Nope, didn't work.
Nope, didn't work.
Make sure you have that on the correct 2 lines:
Seemed to clear things up for me ...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
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!
A ha! That worked! Thank you very much!!
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!
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!
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:
I am assuming that you mean that orders over $50, based on your Table Rate shipping settings go to $0.00 ...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)
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!
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.
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!
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!)
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!
Bookmarks