X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Add extra field to Featured Products (https://forum.x-cart.com/showthread.php?t=37674)

RedandBlue 10-21-2010 09:02 AM

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


All times are GMT -8. The time now is 03:06 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.