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

PHP and Smarty coding mods for newbie???

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 07-17-2008, 07:03 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: PHP and Smarty coding mods for newbie???

You can add new language variables in the same area mentioned above - the languages area. Really should take a look at the manual on this one, it covers the whole webmaster mode/language variable thing pretty well, as that is a core function of this software.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #12  
Old 07-17-2008, 09:03 PM
 
Asiaplay Asiaplay is offline
 

X-Wizard
  
Join Date: Oct 2005
Posts: 1,242
 

Default Re: PHP and Smarty coding mods for newbie???

Spia,

Happy you managed to change the text you wanted to - progress

My guess is 60 to 80% of users start using X-Cart with only basic html (and maybe CSS) understanding or no programming knowledge (so it can be used by non-programmers for sure).

Adding text in smarty is easy (and is not coding based to add the text value or variable) - as Balinor says - read the manual on this (basically at the bottom of the languages page in X-Cart Admin, you just add in a variable, using a variable name which has not been used before ).
To know what has not been used you could export a language and import it into MS Excel (see Internationalization section for importing and exporting a language e.g. Russian language post answer I provided in there) or reading the manual.

The 2nd step is to add the newly created language variable, into a template (or change an existing variable named in a template to match the new one you have just made) is coding based.
At the start you are better off to change the text in a box for existing language variables (rather than add too many new ones) - slowly learn.
Your question... "Is there a big learning curve" - there is some if you have never used html before - yes (but you are 80% there understanding how to use webmaster mode).
Things are easier if you understand basic html programming and then change the syntax a little for it to be php - what I would do initially if I was you is follow mods others in the forum have done (you will then begin to understand how php code works).
For changing text on a page - 95% of the time this can be done within the X-Cart languages section of X-Cart Admin.

If you do not understand basic smarty code (used mainly for languages) or php code then changing things can take time or be hard (if you do not understand basic html first) - yes... there is a learning curve.
But it is not really, really difficult really - as php like html does use pretty easy to read logic (unlike many other programming languages) and the layout is based on html table code a lot.
However the advantage is almost anything can be changed (unlike other carts where code is locked).

Lastly - there are some changes which are harder - logical changes to things like cart $ values or shipping (as these are not a simple change to one template - sometimes this can mean a change in several templates and quite complex logical maths code... not impossible - but harder than layout changes and probably better to avoid unless a custom mod had been provided in the forum which another user has said works).

So layout, colours and text is easier (but function is harder).
At the start - the easiest and fastest way to change colour and text is to buy a custom skin - one which is close to how you want the cart to finally appear - see www.dana7.com or http://x-cart-customization.com/shop/ (then change this custom template to match what you want).
Remember that many layout changes are also made in the CSS file (once again quiet easy to do once you try) - e.g. text size

For function changes, for now I suggest stick to completed mods available in the forum or bought ones (and learn from doing those first).

Hope comments help - cheers, Asiaplay

PS: trick is to keep a back-up copy of the original before you make a change - so if you mess up the mod instructions (then you can replace the messed up changed template or page with the original you backed up... then at least you have not lost anything, but a little time).
__________________
X-Cart Gold version 4.1.9
(plus built in X-Cart bugs!)
Reply With Quote
  #13  
Old 07-18-2008, 05:59 AM
 
spia spia is offline
 

Member
  
Join Date: Jul 2008
Posts: 21
 

Arrow Re: PHP and Smarty coding mods for newbie???

Thanks so much for the detailed and helpful information! I have a feel for it now, but just wanted to understand how much deeper I have to go to see real results.

I know HTML fairly well and CSS to a lesser but workable degree. I've even coded a few test PHP "Hello world" pages.

I work with a graphic person that is used to designing any layout she wants (within reason) and then I have to figure out how to make that work in HTML. Years of working together that way have made us averse to using other people's templates (we've never done it). That's why I want to be sure that I can move stuff around, change textual content, delete things we don't want, etc. Just changing a color scheme would never fly.

I've been reading (pieces of) the manual - ther's just soooooooooooooo much manual...
__________________
Gold 4.1.10
Reply With Quote
  #14  
Old 07-18-2008, 06:01 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: PHP and Smarty coding mods for newbie???

Try this as well, it will give you a good handle on the templates:

http://forum.x-cart.com/showthread.php?t=21529
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #15  
Old 07-18-2008, 06:46 AM
 
spia spia is offline
 

Member
  
Join Date: Jul 2008
Posts: 21
 

Arrow Re: PHP and Smarty coding mods for newbie???

Thanks. I read it quickly but will go back and read it carefully later as I check out more of the manual too...

One more quick question:

If I want to use the content of something like customer/categories.tpl in a brand new scratch built HTML page of my making, how do I do that so that it generates the needed content in my page?
__________________
Gold 4.1.10
Reply With Quote
  #16  
Old 07-18-2008, 06:48 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: PHP and Smarty coding mods for newbie???

That really isn't an easy task - your best bet is to use the embedded static pages to create all of your non-cart pages - they show up in the main area and have the rest of the site wrapped around them.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #17  
Old 07-18-2008, 08:30 AM
 
spia spia is offline
 

Member
  
Join Date: Jul 2008
Posts: 21
 

Default Re: PHP and Smarty coding mods for newbie???

Uggh! That sounds like the deal killer. Am I to understand that most people using X-cart just go with the stock layout or generic templates and just do color adjustments and just a few design tweaks? Does anyone have original designs that they fit X-cart to rather than the other way around?

Quote:
Originally Posted by balinor
...they show up in the main area and have the rest of the site wrapped around them.

What do you mean exactly by main area? And if I still want to take on this difficult task, can you direct me to where I can learn about doing it?

Thanks!
__________________
Gold 4.1.10
Reply With Quote
  #18  
Old 07-18-2008, 08:45 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: PHP and Smarty coding mods for newbie???

Not at all. Most people add their own designs to X-Cart - once you get the hang of it it is easier than you think. There is one set of templates so you edit them once and then every new page you create automatically uses the design. Add a new embedded static page and you'll see what I mean.

You can either buy a pre-made template from someplace like 7dana.com, or you can completely customize the look and feel to what you want. The pre-made templates are obviously easier, but a custom design is really the way to go if you want to get noticed.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #19  
Old 07-18-2008, 09:11 AM
 
spia spia is offline
 

Member
  
Join Date: Jul 2008
Posts: 21
 

Default Re: PHP and Smarty coding mods for newbie???

You've been a big help, but please give me a better handle on this.

If you wanted to "embed" or "integrate" X-cart into a section on the ryandesignstudio.com site or one of your clients like pointonearchitects.com, without breaking the existing design or looking like an aftermarket cart system was an aftertought to a custom designed site, how would you do it?

Thanks!
__________________
Gold 4.1.10
Reply With Quote
  #20  
Old 07-18-2008, 09:25 AM
 
Group Imaging Group Imaging is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 38
 

Default Re: PHP and Smarty coding mods for newbie???

I'm pretty sure you would be killing yourself to try to integrate x-cart into a totally external design. From what I've seen x-cart is a standalone app that you need to design inside of for it to fully function. Someone else can correct me if I'm wrong but I think you do what you are talking about with Lite Commerce.
__________________
Brad Thompson
Group Imaging
X-Cart Gold Version 4.1.8
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 03:53 PM.

   

 
X-Cart forums © 2001-2020