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

#   Hikashop cart integration with T3/bootstrap

##

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

Less More

- Posts: 22
- Thank you received: 0
-
-

11 years 1 month ago [\#218608](#218608) by [Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")  *[Hikashop cart integration with T3/bootstrap](/forum/30-integrations/880104-hikashop-cart-integration-with-t3-bootstrap#218608 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.0 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome  Hi there,  Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.  I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.  If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.  Many thanks, Oli")* was created by *[Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.0
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome

Hi there,

Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.

I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.

If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.

Many thanks, Oli

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 1 month ago [\#218617](#218617) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop cart integration with T3/bootstrap](/forum/30-integrations/880104-hikashop-cart-integration-with-t3-bootstrap#218617 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.0 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome  Hi there,  Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.  I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.  If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.  Many thanks, Oli")*

Hi,

Not sure but I think that the sidebar open and close is done via Javascript.
So some javascript code could be added to the page in order to open the sidebar (so see with the template provider how to do that) when the "add to cart" button is pressed.

With jQuery that could be something like that: Code:

jQuery('.hikashop_cart_button').click(function(){ // open the canvas sidebar });

This code is very generic and will be call every time the customer click on an add to cart button.
That can be more specific by calling a JS function in a plugin based on the function "onBeforeCartUpdate()".

This require Javascript knowledges and in the second case PHP too.
Here is the developer documentation for the plugin part:
[ www.hikashop.com/support/support/documen...r-documentation.html](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html)

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

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

Less More

- Posts: 22
- Thank you received: 0
-
-

11 years 4 weeks ago [\#218720](#218720) by [Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")  Replied by *[Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")* on topic *[Hikashop cart integration with T3/bootstrap](/forum/30-integrations/880104-hikashop-cart-integration-with-t3-bootstrap#218720 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.0 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome  Hi there,  Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.  I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.  If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.  Many thanks, Oli")*

Hi Xavier,

Thanks for that, I cannot seem to find the onBeforeCartUpdate() function in any of the hikashop files, it is called in \administrator\components\com_hikashop\helpers\cart.php, but i cannot find the actual function.

I would have thought it would be located near onAfterCartUpdate() in hikashopuser.php but it doesnt seem to be there.

Thanks, Oli

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 weeks ago [\#218721](#218721) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hikashop cart integration with T3/bootstrap](/forum/30-integrations/880104-hikashop-cart-integration-with-t3-bootstrap#218721 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.0 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome  Hi there,  Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.  I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.  If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.  Many thanks, Oli")*

Hi,

The best will be to create a new plugin and use this function in the plugin directly.

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

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

Less More

- Posts: 22
- Thank you received: 0
-
-

11 years 4 weeks ago [\#218866](#218866) by [Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")  Replied by *[Kingwell](/forum/user/38001-kingwell "View Kingwell's Profile")* on topic *[Hikashop cart integration with T3/bootstrap](/forum/30-integrations/880104-hikashop-cart-integration-with-t3-bootstrap#218866 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.0 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Chrome  Hi there,  Apologies if something similar to this has been posted before, i've searched around but cant seem to find an answer.  I'm trying to use the t3/bootstrap off canvas sidebar to display the mini cart, which is working correctly, but i would like to have the sidebar open when something is added to the cart, rather than the hikashop popup.  If anyone could point me in the right direction, or even point out what files i should be looking at to trigger the offcanvas sidebar that would be great.  Many thanks, Oli")*

Hi Xavier,

Thanks for your help with this, its most appreciated.

In the end i solved the problem by placing the following code in to the off canvas loader.
By using 2 Attributes i was able to display the cart only when the actual "add to cart" button is pressed, ignoring the proceed to checkout buttons etc.
Code:

$document = JFactory::getDocument(); $document-&gt;addScriptDeclaration(' jQuery(document).ready(function(){ jQuery("[class*=hikashop_cart_input_button][name=add]").click(function(){ jQuery("[class*=off-canvas-toggle]").trigger("tap"); }); }); ');

Cheers, Oli

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODAxMDQtaGlrYXNob3AtY2FydC1pbnRlZ3JhdGlvbi13aXRoLXQzLWJvb3RzdHJhcD90bXBsPW1hcmtkb3du) 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.063 seconds

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