If this is your first visit, check our documentation. To post, register or login.

Master Categories ID's Keep Changing

Locked

Started by nfallat on 5 Sep 2010, 10:27 PM · Views: 5,984

Results 1 to 20 of 35
This thread is locked. New replies are disabled.
5 Sep 2010, 10:27 PM
#1
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #1 by nfallat

I've had this problem for a while but now it's becoming even more of a problem.

I have a list of main categories (Designer). I upload all the products to start out in these by Designer categories.

Then we link to other categories like "Dresses By Style" and "Dresses Shown In" which is color categories.

The problem is, the master Categories ID keeps resetting magically to these other linked categories.

I know how to do the Store Manager/Reset Master Categories ID but that does not fix it.

I also know how to reset globally category-by-category in the Mulitiple Categores Links Manager at the bottom.

But now, even when I try to reset the Master Category ID's back to the "Designer" category, it shows fixed in Zencart but on the site when you click on a product it still shows it in the other linked category.

2 Problems I have found with this:

  1. When the customer clickes on a product in the main Designer category and clicks Next, they are not in a different category - like "short" or "ballgowns". Now they are no longer looking at "After Five" dresses, they are looking at "Short"

  2. On coupon code restrictions, it's not recognizing a restricted category because the Master Category ID is not that main Designer category.

An example is "Hannah S Short" category. Product 27561. The "Hannah S Short" category is restricted from coupon code folswitch.

But if you try to buy that product the coupon code works. Because it thinks it is in the "Short" category which is not restricted.

We are using Zen Version 1.3.8 with several mods - testimonials manager, easy populate, and other various minor mods that I don't think are related.
domain www.f i n d m y p r o m d r e s s . c o m

We are desperate to fix this problem. Any answer to this? If not, the link function is basically unusable.

6 Sep 2010, 6:06 AM
#2
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #2 by nfallat

I have an update to this post. I went into Coupon Admin and restricted code for non-designer categories (like "Short") and tested the product 27561 again and now it restricts like I want it to. But it looks like this is based on the website thinking it is in Short Master ID, not Hannah S Short. I reste the Master ID to be Hannah S Short and it shows that in Zen but not on site. So it looks like whatever the site thinks it is controls the coupon code restriction.

But additional problem is that I have Alyce After Five category not on sale so should NOT be restricted from coupon code. But the coupon codes does not work (even though I reset it's Master ID to Alyce After Five because on the site, the navigation says it's main category is Short- which is restricted.

And still the additional problem is why does the Master ID keep changing back in the Master Categories Link Manager to the wrong one? Maybe because the site navigation is ruling and keeps wanting to change it back in the Master Categories Link Manager?

I am surprised I have not seen other posts about this apparent bug.

6 Sep 2010, 6:55 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #3 by drbyte

If it's a bug then one will be able to recreate the problem in a fresh clean install of a new store using the latest version.
Please list the exact steps to recreate the problem in such a clean environment.

.
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 Sep 2010, 3:03 AM
#4
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #4 by nfallat

DrByte:

If it's a bug then one will be able to recreate the problem in a fresh clean install of a new store using the latest version.
Please list the exact steps to recreate the problem in such a clean environment.

I tried it in a test zen, really bare bones with just a couple of products and it did not recreate the problem. But the problem is, it seems, on my live sites, to be just changing the master randomly to the category with the lowest category ID number.

Any potential fix for this? Others MUST have this problem as well.

9 Sep 2010, 3:11 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

nfallat:

Others MUST have this problem as well.Can't recall any.

nfallat:

Any potential fix for this?http://www.zen-cart.com/wiki/index.php/Troubleshoot_-_Diagnosing_Obscure_Issues

.
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 Sep 2010, 4:54 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #6 by ajeh

In v1.3.8, there are Known Bugfixes relating to this issue:
http://www.zen-cart.com/forum/showthread.php?t=82619

This is also a good time to check your Security Patches and Updates:
http://www.zen-cart.com/forum/showthread.php?t=131115

NOTE: all of these and more are done in the Current version of Zen Cart from our Home page ...

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!

9 Sep 2010, 9:42 PM
#7
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #7 by nfallat

Ajeh:

In v1.3.8, there are Known Bugfixes relating to this issue:
http://www.zen-cart.com/forum/showthread.php?t=82619

This is also a good time to check your Security Patches and Updates:
http://www.zen-cart.com/forum/showthread.php?t=131115

NOTE: all of these and more are done in the Current version of Zen Cart from our Home page ...

Thanks for the reply. Are you referring to just #2 below of my post? (coupon code restrictions). Or was there something, in general, about the master categories ID's changing in the first place to the lowest master category ID#? I didn't see the answer to that one. What I saw was the post that started:

Problem: Discount Coupon Category Restrictions are not always working right ...

Solution: change a function in:
/includes/functions/functions_general.php

My issues were:

  1. When the customer clickes on a product in the main Designer category and clicks Next, they are not in a different category - like "short" or "ballgowns". Now they are no longer looking at "After Five" dresses, they are looking at "Short"

  2. On coupon code restrictions, it's not recognizing a restricted category because the Master Category ID is not that main Designer category.

9 Sep 2010, 10:09 PM
#8
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #8 by ajeh

If you apply the Known Bug Fixes to correct the Master Categories issue in your older version and then clean up your site, they should stay fixed now that the bug fixes are applied ...

If they keep changing, then something else is going on that you will need to look into ...

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!

10 Sep 2010, 12:55 AM
#9
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #9 by nfallat

Ajeh:

If you apply the Known Bug Fixes to correct the Master Categories issue in your older version and then clean up your site, they should stay fixed now that the bug fixes are applied ...

If they keep changing, then something else is going on that you will need to look into ...

Apply which bug fixes? Just #37? I don't see any here that really seem to relate directly to the ID's changing issue except this one that refers to coupon code restrictions.

10 Sep 2010, 1:01 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #10 by ajeh

Personally, a bug is a bug and you should be doing them all ... that is why they are listed to be fixed and were all fixed in the current release ... :smile:

Anything with Categories and master_categories_id for sure ...

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!

11 Sep 2010, 9:43 PM
#11
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #11 by nfallat

Ajeh:

Personally, a bug is a bug and you should be doing them all ... that is why they are listed to be fixed and were all fixed in the current release ... :smile:

Anything with Categories and master_categories_id for sure ...

If it's a bug, then it's a bug in 1.3.9 too. Have other carts on 1.3.9e. Tested it on one of those and same problem.

Tried applying bug fix #37 on the 1.3.8 and did not fix it.

11 Sep 2010, 10:21 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #12 by drbyte

nfallat:

If it's a bug, then it's a bug in 1.3.9 too. Have other carts on 1.3.9e. Tested it on one of those and same problem.

Tried applying bug fix #37 on the 1.3.8 and did not fix it.

Notwithstanding all that you've already posted above in relation to your own symptoms on your own 1.3.8 store, I'm unable to pick out the exact steps to duplicate what you think is a bug, using a fresh clean brand new uncustomized install of v1.3.9f.
If you can provide the steps to exactly recreate the "bug" you allege, then we'll attempt to fix it.
As it stands now I'm having difficulty reproducing anything you describe, and as such can't confirm it as a bug.

.
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.

13 Sep 2010, 10:08 PM
#13
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #13 by nfallat

Ajeh:

Personally, a bug is a bug and you should be doing them all ... that is why they are listed to be fixed and were all fixed in the current release ... :smile:

Anything with Categories and master_categories_id for sure ...

I am really at a loss. Tried applying the patches, tried the problem on 1.3.9 version. Still does not work.

Linked products keep resetting to LOWEST category ID number. Can't scroll through a category which defeats the purpose of the next button. Have to go back to the category page to see the next item.

And, again coupon restrictions don't work right because of this.

Try it on 1.3.9 and I think you will see it is still a problem.

Nancy

13 Sep 2010, 11:07 PM
#14
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #14 by ajeh

Could you search the file, on the server, for:
/includes/functions/functions_lookups.php

and find the line:

  function zen_get_products_category_id($products_id) {

around line 306, and copy the whole function here ...

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!

15 Sep 2010, 8:55 PM
#15
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Post #15 by sph

Ajeh:

Could you search the file, on the server, for:
/includes/functions/functions_lookups.php

and find the line:

function zen_get_products_category_id($products_id) {

> 
> around line 306, and copy the whole function here ...

Hi and thanks for the help. I am replying for my sister.

*****************************

* @copyright Copyright 2003-2007 Zen Cart Development Team

  function zen_get_products_category_id($products_id) {
    global $db;


    $the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "'" . " order by products_id,categories_id";
    $the_products_category = $db->Execute($the_products_category_query);


    return $the_products_category->fields['categories_id'];

  }

*******************************

Our new satellite zen cart sites are 1.3.9e and f. However, our main two sites are 1.3.8a; we are hesitant to upgrade as they are the powerhouses. 

Would a link help?

Steve
prommart.com

15 Sep 2010, 9:03 PM
#16
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #16 by drbyte

nfallat:

Try it on 1.3.9 and I think you will see it is still a problem.

SPH:

Hi and thanks for the help. I am replying for my sister.


  • @copyright Copyright 2003-2007 Zen Cart Development Team

    function zen_get_products_category_id($products_id) {
    global $db;

    $the_products_category_query = "select products_id, categories_id from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "'" . " order by products_id,categories_id";
    $the_products_category = $db->Execute($the_products_category_query);

    return $the_products_category->fields['categories_id'];

    }
    That code is not from v1.3.9.

.
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.

15 Sep 2010, 10:31 PM
#17
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #17 by ajeh

The point of my having your pull that function was to see if you had upgrade your files correctly ...

As DrByte has pointed out, that is not the correct code for v1.3.9 and a good indication that things are not running correctly with mixed code ...

If this function is bad ... there is no telling what else is bad on the code that could be resulting in some bizarre situations ... :unsure:

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!

16 Sep 2010, 5:49 PM
#18
sph avatar

sph

Totally Zenned

Join Date:
Jan 2006
Posts:
1,556
Plugin Contributions:
0

Post #18 by sph

Thanks for the replies. Yes, I know the code is not 1.3.9...the carts in question are still 1.3.8a's.

It looks like an upgrade on our main carts is only real solution.

Steve
prommart.com

16 Sep 2010, 6:52 PM
#19
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #19 by ajeh

Upgrading is the best solution ...

It would probably take as long to apply all of the Security Patches and Upgrades for v1.3.8 ... and to apply all of the Known Bug Fixes for v1.3.8 ...

The Upgrade to the current release of Zen Cart, on our Home page would be the most current and secure version ...

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!

17 Sep 2010, 5:43 AM
#20
nfallat avatar

nfallat

New Zenner

Join Date:
Jan 2009
Posts:
84
Plugin Contributions:
0

Post #20 by nfallat

Ajeh:

Upgrading is the best solution ...

It would probably take as long to apply all of the Security Patches and Upgrades for v1.3.8 ... and to apply all of the Known Bug Fixes for v1.3.8 ...

The Upgrade to the current release of Zen Cart, on our Home page would be the most current and secure version ...

Again, tried it on a 1.3.9 site and still same problem. Can you point to ANY site where links are being used so I can see an instance where links work without setting the master id to the lowest linked id?

Nancy