Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Linked Products Report [Support Thread]

    The Linked Products Report, supported on Zen Cart v1.5.x, creates a table that contains each linked product, its master category's name and a list of the categories to which the product is linked. It's a tool that can help you manage your linked products, it also points out any products with an invalid master_categories_id!

    I'll update here once I've got a download link.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Re: Linked Products Report [Support Thread]

    Once approved, the plugin can be downloaded from here: http://www.zen-cart.com/downloads.php?do=file&id=1896

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,379
    Plugin Contributions
    29

    Default Re: Linked Products Report [Support Thread]

    interesting...what was the problem that instigated this solution?
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto, Product Listing Sorter...

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Re: Linked Products Report [Support Thread]

    Quote Originally Posted by torvista View Post
    interesting...what was the problem that instigated this solution?
    An upgrade in progress, with some categories' restructuring required, and a bunch of linked products. Once I got the basic restructuring finished, there were some "leftover" products and I needed to know what the current master_categories_id was and what the current linked categories were to make a "proper" assignment.

    P.S. That's one of my favorite questions: What is the problem we're trying to solve?

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Re: Linked Products Report [Support Thread]

    This plugin is now available for download.

  6. #6
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Linked Products Report [Support Thread]

    Hi,
    I've benn using this pluging for a while and it was all fine, today i added a new articles to the store, i made all the linking and checked.

    This is what i found:
    HTML Code:
    Incensi composti :: Himalaya	Error!
    
    Unable to determine the page link!
    
    Function used:
    
    zen_href_link('', 'product_type=&cPath=15&pID=239&action=new_product', 'NONSSL
    What's happening? On the store side it work perfectly...

    Zen Cart 1.54
    PHP 5.3.3

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Re: Linked Products Report [Support Thread]

    I'll need to review the code, but it looks like (somehow) the products_type value associated with products_id 239 is messed up. There's most likely an error-check I can add to the report's processing so that the zen_href_link function doesn't get "mad"!

  8. #8
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Linked Products Report [Support Thread]

    Quote Originally Posted by lat9 View Post
    I'll need to review the code, but it looks like (somehow) the products_type value associated with products_id 239 is messed up. There's most likely an error-check I can add to the report's processing so that the zen_href_link function doesn't get "mad"!
    Can I provide you with any information that could help? Unfortunately i got no debug error file...

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    11,126
    Plugin Contributions
    80

    Default Re: Linked Products Report [Support Thread]

    A couple of file changes. First, /YOUR_ADMIN/includes/languages/english/stats_products_linked.php, adding the line below:
    Code:
    define ('ERROR_MISSING_PRODUCT_TYPE', '<span style="color: red;">Error:</span> Unknown product type (%1$s) for the product named <em>%2$s [%3$s]</em>.');  //-%1$s: product_type, %2$s: products_name, %3$s: products_id
    Then, /YOUR_ADMIN/stats_products_linked.php, changing this section:
    Code:
      foreach ($linked_products as $products_id => $product_info) {
        if ($master_category_id == $product_info['master_category_id']) {
    ?>
                  <tr class="dataTableRow">
    <?php
          if (strpos ($category_names->get_name ($master_category_id), '==>') === 0) {
    ?>
                    <td class="dataTableContent"><span class="unknown"><?php echo $category_name; ?></span></td>
    <?php
          } else {
    ?>
                    <td class="dataTableContent"><a href="<?php echo $categories_base_link . "?cPath=$master_category_id"; ?>"><?php echo $category_name; ?></a></td>
    <?php
          }
    ?>
                    <td class="dataTableContent"><a href="<?php echo zen_href_link ($product_type_handlers[$product_info['products_type']], 'product_type=' . $product_info['products_type'] . "&amp;cPath=$master_category_id&amp;pID=$products_id&amp;action=new_product"); ?>"><?php echo $product_info['name']; ?></a></td>
                    <td class="dataTableContent">
    to look like the following (changes in red):
    Code:
      foreach ($linked_products as $products_id => $product_info) {
        if (!isset ($product_type_handlers[$product_info['products_type']])) {
          $products_link_name = sprintf (ERROR_MISSING_PRODUCT_TYPE, $product_info['products_type'], $product_info['name'], $products_id);
          
        } else {
          $products_link_name = '<a href="' . zen_href_link ($product_type_handlers[$product_info['products_type']], 'product_type=' . $product_info['products_type'] . "&amp;cPath=$master_category_id&amp;pID=$products_id&amp;action=new_product") . '">' . $product_info['name']. '</a>';
          
        }
        if ($master_category_id == $product_info['master_category_id']) {
    ?>
                  <tr class="dataTableRow">
    <?php
          if (strpos ($category_names->get_name ($master_category_id), '==>') === 0) {
    ?>
                    <td class="dataTableContent"><span class="unknown"><?php echo $category_name; ?></span></td>
    <?php
          } else {
    ?>
                    <td class="dataTableContent"><a href="<?php echo $categories_base_link . "?cPath=$master_category_id"; ?>"><?php echo $category_name; ?></a></td>
    <?php
          }
    ?>
                    <td class="dataTableContent"><?php echo $products_link_name; ?></td>
                    <td class="dataTableContent">
    That should result in an error message if the product's type value is not properly recorded in the database.

  10. #10
    Join Date
    Mar 2009
    Location
    Italy
    Posts
    155
    Plugin Contributions
    0

    Default Re: Linked Products Report [Support Thread]

    Hi Lat9,

    thanks for the help. Now it display the following:

    HTML Code:
    Error: Unknown product type () for the product named Astasuganda [239].
    I've checked the database and the last produts inserted is the one with the error but all the fields are correct, even the products_type (set to 1 as all the products).

    Is something related to Database??

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Monthly Sales and Tax Summary Report [support thread]
    By skipwater in forum Addon Admin Tools
    Replies: 228
    Last Post: 26 May 2022, 05:40 PM
  2. v152 Support Thread: Report All Errors (Even Warnings)
    By lat9 in forum Addon Admin Tools
    Replies: 34
    Last Post: 1 Feb 2020, 05:42 PM
  3. v151 Sales Report with Graphs support thread
    By JacobBushnell in forum Addon Admin Tools
    Replies: 17
    Last Post: 25 Jul 2019, 02:27 PM
  4. Business Activity Report 1.5.0 Support Thread
    By gharls in forum All Other Contributions/Addons
    Replies: 23
    Last Post: 6 Apr 2012, 11:12 PM
  5. Admin Activity Report [support thread]
    By Steven300 in forum All Other Contributions/Addons
    Replies: 17
    Last Post: 6 Aug 2009, 12:47 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