Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Menu Bar & Javascript

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-02-2007, 11:34 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Menu Bar & Javascript

I want to incorporate this javascript to my menu bar. Its a vertical menu script I got from DynamicDrive

Here it is in action on my website before X-cart
http://www.systemskins.com

In 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?

Any help or advice would be appreciated.

Thanks

Doug
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #2  
Old 11-02-2007, 11:41 PM
 
dsoong dsoong is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 94
 

Default Re: Menu Bar & Javascript

You can use static HTML if you do not change/add category often. Put the html in skin1\customer\categories.tpl
Reply With Quote
  #3  
Old 11-02-2007, 11:50 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Menu Bar & Javascript

Quote:
Originally Posted by dsoong
You can use static HTML if you do not change/add category often. Put the html in skin1\customer\categories.tpl

Oh you mean in the admin area... well, so far I have all the categories I'm going to need until I start adding more products. But then I'd have to modify the menu anyways, which I'm aware of.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #4  
Old 11-02-2007, 11:57 PM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Menu Bar & Javascript

The script comes with its own CSS files. Should I refrain from multiple CSS files on my site and just copy the values into skin1.css ?
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #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
  #6  
Old 11-03-2007, 10:42 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Menu Bar & Javascript

Carpeperdiem

Thanks for helping clear that up. I understand it better, not completely, but better. I have gotten the script installed into x-cart and im now working on adding smarty into it, like links, and such. I'll post my code when i'm done and you can critique it for me. (if you wouldnt mind).
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
  #7  
Old 11-03-2007, 10:55 AM
 
dsoong dsoong is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 94
 

Default Re: Menu Bar & Javascript

Using static HTML only affect one tpl file, and you can upgrade and back out easily. You don't even need to know Smarty, or PHP. It will also not run slower if you have large number of categories. Most importantly, one can implement/debug a static category faster. The main drawback is you need to change the static file when you add or remove category. You can ask yourself how many times will you do that? If you are using excel to keep track of categories, wirte a fomula to generate the HTML in one column. It will just be copy and paste.
Reply With Quote
  #8  
Old 11-03-2007, 10:58 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Re: Menu Bar & Javascript

Quote:
Originally Posted by dsoong
Using static HTML only affect one tpl file, and you can upgrade and back out easily. You don't even need to know Smarty, or PHP. It will also not run slower if you have large number of categories. Most importantly, one can implement/debug a static category faster. The main drawback is you need to change the static file when you add or remove category. You can ask yourself how many times will you do that? If you are using excel to keep track of categories, wirte a fomula to generate the HTML in one column. It will just be copy and paste.

Yeah, thats just it. My categories are pretty much set for now. As the gaming industry adds new gaming consoles then I'll have new skin kits to develop and sell. Which is pretty much on average only 1-2 every other year. I don't have a problem going in and manually adding them.

I was mainly concerned about load times and possible security holes.
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:57 AM.

   

 
X-Cart forums © 2001-2020