Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • reders Friend
    #150336

    Please help,
    We are using this template and have set Virtuemart to be the homepage of the website so that the categories show on the home page.

    The problem we are having is when a user clicks on any products or categories, the modules in the ‘mass-top’ position are still showing when you get to the main products details page.

    We want the modules to disappear.

    We have only select the homepage for the modules to appear on in the modules admin settings, but they still appear on all pages.

    You can view our test site at:
    http://www.s285981493.websitehome.co.uk/Proofs/smak.co.uk/

    Please tell us how to stop this?

    Regards,
    Reders

    Saguaros Moderator
    #340310

    Dear reders!

    Please check the links of categories and products, they have not the ItemId parameter. The ItemId is the id of menu item. The Joomla ‘ll display modules following menu item, meaning follow the value of menu ID. If the link has not the ItemId parameter, so the joomla ‘ll understand that you are staying at the “Home Page” menu ( as default menu). To fix this issue , Please kindly create the “Shop” menu having the menu type to be the “Vitual mark” Component

    Good luck

    reders Friend
    #340333

    Hi There,
    Thanks for the help, but this has not worked.
    I have had this problem before. We want to have Virtuemart as the home page and not create a button called shop.

    We have also created a button called shop, but we still have the issue.

    Please help.
    Regards,
    Reders

    Saguaros Moderator
    #340358

    Dear reders!

    Can you please give me the administrator account via PM, i would like to check this issue in detail

    Thanks

    reders Friend
    #340477

    Hi all,
    We have managed to sort this issue.
    If you set Virtuemart as your Default Hompage, Joomla automatically assigns the same item id to all the product categories on your website, so the modules do not know which page to show or not.

    The hack we found arround this is to open the file:
    administrator/components/com_virtuemart/classes/ps_session.php

    Around line 548 you need to change:
    $Itemid = “&Itemid=” . ($tmp_Itemid ? $tmp_Itemid : $this->getShopItemid());

    to

    $Itemid = “&Itemid=2” . ($tmp_Itemid ? $tmp_Itemid : $this->getShopItemid());

    Basically all we have done is put the number 2 into the itme id, this way it tricks Joomla into thinking it is a different item.

    Regards,
    Reders

    reders Friend
    #349675

    Hi Tien,
    I have just sent you through a PM with all the details.
    Regards,
    Sean R.

    reders Friend
    #350046

    Hi Tien,
    Please can you give me some help on this?
    Regards,
    Reders

    Saguaros Moderator
    #350291

    Dear Reders!

    I think that you controlled this issue, because everything working well with the home menu and products category links

    Thanks

    reders Friend
    #350321

    Hi Tien,
    Yes I have managed to control the modules when a user navigates the categories on the site, BUT
    when you add products to the shopping basket and you view your cart and start going through the checkout process, the modules re-appear.
    Please see the attached pic.


    1. Picture1
    Saguaros Moderator
    #350525

    Because the CheckOut Page, Cart page…. they are parts of the component which having one ItemId Value, so that you could not enable or disable anymodules on some pages of the virtuemart component,

    You must to fix code: check and only displays the Joomla Tag (which includes modules ) if current page is not checkout page.

    For example:
    [PHP]
    <?php if( JRequest::getVar(‘page’) != ‘shop.checkout’ ) : ?>
    <jdoc:include type=”modules” name=”my-module” style=”JAxhtml” />
    <?php endif; ?>
    [/PHP]

    GOodluck

    reders Friend
    #350748

    Hi Tien,
    I have tried putting the following code into the file :
    /templates/ja_mesolite_ii/layouts/blocks/main.php

    <?php
    $mass_top = $this->getPositionName ('content-mass-top');
    if($this->countModules($mass_top)) ; if( JRequest::getVar('page') != 'shop.checkout' ) : ?>
    <div class="ja-mass ja-mass-top clearfix">
    <jdoc:include type="modules" name="mass-top" style="JAxhtml" />
    </div>
    <?php endif; ?>

    And it does not work?
    Do you know if I am doing this correctly?

    Regards,
    Sean R.

    Anonymous Moderator
    #350866

    Hello Sean R,

    Please retry using the following code

    <blockquote><?php
    $mass_top = $this->getPositionName (‘content-mass-top’);
    if( $this->countModules($mass_top) && JRequest::getVar(‘page’) != ‘shop.checkout’ ) : ?>
    <div class=”ja-mass ja-mass-top clearfix”>
    <jdoc:include type=”modules” name=”mass-top” style=”JAxhtml” />
    </div>
    <?php endif; ?></blockquote>

    reders Friend
    #351038

    Hi Support Team,
    This does not work, I have added the code the the main.php and it still shows the modules on the checkout.
    Regards,
    Sean R.

    Saguaros Moderator
    #351633

    Hello Sean!

    Sorry for my mistaken on my solution

    and here is right solution:

    [PHP]
    <?php
    $mass_top = $this->getPositionName (‘content-mass-top’);
    if($this->countModules($mass_top)) ; if( JRequest::getVar(‘page’) != ‘checkout.index’ ) : ?>
    <div class=”ja-mass ja-mass-top clearfix”>
    <jdoc:include type=”modules” name=”mass-top” style=”JAxhtml” />
    </div>
    <?php endif; ?>
    [/PHP]

    Goodluck

Viewing 14 posts - 1 through 14 (of 14 total)

This topic contains 14 replies, has 3 voices, and was last updated by  Saguaros 13 years, 9 months ago.

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