Jump to content



- - - - -

Product info. Master and Slave


  • Please log in to reply
1 reply to this topic

#1   gavinbruce

gavinbruce
  • Members
  • 5 posts
  • Real Name:Gavin Bruce

Posted 13 November 2007 - 10: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

#2   scribionics

scribionics
  • Members
  • 14 posts
  • Real Name:scribionics

Posted 05 April 2008 - 12:25 AM

View Postgavinbruce, on Nov 13 2007, 05:31 AM, said:

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.