Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need some input


Jack_mcs

Recommended Posts

I am trying to add an option to the attributes section that will allow the price to be changed by a percentage. I have the code working as far the attributes are concerned. But when I click add to cart, the price in checkout confirmation is wrong.

 

I set up a product that costs $40. No tax or any other charges are applied to it. I have the attributes set up to deduct 10,20,30 and 40%. If I select the 10% attribute, the price on the shopping cart page shows $4, which is correct. But if I add it to the cart, the price is $32.80. I have no idea where that price is coming from. The attribute is having an effect on the total. Here is a list of all four. Maybe someone can see a pattern:

Attribute     Final price
10 %            32.80
20 %            33.60
30 %            34.40
40 %            35.20

Can anyone offer a suggestion as to where to look for this problem? I've been all over the code and can't find it. I'm hoping some fresh thoughts on the problem might help me see what I am missing. Any thoughts?

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks for the link. It's not a tax problem thoguh, at least as far as I can tell. I have all tax options disabled and there aren't any tax classes declared.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack

 

If I select the 10% attribute, the price on the shopping cart page shows $4, which is correct. But if I add it to the cart, the price is $32.80.
Is that the product info page where the $4 is showing??? then $32.80 in the cart?

 

 

The figures actually work out if you play around with the percentage calculations. It's as if it's deducting one percentage correctly then adding another on top.

eg:

 

$40 less 20% = $32

then $32 + 10% = $35.20 which is whats showing for your 40%

 

$40 less 30% = $28

then $28 + 20% = $33.60 which is your 20% price

 

This must be a calculation performed somewhere thats mixed up. Thats all i can suggest. I hope this helps anyway.

 

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

yes I know I meant it could help you for the attribute percentages. Same files same place in the files you will have to modify.

Oh, I see. As far as I know, I have that part working OK.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack

 

Is that the product info page where the $4 is showing??? then $32.80 in the cart?

The figures actually work out if you play around with the percentage calculations. It's as if it's deducting one percentage correctly then adding another on top.

eg:

 

$40  less 20%  = $32

then $32  + 10% = $35.20 which is whats showing for your 40%

 

$40 less 30% = $28

then $28 + 20% = $33.60 which is your 20% price

 

This must be a calculation performed somewhere thats mixed up. Thats all i can suggest. I hope this helps anyway.

 

Julian

Hmm, interesting. I figured there was a pattern there but couldn't see it. Thanks for finding that.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...