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

Add extra field to Featured Products

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 10-21-2010, 09:02 AM
  RedandBlue's Avatar 
RedandBlue RedandBlue is offline
 

Senior Member
  
Join Date: Aug 2009
Posts: 170
 

Exclamation Re: Add extra field to Featured Products

Quote:
Originally Posted by Yurij
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:
{section name=field loop=$products[product].extra_fields}
{if 
$products[product].extra_fields[field].active eq "Y" && $products[product].extra_fields[field].value && $products[product].extra_fields[field].field eq "author"}
<
b>{$products[product].extra_fields[field].field}</b> - 
{
$products[product].extra_fields[field].value}
<
br>
{/if}
{/
section

3.Edit the file "skin1/customer/main/products.tpl"
after lines (for xcart 4.1.9 gold):
PHP Code:
<a href="product.php?productid={$products[product].productid}&amp;cat={$cat}&amp;page={$navigation_page}{if $featured eq 'Y'}&amp;featured{/if}"><font class="ProductTitle">{$products[product].product}</font></a>
{if 
$config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
<
br />
{
$lng.lbl_sku}: {$products[product].productcode}
{/if} 

insert next lines:
PHP Code:
<br>
{if 
$active_modules.Extra_Fields ne ""}
{include 
file="modules/Extra_Fields/product2.tpl"}
{/if} 

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.


could you please tell me how can i implement same in x-cart 4.3.2
i tried same code, it didn't work.

i really appreciate your time
thanks
__________________
rbgx
X-Cart 4.3.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:52 PM.

   

 
X-Cart forums © 2001-2020