Skip to main content

Minimum $ spend before checkout is allowed

More
10 years 9 months ago #223690 by dda
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.2.4
-- PHP version -- : 5.4.12

I need to create a mechanism that compares a users cart total to a specific amount. If their total is less than the specific amount links checkout are disabled and a redirect is triggered if they try to got to the checkout manually.

I am struggling to figure out/find what variable holds the cart total. An help as to what it is would be appreciated.

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

More
10 years 9 months ago #223719 by nicolas
Hi,

You can do it like that:
Code:
$cartClass = hikashop_get('class.cart'); $cart = $cartClass->loadFullCart(); echo $cart->full_total->prices[0]->price_value_with_tax;
The following user(s) said Thank You: dda

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

More
10 years 9 months ago #223841 by dda
Thats what I need thanks.

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

Time to create page: 0.178 seconds
Powered by Kunena Forum