| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Add extra field to Featured Products | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Add extra field to Featured Products
Hi, any ideas on how to add a specific extra field to customer/main/featured.tpl? (I want to add 'Author' next to the product title) The code in customer/main/products.tpl just pulls all extra fields in and is not specific so I cant copy that.
Assistance would be appreciated. Thanks
__________________
X cart Gold - Version 4.1.9 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Add extra field to Featured Products
What will be displayed in the field "Author"?
There are several options for how to do this, through the implementation of "Extra Fields" - not very convenient. Because by default "Featured products" no show "Extra fileds". Need to change "php" code X-Cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
Re: Add extra field to Featured Products
Have you thought about using the Manufacturers module for Authors?
__________________
Paul Dodman e-business & m-commerce consultant w: www.luminointernet.com e: xcart@luminointernet.com Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart. |
|||||||||
#4
|
|||||||
|
|||||||
Re: Add extra field to Featured Products
Manufacturers..... interesting. I shall look into it. It seems extra fields are very limited in their flexibility
__________________
X cart Gold - Version 4.1.9 |
|||||||
#5
|
|||||||
|
|||||||
Re: Add extra field to Featured Products
Quote:
Yes, it is the code I am after. Too complex to work out for myself as I do not know PHP!
__________________
X cart Gold - Version 4.1.9 |
|||||||
#6
|
|||||||||
|
|||||||||
Re: Add extra field to Featured Products
I was not much wrong, the task easier, here is a solution to your problem.
1. Create "Extra fileds" for the author, called "author" (name of the field should not be changed, Default value - Empty). 2. Create a new file "skin1/modules/Extra_Fields/product2.tpl" with the following content: PHP Code:
3.Edit the file "skin1/customer/main/products.tpl" after lines (for xcart 4.1.9 gold): PHP Code:
insert next lines: PHP Code:
4. Happy end When the module is active "extra fileds, and the product in the" featured product", and for "extra fileds" defined value "author " - will be displayed. It also displays the value of field "author" when viewing content category. If the feature is not required, need to make some changes. |
|||||||||
#7
|
|||||||
|
|||||||
Re: Add extra field to Featured Products
Thats great! Works prefectly.
If other wants to use this code, note the extra field name in the product2.tpl code is case sensitive.
__________________
X cart Gold - Version 4.1.9 |
|||||||
#8
|
|||||||||
|
|||||||||
Re: Add extra field to Featured Products
You can easily modify the code and use to groups of parameters, or that extra fields would appear only in a specific place.
f you do not know how, ask me, try to help! |
|||||||||
#9
|
|||||||
|
|||||||
Re: Add extra field to Featured Products
If you want the author's name to appear beneath the title for a featured product you can edit customer/main/products_t.tpl and add this code right below the product title
Code:
__________________
4.1.9 (Linux) Live Store www.thecrackedbook.com Find used books and out of print books. |
|||||||
#10
|
|||||||||
|
|||||||||
Re: Add extra field to Featured Products
Quote:
"Products_s.tpl" will work only if the following conditions are met: - it is the customer; - specified rate (Display products list in multiple columns (1-3)); - Module "Featured Products" is active or not active option "Display only featured products list in multicolumn format. " If any one condition is not fulfilled, "producst_t.tpl" will not be called. Consider this. |
|||||||||
|
|||
X-Cart forums © 2001-2020
|