Skip to main content

Integration of the stock inside a page builder

More
3 years 10 months ago #346693 by ButterflyPixel
Hi,
we created some pages with SP Page Builder , we use them to describe the product we sell.
We would like to show inside each page the stock available.
Is there a way to integrate the stock inside a module or directly in raw code ?
Thanks !

Please Log in or Create an account to join the conversation.

More
3 years 10 months ago #346698 by nicolas
Hi,

If you're able to add raw PHP code in there, then you can use this:
Code:
<?php if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){ return false; } $productClass = hikashop_get('class.product'); $product = $productClass->get(XX); echo $product->product_quantity; ?>
where XX is the id of the product.
Basically, I'm using here a code sample from there: www.hikashop.com/support/documentation/6...umentation.html#code

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum