Results 1 to 3 of 3

Product Attributes Sort Order v1.0

This is a discussion on Product Attributes Sort Order v1.0 within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; osCommerce Community Add-Ons I have installed this mod but am having problems with one page. The instructions call to find ...

      
  1. #1
    Member
    Join Date
    Jun 2008
    Posts
    73
    Rep Power
    4


    Default Product Attributes Sort Order v1.0

    osCommerce Community Add-Ons

    I have installed this mod but am having problems with one page.

    The instructions call to find and replace certain code on the product_info.php page.


    I have found the information in templates aabox product_info.php

    My problem is, the code on that page has been completely modified and I dont know what I should edit.

    Everything I have tried so far has resulted in errors on the page.



    Current page code

    Code:
    <?php
        }
            //// END:  Added for Dynamic MoPics v3.000
    ?>
              <p><?php echo stripslashes($product_info['products_description']); ?></p>
    <?php
        $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
        $products_attributes = tep_db_fetch_array($products_attributes_query);
        if ($products_attributes['total'] > 0) {
    //++++ QT Pro: Begin Changed code
          $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); 
          require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
          $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
          $pad = new $class($products_id);
          echo $pad->draw();
    //++++ QT Pro: End Changed Code
        }
    ?>
            </td>
          </tr>
    Instructions for what to change

    Find:

    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");


    Replace with:

    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.attribute_sort");

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default Re: Product Attributes Sort Order v1.0

    In file /catalog/includes/classes/pad_base.php

    Find aprox line 316:

    PHP Code:
            $products_options_query tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " TABLE_PRODUCTS_ATTRIBUTES " pa, " TABLE_PRODUCTS_OPTIONS_VALUES " pov where pa.products_id = '" . (int)$this->products_id "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id "'"); 
    replace with:
    PHP Code:
            $products_options_query tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " TABLE_PRODUCTS_ATTRIBUTES " pa, " TABLE_PRODUCTS_OPTIONS_VALUES " pov where pa.products_id = '" . (int)$this->products_id "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id "' order by pa.attribute_sort"); 
    These are DIFFERENT that what you have- it been has already been modded for Quantity Tracking Pro.

    Good Luck
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    Member
    Join Date
    Jun 2008
    Posts
    73
    Rep Power
    4


    Default Re: Product Attributes Sort Order v1.0

    Thank you so much!!

    It now works perfectly

Similar Threads

  1. Product Attributes Sort Order v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 07-19-2008, 12:13 PM
  2. Product Attributes Sort Order v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 05-03-2008, 05:23 AM
  3. Product Attributes Sort Order v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 04-19-2008, 11:31 AM
  4. Product Attributes Sort Order v1.0
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-26-2008, 03:02 AM
  5. Anyone use Product Attributes Sort Order?
    By illumn8r in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 08-01-2006, 06:36 AM

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
  •