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

Extra Fields: Creating and making available for all Providers.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-20-2008, 11:13 AM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Question 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.
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #2  
Old 03-21-2008, 12:17 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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.
Reply With Quote
  #3  
Old 03-21-2008, 08:47 AM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default 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)

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

THANK YOU!!!
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #4  
Old 03-24-2008, 12:59 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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)!
Reply With Quote
  #5  
Old 04-17-2008, 04:06 PM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default 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.

__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #6  
Old 04-18-2008, 06:40 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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.


I will try to help you during the next week. Just at that time are no longer free.
Reply With Quote
  #7  
Old 04-18-2008, 11:44 AM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Default 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!
__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
Reply With Quote
  #8  
Old 04-25-2008, 12:38 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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' "); 
Reply With Quote
  #9  
Old 04-25-2008, 01:00 AM
  Yurij's Avatar 
Yurij Yurij is offline
Banned
 

X-Adept
  
Join Date: Jan 2008
Posts: 486
 

Default 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.
Reply With Quote
  #10  
Old 04-25-2008, 06:55 AM
  ScrapProfessor's Avatar 
ScrapProfessor ScrapProfessor is offline
 

Advanced Member
  
Join Date: Mar 2008
Posts: 90
 

Thumbs up 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!!!!

__________________
Joli Kirk,
"Life is not measured by the number of breaths we take, but by the number of moments that take our breath away"

X-Cart PRO 4.3.1 | Linux | PHP 5 | MySQL 5


AlteredCart.com - Download Expander; Product Page Downloads
BCSEngineering.com - On Sale Products; Newest Added Products
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 12:29 AM.

   

 
X-Cart forums © 2001-2020