Skip to main content

Integration of the stock inside a page builder

4 years 1 week 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.

4 years 1 week 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.

2 weeks 3 days ago #100000691 by nicolas
Hi,

For anyone reading this: this can now be done without code with the free HikaShop for SP Page Builder plugin.

You can choose an SP Page Builder page as the layout of your HikaShop product pages and design it with HikaShop add-ons: title, images, price, add to cart (with the stock, as on HikaShop's own product page), description, variants, custom fields and the other parts of the product page, each placed where you want it. The page is shown for every product, with that product's own data.

Other add-ons list products, chosen by hand or from a category, on any SP Page Builder page.

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

Time to create page: 0.049 seconds
Powered by Kunena Forum