Results 1 to 6 of 6

Thread: Store Logo

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

    Store Logo

    The store logo is dynamically called in store_main.tpl.php from the $Logo_Image array. Where is this array set up?

    I see that logo at squirrelcart/themes/squirrelcart/images/store_logo.png.

    What is the intended route for customizing the logo?

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    The store logo is dynamically called in store_main.tpl.php from the $Logo_Image array. Where is this array set up?
    squirrelcart/storefront.php

    All images are now setup via arrays obtained by calling the sc_img() function.

    I see that logo at squirrelcart/themes/squirrelcart/images/store_logo.png.

    What is the intended route for customizing the logo?
    It's now a theme image and works like the rest of them. You would need to create a custom theme folder, and inside it an "images" folder. If you then want to customize the logo (which I would hope everyone would want to do) just put your logo in squirrelcart/themes/YOUR_THEME/images/ , and name it store_logo.png, store_logo.gif, or store_logo.jpg.

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

    Very Good!

    Just as I figured it would work. One strike for logic.

    Making progress here as I make the switch from ver 2 to ver 3 philosophy.

    Will the image dimensions be correctly entered in the $Logo_Image array if the dimensions differ from the original?

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    Will the image dimensions be correctly entered in the $Logo_Image array if the dimensions differ from the original?
    Yes. I also forgot to mention that if PHP has permission to write to your squirrelcart/themes/YOUR_THEME/images/ folder, you can also upload you logo in the control panel under Settings > Themes, by clicking YOUR_THEME Images.

    The arrays for images contain a lot of useful information. You can view it all like this:
    PHP Code:
    <?php sc_print_array($Logo_Image); ?>
    We intentionally put a full <img /> tag along with width and height attributes in all templates like this:
    PHP Code:
    <img src="<?php print $Image['dyn'?>" width="<?php print $Image['width'?>" height="<?php print $Image['height'?>" />
    If you don't need access to the entire tag in your templates, you can change all that to:
    PHP Code:
    <?php print $Image['tag'?>
    You can also put your own custom images in your theme and set them up like this:
    PHP Code:
    <?php $my_image sc_img('name_of_image'); ?>
    We'll be writing a developers guide for v3.0.0 with info on that function as well as some others.

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

    ALT Attribute

    What about the ALT attribute? Important for SEO.

    Is there a method of entry?

  6. #6
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,829
    Squirrelcart version
    v3.3.7
    For products and categories, the ALT gets set to the name of the product or category. For all other images that make sense to have ALT text, it's been coded in the template files. For the handful of images where an ALT attribute would serve no practical purpose and possibly cause a problem if the image was broken, an empty alt attribute is used to ensure everything validates as XHTML 1.0 transitional.

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