X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to add menu/flash photos on the sides (https://forum.x-cart.com/showthread.php?t=38987)

modibaba 04-11-2008 03:16 AM

How to add menu/flash photos on the sides
 
Hi,
I need to fill in the gaps on the right/left sides of my website by adding boxes/flash photos, something simillare to news or best sellers, I appreciate any help on how di I do that, or if you are aware of any previous posts please let me know the link. I have x-cart gold version 4.9.1
Thank you

Holub 04-11-2008 04:43 AM

Re: How to add menu/flash photos on the sides
 
Hi!

It is very simple.

Open /skin1/customer/home.tpl and insert in any place you want such code. For example you can insert it after news block (you should find `{include file="news.tpl" }` and insert code after)

Code:

{capture name=menu}

-=menu content=-
for example

<img src="images/umbabaraumba.jpg" height=100 width=100>

bla bla bla

{/capture}
{ include file="menu.tpl" dingbats="dingbats_news.gif" menu_title="-=MENU HEADER=-" menu_content=$smarty.capture.menu }


carpeperdiem 04-11-2008 05:35 AM

Re: How to add menu/flash photos on the sides
 
Quote:

Originally Posted by Holub
Code:

for example

<img src="images/umbabaraumba.jpg" height=100 width=100>



This is not xhtml compliant code -- don't use it.

An image tag for xhtml should look like this - with the smarty images path - this is where xcart images should always live, unless you want to get into secure vs. nonsecure problems :

<img src="{$ImagesDir}/image.jpg" height="100" width="100" alt="image description" />

NOTE the self-closing tag. This is how images should be used in xcart 4.1.x, if you want your code to validate and work exactly as expected cross-browser/cross-platform. And note the alt field. Always use it, unless you have a compelling reason not to (such as a spacer - then use alt=""). Not every visitor to your site can see -- not to mention the seo value.

Holub 04-11-2008 06:11 AM

Re: How to add menu/flash photos on the sides
 
Quote:

Originally Posted by carpeperdiem
This is not xhtml compliant code -- don't use it.

An image tag for xhtml should look like this - with the smarty images path - this is where xcart images should always live, unless you want to get into secure vs. nonsecure problems :

<img src="{$ImagesDir}/image.jpg" height="100" width="100" alt="image description" />

NOTE the self-closing tag. This is how images should be used in xcart 4.1.x, if you want your code to validate and work exactly as expected cross-browser/cross-platform. And note the alt field. Always use it, unless you have a compelling reason not to (such as a spacer - then use alt=""). Not every visitor to your site can see -- not to mention the seo value.


Can you say anything in essence of the question but not about xhtml?

carpeperdiem 04-11-2008 06:24 AM

Re: How to add menu/flash photos on the sides
 
Antony,

Your answer was close, but if modibaba used it, it would just confuse him/her later why their perfectly validated x-cart was no longer validating.

I looked at your templates, and you seem to disregard xhtml -- your templates do not validate.

Helping others here is why the forum is valuable, but giving incomplete code must be corrected.

Your suggestion as to WHERE to put the code was correct, but the code you suggested needed an edit.

I was NOT going to visit your disregard to valid xhtml on your commercial products, but since you decided to "go there" - I have responded.

LOOK -- users helping other users is WHY WE ARE HERE - but let's make sure the advice given is accurate and appropriate please?

Jeremy

modibaba 04-11-2008 06:52 AM

Re: How to add menu/flash photos on the sides
 
Gents,

That was really helpful, and simple, I used the <img src="{$ImagesDir}/spacer.gif" width="170" height="1" alt="" /> format and it is working perfectly, and it matches other statements in the home.tpl file such as the example above.

I would like to add "The World's Favourite Internet Store" just next to my store logo, I added my that to logo.gif but the whole logo shrank, as if it has a limited space in the header, I then looked at head.tpl so amend the width, but I could not do that, am I doing the tight thing? I appreciate your help again.

Mo

modibaba 04-11-2008 06:55 AM

Re: How to add menu/flash photos on the sides
 
"My last post with corrections to my typos :)"

Gents,

That was really helpful, and simple, I used the <img src="{$ImagesDir}/spacer.gif" width="170" height="1" alt="" /> format and it is working perfectly, and it matches other statements in the home.tpl file such as the example above.

I would like to add "The World's Favourite Internet Store" just next to my store logo, so I added that to logo.gif but the whole logo just shrank, as if it has a limited space in the header, I then looked at head.tpl to amend the width, but I could not do that, am I doing the right thing? I appreciate your help again.

Mo

carpeperdiem 04-11-2008 10:34 AM

Re: How to add menu/flash photos on the sides
 
Mo,

head.tpl is indeed the right place to be editing... but it is a nested table in a nested table -- by default, head.tpl is a MESS

THEORETICALLY, you should be able to edit xlogo.gif -- in fact, I suggest you do this. RENAME IT to modibaba_logo.gif, make it look like what you want, but for now, keep the size to 67px high x up to 600 wide.

FIND:
<img src="{$ImagesDir}/xlogo.gif" width="244" height="67" alt="" />

REPLACE WITH:
<img src="{$ImagesDir}/modibaba_logo.gif" width="width-of-new-file" height="67" alt="" />

UPLOAD modibaba_logo.gif to /skin1/images

CLEAR YOUR browser cache, as well as run cleanup.php
http://www.yourdomain.com/store_location-optional/cleanup.php

better now? There are MANY THREADS up here about editing your header logo.

The trick with this is to USE webmaster mode, find the exact template you need to edit, then if you need to clarify an insane nested table structure, a tool such as dreamweaver can help sort out the nested table insanity. If you have the skills, lose as many tables as you are comfortable eliminating. Your code will be cleaner and it will render faster.

Hope this helps.


All times are GMT -8. The time now is 01:32 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.