Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product info. Master and Slave


gavinbruce

Recommended Posts

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

Link to comment
Share on other sites

  • 4 months later...
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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...