Page 22 of 28 FirstFirst ... 122021222324 ... LastLast
Results 211 to 220 of 272
  1. #211
    Join Date
    Jun 2007
    Posts
    474
    Plugin Contributions
    2

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

    Quote Originally Posted by crazy_chris View Post
    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

  2. #212
    Join Date
    Nov 2009
    Posts
    59
    Plugin Contributions
    0

    Default 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

  3. #213
    Join Date
    Mar 2011
    Posts
    1
    Plugin Contributions
    0

    Default 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

  4. #214
    Join Date
    Feb 2011
    Location
    St. John's, NL, Canada
    Posts
    1
    Plugin Contributions
    0

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

    Quote Originally Posted by bunyip View Post
    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.

  5. #215
    Join Date
    Aug 2010
    Posts
    13
    Plugin Contributions
    0

    Default 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

  6. #216
    Join Date
    Nov 2009
    Location
    In beautyful New York
    Posts
    160
    Plugin Contributions
    2

    Default 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

  7. #217
    Join Date
    Nov 2007
    Posts
    71
    Plugin Contributions
    0

    Default 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

  8. #218
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

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

    Does the module copy_to_confirm.php have your new fields in it?
    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: v1.5.5]
    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!

  9. #219
    Join Date
    Nov 2007
    Posts
    71
    Plugin Contributions
    0

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

    Quote Originally Posted by Ajeh View Post
    Does the module copy_to_confirm.php have your new fields in it?
    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,

    } 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 :)

  10. #220
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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: v1.5.5]
    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!

 

 
Page 22 of 28 FirstFirst ... 122021222324 ... LastLast

Similar Threads

  1. change how latest products works or add new box that displays products we select
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Oct 2010, 04:19 PM
  2. shopping cart contents and new properties to the products
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Nov 2009, 05:50 PM
  3. Replies: 4
    Last Post: 20 Jun 2009, 04:06 PM
  4. !! Please help !! Add new Properties to your Products
    By JohnSquier in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 27 Feb 2008, 05:46 AM
  5. alter and add new product properties
    By jmitton in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Jan 2008, 03:24 PM

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