Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20
  1. #11
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Re: Products priced by attribute calculates wrong shipping

    Nope, didn't work.

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Products priced by attribute calculates wrong shipping

    Make sure you have that on the correct 2 lines:
    PHP Code:
              // bottom total
              //            if ($attribute_price->fields['product_attribute_is_free']) {
              
    if ($attribute_price->fields['product_attribute_is_free'] == '1' and zen_get_products_price_is_free((int)$prid)) {
                
    // no charge for attribute
              
    } else {
                
    // + or blank adds
                
    if ($attribute_price->fields['price_prefix'] == '-') {
    // appears to confuse products priced by attributes
                    
    if ($product->fields['product_is_always_free_shipping'] == '1' or $product->fields['products_virtual'] == '1') {
                      
    $shipping_attributes_price zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
                      
    $this->free_shipping_price -= $qty zen_add_tax( ($shipping_attributes_price), $products_tax);
                    }
                  if (
    $attribute_price->fields['attributes_discounted'] == '1') {
                    
    // calculate proper discount for attributes
                    
    $new_attributes_price zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
                    
    $this->total -= $qty zen_add_tax( ($new_attributes_price), $products_tax);
                  } else {
                    
    $this->total -= $qty zen_add_tax($attribute_price->fields['options_values_price'], $products_tax);
                  }
                } else {
    // appears to confuse products priced by attributes
                    
    if ($product->fields['product_is_always_free_shipping'] == '1' or $product->fields['products_virtual'] == '1') {
                      
    $shipping_attributes_price zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
                      
    $this->free_shipping_price += $qty zen_add_tax( ($shipping_attributes_price), $products_tax);
                    }
                  if (
    $attribute_price->fields['attributes_discounted'] == '1') {
                    
    // calculate proper discount for attributes
                    
    $new_attributes_price zen_get_discount_calc($product->fields['products_id'], $attribute_price->fields['products_attributes_id'], $attribute_price->fields['options_values_price'], $qty);
                    
    $this->total += $qty zen_add_tax( ($new_attributes_price), $products_tax);
                  } else {
                    
    $this->total += $qty zen_add_tax($attribute_price->fields['options_values_price'], $products_tax);
                  }
                } 
    // eof: attribute price 
    Seemed to clear things up for me ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #13
    Join Date
    Dec 2006
    Location
    Ohio
    Posts
    198
    Plugin Contributions
    0

    Default Re: Products priced by attribute calculates wrong shipping

    A ha! That worked! Thank you very much!!

  4. #14
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Products priced by attribute calculates wrong shipping

    Know how I knew you had a typo?

    I did the exact same typo when I retested the code for that last fix ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #15
    Join Date
    Jun 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Products priced by attribute calculates wrong shipping

    Hello Ajeh,

    I'm having an issue very similar to KTNaturals, so I'll post to this thread since it has a history.

    I'm running a cart at http://www.birdwatchersdigest.com/shop/. As with KTNaturals, we have collectors prints set up for free shipping (and the prints have attributes, each of which increases the price). Naturally we want the product to have free shipping regardless of what attribute is selected. What I've noticed is this - if I select any print and attribute AND the print is the only thing in my cart, then the shipping is always free, which is what I want. But - if I put another product in the cart, for example anything from Birding Gear, then shipping appears to increase as if the extra price of the print's attribute is included in the shipping calculation. Here's an example:

    Say I have collectors prints > Shorebirds > Fog is rising, selected double-matted for a total of $75. Go to checkout, and the shipping charges are $0 as they should be. Now add gear > binocular harness for $19.99, and look at checkout again. According to our table rate, the shipping should be $7.95, and it is being calculated at $10.95.

    Like KTNaturals, I have shipping set up with a table rate that's based on price. In addition we also have a cutoff of free shipping at $50 (though my sense is that, if one of your purchases has free shipping, then you need $50 of non-free-shipping products for that to kick in). Our table rate is set up as follows:

    15:5.95,30:7.95,50:10.95,5000:0

    Note - we're running the latest version of ZenCart (v1.3.7), and I updated it just within the past few months - I noticed that the changes you suggested to KTNaturals appeared to already be there.

    Can you confirm my suspicion that this issue might still exist? Either that, or can you walk me through the settings that might be resulting in this problem? Any assistance would be appreciated!

    In advance, thanks!

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Products priced by attribute calculates wrong shipping

    If I understand your products right ... I have not re-produced this in the upcoming v1.3.8 ...

    I have to find a clean v1.3.7 to test your's ...

    But I am a bit confused on your cut off statement:
    In addition we also have a cutoff of free shipping at $50 (though my sense is that, if one of your purchases has free shipping, then you need $50 of non-free-shipping products for that to kick in)
    I am assuming that you mean that orders over $50, based on your Table Rate shipping settings go to $0.00 ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #17
    Join Date
    Jun 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Products priced by attribute calculates wrong shipping

    Thanks for your quick attention! I *think* we're saying the same thing about the free shipping - in the example I posed, if you have a print for $75 and a second item for $19.99, the suborder total would be $94.99. But, that print for $75 is marked as free shipping, so that doesn't count toward the $50 total that you must have (or so that's my understanding - please don't hesitate to correct me if I'm wrong).

    But that aside, my main mystery at the moment is why the print appears to be influencing the shipping calculation at all, when combined with two or more items. If the binocular harness is in the cart alone, its shipping is $7.95. If you have the print alone in the cart, its shipping is $0. I don't understand why, when you have them in the cart together, the shipping on the total order goes to $10.95. It seems as if the programming is looking at the $19.99 from the binocular harness, the extra $25 associated with the print attribute, and then calculating the shipping based on $44.99, which would place the shipping to $10.95 as listed in the table.

    If you're interested in further information about my setup, please let me know; I'll be happy to provide anything that will help solve the mystery.

  8. #18
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Products priced by attribute calculates wrong shipping

    I believe mine is working fine ... for v1.3.8

    Your's however could be this fix that I posted or I have to take another look at v1.3.7 and see which version we added that fix to as it escapes me at the moment and I have not looked this up yet ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #19
    Join Date
    Jun 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Products priced by attribute calculates wrong shipping

    Hi Ajeh,

    Originally I thought your changes were already in the 1.3.7 distribution (must not have been looking at the code close enough), though it looks like you were right - your change had not been applied in that version. Once I copy-pasted your code it looks like that end up solving the bug (my apologies for the alarm - looks like this was an easy one for you!)

  10. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Products priced by attribute calculates wrong shipping

    Sure ... umm ... yeah ... easy ...

    Only went slightly blind finding it ... but sure am glad it is fixed for the up coming release ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v138a Sales tax Calculates after Shipping, this is wrong. Need it to cal on Subtotal Help!
    By friar778 in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 2
    Last Post: 1 May 2013, 10:12 PM
  2. Using weight for shipping amounts - calculates wrong shipping when out of stock
    By trev-h in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 14 Apr 2009, 09:57 PM
  3. Replies: 0
    Last Post: 18 Jan 2009, 07:13 AM
  4. Adding gift certificates calculates wrong shipping
    By KTNaturals in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 17
    Last Post: 14 May 2007, 10:32 PM
  5. Specials on products priced by attribute
    By joe90 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 14 Dec 2006, 12:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR