Results 1 to 6 of 6

Thread: This category does not contain any products...

  1. #1
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Completed This category does not contain any products...

    Have got a copy of ver 3b2 neatly customized and still W3C compliant.

    Jamie: A "tip of the old hatlo" to you folks. Once I got the drift of the CSS and revised template structure, I've had mostly easy sailing.

    Here is the current stumper.

    I have a Category that will never have individual products. It is a Subcat container. I get the "this category doesn't have any products" message which is not appropriate in the context.

    I understand how to edit the templates to get rid of the message permanently but, that means that categories that should have products won't display the message.

    Am I missing something? Is there now a way to accomplish this in version 3?

    If not, here is a new feature request.

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Jamie: A "tip of the old hatlo" to you folks. Once I got the drift of the CSS and revised template structure, I've had mostly easy sailing.
    Thanks, that's great! Glad it's working well for you.

    I have a Category that will never have individual products. It is a Subcat container. I get the "this category doesn't have any products" message which is not appropriate in the context.

    That's a bug. I just fixed it in the final release. You can fix it by changing this line towards the top of category.tpl.php:
    PHP Code:
    <?php if (!$Product_Rows): ?>
    to:
    PHP Code:
    <?php if (!$Product_Rows && !$Subcategory_Rows): ?>

  3. #3
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    It's A Wrap

    Thanks Jamie. It works. I don't know WHY it works as I do have subcategories in the category with no products. I am not tempted to play with success however.

    Here are two themes, switchable entirely from the theme selector. Each is presented in the "800" variant but they scale up beautifully as well.

    Standard "Squirrelcart" storefront.

    More contemporary format.

    The layered theme system works well.
    One thing I would use if I had it would be the ability to switch logo images with the theme variants. I'd use a smaller image for the "800" variant and a larger image for the others.

    As they say in show biz, "that's a wrap for beta2 in Tucson."

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Quote Originally Posted by pdunton View Post
    Thanks Jamie. It works.
    Glad to hear it.
    I don't know WHY it works as I do have subcategories in the category with no products.
    The reason it wasn't working is there was a line in the category.tpl.php template file to output that message when there were no products in the category being viewed. That code needed to also make sure the category had no subcategories. The change of that one line does that. Its something I forgot to account for when I created the new template files.

    Here are two themes, switchable entirely from the theme selector. Each is presented in the "800" variant but they scale up beautifully as well.
    Looks good.

    The layered theme system works well.
    Thanks. Glad you like it.

    One thing I would use if I had it would be the ability to switch logo images with the theme variants. I'd use a smaller image for the "800" variant and a larger image for the others.
    You can do that for primary variants (but not secondary). It will be explained in the documentation. Consider the way the master theme has color variants like "blue", "green" etc....

    Those variants are created by style_variant1_blue.css.php, style_variant1_green.css.php, etc....

    You can take the squirrelcart/themes/custom/images folder, and rename it to match a primary variant, like:
    squirrelcart/themes/custom/images_blue
    squirrelcart/themes/custom/images_green

    When you do that and choose custom - blue for your theme, it looks for images in images_blue. Swap it to custom - green, and it then looks in images_green. This allows you to completely change some (or all) of the theme images based on the primary variant chosen. This was designed so that you could have a theme that looks pretty much the same but has different colors (buttons, header images, etc...).

    That process does not work for secondary variants, which is what is controlling the width in your themes.

  5. #5
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    Variants

    I understand what you are talking about with the master variants.
    That is how I switched the logo images in the examples above.

    I am asking for the ability to switch logos on the subvariants. As in variant 800, variant1024, ETC.
    Just consider this a normal feature request, not a complaint.

    An image that fits the 800 px scheme has wasted screen real-estate in the larger formats.

  6. #6
    Client pdunton's Avatar
    Join Date
    Apr 2006
    Location
    Tucson, Arizona
    Posts
    555
    Squirrelcart version
    v3.4.1

    This seems to work

    Modified storefront.php to look for larger logo.

    Call small logo store_logo, and large logo store_logo_large.

    Change in storefront.php

    /************************************************** *****
    Setup vars for template
    ************************************************** ******/
    // logo URL...change this to pull from DB, along with dims
    // Use the new Pages feature for this, and put this field and it's ALT property on the page record for "store_main".

    if(strstr($css_variant2_url, '800'))
    {
    $Logo_Image = sc_img('store_logo');
    }else {
    $Logo_Image = sc_img('store_logo_large');
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts