Giter VIP home page Giter VIP logo

Comments (13)

Vinai avatar Vinai commented on June 3, 2024

Hi Karen,

can you please provide module and Magento Versions, and also the system configuration values for the groupscatalog2 extension?
I'd like to help but need the info so I can try to reproduce the error.

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

Hi Vinai,

Thanks for the swift response. I'm using Magento 1.6.2 and GroupsCatalog2 0.1.4 (beta). Settings for the extension as follows:

Enable Module : Enable
Product Mode : Show products by default
Hide Products from : [NONE]
Category Mode : Show categories by default
Hide categories from : [NONE]
How to handle guest accessing a hidden enitty : 404 page
How to handle logged in customers accessing a hidden entity : 404 page
Display a message when a hidden entity is accessed : No
Auto refresh category cache : Yes

I'm using HelloWired as my template. Any idea what it could be?

Karen

from groupscatalog2.

Vinai avatar Vinai commented on June 3, 2024

Thank you for the additional information.
When you mention the main menu, are you refering to the category dropdown navigation or the layered navigation?

Whatever it is, I duplicated the setup, but am unable to reproduce the issue. Both the top menu and the layered navigation work as expected.

I'm unfamiliar with the HelloWired theme.

Are you using a customized navigation?

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

Thanks for getting back to me. I'm using a customized navigation so it doesn't actually pull the categories dynamically.

Here's my site if you want to have a look: http://www.thegiftcompany.co.za/

from groupscatalog2.

Vinai avatar Vinai commented on June 3, 2024

So you are referring to the top navigation?

I have to see the code of the navigation block (and maybe template) to check why the menu is disappearing. Right now I have no idea what's happening there.

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

I'm referring to the top nav, yes.

Here's the code to top.phtml in the template:

<?php
/**
 * Top menu for store
 *
 * @see Mage_Catalog_Block_Navigation
 */
?>
<?php $_menu = ''?>
<?php foreach ($this->getStoreCategories() as $_category): ?>
    <?php $_menu .= $this->drawItem($_category) ?>
<?php endforeach ?>
<?php if ($_menu): ?>
<div class="nav-container">
    <ul id="nav">


        <?php $_anyActive = false; foreach ($this->getStoreCategories() as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
         <li class="home <?php echo !$_anyActive ? 'active' : '' ?>"><a href="http://www.thegiftcompany.co.za/"><span><?php echo $this->__('Home') ?></span></a></li>

    <li class="level0 nav-3 parent <?php if ($_SERVER['PATH_INFO'] == "webtexgiftregistry/index/searchRegistry/") { echo 'active'; } ?>" onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)"><a href="http://www.thegiftcompany.co.za/webtexgiftregistry/index/searchRegistry/">Gift Registry</a>
  <ul class="level0">
    <li class="level1 nav-3-1 first"><a href="http://www.thegiftcompany.co.za/webtexgiftregistry/index/searchRegistry/">View all registries</a></li>
    <li class="level1 nav-3-1 first"><a href="http://www.thegiftcompany.co.za/products/customer/account/login/">Create a gift registry</a></li>
    <li class="level1 nav-3-2"><a href="http://www.thegiftcompany.co.za/products/webtexgiftregistry/index/viewItems/">View my gift registry</a></li>
    <li class="level1 nav-3-3 last"><a href="http://www.thegiftcompany.co.za/weddings.html">How to create
a registry</a></li>
  </ul>
</li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/products/our-products.html"><span>Our Products</span></a></li>

 <li class="level0t"><a href="http://www.thegiftcompany.co.za/about-us.html"><span>About Us</span></a></li>

 <li class="level0t"><a href="http://www.thegiftcompany.co.za/weddings.html"><span>Weddings</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/honeymoons.html"><span>Honeymoons</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/links.html"><span>Links</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/contact-us.html"><span>Contact Us</span></a></li>

        <?php ///echo $_menu; ?>

    </ul>
</div>
<?php endif; ?>

from groupscatalog2.

Vinai avatar Vinai commented on June 3, 2024

Thanks for the code. It seems as if Mage_Catalog_Block_Navigation::getStoreCategories() doesn't return any categories once you log in as that customer. That would explain the whole menu disappearing.
Please double check that at least one first level category is visible to the customer.

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

Perfect! I've removed the coding in top.phtml so that it will display the menu for everyone. Thanks Vinai! You're a star!!

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

Sorry, one more question. This is my code now:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to [email protected] so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<?php
/**
 * Top menu for store
 *
 * @see Mage_Catalog_Block_Navigation
 */
?>
<?php //$_menu = ''?>
<?php //foreach ($this->getStoreCategories() as $_category): ?>
    <?php //$_menu .= $this->drawItem($_category) ?>
<?php  //endforeach ?>
<?php //if ($_menu): ?>
<div class="nav-container">
    <ul id="nav">


        <?php //$_anyActive = false; foreach ($this->getStoreCategories() as $_category) { $_anyActive = $_anyActive || $this->isCategoryActive($_category); } ?>
         <li class="home <?php //echo !$_anyActive ? 'active' : '' ?>"><a href="http://www.thegiftcompany.co.za/"><span><?php echo $this->__('Home') ?></span></a></li>

    <li class="level0 nav-3 parent <?php if ($_SERVER['PATH_INFO'] == "webtexgiftregistry/index/searchRegistry/") { echo 'active'; } ?>" onmouseover="toggleMenu(this,1)" onmouseout="toggleMenu(this,0)"><a href="http://www.thegiftcompany.co.za/webtexgiftregistry/index/searchRegistry/">Gift Registry</a>
  <ul class="level0">
    <li class="level1 nav-3-1 first"><a href="http://www.thegiftcompany.co.za/webtexgiftregistry/index/searchRegistry/">View all registries</a></li>
    <li class="level1 nav-3-1 first"><a href="http://www.thegiftcompany.co.za/products/customer/account/login/">Create a gift registry</a></li>
    <li class="level1 nav-3-2"><a href="http://www.thegiftcompany.co.za/products/webtexgiftregistry/index/viewItems/">View my gift registry</a></li>
    <li class="level1 nav-3-3 last"><a href="http://www.thegiftcompany.co.za/weddings.html">How to create
a registry</a></li>
  </ul>
</li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/products/our-products.html"><span>Our Products</span></a></li>

 <li class="level0t"><a href="http://www.thegiftcompany.co.za/about-us.html"><span>About Us</span></a></li>

 <li class="level0t"><a href="http://www.thegiftcompany.co.za/weddings.html"><span>Weddings</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/honeymoons.html"><span>Honeymoons</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/links.html"><span>Links</span></a></li>

 <li class="level0"><a href="http://www.thegiftcompany.co.za/contact-us.html"><span>Contact Us</span></a></li>

        <?php ///echo $_menu; ?>






    </ul>
</div>
<?php //endif; ?>

I've commented out getStoreCategories() so that it will always show for everyone. Unfortunately now when I'm logged in, the menu shows fine but when I got to a different store (products/our-products.html) I get a page not found.

Is this related?

from groupscatalog2.

Vinai avatar Vinai commented on June 3, 2024

Your way of approaching the issue contains several potential problems. For one, the $_anyActive variable isn't initialized, which might result in PHP notices.
I would instead suggest checking the store category configuration, since all visible categories should be returned by that function.
I don't know why the other store gives you a 404 page now, this goes beyond the scope of the module (unless you are hiding products, too).

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

It seems that it has now hidden all the categories and products for that Root category. I've manually set hide to None for each category but the products aren't showing?

from groupscatalog2.

Vinai avatar Vinai commented on June 3, 2024

Hiding categories does not hide products. Categories and Products are independent entities.

from groupscatalog2.

karenn1 avatar karenn1 commented on June 3, 2024

I understand what you mean. I'll have to re-approach what I'm trying to achieve here.

Thanks again for all your help!

from groupscatalog2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.