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 03-20-2008 11:13 AM

Extra Fields: Creating and making available for all Providers.
 
As the admin to the store, I would like to create some extra fields and make them something that shows up to each provider when they are adding a new product. I know that providers can create their own 'extra fields', which is really not the way I want it. I want to create the specified extra fields in the admin area and have them be fields that the providers have to fill in when they add a product to their store.

Is this possible? Any help or suggestions would be great! :)

Thank you.

Yurij 03-21-2008 12:17 AM

Re: Extra Fields: Creating and making available for all Providers.
 
Maybe as an option to make the automatic generation - "Extra Fields" for each new product?
Take the reference product and has copied all "Extra" fields for each new product.

ScrapProfessor 03-21-2008 08:47 AM

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

Originally Posted by Yurij
Maybe as an option to make the automatic generation - "Extra Fields" for each new product?
Take the reference product and has copied all "Extra" fields for each new product.


Thanks for the reply Yurij. Unfortunately, you completely lost me. I've got about 18 hours sleep since last Friday because I've been trying to get the store up and functioning properly so maybe I've just got loopy and have lost the ability to understand. ??!! (Just Kidding) 8O

Really though, I don't understand what you mean with your post. Can you clarify??

THANK YOU!!! :D

Yurij 03-24-2008 12:59 AM

Re: Extra Fields: Creating and making available for all Providers.
 
To what you want to do will require some changes in the X-Cart.

1. Automatic created for each product list - "Extra fields."
2. The ban on the disposal of providers "Extra fields", established in paragraph № 1.
3. Editing list (add, edit, delete) "Extra fileds" established in paragraph № 1.

Maybe we should add a field not through "Extra fields? Add them through the table "product" This looks easier.

Then you should modify the database and one / two files (tpl-php)!

ScrapProfessor 04-17-2008 04:06 PM

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

Originally Posted by Yurij

Maybe we should add a field not through "Extra fields? Add them through the table "product" This looks easier.

Then you should modify the database and one / two files (tpl-php)!


Yuri,

YES! This is exactly what I would like to do. I have NO idea how to modify the database, but I'm not afraid to try if I get exact instructions. And, which templates would I have to modify and what would I have them say?

THANK YOU! I really look forward to your reply. This is excactly what I need and I'm sure there are others who need the same thing as wel.

:D/

Yurij 04-18-2008 06:40 AM

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

Originally Posted by ScrapProfessor
Yuri,

YES! This is exactly what I would like to do. I have NO idea how to modify the database, but I'm not afraid to try if I get exact instructions. And, which templates would I have to modify and what would I have them say?

THANK YOU! I really look forward to your reply. This is excactly what I need and I'm sure there are others who need the same thing as wel.

:D/


I will try to help you during the next week. Just at that time are no longer free.

ScrapProfessor 04-18-2008 11:44 AM

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

Originally Posted by Yurij
I will try to help you during the next week. Just at that time are no longer free.


That's fine. Thank you. ;) Talk to you soon!

Yurij 04-25-2008 12:38 AM

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

Originally Posted by ScrapProfessor
That's fine. Thank you. ;) Talk to you soon!


There is a solution to your problem:

We allow only one provider to change "Extra-Fileds", while other providers can only fill "Extra-Fileds" in the creation of their product.


The obligatory initial condition - no "Extra-Fileds" for all providers.


The order changes:
1. Create the backup site :)

2. Create provider (We need to know his login). You can use the provider, established by default (login: provider).

3. Edit file "modules/Extra_Fields/extra_fields.php",

Find the following line:
PHP Code:

$provider_condition = ($single_mode "" " AND $sql_tbl[extra_fields].provider='$extra_fields_provider' "); 


And replaced by:
PHP Code:

//$provider_condition = ($single_mode ? "" : " AND $sql_tbl[extra_fields].provider='$extra_fields_provider' "); 


Yurij 04-25-2008 01:00 AM

Re: Extra Fields: Creating and making available for all Providers.
 
4. Edit file "provider/extra_fields.php":

after this lines:
PHP Code:

#   
# Use this condition when single mode is disabled
#
$provider_condition = ($single_mode "" "AND provider='$login'"); 


Insert the following line:
PHP Code:

if ($login!="provider"func_header_location("home.php"); 


PS. .......$login!="provider"....
If the username "provider who can edit "Extra Fileds" no "provider", change this condition (Replace the "provider" for your provider login).

5. Edit file "skin1/provider/menu.tpl":

find this lines:
PHP Code:

{if $active_modules.Extra_Fields ne ""}
<
a href="{$catalogs.provider}/extra_fields.php" class="VertMenuItems">{$lng.lbl_extra_fields}</a><br />
{/if} 


and replace them with this:
PHP Code:

{if $active_modules.Extra_Fields ne "" and $login eq "provider"}
<
a href="{$catalogs.provider}/extra_fields.php" class="VertMenuItems">{$lng.lbl_extra_fields}</a><br />
{/if} 


PS. .......and $login eq "provider"....
If the username "provider who can edit "Extra Fileds" no "provider", change this condition (Replace the "provider" for your provider login).


If you have any difficulty or questions, I am here. :)


Total:
- We allowed only one provider to work with "Extra-fileds".
- All providers see the same set of "Extra-fileds" when working with the product.

ScrapProfessor 04-25-2008 06:55 AM

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

THANK YOU SO MUCH!! I did exactly what you said and it worked like a CHARM!!!

Can I donate some $$ to you for your time and assistance? PM me if you have a PayPal account, and I will donate to you.

THIS IS A GREAT MOD! Perfect for my type of website!!!!

:D/ :D/ :D/ :D/

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

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