osCmax v2.5 User Manual
Results 1 to 2 of 2

Multi Attribute (combination) entry boxes in product info page.

This is a discussion on Multi Attribute (combination) entry boxes in product info page. within the New osCommerce Contributions forums, part of the osCommerce 2.2 Forums category; Many Bug fixes. Updated installation. Now working as supposed. Preconfigured files attached or make the changes as described in installation ...

      
  1. #1
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Post Multi Attribute (combination) entry boxes in product info page.

    Many Bug fixes. Updated installation. Now working as supposed. Preconfigured files attached or make the changes as described in installation file.

    Bugs fixed:

    0) Cleaned up some code, which isn't really a bug ;-)

    1) When product would have more than 1 option with attributes it would make no sense to add quantities. (think about this for a minute)

    2) Attributes was set at 5 which would be only appropriate when you actually had 5 attributes, now it auto adjusts.

    3) Product attribute with 0 quantity was also added to cart! (in my case that is)

    4) Would show dropdown on each line with the default attribute on top. What's the use of the dorpdown of you have all options? --> Will now show all unique attributes without the dropdown!


    Additional comments:
    will now also show a quantity field for products with no options.



    Please feel free to contact me for any questions of suggestions. Use at own risk. Please backup before proceeding.


    More...
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  2. #2
    osCMax Testing Team
    Join Date
    Jun 2004
    Posts
    258
    Rep Power
    0


    Default Re: Multi Attribute (combination) entry boxes in product info page.

    i tried looking in the product_info.php and tpl file but i couldnt find

    <?php
    $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 . "' order by popt.products_options_name");
    while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    $products_options_array = array();
    $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 . "'");
    while ($products_options = tep_db_fetch_array($products_options_query)) {
    $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
    if ($products_options['options_values_price'] != '0') {
    $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
    }
    }

    if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
    $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
    } else {
    $selected_attribute = false;
    }
    ?>
    <tr>
    <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
    <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
    </tr>
    <?php
    }
    ?>
    </table>
    i believe the reason is because the file im looking at which is the product_info.tpl.php is a oscmax template im using and where it shows the code similar to where the attribute should be says QT Pro comments. Is it still possible for me to implement this mod?

Similar Threads

  1. Attribute Qty Product Info
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 09-15-2008, 08:00 AM
  2. Product boxes on main page
    By clapat in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 05-05-2008, 03:03 AM
  3. Multi Attribute (combination) entry boxes in product info page.
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-30-2008, 10:05 PM
  4. Multi Attribute (combination) entry boxes in product info page.
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 01-30-2008, 09:11 AM
  5. Product Quantity Dropdown on Product Info Page
    By michael_s in forum New osCommerce Contributions
    Replies: 0
    Last Post: 06-12-2007, 01:14 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
  •