Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Weird issue with product types

    Dunno if this is the right place for this, but I ran to a odd issue with product types.

    I have the basic product types in my shop and have not ever touched them.

    For some reason 11 products in my database have had their product type id set to 0 (zero) and there is no product type with an id of 0 in the database... the first product type is "general" with id 1.

    I noticed this as I could not edit the products in admin, as it just kept giving me a "page not found" or that require() function could not open a file (because the product type directory could not be found)

    I have not touched the products in question in a long time, but they have worked just fine in the past.

    How can the product type change without touching them, and why only 11 products of the 166 products change?
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  2. #2
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Weird issue with product types

    Are you using something other than Zen Cart to add products to the Database?

    To fix them change the 0 to 1 directly in the database using phpMyAdmin.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Quote Originally Posted by Kim View Post
    Are you using something other than Zen Cart to add products to the Database?

    To fix them change the 0 to 1 directly in the database using phpMyAdmin.
    I have used easy populate something like 6 months ago, but the products were fine after that.

    I did an UPDATE query to the database to set the product types back... I was just wondering how this could have happened...

    someone SQL injecting me

    Well maybe not
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  4. #4
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Since my last post, again 3 products have had their product types set to 0.

    Fixed with:

    Code:
    mysql> update zen_products set products_type=1 where products_type=0;
    Query OK, 3 rows affected (0.05 sec)
    Rows matched: 3  Changed: 3  Warnings: 0
    This time 1 of the products was the same as before, but 2 were different and such products that I had not touched since the last occurance of this "malfunction"

    Since the last time, all I have done is updated stock numbers of some products, added few new products and moved a few products to new categorys.
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  5. #5
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Just wondering... is there a way to log all admin side queries?

    this way I could go through the log and see where the products type gets changed...
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  6. #6
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Since my last post, 6 products has had their product types set to 0 !!!!!!!

    Again the products seem "random", and non of them had been edited etc...!

    This is really starting to be annoying as the products do not work correctly if the type is 0 !!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  7. #7
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Again... since my last post, 6 products have been set to type 0

    Code:
    mysql> select products_id,products_type,products_quantity from zen_products where products_type=0;
    +-------------+---------------+-------------------+
    | products_id | products_type | products_quantity |
    +-------------+---------------+-------------------+
    |          53 |             0 |                 0 | 
    |         206 |             0 |                 5 | 
    |          74 |             0 |                10 | 
    |         137 |             0 |                 6 | 
    |         192 |             0 |                 3 | 
    +-------------+---------------+-------------------+
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  8. #8
    Join Date
    Mar 2004
    Location
    Finland
    Posts
    488
    Plugin Contributions
    3

    Default Re: Weird issue with product types

    Is there any builtin log-all-queries thingy in zencart... it slows things down but with it I could see where this happens!
    Working with Zen Cart since 2003 :: www.prr.fi
    Author of the original Finnish language pack for Zen Cart since 2004

  9. #9
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Weird issue with product types

    Hi Pasi,

    I have had this same problem a couple of times too, and in my case it seems to be related to editing a product while the cPath is not set (or maybe also when it's value is invalid?).

    Normally, when you edit a product using your Zen Cart admin, the url looks like this for example:
    admin/product.php?page=1&product_type=1&cPath=90&pID=681&action=new_product
    But when cPath is missing, like this:
    admin/product.php?page=1&product_type=1&pID=681&action=new_product
    and the product is updated, the product_type is set to 0.

    I haven't had time yet to look into it further and do more testing, hopefully I will have time later today or tomorrow.

  10. #10
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Weird issue with product types

    I think I spoke to soon! It probably was the product_type itself that was not set.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Weird Issue with Detailed Product Page & Images
    By katiecreates in forum General Questions
    Replies: 5
    Last Post: 7 Jul 2014, 05:36 AM
  2. weird issue with master category in product page
    By willie bee in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 21 Nov 2011, 03:42 PM
  3. Replies: 2
    Last Post: 14 Jun 2010, 08:04 PM
  4. Weird Product Description Issue
    By bennettelec in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 7 Apr 2008, 08:40 PM
  5. Moved, weird issue with logging in
    By bonni in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 20 Oct 2006, 10:06 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