Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    cart error adding shopping cart image to shopping cart sidebox?

    Hi again and again,
    I want to change the Text Shipping Cart (more) to an image of a shopping cart. I have the image all I need to know is which file do I copy the code to. I read several Threads but did not find anythiong similar.
    Thanks for your help,
    Bob

  2. #2
    Join Date
    Nov 2005
    Location
    Colorado Springs, CO USA
    Posts
    7,033
    Plugin Contributions
    31

    Default Re: adding shopping cart image to shopping cart sidebox?

    Quote Originally Posted by RobertG View Post
    Hi again and again,
    I want to change the Text Shipping Cart (more) to an image of a shopping cart. I have the image all I need to know is which file do I copy the code to. I read several Threads but did not find anythiong similar.
    Thanks for your help,
    Bob
    try this article in the tutorials/FAQ section

  3. #3
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    cart error Re: adding shopping cart image to shopping cart sidebox?

    Am I suppose to add anything to this: my pic isn't showing up

    $title = zen_image($template->get_template_dir(BOX_HEADING_CATEGORIES, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . BOX_HEADING_CATEGORIES, HEADER_ALT_TEXT);

    the pic name is cart.jpg and is located in my admin/images directory.
    Thanks Bob

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: adding shopping cart image to shopping cart sidebox?

    Because that heading is also a link, it will still have the [more] after/below the image. You can redefine the text to blank, but then all other sidebox headings that have the [more] will lose it too.

    Instead of manually editing PHP files for each sidebox, the easiest way is to install the Image Titles mod from Free Addons (link in my sig), and upload the image to /includes/templates/your_template/buttons/english/ with the filename boxhead-shoppingcart.gif.

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: adding shopping cart image to shopping cart sidebox?

    Note: this is an old mod which I have not yet brought up to my current standards of flexibility. If you want to use jpegs instead of gifs, you will need to edit a file.
    In /includes/templates/your_template/common/tpl_box_default_left.php, find
    PHP Code:
    //image titles - box header image if file exists  2007-10-04
    $title = (file_exists(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/boxhead-' $box_id '.gif') ? zen_image(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/boxhead-' $box_id '.gif') : $title);
    if (
    $title_link) {
      if (
    file_exists(DIR_WS_TEMPLATE 'buttons/' $_SESSION['language'] . '/boxhead-' $box_id '.gif')) {
        
    $title '<a href="' zen_href_link($title_link) . '">' $title '</a>';
      } else {
        
    $title '<a href="' zen_href_link($title_link) . '">' $title BOX_HEADING_LINKS '</a>';
      }
    }
    // 
    and change all '.gif' to '.jpg' . Do the same with tpl_box_default_right.php.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: adding shopping cart image to shopping cart sidebox?

    the pic name is cart.jpg and is located in my admin/images directory.

    Files in /admin/images/ will not be found by the storefront output code. If you are going to do the manual edit method, you need to put the file in the base /images/ folder, not
    /admin/images/.

  7. #7
    Join Date
    Jun 2007
    Location
    Cymru
    Posts
    124
    Plugin Contributions
    0

    Default Re: adding shopping cart image to shopping cart sidebox?

    This looks good, but have you got a list of the names that we need to give the gif files for the sideboxes?

    i.e. the source code for my language box is:
    Code:
    <!--// bof: languages //-->
    <div class="rightBoxContainer" id="languages" style="width: 210px">
    <h3 class="rightBoxHeading" id="languagesHeading">Languages</h3>
    <div id="languagesContent" class="sideBoxContent centeredContent"><a href="http://www.cadwyngifts.com/shopping_cart.html?language=en&amp;number_of_uploads=0"><img src="includes/languages/english/images/icon.gif" alt="English" title=" English " width="91" height="27" /></a>&nbsp;&nbsp;<a href="http://www.cadwyngifts.com/shopping_cart.html?language=cy&amp;number_of_uploads=0"><img src="includes/languages/cymraeg/images/icon.gif" alt="Cymraeg" title=" Cymraeg " width="91" height="27" /></a>&nbsp;&nbsp;<br /></div></div>
    <!--// eof: languages //-->
    What should I therefore name the gif file?

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: adding shopping cart image to shopping cart sidebox?

    All sideboxes show their id at the top in view source:

    <div class="rightBoxContainer" id="languages"

    so you would use boxhead_languages.gif.

  9. #9
    Join Date
    Nov 2009
    Posts
    339
    Plugin Contributions
    0

    Default Re: adding shopping cart image to shopping cart sidebox?

    Update: I am using the link you suggested "can I use an image for Sidebox Header. I put a copy of my Cart (cart.gif) into file includes/templates/Tte/images and uploaded to the server. I also had the same pic in base/images folder
    I then went to includes/modules/sideboxes and in DEFINE_HEADING_SHOPPING_CART, <a href="http://30408.vws.magma.ca/TTEZENCART/images/cart.gif"></a>; I uploaded it to the server
    I then went to my Stylesheet, and since I was only going to change the header on the right-side of the page I went to rightBoxHeading in stylesheet. This is what is there Now:.rightBoxHeading {
    margin: 0em;
    background-color: #3A558B;
    padding: 0.2em 0em;
    }
    Now my problem is that I didn't understand the insruction of (background: url(../images/cart.gif)#ff6699.
    I am not sure where and how i'm suppose to document the changes.
    If you go to my site you will notice that on the right side colomn the lettering Shopping Cart is no longer there but the (more) is.
    I need your help again, sorry to be such a pain.
    Bob

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: adding shopping cart image to shopping cart sidebox?

    That article gives an awkward method of doing the substitution, which cannot remove the [more]. Reverse what you have done and install Image Titles from Free Addons; this will automatically remove the [more] from the sidebox where you replace the text with an image.
    Name the image boxhead-shoppingcart.gif and save it in
    /includes/templates/Tte/buttons/english/. Done.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Remove right sidebox shopping cart from when on shopping cart page
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Oct 2010, 01:45 AM
  2. Adding a new sidebox on my shopping cart?
    By kylepoyser in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 18 Sep 2010, 11:23 PM
  3. Shopping cart image & shopping cart to appear all the time
    By 4dw in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 3 Nov 2009, 09:44 AM
  4. Adding a linked image in the Shopping Cart sidebox header
    By froyse in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 29 Mar 2007, 10:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR