News:

Support the VirtueMart project and become a member

Main Menu

Upgrading stock in depending on the size

Started by El_Loboo, December 04, 2012, 16:56:17 PM

Previous topic - Next topic

El_Loboo

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]

bytelord

Hello,

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

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

El_Loboo

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.

bytelord

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
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!