Problems, need help? Have a tip or advice? Post it here.
13 posts Page 1 of 2
Hello Couchers,
I need help implementing a sales logic.
On my website, I want to sell wines either in Singles and Bulk(boxes or 6 wines). So I want to do this:
1. There will be two radio buttons with labels "Wholesale" and "Retail"

2. By default the Quantity input field will be for single bottles of wines and the cost of a single wine will be say $10

3. When a buyer chooses Wholesale, I want the quantity input field to now calculate the wines based on multiples of 6 and the cost of a box will be $50 instead of $60 because it's at wholesale price.

Any help on how to go about this will be greatly appreciated.
What do you want to see in cart for wholesale purchase - boxes or bottles? This question is just one among many that help choose a solution. In all cases it is best to have 2 different products (possibly related)- 1 bottle of wine and 1 box of that wine. Otherwise it will be a huge mess. I am currently helping someone with discounts in Cart (sample video https://send.firefox.com/download/c7c91 ... xaFgALbXAQ ) and while it is possible to calculate things on the fly (like multi-level discounts in video) I would *not* try to mess with qty selector.

Relating products is as easy as relating pages, and both can have different prices and different discounts. Everything will be manageable. Your radio button may trigger a popup with the other product instead (or redirect to another page with product).

You may think of creating an option modifier for a bottle (like [Box = 50]) but I do not recommend this idea.
In the Cart I would want to see both boxes and bottles. The wines come in different types so I will want to see both boxes and the bottles.
Hello Trendoman,
So I duplicated the wines.php template and changed the name to wine_box.php and related the two templates and linked both via their respective page_link. However when I go to any of the wine_box.php page and add to cart and then I use dump_all on the cart.php page to check the k_page_template of the individual items, the wine_box.php items still show that they are cloned from the wine.php template. Any reason why this is so?

Thank you
So I duplicated the wines.php template

Nope, that will not work, because there is only one template registered as products template in cart's config. I do not foresee issues if you create a new product 'A box of wine XX' in wines.php template. In the cms:editable type='relation' set masterpage to the same 'wines.php' (to self).
Ok trendoman,
I will do that and get back to you. Thank you very much for the quick responses.
Trendoman,
I want to be able to append the text "Box(es) to the beside the Quantity field only if we are in a box of wine page?
Sorry bud, can't help you further than that. From Couch perspective, it doesn't matter what you show on your dedicated product page or how you show it.

Edit: If you need a variable to use from Couch part - I'd consider placing boxes in a folder 'boxes' or 'wholesale', OR add a radio to the editables of the template. It would make sense to use Conditional Fields to display specific fields for wholesale product in admin.
trendoman,
So I added radio buttons(Wholesale & Retail) to the template. Both the Retail and Wholesale products have the same info so didn't bother to use the conditional fields. For now everything is working perfectly fine.

Edit: but on second thought I think I will just throw conditionals in there for future sake.

I appreciate the effort you took in pointing me to the right direction. Thank you very much.
This is my first time using the Couch shopping feature and I must say I've learnt a lot through the process.
13 posts Page 1 of 2
cron