| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
PHP and Smarty coding mods for newbie??? | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
My 1st store is working but nowhere near live yet. I'm just getting the feel for the template system and understand that there is PHP coding within the HTML and that CSS and HTML can be modified just like any other web site. My question; is how to change some of the PHP (and Smarty?) coding? Really, how to even find it? I'm not talking about programing in PHP, simply changing some simple wording. Specifically: In top_menu.tpl, line 23 is this: Code:
That adds the "CALL US: 555.555.5555" to the header. We want to reword that to something like: If you need assitance call us at: 555.555.5555 The change has nothing to do with functionality, just verbiage, so where/how do I make that change (and similar types of changes)? Thanks guys! ![]()
__________________
Gold 4.1.10 |
|||||||
#2
|
|||||||
|
|||||||
![]() Ok, it isn't PHP, it is Smarty and all of it can be controlled one of two ways:
1. Webmaster Mode - read about this in the manual, it will be your best friend. 2. In the 'Languages' area of the admin - also covered pretty well in the manual. It looks much more complicated than it really is, you will never have to actually edit the text in the templates, it is all in the database and is controlled via Webmaster mode or the Languages area.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Or at times the general settings -> company options section, or in the payment configuration section, or some deeply buried section that will simply take time, effort and possibly forum research to locate
![]() |
|||||||||
#4
|
|||||||
|
|||||||
![]() Quote:
OK... so you're saying that when I click "Open customer area in a new window", in webmaster mode, the list of "Included templates & config files" are all I need to work with to change or reformat the design/layout, basic functions of the site? Thanks guys!
__________________
Gold 4.1.10 |
|||||||
#5
|
|||||||
|
|||||||
![]() No, webmaster mode will just let you change the text and let you know which template is which. To actually change layout, graphics and color, you have to edit the html in the templates, and the styles in the master stylesheet.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#6
|
|||||||
|
|||||||
![]() Going back to my example in my original post... I cannot find anything for the text "CALL US..." in the customer/top_menu.tpl template except the code I originally posted. I still don't understand then how I can reword that.
![]() Thanks!
__________________
Gold 4.1.10 |
|||||||
#7
|
|||||||
|
|||||||
![]() Yea, you aren't getting what I'm saying. Open the site in webmaster mode. Click on that text, you can edit it right there.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#8
|
|||||||
|
|||||||
![]() I do understand what you're saying... I just don't see the text. Either I'm blind to it or it's part of the code. If you have a moment, please look at the file in your store and let me know if I need to see the optometrist or not.
![]() Thanks a lot!
__________________
Gold 4.1.10 |
|||||||
#9
|
|||||||
|
|||||||
![]() Hi Spia,
You have used webmaster correctly and found the code which corresponds to the text you want to change. I am about to sleep - so quick reply without checking. Assuming your code example is correct, then it is telling me that smarty language variable holds the text "CALL US:" is "lbl_phone_1_title" (note: the lng. in front of this is telling smarty to use the current language version of this smarty variable e.g. if someone was in French on your store they would get the French version of the language variable "lbl_phone_1_title" and not the English one - just explaining the meaning of "lng." for you). The easiest way is to change the text for this language variable "lbl_phone_1_title". So in X-Cart Admin open the "Administration" -> "Languages" page and choose "English" for the selected language. This will then reload the page and show a list of all the smarty language variables used for English within your store (there are around 5000 for customer and admin side - so do not go page to page to search for this). In the search box (find) put in "lbl_phone_1_title" (without quotes obviously) and click to search for this variable (you could also put in "CALL US" - but that might not show just one language variable - so "lbl_phone_1_title" is best idea). Manually change the text in the box for this field "lbl_phone_1_title", to read "If you need assistance call us at" (note the colon ":" is not needed in the text in this box, as it appears in the template code example you showed above). Then click the save (update) button. Refresh your homepage in your browser and you should see the changed text appear. If it does not appear - clear your browser cache (e.g. Tools, Clear Private Data in Firefox browser) and try to view again... Hope this helps - cheers, Asiaplay PS: an alternative method is to add a new language variable in X-Cart languages (e.g. "lbl_phone_1_title_custom4me" and change the template line to use that - however I wouldn't bother adding a language variable in this case and changing the template (as no need for a simple change like this)... and would just change the text of the present "lbl_phone_1_title" being used (i.e. change standard X-Cart text as suggested above).
__________________
X-Cart Gold version 4.1.9 (plus built in X-Cart bugs!) |
|||||||
#10
|
|||||||
|
|||||||
![]() Great advice - Thank You! At least I don't need to see the optometrist...
A few more questions: How difficult is it to add new language variables and where does that go? Is that a Smarty thing and does that require PHP or Smarty coding skills as well? There seems to be a massive learning curve to create a graphically (not so much functionally) custom site. Am I right about this because it is discouraging?
__________________
Gold 4.1.10 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|