VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: El_Loboo on December 04, 2012, 16:56:17 PM

Title: Upgrading stock in depending on the size
Post by: El_Loboo on December 04, 2012, 16:56:17 PM
Hi all.

I've created a product with various sizes. These sizes are child products of the parent product and i've configurated the amount of stock for each size. So far so good.

I've programming default.php in productdetails to show the amount of stock available. I would like when a customer chooses a size refresh the amount of stock available using Ajax (the same operation when refresh the price). I'm assign a class for stock "stock-disponible". I'm suppose i must reprogramming some javascript file but i don't know what i must modify.

I hope someone can help me.

Thank you.



[attachment cleanup by admin]
Title: Re: Upgrading stock in depending on the size
Post by: bytelord on December 04, 2012, 18:54:25 PM
Hello,

If i am not mistaken this feature has been scheduled on the next release of vm2.0 (2.0.16).

Regards
Title: Re: Upgrading stock in depending on the size
Post by: El_Loboo on December 04, 2012, 20:00:58 PM
Quote from: bytelord on December 04, 2012, 18:54:25 PM
Hello,

If i am not mistaken this feature has been scheduled on the next release of vm2.0 (2.0.16).

Regards

Hi bytelord.

It's a great news but recently has been published the last version 2.0.14, when will the new version?

Until the new version be published, i would like refresh amount of stock using Ajax and i think i've located the js file necesary to do this in components\com_virtuemart\assets\js\vmprices.js, but i don't know much about javascript.

Could anyone help me with this?

Thank you for the information bytelord, i appreciate it.

Cheers.
Title: Re: Upgrading stock in depending on the size
Post by: bytelord on December 05, 2012, 07:50:02 AM
Hello,

When choosing child products all the page is been refreshed, so you will need to "refresh the page" using ajax. I haven't accomplished something similar and i don't have a solution at the moment.
Something similar was over here: https://forum.virtuemart.net/index.php?topic=109103.0
http://forum.virtuemart.net/index.php?topic=102830.0

Never test those examples/solutions. If not mistaken i think that future will be implemented in 2.0.16 (not sure), then it should be in about 10 days

Regards