Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    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.

  2. #2
    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??

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,870
    Plugin Contributions
    96

    Default Re: Linked Products Report [Support Thread]

    Quote Originally Posted by izar74 View Post
    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??
    It's certainly something related by my mishandling of the information in the database! Is that last-product-added (ID 239) linked?

  4. #4
    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
    It's certainly something related by my mishandling of the information in the database! Is that last-product-added (ID 239) linked?
    Yes it is linked in one more category

 

 

Similar Threads

  1. Monthly Sales and Tax Summary Report [support thread]
    By skipwater in forum Addon Admin Tools
    Replies: 244
    Last Post: 4 Jul 2025, 03:16 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

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