- Posts: 95
- Thank you received: 1
How to show cart total in a custom module
12 years 7 months ago #143031
by vaclav
How to show cart total in a custom module was created by vaclav
Hello,
what html code should I paste into a custom html module to show the cart total?
Thanks
Vaclav
what html code should I paste into a custom html module to show the cart total?
Thanks
Vaclav
Please Log in or Create an account to join the conversation.
12 years 7 months ago #143060
by nicolas
Replied by nicolas on topic How to show cart total in a custom module
Hi,
You can't do that with a custom HTML module as it would require to process PHP code which a custom HTML module cannot.
You would need something like that instead extensions.joomla.org/extensions/core-en...code-in-content/5051
And use such PHP code:
You can't do that with a custom HTML module as it would require to process PHP code which a custom HTML module cannot.
You would need something like that instead extensions.joomla.org/extensions/core-en...code-in-content/5051
And use such PHP code:
Code:
if(!include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')) return true;
$cartClass = hikashop_get('class.cart');
$currencyClass = hikashop_get('class.currency');
$cart = $cartClass->loadFullCart();
echo $currencyClass->format($cart->full_total->prices[0]->price_value_with_tax,$cart->full_total->prices[0]->price_currency_id);
Please Log in or Create an account to join the conversation.
Time to create page: 0.167 seconds