OSCOMMERCE SUPPORT CALL 702-453-3332

 

Help - Search - Members - Calendar
Full Version: Product info. Master and Slave
osCommerce Community Support Forums > osCommerce Online Merchant v2.x > Contributions / Add-Ons > Order Total Modules
gavinbruce
I am using Master_products-v1.2 which I downloaded from the community contributions. Bas icily it lets you add similar products in your product info page. These are called slave products.

Now the problem is when you have more than one slave product on the same page, they have all default numbers in the add box set to “1” this is not ideal, because if you have 2 products on the same page and hit add to cart both appear in cart. I would like to be able to set it to “0” in the code. It's just it makes it awkward for customers to remove items when they only want 1 item.
Anybody out there that could help me please.

If you use this link you will see what I am talking about. I only use this site for testing codes
Thanks in advance.

http://vmax-fullpower.com/catalog/product_...p;products_id=1
scribionics
QUOTE (gavinbruce @ Nov 13 2007, 05:31 AM) *
I am using Master_products-v1.2 which I downloaded from the community contributions. Bas icily it lets you add similar products in your product info page. These are called slave products.

Now the problem is when you have more than one slave product on the same page, they have all default numbers in the add box set to “1” this is not ideal, because if you have 2 products on the same page and hit add to cart both appear in cart. I would like to be able to set it to “0” in the code. It's just it makes it awkward for customers to remove items when they only want 1 item.
Anybody out there that could help me please.

If you use this link you will see what I am talking about. I only use this site for testing codes
Thanks in advance.

http://vmax-fullpower.com/catalog/product_...p;products_id=1


I've been struggling with exactly this for some days and just worked it out this afternoon.

In /includes/modules/master_listing.php, after case case 'MASTER_LIST_BUY_NOW': (line 163 for me), find a line that looks like
$lc_text = tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '1', 'size="4"');

The 1 is the initial quantity that will be pre-filled in the field; set that to 0.
The size=4 describes the size of the field; I don't want any more than 1 order per slave, so I set that size to 1.

I hope this helps.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.