osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Quantity Box

This is a discussion on Quantity Box within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hiya everyone. Trying to get a quantity box, which is NOT a dropdown, but also will automatically calculate based on ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Reply

 

LinkBack Thread Tools
  #1  
Old 04-21-2009, 07:23 AM
Member
 
Join Date: Apr 2009
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
heezay is on a distinguished road
Default Quantity Box

Hiya everyone. Trying to get a quantity box, which is NOT a dropdown, but also will automatically calculate based on available quantity.

Now ive searched everywhere for one that fits INTO OSCMAX but nothing. I read on

one oscmax page to add quantity box is same as osc, just edit the product_info.tpl.php instead. Tried this but doesnt work. Codes not the same. I follow the instructions but doesnt work. Codes for this are different in both product_info.tpl.php and application_top.php.

Ive marked the 2 areas it asks to change, but new code where 1+ is or the code just before it, doesnt work chaging it

application top:

Code:
HTML clipboard// customer adds a product from the products page
// BOF: MOD - QT Pro
// case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) &&  is_numeric($HTTP_POST_VARS['products_id'])) {
// $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) &&  is_numeric($HTTP_POST_VARS['products_id']) && ($HTTP_POST_VARS['products_id']==(int)$HTTP_POST_VARS['products_id']))  {
$attributes=array();
if (isset($HTTP_POST_VARS['attrcomb']) && (preg_match("/^d{1,10}-d{1,10}(,d{1,10}-d{1,10})*$/",$HTTP_POST_VARS['attrcomb'])))  {
$attrlist=explode(',',$HTTP_POST_VARS['attrcomb']);
foreach ($attrlist as $attr) {
list($oid, $oval)=explode('-',$attr);
if (is_numeric($oid) && $oid==(int)$oid && is_numeric($oval) && $oval==(int)$oval)
$attributes[$oid]=$oval;
}
}
if (isset($HTTP_POST_VARS['id']) && is_array($HTTP_POST_VARS['id'])) {
foreach ($HTTP_POST_VARS['id'] as $key=>$val) {
if (is_numeric($key) && $key==(int)$key && is_numeric($val) && $val==(int)$val)
$attributes=$attributes + $HTTP_POST_VARS['id'];
}
}
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'],  $attributes))+1, $attributes);
// EOF: MOD - QT Pro
And then on another post on oscmax read that trying the osc way will not work as the QTPro code replaces it, so anything you try with osc code will not work???

Am baffled? one says to use osc code, the other says not to?

How can I acheive this? I used google, osc, oscmax, forums everything with no luck to an answer or guide how its done on oscmax. Ive tried the osc ones and cant find codes or it just doesnt work??

Last edited by heezay; 04-21-2009 at 07:26 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 04-25-2009, 12:57 PM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 2,681
Thanks: 12
Thanked 214 Times in 196 Posts
Rep Power: 20
jpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud ofjpf has much to be proud of
Default Re: Quantity Box

// is a comment - old/changed code

/* this is also
a mult-line
comment */

And from the comments - it shows you that this section was moded and added QTpro.

What is the instructions/code changed you want to do?
__________________
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Min Order Quantity michael_s New osCommerce Contributions 0 08-31-2008 11:00 AM
Quantity discount Keilew osCMax v2 Customization/Mods 4 08-05-2007 09:03 AM
Add Quantity to Listings michael_s New osCommerce Contributions 0 06-13-2007 07:12 AM
Help Quantity BUG... djlane osCMax v1.7 Installation 1 07-02-2005 06:17 PM
quantity mod...newbie needs help mediareaction osCommerce 2.2 Modification Help 2 11-17-2004 10:14 AM


All times are GMT -8. The time now is 09:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design