Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Update Price Automatically After Selecting Product Attribute


ai12

Recommended Posts

Hi All,

 

Im looking to find a module that will automatically update the product price displayed on product_info.php when a product attribute is selected. E.g. product is £100, for the large version its an extra £50 so when the customer selects the large drop down, the price changes to £150. I have tried a number of addons on the oscommerce site however none of them seem to work.

 

Has anyone got the above working on their own oscommerce store? If so which addon did you use?

 

Thanks,

 

Chris

Link to comment
Share on other sites

  • Replies 54
  • Created
  • Last Reply
Posted · Hidden by burt, May 14, 2013 - commercial
Hidden by burt, May 14, 2013 - commercial

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment

Hi

 

I did once use the code shown here: http://www.oscommerce.com/forums/topic/371585-calculate-selected-attributes-price-in-product-info-to-show-total-price/ on a 2.2 version of osC - however on 2.3 with jQuery it should be possible to smarten it up a bit

 

There were some problems with the javascript on that link (which for the life of me I cannot recall) but if you use Firebug or whatever it wil throw up the errors

Link to comment
Share on other sites

@@PupStar I have tried that one on a fresh install of osc 2.3.3 and it didn't do a thing.

 

@@burt that would be awesome if you do! Missing Small features like this are making osc fall behind the competition.

 

Didn't get chance to try bobs suggestion but will give it a go tomorrow.

Link to comment
Share on other sites

I have a customized example of this here

 

http://canadacopy.com/oscommerce/product_info.php/85-11-colour-copies-p-1479

 

Both, quantity and price calculations, are in real time

 

Quantity is a result of multiplication of 2 first fields (number of copies x number of pages)

 

Prices get calculated based on

- quantity according to price break table

- options selected. There are some options that are calculated by unit [(quantity + options) x price] and some others just once per item [(quantity x price) + options]

 

Additional detail: add to cart button is disabled until a quantity is set

 

I hope to find time to post how it is done

Link to comment
Share on other sites

George,

 

there is an addon 8278/v,23. It works good, but

in different currencies, it doesn't make a different between plus and minus attributes values, that means it calculate everything in plus.

I contacted the guy, but without success.

 

I saw in your example, that you show one currency with plus attributtes values.

Will this issue solved with your new contri?

 

Regards

Nico

Link to comment
Share on other sites

@@Nico01

 

The addon you found is trying to do some calculation in js and is modifying quite a lot of files, I never used it and I don't know what issues it has of course

 

My approach does all calculations in php in a similar manner as the default script's way, so it work for all currencies and all +/- etc

 

On top it modify just a single file by adding a small bit of code

 

I updated the example store to use 2 currencies (USD and Euro, Euro is set to be 1,5 of USD for simplicity) and I set the option "version" to have a - value available, you can check

Link to comment
Share on other sites

@@ai12

 

The modification does not depend on currencies, tax rates etc. It calculates the price in a similar way like the default system does.

 

If you have GPB installed in the store, then it will use that.

Link to comment
Share on other sites

They really should bundle a feature like this in the next version of osc

 

Who is "they" ?

 

if there ever is one that is.....

 

All the hard work going on counts for nothing ? :(

Link to comment
Share on other sites

Who is "they" ?

It's the ominous "they". Such as "They are out to get you."

 

All the hard work going on counts for nothing ? :(

Apparently not. Time to admit defeat, hang up the coding gloves and move on?

 

(I hope not.)

 

Price update looking good from both of you, though. I've been looking for something that will work properly for a while. I've tried several, only one of which half worked, and which changed the draw dropdown function to work. Other things that used the function didn't like that. That's obvious in retrospect, I suppose.

Not enough time in the day. Need a time machine...

 

Would build one, but not enough time. Ironically.

Link to comment
Share on other sites

I need a couple of testers to take a look at my test site, to give my version a go and report back any problems (regular shopowners are better at breaking things than coders). If you can spare a couple of minutes to do some testing, please message me.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...