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)
-   -   Extra Fields: Creating and making available for all Providers. (https://forum.x-cart.com/showthread.php?t=38472)

ScrapProfessor 04-30-2008 10:18 AM

Re: Extra Fields: Creating and making available for all Providers.
 
Dear Yuri,

I need some more help here. Let me explain. I would like to have a specific extra field (Designer) to be listed on the product listing page. I've created and setup the extra field just as you specified above (works BEAUTIFULLY! Thanks!). When a customer clicks on any of the categories the product listing page is brought up. It currently shows the following:

Product Image: Name of Product
SKU of Product
Short Description of Product
Market Price
Our Price
Quantity
Buy Now button, Add to Wishlist button

I would also like it to display the extra field "Designer" (provider name) in the list as well, preferrably below the SKU. How would I do this?

Your help and time is appreciated! THANK YOU!!

Yurij 05-02-2008 07:13 AM

Re: Extra Fields: Creating and making available for all Providers.
 
Quote:

Originally Posted by ScrapProfessor
Dear Yuri,

I need some more help here. Let me explain. I would like to have a specific extra field (Designer) to be listed on the product listing page. I've created and setup the extra field just as you specified above (works BEAUTIFULLY! Thanks!). When a customer clicks on any of the categories the product listing page is brought up. It currently shows the following:

Product Image: Name of Product
SKU of Product
Short Description of Product
Market Price
Our Price
Quantity
Buy Now button, Add to Wishlist button

I would also like it to display the extra field "Designer" (provider name) in the list as well, preferrably below the SKU. How would I do this?

Your help and time is appreciated! THANK YOU!!


Name "Extra field " - "Designer". If not, pls. change all"Designer" (in the entire code below) on your name.


1. Edit file "skin1/modules/Extra_Fields/product.tpl":
PHP Code:

{* $Idproduct.tpl,v 1.9 2005/11/21 12:42:06 max Exp $ *}
{
section name=field loop=$extra_fields}
{if 
$extra_fields[field].active eq "Y" && $extra_fields[field].field_value && $extra_fields[field].field ne "Designer"}
<
tr>
    <
td width="30%">{$extra_fields[field].field}</td>
    <
td>{$extra_fields[field].field_value}</td>
</
tr>
{/if}
{/
section


2. Create file "skin1/modules/Extra_Fields/product2.tpl":

PHP Code:

{* $Idproduct.tpl,v 1.9 2005/11/21 12:42:06 max Exp $ *}
{
section name=field loop=$extra_fields}
{if 
$extra_fields[field].active eq "Y" && $extra_fields[field].field_value && $extra_fields[field].field eq "Designer"}
<
tr>
    <
td width="30%">{$extra_fields[field].field}</td>
    <
td>{$extra_fields[field].field_value}</td>
</
tr>
{/if}
{/
section


Yurij 05-02-2008 07:33 AM

Re: Extra Fields: Creating and making available for all Providers.
 
3. For "PRODUCTS DETAILS PAGE":

3.1 Edit file "skin1/customer/main/product.tpl", after this lines:

PHP Code:

<tr><td colspan="2">&nbsp;</td></tr>
<
tr>
    <
td width="30%">{$lng.lbl_sku}</td>
    <
td nowrap="nowrap" id="product_code">{$product.productcode}</td>
</
tr


Insert the following code

PHP Code:

{if $active_modules.Extra_Fields ne ""}
{include 
file="modules/Extra_Fields/product2.tpl"}
{/if} 



3. For SUBCATEGORY page (config.Appearance.products_per_row="", Display products list in multiple columns (1-3) (leave empty to use standard format)):

3.1. Create file "skin1/modules/Extra_Fields/product3.tpl":
PHP Code:

{* $Idproduct.tpl,v 1.9 2005/11/21 12:42:06 max Exp $ *}
{
section name=field loop=$extra_fields}
{if 
$extra_fields[field].active eq "Y" && $extra_fields[field].value && $extra_fields[field].field eq "Designer"}
<
tr>
    <
td width="30%">{$extra_fields[field].field}</td>
    <
td>{$extra_fields[field].value}</td>
</
tr>
{/if}
{/
section


3.2. Edit file "skin1/customer/main/products.tpl", after this lines:
PHP Code:

{if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
<
br />
{
$lng.lbl_sku}: {$products[product].productcode}
{/if} 


Insert the following code

PHP Code:

{if $active_modules.Extra_Fields ne ""}
    <
table border="0">
    {include 
file="modules/Extra_Fields/product3.tpl" extra_fields=$products[product].extra_fields}
    </
table>
{/if} 


Yurij 05-02-2008 07:38 AM

Re: Extra Fields: Creating and making available for all Providers.
 
3. For SUBCATEGORY page (config.Appearance.products_per_row!=""):

3.1. Create file "skin1/modules/Extra_Fields/product3.tpl":
PHP Code:

{* $Idproduct.tpl,v 1.9 2005/11/21 12:42:06 max Exp $ *}
{
section name=field loop=$extra_fields}
{if 
$extra_fields[field].active eq "Y" && $extra_fields[field].value && $extra_fields[field].field eq "Designer"}
<
tr>
    <
td width="30%">{$extra_fields[field].field}</td>
    <
td>{$extra_fields[field].value}</td>
</
tr>
{/if}
{/
section


3.2. Edit file "skin1/customer/main/products_t.tpl", after this lines:
PHP Code:

{if $config.Appearance.display_productcode_in_list eq "Y" and $products[product].productcode ne ""}
{
$lng.lbl_sku}: {$products[product].productcode}<br />
{/if} 


Insert the following code

PHP Code:

{if $active_modules.Extra_Fields ne ""}
    <
table border="0">
    {include 
file="modules/Extra_Fields/product3.tpl" extra_fields=$products[product].extra_fields}
    </
table>
{/if} 


shanda 05-14-2008 05:47 AM

Re: Extra Fields: Creating and making available for all Providers.
 
This answer came right on time! Thanks a million!


All times are GMT -8. The time now is 08:46 PM.

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