test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • Ch1vpH Friend
    #1042443

    Hi there,

    Is there a way to make the ‘Head Cart’ Button click through directly to ‘My Cart’ INSTEAD of the off-canvas menu appearing on the left and then having to click ‘show cart’ again to get to the My Cart Page.

    Thanks,

    site is: http://ch1vph.xyz/ri2k

    Saguaros Moderator
    #1042735

    Hi,

    In that ‘head-cart’ position, we use VM Shopping Cart module there – it’s heavy customization on javascript on this module to have feature as demo site so if you want to customize it again, pls edit this file: [root]/templates/ja_brickstore/html/mod_virtuemart_cart/default.php

    Ch1vpH Friend
    #1042779

    Hi there,

    Thanks for letting me know the file….but what should I be looking for, in order to just have the wording ‘My Cart’ click through as a link?

    Thanks.

    Ps: Is there a way just to have the ‘My Cart’ text click through as a menu item (in the Head Cart position) and that way I can create a link the my cart page

    Saguaros Moderator
    #1042983

    You can try this way if you don’t want to customize above file:

    • Copy the core file of this module in this directory: [root]/modules/mod_virtuemart_cart/tmpl/default.php
    • Paste into this folder: [root]/templates/ja_brickstore/html/mod_virtuemart_cart/ and rename it to another name instead of ‘default.php’. For example: name it ‘defaule-copy.php’
    • Go to backend settings of this VM Shopping Cart module > Advanced tab and select ‘default-copy’ as alternative layout for this module (it will load the new file you added)

    On frontend you will see it load various elements of this module, you can edit ‘default-copy.php’ file above to show what you wish but keep the link of show your shopping cart (this module has this link already, you don’t need to add).

    Hope this helps.

    Ch1vpH Friend
    #1043317

    Hi there,

    So I’m nearly there…I basically used a mix of your two methods above & in the end I took the /modules/mod_virtuemart_cart/tmpl/default.php and put it into directly into the original brickstore template default.php (minus the ‘off canvas’ cart effect) this way I was able to keep the module ‘button’ looking the same as it was – see attached image

    I’m now at the stage where I need some help to find a way to either add a direct http link to the ‘Cart Button’ so it will go directly to the ‘My Cart Page’ or I need a way to add the code I have copied (below) from the module default.php to into the currently live .php file

    Because if I add the following code, a separate working ‘Show Cart’ link appears (although not in the correct position or css as the original cart module ) see 2nd image

    <div class="show_cart">
        <?php if ($data->totalProduct) echo  $data->cart_show; ?>
    </div>
    • This reply was modified 7 years, 6 months ago by  Ch1vpH.

    1. clickable-cart-button
    2. out-of-place-cart
    Saguaros Moderator
    #1043393

    This shopping cart module helps to show the quick view of added items in cart: number of item, price, total price, etc… normally, when clicking the cart icon it will show these info in dropdown or in this template specific, it shows in off-canvas panel.

    So if you want to use this module, you have to customize much as I mentioned above: PHP code and style for it.

    Another option is you create another custom module and add to current position. Inside this module, you manually add link to shopping cart, this link is from the Shopping Cart menu item on your site.

    Ch1vpH Friend
    #1043579

    If anyone else wants to have the Cart click straight to the basket page with having to go through the offcanvas side bar see below:

    Just copy the code from: mod_virtuemart_cart/tmpl/default.php & paste it into the: ja_brickstore/html/mod_virtuemart_cart.default.php

    Then remove all the off canvas code & the off canvas references in the ‘button’ class at the top of page and add a http link<a href="yourbasket">and close off the code withbasically copy as below and paste under

    <button class="btn-cart"><a href="http://yourbasket-link">
      <i class="ion-android-cart"></i>
      <span><?php echo JText::_( 'TPL_MYCART' ); ?></span>
      <sup class="total-product"><?php echo $data->totalProduct ?></sup>
      <span class="total"> / 
        <?php if ($data->totalProduct and $show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) {
          echo $data->billTotal;
         } else {
          echo '0.00';
         } ?>
      </span>
    </a>
    </button>
    • This reply was modified 7 years, 6 months ago by  Ch1vpH.
    • This reply was modified 7 years, 6 months ago by  Ch1vpH.
    Saguaros Moderator
    #1043709

    Is that ok now?

    Ch1vpH Friend
    #1047407

    Yes thanks just glad I left this post as I had to re-do this process after upgrading!!

    Just to go over what I mentioned above if anyone else wants to bypass the off canvas checkout route just copy the code below into the file: ja_brickstore/html/mod_virtuemart_cart.default.php

    <?php // no direct access
    defined('_JEXEC') or die('Restricted access');
    
    //dump ($cart,'mod cart');
    // Ajax is displayed in vm_cart_products
    // ALL THE DISPLAY IS Done by Ajax using "hiddencontainer" ?>
    
    <!-- Virtuemart 2 Ajax Card -->
    
    <button class="btn-cart"><a href="https://YOURSITE.COM/basket-link">
      <i class="ion-android-cart"></i>
      <span><?php echo JText::_( 'TPL_MYCART' ); ?></span>
      <sup class="total-product"><?php echo $data->totalProduct ?></sup>
      <span class="total"> / 
        <?php if ($data->totalProduct and $show_price and $currencyDisplay->_priceConfig['salesPrice'][0]) {
          echo $data->billTotal;
         } else {
          echo '0.00';
         } ?>
      </span>
    </a>
    </button> 
    • This reply was modified 7 years, 5 months ago by  Ch1vpH.
Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 8 replies, has 2 voices, and was last updated by  Ch1vpH 7 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum