Forums / Setting Up Categories, Products, Attributes / How-To: Add new Properties to your Products

How-To: Add new Properties to your Products

Views: 144,144

Results 201 to 220 of 272
30 Nov 2010, 11:32 PM
#201
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

How-To: Add new Properties to your Products

Do a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
products_materials

select Admin then click SEARCH ...

Open a new tab in your browser, and do a search for:
products_technical

is anyone missing? :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

1 Dec 2010, 3:11 AM
#202
mikeinvaldosta avatar

mikeinvaldosta

New Zenner

Join Date:
Dec 2010
Location:
Georgia, US
Posts:
4
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Forgive my laziness, too many replies to read, but this appears to be a great fix to my dilemma. I am currently using "read only" attributes, which is a very painful process for creating new products.

If I move to this fix, what happens when an upgrade occurs? I could probably live with reapplying the fix if that is the only issue.

1 Dec 2010, 3:35 AM
#203
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How-To: Add new Properties to your Products

You would need to save any modified admin files, and compare, merge (if necessary), and reinstall them. The db changes should carry over.

1 Dec 2010, 8:36 AM
#204
techiescot avatar

techiescot

New Zenner

Join Date:
Nov 2009
Posts:
59
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Hi Linda

Ajeh:

Do a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
products_materials

select Admin then click SEARCH ...

Open a new tab in your browser, and do a search for:
products_technical

is anyone missing? :unsure:

Thanks for the reply. I tried that ... (When I tried just Admin in the filter I got an error (No matching Configuration Keys were found ... product_materials) but when I tried Catalog/Admin the results came through) Does that mean something?

When I ran both of these through the developers tool, all the same files are there and I checked through the syntax and it all looks the same too. It just seems to be that one field (techical) that is misbehaving. Any other ideas that I can try?

Well, I am sure that I will be able to find a way around the problem. I am thinking about making the Technical details and Maintenance a downloadable file - if I can get Delia's Extra Fields module to work with the latest upgrade.

However, I don't like to be beaten and would like to find a solution if at all possible - I never know when I might need to use that field and at the moment Delia's mod won't work for me.

Many thanks again.

OH NO ..... MORE SNOW !!!! I don't believe it!!!! :jawdrop:

Gillian

1 Dec 2010, 2:56 PM
#205
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

This sounds like you are not quite using the Developers Tool Kit correctly ...

Very carefully ... do a search in the Tools ... Developers Tool Kit ... in the bottom input box for:
products_materials

select Admin in the dropdown then click the SEARCH button ...

Open a new tab in your browser, and do a search for:
products_technical

is anyone missing?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Dec 2010, 8:19 AM
#206
techiescot avatar

techiescot

New Zenner

Join Date:
Nov 2009
Posts:
59
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Hi

I tried it again ... very carefully ... same result. Could the problem be that I have renamed my Admin folder? It seems to work fine seraching the catalog but not searching the admin. When I put Admin in the dropdown, it says searching 0 files at the top.

*Searching 0 files ... for: products_materials

Match Lines found: 0
Warning Error: No matching Configuration Keys were found ... products_materials*

Whereas when I put Catalog/admin in the drop down, it searches 854 files .... so it seems like it is not finding my admin folders. The foldwes it retreives in this latter serach do not include any admin files. I tried renaming Admin back to Admin but this didn't work either.

Mmmmm .... don't know what to try next ... Any suggestions?

Thanks for your patience with me ....

Gillian

Still snowed in ... kids have now been off school for a week!!!

2 Dec 2010, 2:45 PM
#207
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

Test a search on the word:
the

and select Admin in the dropdown ... do things show up?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Dec 2010, 2:48 PM
#208
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

It sounds like your /admin directory could be missing files or have files out of date ...

The answer you are getting on your search is as if you picked NONE from the dropdown rather than Admin ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

2 Dec 2010, 4:30 PM
#209
techiescot avatar

techiescot

New Zenner

Join Date:
Nov 2009
Posts:
59
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Hi

I tried searching for "THE" but again 0 files were checked. So there is a problem with my files.

I have upgrades to 1.3.9h. How can I check which file or what data might be missing ... a winmerge check of 1.3.9h with what I have or an earlier version compared to what I have?

Any idea which files control the developers tool function? I saw the one called developers_tool_kit.php but are there others?

All the best

Gillian

2 Dec 2010, 5:33 PM
#210
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

I use Beyond Compare from scootersoftware.com and that lets me compare all the files of a clean Zen Cart with a copy of my files on the server ...

If you own it, you can do FTP compares direct to the server ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

4 Dec 2010, 5:33 PM
#211
lindasdd avatar

lindasdd

Zen Follower

Join Date:
Jun 2007
Posts:
474
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

crazy_chris:

*Guarantee:

<?php if (!empty(**$product_info->fields['products_guarantee'])) **echo $product_info->fields['products_guarantee']; ?>*

I personally had to change !empty to !is_null since I sometimes want "0" values to display and the new PHP considers "0" to be the same as empty.

-lindasdd

15 Dec 2010, 11:38 AM
#212
techiescot avatar

techiescot

New Zenner

Join Date:
Nov 2009
Posts:
59
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Hi Ajeh

Thanks for all your help.

I got the developers tool kit to work by ensuring that the ADMIN folder was renamed in all the Configure files. I then did what you suggested and compared the "products_technical" with other fields that were working and discovered that a missing letter N was the culprit!!! It is now working well.

Now, on to the problem of invalid master category ID which is appearing on one or two products and not allowingany of the data from the database to show up.

Thanks

Gillian

15 Mar 2011, 2:11 AM
#213
kkstang82 avatar

kkstang82

New Zenner

Join Date:
Mar 2011
Posts:
1
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

When trying to add the the info from the product admin page I keep getting a white screen. The boxes are showing up to add my info. When I add it I will click preview. It doesnt show in there and then if I click update it just goes to a white screen.

Can someone help with this?

Thanks,

Keith

23 Mar 2011, 2:20 AM
#214
john_goold avatar

john_goold

New Zenner

Join Date:
Feb 2011
Location:
St. John's, NL, Canada
Posts:
2
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

bunyip:

Personally, I prefer to put new product properties into a separate table rather than the products table - you never know when the core code is going to change and perhaps encounter problems if you've added extra fields to a table (ever have a mysql error telling you the column count doesn't match?). It's a little more work to achieve the same result, but could save lots of time bug-hunting in the future.

Personally, I don't. It makes the code more complex (and hence more error-prone) and leads to poor structure. It also adds more overhead. If the Zen Project team write code that updates tables by using the VALUES (xxx, xxx, xxx, ...) syntax, then they are being silly. Their own code will end up breaking at some time. I suspect they use the much less error-prone "UPDATE table-name set col_x = 'xxxx', col_y = 'xxx' ...". I know I do -- it avoids having to go back and change code when the database schema changes. Note that separating your added columns into a separate table does not avoid this particular problem -- if you add another column to YOUR table, you can still break YOUR code unless you write your code to avoid the problem.

Tables should be kept as normalized as possible.

24 Mar 2011, 7:27 PM
#215
fjej1970 avatar

fjej1970

New Zenner

Join Date:
Aug 2010
Posts:
15
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Guys i have a dumb question, I want to replace the word: "Model" with "Part #" where can i change that?

Thanks

13 Apr 2011, 6:15 PM
#216
evelt avatar

evelt

Zen Follower

Join Date:
Nov 2009
Location:
In beautyful New York
Posts:
170
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

Search for the word Model in the lang. files

tools>Developers Tool Kit > Language File Look-ups:

find the one for that particular output

24 Jul 2011, 6:45 PM
#217
sam_m avatar

sam_m

New Zenner

Join Date:
Nov 2007
Posts:
71
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Ive not seen this issue on a search so will post here in case its happened to someone else,

I have 3 new product fields setup which are all working correctly, but have noticed when trying to Duplicate a Product, the new fields show up as empty.

Can anyone advise what file I need to edit to enter this information to copy over.

Thanks very much
Sam

25 Jul 2011, 12:38 AM
#218
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

Does the module copy_to_confirm.php have your new fields in it? :unsure:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

25 Jul 2011, 7:49 PM
#219
sam_m avatar

sam_m

New Zenner

Join Date:
Nov 2007
Posts:
71
Plugin Contributions:
0

Re: How-To: Add new Properties to your Products

Ajeh:

Does the module copy_to_confirm.php have your new fields in it? :unsure:

Thanks for the reply, ok ive messed about with the code a little on the copy_to_confirm but it is copying strange information over, replacing new field boxes with something completely different... for example I have 3 extra fields, none of the information actually gets copied, it takes it from another field (like model) depending where I place the extra fields this effects another fields data being copied, :wacko:

} elseif ($_POST['copy_as'] == 'duplicate') {
$old_products_id = (int)$products_id;
$product = $db->Execute("select products_otherinfo, products_size, products_weight2, products_type, products_quantity, products_model, products_image,
products_price, products_virtual, products_date_available, products_weight,
products_tax_class_id, manufacturers_id,
products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute,
product_is_free, product_is_call, products_quantity_mixed,
product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order,
products_price_sorter, master_categories_id
from " . TABLE_PRODUCTS . "
where products_id = '" . (int)$products_id . "'");

        $tmp_value = zen_db_input($product->fields['products_quantity']);
        $products_quantity = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
        $tmp_value = zen_db_input($product->fields['products_price']);
        $products_price = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
        $tmp_value = zen_db_input($product->fields['products_weight']);
        $products_weight = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;

        $db->Execute("insert into " . TABLE_PRODUCTS . "
                                  (products_otherinfo, products_size, products_weight2, products_type, products_quantity, products_model, products_image, 
                                   products_price, products_virtual, products_date_added, products_date_available,
                                   products_weight, products_status, products_tax_class_id,
                                   manufacturers_id,
                                   products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute,
                                   product_is_free, product_is_call, products_quantity_mixed,
                                   product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order,
                                   products_price_sorter, master_categories_id
                                   )
                      values ('" . zen_db_input($product->fields['products_type']) . "',
                              '" . $products_quantity . "',
                              '" . zen_db_input($product->fields['products_otherinfo']) . "',
                              '" . zen_db_input($product->fields['products_size']) . "',
                              '" . zen_db_input($product->fields['products_weight2']) . "',
                              '" . zen_db_input($product->fields['products_model']) . "',
                              '" . zen_db_input($product->fields['products_image']) . "',
                              '" . $products_price . "',
                              '" . zen_db_input($product->fields['products_virtual']) . "',
                              now(),
                              '" . (zen_not_null(zen_db_input($product->fields['products_date_available'])) ? zen_db_input($product->fields['products_date_available']) : '0001-01-01 00:00:00') . "',
                              '" . $products_weight . "', '0',
                              '" . (int)$product->fields['products_tax_class_id'] . "',
                              '" . (int)$product->fields['manufacturers_id'] . "',
                              '" . zen_db_input($product->fields['products_quantity_order_min']) . "',
                              '" . zen_db_input($product->fields['products_quantity_order_units']) . "',
                              '" . zen_db_input($product->fields['products_priced_by_attribute']) . "',
                              '" . (int)$product->fields['product_is_free'] . "',
                              '" . (int)$product->fields['product_is_call'] . "',
                              '" . (int)$product->fields['products_quantity_mixed'] . "',
                              '" . zen_db_input($product->fields['product_is_always_free_shipping']) . "',
                              '" . zen_db_input($product->fields['products_qty_box_status']) . "',
                              '" . zen_db_input($product->fields['products_quantity_order_max']) . "',
                              '" . zen_db_input($product->fields['products_sort_order']) . "',
                              '" . zen_db_input($product->fields['products_price_sorter']) . "',
                              '" . zen_db_input($categories_id) .

                              "')");

Any thought, much appreciated, thank you :)

25 Jul 2011, 11:02 PM
#220
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: How-To: Add new Properties to your Products

You are just sticking the new fields where ever ...

Put them on the end of the originals so that you are keeping everything in order ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!