Integration of the stock inside a page builder

  • Posts: 143
  • Thank you received: 9
  • Hikashop Multisite
1 year 5 months ago #346693

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.

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
1 year 5 months ago #346698

Hi,

If you're able to add raw PHP code in there, then you can use this:

<?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.055 seconds
Powered by Kunena Forum