Page 10 of 16 FirstFirst ... 89101112 ... LastLast
Results 91 to 100 of 159
  1. #91
    Join Date
    Jun 2009
    Location
    Des Moines, Iowa USA
    Posts
    580
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    I THINK I have success -
    Will know conpletely when I start to work in it - So again a tenative
    I so appriciate the time you have donated to this( and probably other) threads. this is an important aspect that has been so helpful.

    I do have one tiny glitch - probably is not hurting the program but it looks weird -

    www....stitchnframonline...com/snfcart

    kit
    crewel
    at the middle of the page i must have put in some sort of note to keep track of things and of course not really knowing what I am doing(sometimes it is dangerous) anyway it is showning up.

    I have foxfire WebDev but have been unable to find the wordage. Also did a MS search on my computer using the wordage but had no luck finding it - i am assuming that MS search really does not look for things like that.
    Again TY.

  2. #92
    Join Date
    Oct 2008
    Posts
    36
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    Glad to hear things look like they are sorted and you are most welcome to the help.

    You will probably be able to use Developers Tool Kit to find your text. If you login to your admin then from the Tools menu select Developers Tool Kit. Then in the 'Look-up in all files' section at the bottom of the page type in some or all of the text you wish to search for and select 'All Files - Catalog/Admin' from the drop down list. That should list any files with matching text.

  3. #93
    Join Date
    Jun 2009
    Location
    Des Moines, Iowa USA
    Posts
    580
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    Worked like a charm!

  4. #94
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: How To Add New Product Fields?

    Quote Originally Posted by greengreetings View Post
    I have a question. I followed all of the steps in the first post and when I go to a product in categories I receive this message:

    Warning: reset() [function.reset]: Passed variable is not an array or object in /usr/www/users/deleted for privacy/catalog/deleted for privacy/includes/classes/object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in /usr/www/users/deleted for privacy/catalog/deleted for privacy/includes/classes/object_info.php on line 30
    Product in Category: "Cards"


    I don't know what that means nor what I should do. Any suggestions?
    Hello Greengreetings,

    I am getting the same message. In my case it apeared after modifying my code from one to four extra fields. While i already hade modified multiple products with the first extra field.
    The message has somthing to do with the product ID's in the sdql table. After adding enough new products with four extra fields the message disapears.

  5. #95
    Join Date
    Oct 2009
    Posts
    2
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    webego,thank you very much!

    I have added 115 fields to my products successfully,just add my code very carefully according to what webego post.

  6. #96
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: How To Add New Product Fields?

    Thanks for getting this going webego it helps me a lot, hopefully I can give a little back.

    This was working fine for me until I tried to copy a product but I reliased that copying a product doesn't add an extra row in the added fields table for the newly copied product. As I use copy product alot I though I'd try to code a fix. So here goes.

    I've continued the original example using product_colour as the added field.

    I would be pleased if someone from the zen team can cast their eye over this to see if the code is ok, it works but there may be a better way of doing it.

    As always backup and test before you try this.


    Open admin/includes/modules/copy_to_confirm.php

    find (line 35 for me)

    $product = $db->Execute("select 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 . "'");

    replace with

    $product = $db->Execute("select p.products_type, p.products_quantity, p.products_model, p.products_image,
    p.products_price, p.products_virtual, p.products_date_available, p.products_weight,
    p.products_tax_class_id, p.manufacturers_id,
    p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute,
    p.product_is_free, p.product_is_call, p.products_quantity_mixed,
    p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max, p.products_sort_order,
    p.products_price_sorter, p.master_categories_id,
    pdex.products_colour,
    from " . TABLE_PRODUCTS . " p, " . TABLE_ADDED_FIELDS." pdex
    where p.products_id = '" . (int)$products_id . "'
    and pdex.products_id = '" . (int)$products_id . "'");
    Then after (line 109)

    $db->Execute("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . "
    (products_id, categories_id)
    values ('" . (int)$dup_products_id . "', '" . (int)$categories_id . "')");
    $products_id = $dup_products_id;
    $description->MoveNext();

    add

    // added fields////////
    $db->Execute("insert into " . TABLE_ADDED_FIELDS . "
    (products_id, products_colour )
    values ('" . (int)$dup_products_id ."', '" . zen_db_input($product->fields['products_colour']) . "' )");
    // added fields////////
    Sorry I can't seem to add source tag only quote, but you get my meaning
    Last edited by steveyork136; 9 Jan 2010 at 02:52 PM.

  7. #97
    Join Date
    Mar 2010
    Posts
    14
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    Hi,

    I am trying to add a field do product description as described in guide at the begining of this topic. I have encountered some problems though. When I want to edit product, all data is blank and I need to insert all data from the begining, as in entering new product. I found this is related to 4th point of the guide. I have checked at least 10 times if everything I added is done properly, and I found no error.

    This is how it looks:

    p.products_price_sorter, p.master_categories_id, pdex.products_class
    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
    TABLE_PRODUCTS_EXTRA_DATA . " pdex
    where p.products_id = '" . (int)$_GET['pID'] . "'
    and p.products_id = pd.products_id
    and p.products_id = pdex.products_id

    when I delete the changes from this section, everything works fine again.

    Please help, because I'm stuck.

    rgds
    HoGo

  8. #98
    Join Date
    Aug 2009
    Posts
    16
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    Hi. Thanks for posting this.

    I have an error though...

    Warning: reset() [function.reset]: Passed variable is not an array or object in /....../object_info.php on line 29

    Warning: Variable passed to each() is not an array or object in /...../object_info.php on line 30

  9. #99
    Join Date
    Jul 2009
    Location
    Texas
    Posts
    209
    Plugin Contributions
    2

    Default Re: How To Add New Product Fields?

    steveyork136, applied your code and it fixes the copy / duplicate item function perfectly. Thanks for saving me some time.

    Last two posts relate to this problem. Apply steveyork's fix and both should be solved.

    Anthony

  10. #100
    Join Date
    Aug 2009
    Posts
    15
    Plugin Contributions
    0

    Default Re: How To Add New Product Fields?

    Thanks alot for the post, I have managed to create about 10 new fields with no problems :). The time that was taken in writing this post is greatly appreciated.

    What I'd like to do now is make the new fields searchable in the header of my site (via a dropdown list), does anybody know of a easy way to achieve this? Also, does zen cart have any function built in for sanitizing user input or should I write this myself?

    Thanks

 

 
Page 10 of 16 FirstFirst ... 89101112 ... LastLast

Similar Threads

  1. How to add new fields?
    By chandroo007 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 1 Jun 2010, 03:13 PM
  2. How To Add New Fields to Invoice?
    By PudzPud in forum Basic Configuration
    Replies: 7
    Last Post: 15 Nov 2009, 03:50 PM
  3. Replies: 1
    Last Post: 10 Dec 2007, 02:40 PM
  4. How to add labels to new fields
    By kappaluppa in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 3 Feb 2007, 07:16 PM
  5. How i can add new data fields to a Product
    By shreesoft in forum Customization from the Admin
    Replies: 4
    Last Post: 2 Oct 2006, 03:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR