| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Product Title - How to make it italic? | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
I am doing a site for a friend of mine who sells wild roses. Many of the products have latin names such as 'Rosa gallica Complicata'. Is it possible to have product titles formatted like this? Because it's not all in italics, just some of it. Thanks, Tim
__________________
Version: 4.4 OS: Linux |
|||||||
#2
|
|||||||
|
|||||||
![]() Anyone?
__________________
Version: 4.4 OS: Linux |
|||||||
#3
|
|||||||
|
|||||||
![]() Because you need to format the product title in 2 parts, you'll probably need to make an extra field for the non-italic part (or vice versa).
You'll need to wrap your head around extra fields and how they integrate with product.tpl It can be done. Good luck.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#4
|
|||||||
|
|||||||
![]() Thanks for replying. I'm glad to hear it can be done, but it seems beyond my skills. Perhaps I'll have to get this one outsourced, or not bother using italics.
Thanks again.
__________________
Version: 4.4 OS: Linux |
|||||||
#5
|
|||||||
|
|||||||
![]() at first i thought you could use html tags for the title, but apparently not
but i found a simple way around this and that is to manipulate strings using smarty in product.tpl look for Code:
Code:
in products.tpl or products_t.tpl, depending if you use the default column setup or not, look for Code:
Code:
and in the admin section when adding products, for the title name put #i# and #/i# as the open and closing of the italicized tags (similar to <i> and </i>) so in your example you type in: #i#Rosa gallica#/i# Complicata the admin section will still show the #i# and #/i# however, which you can always mod as well using the replace as above you have to edit bread crumbs and html title, but have it replace it with a null string rather than the italics for this case, as well (and whatever else that uses product title), but i cant think off the top of my head which tpl's these correspond to |
|||||||
#6
|
|||||||
|
|||||||
![]() Quote:
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#7
|
|||||||||
|
|||||||||
![]() An easier way would be to use this:
product.tpl Code:
products.tpl Code:
Or even better (for the products.tpl file), just change the ProductTitle class in skin1.css to this: Code:
|
|||||||||
#8
|
|||||||
|
|||||||
![]() that would italicize the whole title, he only wanted some of it to be italicized
|
|||||||
#9
|
|||||||||
|
|||||||||
![]() Quote:
...I guess maybe I should have read the orignal post... ![]() |
|||||||||
#10
|
|||||||
|
|||||||
![]() Hi All,
Another way of doing... just incase anyone prefers this approach (but the fix mentioned above will work too). I do Italics a different method than is used above.... for Italics I just use '<em>' to open and '</em>' to close. Using this there is no need to change the code within X-Cart at all (essentially the <em> script for php & smarty, is the same thing as using <i> in html) So for example 'Rosa gallica Complicata' would be '<em>Rosa gallica</em> Complicata' NOTE: This only Works if you do either a CSV import for the Product description OR you do the editing directly to your SQL table inside something like PHP MyAdmin (it does not work if you try to enter this into the field in X-Cart Admin product description field... this is as X-Cart parses / pass via a script on Save and doing this they remove the <em> etc.). However, If you want to type directly into X-Cart Admin, there is another way. i.e. '<span style="font-style: italic;">Rosa gallica</span>Complicata' But as you can see, you need to type much more text (but still no need to change the code in the tables for this to work)... however, if you use X-Cart Admin to enter the product descriptions, the fix above is perhaps an easier way (as code used to create italics within the product description is shorter). Personally I think the upload / import via CSV (and using <em>xxx</em>) is another feasible alternative, if you need to mix normal fonts with italic fonts. Hope comments are useful - cheers, Asiaplay.
__________________
X-Cart Gold version 4.1.9 (plus built in X-Cart bugs!) |
|||||||
|
|||
X-Cart forums © 2001-2020
|