View Single Post
  #5  
Old 11-03-2007, 03:30 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default Re: Menu Bar & Javascript

Quote:
n the past few days I that I have been learning how X-cart works it seams as though there is very little html around. Yet thie script would involve alot of html. or at least I think it would.

What page or pages would I have to edit to incorporate this script into X-cart?
Do I use regular <a href="www.mysite.com/product1.html"> tags?

What about tables? Or should I stay away from tables?

Doug,

Working backwards -- tables, use 'em if you want... xcart can nest them 8 layers deep at times... but most designers have been going to css and using divs -- this is well beyond the scope of this thread.

Yes, there is html within templates (lots of HTML!), BUT you will use Smarty to integrate your html to the xcart code...

FOR EXAMPLE:

the css/js menu you linked to can work in the categories -- but you'll have to figure out how to wrap it around the smarty category loop.

You need to get your head around how things are created and rendered and displayed...

In a stock store, in your home.tpl file, your categories are listed in this include:
{include file="customer/categories.tpl" }

SO, let's look at categories.tpl - the guts of the category display is:
Code:
{foreach from=$categories item=c} <font class="CategoriesList"><a href="home.php?cat={$c.categoryid}" class="VertMenuItems">{$c.category}</a></font><br /> {/foreach}

There's html going on there... and smarty is wrapped around it. Smarty makes the loop (for each) and places the category ID into the html link. Then if there are more, it loops and keeps making links for you...

SO if your goal is to make a css/js popup for your categories, this is probabloy where you will integrate the css/js.

You really need to visit the template editing guide and get your head around webmaster mode. Everything is nested into something in xcart, and few people know every path of every template or function... but webmaster mode reveals all.

You can use static html if you really want to, but it is not practical for things like categories -- since these are generated dynamically, USE WHAT SMARTY GIVES YOU and loop around it.

May I suggest, before you do one of these popups, get your head around how the html and css and smarty all play nicely together in templates -- you MUST use webmaster mode or else you will be lost.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote