Page 4 of 28 FirstFirst ... 2345614 ... LastLast
Results 31 to 40 of 272
  1. #31
    Join Date
    Aug 2007
    Posts
    36
    Plugin Contributions
    0

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

    Quote Originally Posted by k4satin View Post
    The line that crazy_chris wrote, "ALTER..." is the SQL query itself. The menu that you found is an alternative to writing your own SQL queries for us SQL-illiterate folks. When you fill out the form and save your new field, phpMyAdmin creates the query for you, and it'll look like what crazy_chris wrote. You have to do it separately for each field. If you want to write in SQL query form instead, click on 'SQL' from the menu along the top. I think that if you're writing an SQL query you can include as many fields as you want at the same time.
    Okay,
    I went to SQL and I see this:

    Run SQL query/queries on database phones:

    In the blank where I can put what I want it says: SELECT * FROM `products` WHERE 1

    Do I just erase that an paste: ALTER TABLE `zencart_products` ADD `product_condition` INT NOT NULL , ADD `products_warranty` VARCHAR( 32 ) NOT NULL;


    And press on GO?

  2. #32
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,403
    Plugin Contributions
    6

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

    Are you using prefixes on your database tables?

    The default line you show reads products but what you say you want to add is reading zencart_products ...
    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!

  3. #33
    Join Date
    Aug 2007
    Posts
    36
    Plugin Contributions
    0

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

    Quote Originally Posted by Ajeh View Post
    Are you using prefixes on your database tables?

    The default line you show reads products but what you say you want to add is reading zencart_products ...
    Well I just copied and pasted what crazy had and changed the two things to what I want them to be. He had zencart_products in there. So what did I do wrong?

  4. #34
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,403
    Plugin Contributions
    6

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

    If the products table in your database is NOT called:
    zencart_products

    then you need to look and see what it is called ...
    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!

  5. #35
    Join Date
    Mar 2006
    Location
    Sacramento, CA
    Posts
    93
    Plugin Contributions
    0

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

    Ajeh,

    Glad to see you've joined us in this thread! We could use someone a little more knowledgeable.

    Would I mess everything up if I asigned my sku numbers as my product id's instead of using the auto-increment feature for 'products_id'? My sku numbers are alph-numeric.

  6. #36
    Join Date
    Aug 2007
    Posts
    36
    Plugin Contributions
    0

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

    Quote Originally Posted by Ajeh View Post
    If the products table in your database is NOT called:
    zencart_products

    then you need to look and see what it is called ...
    Okay, I don't see zencart_products anywhere. I see just products and after that it has like products_image, _weight, etc. What should I do?




    P.S. Could you please also reply to my other post: http://www.zen-cart.com/forum/showth...027#post414027

    Thanks.

  7. #37
    Join Date
    Mar 2006
    Location
    Sacramento, CA
    Posts
    93
    Plugin Contributions
    0

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

    I think what you'd want would go more like this:

    ALTER TABLE `products` ADD `products_condition` INT NOT NULL , ADD `products_warranty` VARCHAR( 32 ) NOT NULL;

    You might also want to edit INT and VARCHAR. INT means integer - you'd probably want VARCHAR for your product_condition, and you can set the length of the input field in the perentheses. For products_warranty, you might use INT, if it's just going to be a number...

  8. #38
    Join Date
    Aug 2007
    Posts
    36
    Plugin Contributions
    0

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

    Quote Originally Posted by k4satin View Post
    I think what you'd want would go more like this:

    ALTER TABLE `products` ADD `products_condition` INT NOT NULL , ADD `products_warranty` VARCHAR( 32 ) NOT NULL;

    You might also want to edit INT and VARCHAR. INT means integer - you'd probably want VARCHAR for your product_condition, and you can set the length of the input field in the perentheses. For products_warranty, you might use INT, if it's just going to be a number...
    Okay, do I need to put it where I thought I woud?

    I went to SQL and I see this:

    Run SQL query/queries on database phones:

    In the blank where I can put what I want it says: SELECT * FROM `products` WHERE 1

  9. #39
    Join Date
    Mar 2006
    Location
    Sacramento, CA
    Posts
    93
    Plugin Contributions
    0

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

    Quote Originally Posted by ElBasha View Post
    Okay, do I need to put it where I thought I woud?

    I went to SQL and I see this:

    Run SQL query/queries on database phones:

    In the blank where I can put what I want it says: SELECT * FROM `products` WHERE 1
    Just delete whatever's there and add your statement ('ALTER TABLE...) I think the other stuff is there to help you create an SQL statement, but not for what you're trying to do.

  10. #40
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,403
    Plugin Contributions
    6

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

    Quote Originally Posted by k4satin View Post
    Would I mess everything up if I asigned my sku numbers as my product id's instead of using the auto-increment feature for 'products_id'? My sku numbers are alph-numeric.
    The products_id is a control feature of Zen Cart and all of the code addresses this ...

    You do not want to alter this field nor manipulate it in any way ...
    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 4 of 28 FirstFirst ... 2345614 ... 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