robbertcognito
Forum Replies Created
-
Hi,
I went on the developing website today, to update the theme and start adding content but there was no update for it? How do I add my own content to the homepage?
Kind regards,
RobbertForum: Plugins
In reply to: [WooCommerce] Get variation stock quantityI think I found the spot where to put it but it outputs nothing. It just gives me an empty div 🙁
Forum: Plugins
In reply to: [WooCommerce] Get variation stock quantity@robbertcognito Try using this:
{{{ data.variation.max_qty}}}
It is set here:
https://github.com/woocommerce/woocommerce/blob/3.4.3/includes/class-wc-product-variable.php#L343Which calls this:
https://github.com/woocommerce/woocommerce/blob/3.4.3/includes/abstracts/abstract-wc-product.php#L1745-L1753As long as there’s a positive amount, you should get the quantity.
I have tried it in different files but am unable to get any value out of it. I checked if the files you mentioned exist and if the code you highlighted were there and it was all there.
Where do you suggest I put this code?
Kind regards,
RobbertForum: Plugins
In reply to: [WooCommerce] Get variation stock quantityHey Jesse!
Sorry for the late response, I only work 3 days a week. I will try your method as soon as I get back to the project 🙂 Ill let you know if it worked!
Kind regards,
RobbertForum: Plugins
In reply to: [WooCommerce] Get variation stock quantityDo you have any recommendations on how to do this? There are so many ways to do it ranging from 2 lines of code to 30 so I do not know what is the best aproach for this.
Kind regards,
Robbert