eriknv Posted November 10, 2013 Share Posted November 10, 2013 Hello, I have a problem with the shipping value. I am using 2 shipping methods for my webshop: 1. Free Shipping (minimum order value $100,-) 2. Per Category (some categories are $2.95 and some categories are $3.95) When I put 2 products of $60 directly from the product page in my basket there is no problem. The shipping cost is 0.00, that's exactly right. There is only a problem when i first put one product in the basket from $60,- and change the quantity to 2 on the basket page. The shipping cost is still $3,95 where it needs to be 0,00 (subtotal is $120).. This problem only appears on the 'shopping-cart' page before the user is logged in. On the 'index.php?_a=confirm' page everything works fine (When a user is logged in). I am using Cubecart 5.2.2. Can somebody help me with this problem? Thanx in advance. Erik Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 10, 2013 Share Posted November 10, 2013 It may not fix your problem, but I did see mention of a fix in 5.2.3 concerning ghost customers. It might be that you could fix your issue by upgrading to 5.2.4. Do NOT upgrade to 5.2.3, as they almost immediately offered 5.2.4. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 10, 2013 Share Posted November 10, 2013 We can look into that. You may also be interested in suppressing the display of the estimated shipping until CubeCart gets the customer's delivery address. Quote Link to comment Share on other sites More sharing options...
eriknv Posted November 10, 2013 Author Share Posted November 10, 2013 Good suggestion Dirty Butter. Unfortunately, upgrading to the latest version did not solve the problem. Hopefully there is a quick solution for the problem bsmither. Maybe somebody knows a temporary solution. Something hard coded in the cart class like this: if ($this->basket['subtotal'] > 100) { $this->basket['shipping'] = 0; } Thanx in advance. Quote Link to comment Share on other sites More sharing options...
eriknv Posted November 10, 2013 Author Share Posted November 10, 2013 I added this in my cart.class.php file and it looks like it works. if ($this->basket['subtotal'] > 100) { $this->basket['By_Category_Shipping'] = 0; $this->basket['shipping']['offset'] = 1; $this->basket['shipping']['name'] = 'Gratis verzending bij besteding vanaf €100,-'; $this->basket['shipping']['value'] = 0; $this->basket['shipping']['tax_id'] = 0; $this->_shipping = 0; } The code above bellow this line: if (isset($this->basket[$tax_on]['state_id']) && isset($this->basket['shipping'])) { $GLOBALS['tax']->productTax($this->_shipping, $this->basket['shipping']['tax_id'], false, $this->basket[$tax_on]['state_id'], 'shipping'); } Can somebody give some feedback on this? Even if this code is really terrible. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 10, 2013 Share Posted November 10, 2013 Using an installation of CC524 that has a number of fixes applied -- but none related to the problem you are experiencing -- when the quantity is changed in the View Cart (_a=basket) past the point where the cart total reaches above 100, only until then will Free Shipping appear. I've made a trace of the code and, except for a redundant trip through the Per-Category calculator that happens too early, CubeCart behaves fine. I just double-checked on an 'un-fixed' version of CC524, and when changing the quantity of an item so that it goes over the Free Shipping amount, Free Shipping does appear. I wonder if there is a difference in your case because your money expression uses a comma as a decimal point. To test this, please enable debug mode. (admin, Store Settings, Advanced tab, Debug mode: enabled, and also enter your IP address in the field -- you can get your IP address at www.whatismyip.com) At the bottom of the CubeCart pages will be a grey section. In here, you will find what the prices of the shopping basket are. Do they use periods as decimal points, or commas? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 11, 2013 Share Posted November 11, 2013 This isn't a known issue at all. I don't have much in the way of a suggestion without getting my hands dirty debugging the source. Maybe you want to send a tech support ticket? A very common mistake is for currency symbols to be entered into module configuration text fields but I'm just taking a quick stab in the dark. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 11, 2013 Share Posted November 11, 2013 A very common mistake is for currency symbols to be entered into module configuration text fields but I'm just taking a quick stab in the dark. This is the sort of thing that needs to be added to the Admin page as a caution at the point of use. There are probably several common errors you could eliminate by doing that with the next upgrade. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted November 12, 2013 Share Posted November 12, 2013 I agree. Even better will be to automatically strip them out. Quote Link to comment Share on other sites More sharing options...
eriknv Posted November 12, 2013 Author Share Posted November 12, 2013 Thanks for all the comments! [...] I wonder if there is a difference in your case because your money expression uses a comma as a decimal point. To test this, please enable debug mode. (admin, Store Settings, Advanced tab, Debug mode: enabled, and also enter your IP address in the field -- you can get your IP address at www.whatismyip.com) At the bottom of the CubeCart pages will be a grey section. In here, you will find what the prices of the shopping basket are. Do they use periods as decimal points, or commas? This is some debug info: First I added 2 the same products (91,90), after that I updated the products to 3. 'id' => 7930 'quantity' => '3' 'digital' => '0' 'options' => '1' => '29106' 'options_identifier' => 'd41d8cd98f00b204e9800998ecf8427e' 'option_line_price' => 0 'total_price_each' => '45.95' 'description' => ' Blablabla' 'product_code' => '82438916' 'product_weight' => 0 'tax_each' => false 'By_Category_Shipping' => 3.95 'weight' => '0.000' 'discount' => '0.00' 'subtotal' => '137.85' 'total_tax' => '0.00' 'total' => '141.80' As you can see I use decimal points for every value. This is debug when I was logged in and add the same products in 2 times (first 2 and later update to to 3) 'id' => 7930 'quantity' => '3' 'digital' => '0' 'options' => '1' => '29106' 'options_identifier' => 'd41d8cd98f00b204e9800998ecf8427e' 'option_line_price' => 0 'total_price_each' => '45.95' 'description' => ' Blablabla' 'product_code' => '82438916' 'product_weight' => 0 'tax_each' => false 'By_Category_Shipping' => 3.95 'weight' => '0.000' 'discount' => '0.00' 'subtotal' => '137.85' 'total_tax' => '0.00' 'total' => '137.85' 'shipping' => 'offset' => 1 'name' => 'Gratis verzending (Bij besteding vanaf €100)' 'value' => 0 'tax_id' => 0 The bold values (From 'shipping' =>) ​​were missing in the debug before I logged in. Maybe that is causing the problem? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.