When using so_taxes with payment module, the order total preview keeps refreshing on checkout page.

You can bypass this setting by unchecking the order total preview box under the "Payment Settings" section.

Store Administration > Configuration > Checkout settings > Edit > Checkout panes

(admin/store/settings/checkout/edit/panes)

CommentFileSizeAuthor
#6 order_total_preview_recursion-6.x-1.4.patch754 bytesrfreij

Comments

webkenny’s picture

Component: User interface » Code

We have identified a possible cause of this issue. It appears that when the Delivery Information for an order is left blank, i.e. on the first pass of the checkout form, this endless loop continues. Still investigating possible solutions. Below is a dump of the POST variable being sent that continues to cause the loop:

O:8:"stdClass":21:{s:8:"products";a:2:{i:0;O:8:"stdClass":13:{s:12:"cart_item_id";s:2:"68";s:7:"cart_id";s:1:"1";s:3:"nid";s:1:"3";s:3:"qty";s:1:"1";s:7:"changed";s:10:"1260762035";s:4:"data";a:3:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"1";s:6:"module";s:10:"uc_product";}s:5:"title";s:28:"Wildlife Monographs: Puffins";s:3:"vid";s:2:"45";s:4:"cost";d:0;s:5:"price";d:24.949999999999999289457264239899814128875732421875;s:6:"weight";i:0;s:6:"module";s:10:"uc_product";s:5:"model";s:3:"303";}i:1;O:8:"stdClass":13:s:12:"cart_item_id";s:2:"69";s:7:"cart_id";s:1:"1";s:3:"nid";s:1:"9";s:3:"qty";s:1:"1";s:7:"changed";s:10:"1260762035";s:4:"data";a:3:{s:10:"attributes";a:0:{}s:9:"shippable";s:1:"1";s:6:"module";s:10:"uc_product";}s:5:"title";s:18:"Backyard Birdwatch";s:3:"vid";s:1:"9";s:4:"cost";d:0;s:5:"price";d:9.949999999999999289457264239899814128875732421875;s:6:"weight";i:0;s:6:"module";s:10:"uc_product";s:5:"model";s:3:"428";}}s:8:"order_id";i:0;s:3:"uid";i:0;s:13:"primary_email";s:20:"adeutsch@audubon.org";s:19:"delivery_first_name";s:5:"Kenny";s:18:"delivery_last_name";s:9:"Silanskas";s:16:"delivery_street1";s:13:"255 Paris St.";s:16:"delivery_street2";s:0:"";s:13:"delivery_city";s:0:"";s:13:"delivery_zone";i:0;s:20:"delivery_postal_code";s:0:"";s:16:"delivery_country";i:840;s:18:"billing_first_name";s:5:"Kenny";s:17:"billing_last_name";s:9:"Silanskas";s:15:"billing_street1";s:0:"";s:15:"billing_street2";s:0:"";s:12:"billing_city";s:0:"";s:12:"billing_zone";i:0;s:19:"billing_postal_code";s:0:"";s:15:"billing_country";i:840;s:10:"line_items";a:2:{i:0;a:5 {s:5:"title";s:8:"Subtotal";s:4:"type";s:8:"subtotal";s:6:"amount";d:34.9;s:6:"weight";d:-10;s:6:"summed";i:1;}i:1;a:5:{s:5:"title";s:5:"Taxes";s:4:"type";s:12:"tax_so-taxes";s:6:"amount";d:0;s:6:"weight";d:NaN;s:6:"summed";i:1;}}}

As you can see, the delivery_zone and other delivery variables are empty and no billing has been entered either. There are no checks in the module to ensure that something exists before continuing. Basically it just checks to see if billing is present and if not, it puts the delivery address in its place. If both do not exist, then there is an endless loop created somehow.

Some more information of interest. The post to calculate occurs twice as indicated by the screen shot (http://skitch.com/kennysilanskas/nmxbc/so-firebugview) - The first call returns the proper information, the second returns an empty set. And then the loop continues on executing 4 calls at a time, populated and empty respectively.

Service Objects’s picture

Status: Active » Postponed

For now, it looks like the solution is to deactivate the preview pane. I'll look into fixing this more elegantly in the module code but for now I'm postponing the issue until after the upcoming 1.4 release.

Service Objects’s picture

Assigned: Unassigned » Service Objects
Docc’s picture

subscribe

mwisner’s picture

subscribe

rfreij’s picture

Status: Postponed » Needs review
StatusFileSize
new754 bytes

Here is a working patch that solves this issue....

webkenny’s picture

This patch looks good to me. It does the necessary check before applying the update. Thanks Ramsey!

jlockhart’s picture

subscribe

Service Objects’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.