Page 1 of 3 123 LastLast
Results 1 to 10 of 27
  1. #1
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Hello All,

    I'm attempting to delete a "TEXT" type option name that exists with all products on our web site. I would normally use "Delete ALL Option Values to ALL products for Option Name" but option names that are the text or file type don't appear in the list. Is there another way to delete this type of option name for all products?

    Any help would be appreciated. Thanks.

  2. #2
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    I've attempted to use the method found in this thread which seems to match my issue exactly.

    The query SELECT from products_attributes WHERE options_id= XX and options_values_id =0; with my option_id generates an error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from products_attributes WHERE options_id= 10 and options_values_id =0 LIMIT 0,' at line 1

    The query DELETE from products_attributes WHERE options_id= XX and options_values_id =0; deletes 4 items but seems to do nothing to the actual option name when you're in the Zen admin.

    We're currently using Zen 154, PHP 5.3.28 and MySQL 5.5.40 and the thread noted above is from 2010 so I'm assuming it's possible the solution isn't valid in 2015. Should these queries be functioning properly for me in 2015? or am I missing some required data?

    Any help would really be appreciated. Thanks!

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    What is meant by: it doesn't do anything with the actual option name in the admin?

    What and where are you still seeing information that I sno longer desired?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Quote Originally Posted by mc12345678 View Post
    What is meant by: it doesn't do anything with the actual option name in the admin?

    What and where are you still seeing information that I sno longer desired?
    Thank you for the reply.

    The option name still exists in the Zen Admin Catalog -> Option Name Manager and the attribute still exists with every product.

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

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Your SELECT will not work as there is nothing set for selection ... try using:
    Code:
    SELECT * from products_attributes WHERE options_id= XX and options_values_id =0;
    On the DELETE, this will delete the records in the products_attributes but it will not delete the Option Name ...

    Have you an URL to a Product that has TEXT attributes that you are trying to delete that we could perhaps look at?

    What is the DELETE that you are using that you say is failing?
    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!

  6. #6
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Quote Originally Posted by Ajeh View Post
    Your SELECT will not work as there is nothing set for selection ... try using:
    Code:
    SELECT * from products_attributes WHERE options_id= XX and options_values_id =0;
    That works thanks. When I run that query it only shows 4 product IDs (34, 46, 131 and 134) , however all products have this option_id.
    Quote Originally Posted by Ajeh View Post
    Have you an URL to a Product that has TEXT attributes that you are trying to delete that we could perhaps look at?
    The "Upload your Artwork" option id exists with every product, but you can use this link for reference, http://www.kcbgraphics.com/index.php...oducts_id=1032

    Quote Originally Posted by Ajeh View Post
    What is the DELETE that you are using that you say is failing?
    I'm using DELETE from products_attributes WHERE options_id= XX and options_values_id =0; and I stand corrected... it's actually working but it only deletes the option name for the 4 product ids noted above which is really confusing me...

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

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Are you using:
    Code:
    DELETE from products_attributes WHERE options_id=10 and options_values_id=0;
    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!

  8. #8
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Quote Originally Posted by Ajeh View Post
    Are you using:
    Code:
    DELETE from products_attributes WHERE options_id=10 and options_values_id=0;
    Yes that's correct and I get this result "4 rows deleted. (Query took 0.0013 sec)"

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

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Could you check the two files on the server for:
    /includes/configure.php
    /your_secret_admin/includes/configure.php

    are they both using the same database name?

    Where are you when you run the:
    Code:
    DELETE from products_attributes WHERE options_id=10 and options_values_id=0;
    In the Tools ... Install SQL Patches ... or in phpMyAdmin?
    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!

  10. #10
    Join Date
    Dec 2008
    Location
    Toronto
    Posts
    347
    Plugin Contributions
    0

    Default Re: Deleting an Option with a "TEXT" or "FILE" value for ALL products

    Quote Originally Posted by Ajeh View Post
    Could you check the two files on the server for:
    /includes/configure.php
    /your_secret_admin/includes/configure.php

    are they both using the same database name?

    Where are you when you run the:
    Code:
    DELETE from products_attributes WHERE options_id=10 and options_values_id=0;
    In the Tools ... Install SQL Patches ... or in phpMyAdmin?
    Both configure files are using the same database. I'm using phpMyAdmin to run the DELETE SQL query.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v150 Is this a bug in v1.50? orders_total doesn't output "text" but "value"
    By inception in forum General Questions
    Replies: 10
    Last Post: 10 Sep 2012, 05:38 AM
  2. HELP - ALL Attributes are showing up as "Text" for option value!
    By NWFAP in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Jan 2012, 01:14 AM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. Ability to get a list of "option value" by "customer"?
    By Banhi in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 26 Jan 2008, 07:57 PM
  5. Inside the "Categories" box it says "New Products" and "All Products"...
    By john9 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Feb 2007, 07:55 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