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

quanity on "buy now / product info" page?

This is a discussion on quanity on "buy now / product info" page? within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; hi all, maybe i'm missing something obvious but is there a way to add a quantity option (either drop down ...

      
  1. #1
    New Member
    Join Date
    Jan 2006
    Posts
    16
    Rep Power
    0


    Default quanity on "buy now / product info" page?

    hi all,

    maybe i'm missing something obvious but is there a way to add a quantity option (either drop down or type in) on the product info page?

    thanks
    john

  2. #2
    New Member
    Join Date
    Jun 2005
    Posts
    10
    Rep Power
    0


    Default RE: quanity on "buy now / product info" page?

    Anyone figure this out yet - i came close but get it to work correctly...

  3. #3
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default RE: quanity on "buy now / product info" page?

    The key here is that the quantity has to be passed in to the cart.

    from product_inf.tpl.php replace you place in cary <td></td> with something that looks like this:

    Code:
    <td class="main" align="right"><? echo tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2'); ?><input type="hidden" name="cart_quantity" value=1 maxlength="6" size="4">  <?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?>
    This will add the text entry box that will pass the quantity to the cart when they select the add to cart button.
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  4. #4
    osCMax Testing Team
    Join Date
    Sep 2004
    Posts
    362
    Rep Power
    10


    Default RE: quanity on "buy now / product info" page?

    met00

    Did the above and it added box but will not read quantity and only adds 1 item no matter what quantity typed in. Wouldn't something in application_top need to be changed?

  5. #5
    osCMax Development Team met00's Avatar
    Join Date
    Oct 2005
    Location
    wherever I happen to be at the moment
    Posts
    854
    Blog Entries
    2
    Rep Power
    26


    Default RE: quanity on "buy now / product info" page?

    check application_top and make sure that $quantity is not being set to 1 by default (this is done for the "buynow" buttons). The code should look like:


    Code:
          case 'add_product' &#58;
    if &#40;$quantity &lt; 1&#41; $quantity = 1;
    so endith the lesson
    <think>sometimes I just sit's and thinks</think>
    "Here you are with a hand full of holes, a thumb up your ass, and a big grin to pass the time of day with." - TWB

  6. #6
    osCMax Testing Team
    Join Date
    Sep 2004
    Posts
    362
    Rep Power
    10


    Default RE: quanity on "buy now / product info" page?

    Ok in oscmax catalog/includes/ application_top you need to find this line around line 413

    Code:
    $cart->add_cart&#40;$HTTP_POST_VARS&#91;'products_id'&#93;, $cart->get_quantity&#40;tep_get_uprid&#40;$HTTP_POST_VARS&#91;'products_id'&#93;, $attributes&#41;&#41;+1, $attributes&#41;;
    Change +1 to +$quantity
    So finished code looks like this.

    Code:
     $cart->add_cart&#40;$HTTP_POST_VARS&#91;'products_id'&#93;, $cart->get_quantity&#40;tep_get_uprid&#40;$HTTP_POST_VARS&#91;'products_id'&#93;, $attributes&#41;&#41;+$quantity, $attributes&#41;;
    Blayne Pierce

    It is in the QT Pro Mod section Works great now

Similar Threads

  1. product attributes - "option type" dropdown missin
    By test_fsait in forum osCMax v2 Features Discussion
    Replies: 12
    Last Post: 02-13-2007, 05:05 PM
  2. Remove "QTPRO" for "Option Type Feature"
    By adam71o in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 01-10-2007, 09:32 AM
  3. "Page Not Found" after Shipping info
    By lem in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 12-21-2004, 10:48 PM
  4. Manufacture Info & "enlarge" image problem
    By fateimport in forum osCMax v1.7 General Mods Discussion
    Replies: 4
    Last Post: 11-04-2004, 11:23 PM
  5. Define main page error - "file not writeable"
    By mark754 in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 01-16-2004, 09:18 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
  •