Results 1 to 10 of 16

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Migrated site to v1.5.4 and having a small issue with categories

    Hey guys,

    I've migrated my site to the latest version of Zen about 6 months ago and everything works great except one thing I noticed this morning. When creating a new category / sub category, then adding a few products my products don't show. If I set the master category to an old category / sub category they show fine ? Also if I put a single product in the sub category it shows as well, Just a multiple product issue.

    I've looked at the obvious things like errors in the database etc and everything seems fine. The category is being created with a unique identifier. Also products are set to the correct category ID.

    Bit of a head scratcher Not asking to be walked through the issue, just maybe some pointer on where to look within the core or something it could be.

    Cheers guys !

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

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    Please provide the information in posting tips at the top when you reply
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    From 1.3.9g - v1.5.4. I've upgraded manually also migrating the DB manually. No plugins installed that would effect the category system. I have my own server so installed via SSH. MySQL 5.6.25-4 PHP Version: 5.6.12-1 (Zend: 2.6.0). http://www.norfolklights.com. Like I said just looking for a pointer in the right direction really.

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    When creating the new category / sub-category and adding the product, is the product in the category by itself, or is it in the category with a sub-category?

    Does this only happen in newly created categories or does a new product in an existing category also have the same problem?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    No products are in categories with subcategories. So if I create a new category (test), then a subcategory of test (subtest), then add a product (test_prod) with the master category ID subtest it shows as a single product. Now I add some more (test_prod1, test_prod2) with the master category ID subtest nothing shows. If I go and manually change the Master category ID to the last category set by the old site (old_cat) they show ?

    I've been through the database and nothing jumps out when comparing the structure of the old entries to the new entries. I'm checking in the product section, category section & product_to_category section and everything looks the same at first glance.

    I'm guessing this got to be a database error because there's nothing else that would cause this sort of error ?
    Last edited by drgr33n; 16 Sep 2015 at 05:21 PM.

  6. #6
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    Still can't get to the bottom of this. Trying to work my way through the code but can't figure it out. When I create a category I get the correct information in the database. Categories & Categories_description are populated with the correct information and nothing is different to anything else. Then I allocate a couple of products and the product exists in the database with no information missing but still if I allocate the product to a new created category the products are not shown.

    What makes me think maybe a template issue or something ?. Does anyone know where to look for code relating to how the product list is being generated ? I've used the developers tools included to search and found this but I can't see how it wouldn't function.

    Code:
    // Construct a category path to the product
    // TABLES: products_to_categories
      function zen_get_product_path($products_id) {
        global $db;
        $cPath = '';
    
        $category_query = "select p.products_id, p.master_categories_id
                           from " . TABLE_PRODUCTS . " p
                           where p.products_id = '" . (int)$products_id . "' limit 1";
    
    
        $category = $db->Execute($category_query);
    
        if ($category->RecordCount() > 0) {
    
          $categories = array();
          zen_get_parent_categories($categories, $category->fields['master_categories_id']);
    
          $categories = array_reverse($categories);
    
          $cPath = implode('_', $categories);
    
          if (zen_not_null($cPath)) $cPath .= '_';
          $cPath .= $category->fields['master_categories_id'];
        }
    
        return $cPath;
      }
    
    ////
    If I search using DTK through the template files I see loads of references so was just wondering if someone knows what files responsible for generating the list of products ? Zen cart is huge nowa days
    Last edited by drgr33n; 22 Sep 2015 at 12:32 PM.

  7. #7
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    In what view(s) are the multiple products not showing and in what view(s) do the newly added product show? There are multiple locations where such a list of product is generated (typically in the includes/modules/pages subfolder for the applicable page being displayed) if in the upgrade of the site these files were renamed leaving behind a file with the extension of .php intact, then that could cause an issue.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    How many languages do you have installed/configured?

    Have you applied the relevant bug fixes to your site? See: Known Bugs (and fixes) with v1.5.4

    Does the same problem happen with a fresh install in a new database (ie: with test data)? By using the demo database it may help rule out whether the problem is related to something unique to the server or to any plugins installed.

    Quote Originally Posted by drgr33n View Post
    No plugins installed that would effect the category system.
    Please list them anyway.
    .

    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. #9
    Join Date
    Oct 2010
    Posts
    84
    Plugin Contributions
    2

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    Hey guys,

    Only one language installed. Fresh install of zen cart works fine. Been through the bug fixes and nothing relevant there. The template was from template monster but didn't have any core modifications. Only mod really is a bit of javascript to scroll out text over 100 words and the banner scroller. Oh and few modifications for COWOA. I'm convinced this is a database issue might do a dump of the old site and the new sites DB and run diff to see if I can spot anything. But does anyone know where in the zen cart system is responsible for generating the product list ?

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

    Default Re: Migrated site to Zen 1.5 and having a small issue.

    Try switching to the classic template to see if they display
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. Replies: 4
    Last Post: 31 Jul 2013, 07:51 PM
  2. Having small EZpages issue. Please Help.
    By Coffinwear in forum General Questions
    Replies: 4
    Last Post: 28 Jul 2010, 02:41 PM
  3. An issue with Showing Top Categories AND Sub-categories
    By autoace in forum Customization from the Admin
    Replies: 0
    Last Post: 15 Sep 2009, 09:13 PM
  4. Migrated database and files... having trouble
    By hunterw in forum Installing on a Linux/Unix Server
    Replies: 32
    Last Post: 12 Jul 2008, 07:10 PM
  5. New here - Having an issue with header and sidebox
    By shelshell in forum Basic Configuration
    Replies: 0
    Last Post: 2 Jan 2008, 07:20 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