Page 5 of 28 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 272
  1. #41
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

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

    I was able to get text area to work by copying the Description code. You need to duplicate it all over the files and do a similar table in your db.

    I tried to copy the manufacturers_id for a pull down, but it didn't work. I am thinking cause that code works differently. It pulls the manufacturers names form a table that is populated by the admin. I just want to do it myself one time with 6 values. I haven't been able to get a working pull down yet. and no one has yet to have answers for me on this forum.

  2. #42
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

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

    Still hoping for someone to cue in on how to get 6 options in a pull down menu as a new product property...


    What I really don't understand about all this is why is it so hard to do? I used a different cart like 5 years ago, and it let you set these up really easily in the admin. I really think this should be a feature of the cart as it makes customizing product types and properties so easy. This is a pain for anyone needing specialized fields.

  3. #43
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

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

    Quote Originally Posted by magneteye View Post
    I tried to copy the manufacturers_id for a pull down, but it didn't work. I am thinking cause that code works differently. It pulls the manufacturers names form a table that is populated by the admin.
    yes, that works differently, although there are similarities.
    Quote Originally Posted by magneteye View Post
    I just want to do it myself one time with 6 values. I haven't been able to get a working pull down yet. and no one has yet to have answers for me on this forum.
    Somewhere in the top of your product type's collect_info.php script, put something like this:
    Code:
          $my_list_of_options = array();
          $my_list_of_options[] = array('id' => 'Name of option 1',  'text' => 'Name of option 1');
          $my_list_of_options[] = array('id' => 'Name of option 2',  'text' => 'Name of option 2');
          $my_list_of_options[] = array('id' => 'Name of option 3',  'text' => 'Name of option 3');
          $my_list_of_options[] = array('id' => 'Name of option 4',  'text' => 'Name of option 4');
          $my_list_of_options[] = array('id' => 'Name of option 5',  'text' => 'Name of option 5');
          $my_list_of_options[] = array('id' => 'Name of option 6',  'text' => 'Name of option 6');
    Note the duplication of description in both the id and text sides.

    Then, later where you want the pulldown to display, echo something like this:
    Code:
    zen_draw_pull_down_menu('my_selected_option_from_database', $my_list_of_options, $pInfo->my_selected_option_from_database)
    where my_selected_option_from_database refers to the name of the database field which is storing the value selected, and which you've already retrieved earlier in the script.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #44
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

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

    Dr Byte. I really appreciate your response. I can kind of get what you have there. Any tips on setting up the tables in the database? I think I did that wrong when i first tried.

  5. #45
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

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

    Quote Originally Posted by magneteye View Post
    Dr Byte. I really appreciate your response. I can kind of get what you have there. Any tips on setting up the tables in the database? I think I did that wrong when i first tried.
    Sorry, I have no idea what you've done to get where you're at. The process of adding new fields is not something that is described in one page. It requires significant understanding of databases, database structures, coding methodologies, etc. It's not for the faint of heart.
    I've not read all your posts in this thread, and I suspect that some steps are right, and others are not understanding.
    The first post in this thread covers the "big picture" of the concepts, and probably worked great for the original poster's initial needs. That doesn't mean it necessarily meets "your" needs fully.

    How many fields are you trying to add?
    What is their purpose? What is the business need you're trying to solve?
    How is each being used?
    What fields have you created in the database?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #46
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

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

    Dr. Byte... to answer your questions:


    How many fields are you trying to add?
    Six fields.


    What is their purpose?
    Sizes of clothing.


    What is the business need you're trying to solve?
    Consignment (used) clothing. Items sold only once, then removed from product database. See the link in my sig to see the site.


    What fields have you created in the database?
    I created a table called products_sizes and added 6 fields, one for each size (small, medium, large, xlarge, petite, plus sizes). I think I may need to have a primary key setup?



    I basically just want to be able to select the size in admin when adding a product. Then the size is displayed on the product page. Lastly, I want to add the sizes to the end of my categories menu so a user can shop by size.

  7. #47
    Join Date
    Aug 2007
    Location
    Tampa FL.
    Posts
    142
    Plugin Contributions
    0

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

    Dr. Byte,
    a quick question about the drop down menu, if i wanted to have a drop down of lets say 6 images to be placed in a product how would i link the image to what you have displayed:
    $my_list_of_options = array();
    $my_list_of_options[] = array('id' => 'Name of option 1', 'text' => 'Name of option 1');
    $my_list_of_options[] = array('id' => 'Name of option 2', 'text' => 'Name of option 2');
    $my_list_of_options[] = array('id' => 'Name of option 3', 'text' => 'Name of option 3');
    $my_list_of_options[] = array('id' => 'Name of option 4', 'text' => 'Name of option 4');
    $my_list_of_options[] = array('id' => 'Name of option 5', 'text' => 'Name of option 5');
    $my_list_of_options[] = array('id' => 'Name of option 6', 'text' => 'Name of option 6');

    the drop down would have text for the admin to chose from but the result would be an image displayed in the product display for the customer

    any help i would be gratfull
    thanks in advance
    rich

  8. #48
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

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

    Quote Originally Posted by hostmonster View Post
    Dr. Byte,
    a quick question about the drop down menu, if i wanted to have a drop down of lets say 6 images to be placed in a product how would i link the image to what you have displayed:
    $my_list_of_options = array();
    $my_list_of_options[] = array('id' => 'Name of option 1', 'text' => 'Name of option 1');
    $my_list_of_options[] = array('id' => 'Name of option 2', 'text' => 'Name of option 2');
    $my_list_of_options[] = array('id' => 'Name of option 3', 'text' => 'Name of option 3');
    $my_list_of_options[] = array('id' => 'Name of option 4', 'text' => 'Name of option 4');
    $my_list_of_options[] = array('id' => 'Name of option 5', 'text' => 'Name of option 5');
    $my_list_of_options[] = array('id' => 'Name of option 6', 'text' => 'Name of option 6');

    the drop down would have text for the admin to chose from but the result would be an image displayed in the product display for the customer

    any help i would be gratfull
    thanks in advance
    rich
    The whole issue is a complex topic. The first post in this thread covers the overall concepts.
    You'll need to create a database field to store the choice. Then create the forms for selecting the desired option when entering/editing the products, make sure the info gets saved, and then in the display template make sure the page displays the proper image based on the entry.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #49
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    163
    Plugin Contributions
    0

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

    Dr Byte, did you see my reply up a couple from what you asked me last about what I was trying to do... my pulldown question got kinda hijacked here. I am still trying to figure it out.

    Thanks!

  10. #50
    Join Date
    Jan 2004
    Posts
    64,748
    Blog Entries
    6
    Plugin Contributions
    74

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

    Quote Originally Posted by magneteye View Post
    Six fields.

    Sizes of clothing.
    This would be a classic reason for using attributes.

    Quote Originally Posted by magneteye View Post
    I created a table called products_sizes and added 6 fields, one for each size (small, medium, large, xlarge, petite, plus sizes).
    If I correctly read your proposed structure for the products_sizes table as being a reference table, your needs are more directly reflective of pulling data from the Manufacturers table and simply storing the selected choice into your new "product_size" field in your products table:
    - query the table
    - build an array of its entries
    - display a pulldown
    - store the selected entry
    - then in the storefront, display information appropriately based on the selected setting
    - and build your shop-by-size choices in the category menu

    Quote Originally Posted by magneteye View Post
    Lastly, I want to add the sizes to the end of my categories menu so a user can shop by size.
    That's yet another kettle of fish ... and doing it by using normal attributes would be admittedly more difficult. Using a dedicated size table as you're considering may be a touch easier. Nevertheless, I recall a contribution floating around some time back that had code for shop-by-size in it. It should be in the downloads section if you want to use it as a reference. I think it was attribute-based.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 5 of 28 FirstFirst ... 3456715 ... 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