The image filename for each sidebox needs to include the name (id) of the sidebox.
The categories box has an id of categories, so its image file will be named boxhead-categories.gif.
The image filename for each sidebox needs to include the name (id) of the sidebox.
The categories box has an id of categories, so its image file will be named boxhead-categories.gif.
Hi Glenn,
I've been chipping away at this all afternoon, looking at endless posts but have not found a similar problem.
Let me just start by saying the same thing everyone else does - I'm a total ZenCart noob - I've put together quite a few other CMS sites, and see how dramatically different ZC is from the others I've done.
So, I installed the awesome Image Titles mod so that I could add images to my sidebar boxes, and hopefully eventually to the main level of my dropdown menu as well (but that's a whole nother problem right now!). The template is a heavily modified version of Apple Zen (not even close to being finished tweaking with yet...)
The very first thing that happened was that I lost all the sideboxes and the main navigation bar on the main page - they just completely disappeared when I refreshed the page after the initial install of the files. When you click on the link for "Great Gifts" it takes you to a different page, and there they are again! I'm trying not to panic, but...why???All I did was rename the folders as instructed, and add some images (at least some are correctly named, or they wouldn't show up at all, right?), although I MIGHT have touched some other files while I floundering around before I discovered the mod... Do you have any ideas about what I could have done to mess this up??
Here's the link to the main page
http://purple-eggplant.com/zc
This is such a great mod - absolutely perfect for my needs!
Thanks so much in advance,
barleywine
You can use a different image for each language; the code automatically uses the image that matches the current language in the shop. When the customer has selected Italian, the code will look for a file in /includes/templates/your_template/buttons/italian/.
To find the name of any sidebox, you can do a view source and look at the HTML that is being output. For Categories, look for the set of category links in the code, and note at the top of that list:
<div id="categories">
The id stays the same no matter the language in use, so you would use the same filename for images in any language. They should be saved in the appropriate language folder in /buttons/.
sorry but also for the image that goes I don't understand.
If i view the code of page it looks
<div class="leftBoxContainer" id="categories" style="width: 150px">
<h3 class="leftBoxHeading" id="categoriesHeading"><img src="includes/templates/sugar/buttons/english/boxhead-categories.gif" alt="" width="100" height="20" /></h3>
<div id="categoriesContent" class="sideBoxContent">
<hr id="catBoxDivider" />
i have insert copying by you
boxhead-categories.gif but where I saw that I have to insert boxhead before image.gif?
thank you for patience![]()
You have boxhead-categories.gif saved in
includes/templates/sugar/buttons/english/boxhead-categories.gif, but not in includes/templates/sugar/buttons/italian/boxhead-categories.gif.
If you want the same image for both languages, just copy the file into the other language's /buttons/language/ folder.
If you want different images for each language, save each one with the same name, but in the correct language folder.
sorry, i didn't understand before.
So it is alwaysthe word BOXHEAD and the id of box?
It was if is always word boxhead.
Thank you very much
![]()
That is correct: boxhead-boxid.gif.
boxhead-categories.gif,boxhead-search.gif, boxhead-manufacturers.gif...
Last edited by gjh42; 31 Jan 2009 at 10:39 PM.
Let me see if I understand this correctly...
This is the code in the tpl_box_default_left.php
$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>';
}
I viewed my source and this is what I found.
<td id="navColumnOne" class="columnLeft" style="width: 150px">
<div id="navColumnOneWrapper" style="width: 150px"><!--// bof: categories //-->
<table width="150px" border="0" cellspacing="0" cellpadding="0" class="leftbox" id="categories-table">
<tr class="leftboxheading" id="categories-heading-tr">
<!-- Sidebox Header -->
<td colspan="3" width="100%" class="leftboxheading" id="categories-heading-td">Products</td>
</tr>
<tr>
In a previous post I read
Change $title, '/boxhead-' and $box_id to fit the conditions. But that’s where I get confused. Is this even close to being right? I'm not sure what '/boxhead-' refers to.
$categories = (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') ? zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $categories-heading-tr. 'boxhead-categories.gif') : $categories);
if ($categories_link) {
if (file_exists(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/boxhead-' . $ categories-heading-tr. ' boxhead-categories.gif ')) {
$categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . '</a>';
} else {
$categories = '<a href="' . zen_href_link($categories_link) . '">' . $categories . BOX_HEADING_LINKS . '</a>';
}
Or am I so far off that you are chuckling at my attempt to make these edits. :)