Latest News: (loading..)
Sign in to follow this  
Followers 0
gavinbruce

Product info. Master and Slave

2 posts in this topic

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0