Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2013
    Posts
    2
    Plugin Contributions
    0

    Default Select Yes/No option when inserting a product

    Hello,

    When adding a product using the insert fuction, we get to specify options like price weight etc.
    I would like to add another item, and have a yes/no dropdown or radio button... it makes no difference to me.

    Is there a way to do this already thru Zen Cart or maybe a module exists or do I have to write myself?

    I've already looked at the attributes stuff and although this might work, my option has to be an "administrative" option where the customer can not change the value.


    Thanks for your help

    Thomas

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Select Yes/No option when inserting a product

    have a yes/no dropdown

    my option has to be an "administrative" option where the customer can not change the value
    Not sure what you are asking??

    You first what a yes/no option but then state that it is not to be selectable???

  3. #3
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Select Yes/No option when inserting a product

    Quote Originally Posted by tluksa View Post

    When adding a product using the insert fuction, we get to specify options like price weight etc.
    I would like to add another item, and have a yes/no dropdown or radio button... it makes no difference to me.

    Is there a way to do this already thru Zen Cart or maybe a module exists or do I have to write myself?
    Unless I'm misunderstanding you, you are trying to add another data field to the products information? Correct?

    If so, you'll need to do some custom editing. First and foremost you'll need to add another field to the 'products' table to store the setting.
    Next, you'll need to edit the following three files so that they contain suitable references to the new data entry:

    /admin/includes/languages/english/product.php (this file is used when editing a product. It contains the English descriptions of the data fields)
    /admin/includes/modules/update_product.php (This is the file used to update the database record)
    /admin/includes/modules/product/collect_info.php (this is the file used to retrieve the product data for editing)

    All of the edits are/will be very minor, and is basically a matter of copying and extending the existing data.

    You'll probably find it easier to use a text field rather than trying to create a radio button or dropdown. Just enter a '0' (or blank) to indicate 'no', and a '1' to indicate a 'yes'.

    What you do with this new data field after it has been added to a product is a whole new ballgame.

    Cheers
    Rod

  4. #4
    Join Date
    Jan 2013
    Posts
    2
    Plugin Contributions
    0

    Default Re: Select Yes/No option when inserting a product

    Quote Originally Posted by RodG View Post
    Unless I'm misunderstanding you, you are trying to add another data field to the products information? Correct?

    If so, you'll need to do some custom editing. First and foremost you'll need to add another field to the 'products' table to store the setting.
    Next, you'll need to edit the following three files so that they contain suitable references to the new data entry:

    /admin/includes/languages/english/product.php (this file is used when editing a product. It contains the English descriptions of the data fields)
    /admin/includes/modules/update_product.php (This is the file used to update the database record)
    /admin/includes/modules/product/collect_info.php (this is the file used to retrieve the product data for editing)

    All of the edits are/will be very minor, and is basically a matter of copying and extending the existing data.

    You'll probably find it easier to use a text field rather than trying to create a radio button or dropdown. Just enter a '0' (or blank) to indicate 'no', and a '1' to indicate a 'yes'.

    What you do with this new data field after it has been added to a product is a whole new ballgame.

    Cheers
    Rod
    You're spot on. Looks like i'm going to have to do some custom editing.

    Basicaly, we're trying to tag certain products and display them based on user access so we'll have to update the user fields too... but I just wanted to make sure i'm not trying to re-invent the wheel here if someone already had a plug in available.

    Thanks!
    Thomas

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

    Default Re: Select Yes/No option when inserting a product

    To make it a little easier ... follow the pattern of a field like:
    product_is_free

    to see how/where you need to make the changes for your new field ...
    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!

 

 

Similar Threads

  1. Help with error when inserting/updating custom product
    By cliftonj in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Apr 2012, 01:57 PM
  2. Inserting Option Value for Downloadable
    By annasue in forum General Questions
    Replies: 0
    Last Post: 10 Dec 2010, 05:26 PM
  3. Error when inserting product to new categories
    By yellowdaises in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 28 Nov 2006, 06:38 PM

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