[Skip to main content](#vessel-content)

#   Include the Hikashop helper.php

##

- **[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")**
- [![ltempest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1784-ltempest "View ltempest's Profile") Topic Author
- [ Offline](/forum/user/1784-ltempest)

Less More

- Posts: 237
- Thank you received: 5
-
-

6 years 4 months ago [\#321729](#321729) by [ltempest](/forum/user/1784-ltempest "View ltempest's Profile")  *[Include the Hikashop helper.php](/forum/27-checkout/900357-include-the-hikashop-helper-php#321729 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19  Hello, My client is currently using a series of MetaMod modules to display various free shipping options dependent on various settings.  I'm updating the site to the latest versions etc and trying to port this older code. However I cannot seem to get the cart values currently for this code to function fully:  My issue appears to be the $cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;with&#95;tax piece. Looking at the older version fo the code it had an include to load a helper.php file from Hikashop. However even when I try this older include code nothing is being displayed.  What is the correct code now to include the helper.php files that would give me the $cart variables?  Thanks")* was created by *[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19

Hello,
My client is currently using a series of MetaMod modules to display various free shipping options dependent on various settings.

I'm updating the site to the latest versions etc and trying to port this older code. However I cannot seem to get the cart values currently for this code to function fully:
Code:

$maxv = 50; $minv = 30; $spendmoretotal = $cart-&gt;total-&gt;prices[0]-&gt;price_value_with_tax; echo $spendmoretotal; if ($spendmoretotal &gt; $minv &amp;&amp; $spendmoretotal &lt; $maxv) { $total2 = $maxv - $spendmoretotal; $formattedNum = number_format($total2, 2); echo '&lt;p style="text-align:left;"&gt;Spend another £'.$formattedNum.' to get free shipping&lt;/p&gt;'; } // BAR $scale = 1.0; // Get Percentage out of 100 $percent = ($spendmoretotal * 100) / $maxv; echo '&lt;div class="percentbar" style="width:'.round(100 * $scale).'%;"&gt;&lt;div style="width:'.round($percent * $scale).'%;"&gt;&lt;/div&gt;&lt;/div&gt;';

My issue appears to be the **$cart-&gt;total-&gt;prices\[0\]-&gt;price\_value\_with\_tax** piece. Looking at the older version fo the code it had an include to load a helper.php file from Hikashop. However even when I try this older include code nothing is being displayed.

What is the correct code now to include the helper.php files that would give me the $cart variables?

Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDM1Ny1pbmNsdWRlLXRoZS1oaWthc2hvcC1oZWxwZXItcGhwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

6 years 4 months ago [\#321746](#321746) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Include the Hikashop helper.php](/forum/27-checkout/900357-include-the-hikashop-helper-php#321746 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19  Hello, My client is currently using a series of MetaMod modules to display various free shipping options dependent on various settings.  I'm updating the site to the latest versions etc and trying to port this older code. However I cannot seem to get the cart values currently for this code to function fully:  My issue appears to be the $cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;with&#95;tax piece. Looking at the older version fo the code it had an include to load a helper.php file from Hikashop. However even when I try this older include code nothing is being displayed.  What is the correct code now to include the helper.php files that would give me the $cart variables?  Thanks")*

Hello,

If what you want is to load the user current cart, the solution can be to use that kind of code : Code:

$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart(true);

Kind regards,
Mohamed.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDM1Ny1pbmNsdWRlLXRoZS1oaWthc2hvcC1oZWxwZXItcGhwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")**
- [![ltempest's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1784-ltempest "View ltempest's Profile") Topic Author
- [ Offline](/forum/user/1784-ltempest)

Less More

- Posts: 237
- Thank you received: 5
-
-

6 years 4 months ago [\#321781](#321781) by [ltempest](/forum/user/1784-ltempest "View ltempest's Profile")  Replied by *[ltempest](/forum/user/1784-ltempest "View ltempest's Profile")* on topic *[Include the Hikashop helper.php](/forum/27-checkout/900357-include-the-hikashop-helper-php#321781 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.19  Hello, My client is currently using a series of MetaMod modules to display various free shipping options dependent on various settings.  I'm updating the site to the latest versions etc and trying to port this older code. However I cannot seem to get the cart values currently for this code to function fully:  My issue appears to be the $cart-&gt;total-&gt;prices&#91;0&#93;-&gt;price&#95;value&#95;with&#95;tax piece. Looking at the older version fo the code it had an include to load a helper.php file from Hikashop. However even when I try this older include code nothing is being displayed.  What is the correct code now to include the helper.php files that would give me the $cart variables?  Thanks")*

Mohamed,
Thats greta, it now works and I get the values and variables I need.

Thanks so much!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwMDM1Ny1pbmNsdWRlLXRoZS1oaWthc2hvcC1oZWxwZXItcGhwP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.044 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
