Kevin13952 Posted October 3, 2021 Posted October 3, 2021 How do I create a configurable product? We have a coffee roasting company and I'm wanting to create a Gift Box where the customer can pick from a selection of coffees to put in the gift box. Here is the order process I envision: Customer chooses 'Gift Box' as the product. Above the 'Add to Cart' button is a list of different coffees for the customr to choose from. The customer can only choose FOUR coffeees per Gift Box purchased. But can randomly choose whichever coffees they wish for the Gift Box. Customer makes selection of coffees and clicks 'Add to Cart' and it places the Gift Box along with the selected coffees into their shopping cart. Additional considerations would be to either increment the pfinal price by which coffees are added to the Gift box.....OR... to set a total price for the GIft box and limit the choice of coffees to a specific number of selections. Any ideas how to make this happen?
musicmaster Posted October 4, 2021 Posted October 4, 2021 I made something similar here: https://www.topsnoep.nl/relatiegeschenken/2863-notenmand-zelf-samengesteld.html In it you select a basket and one or more products to insert into it. It uses customizations and involves about a hundred lines of code.
veganline Posted October 5, 2021 Posted October 5, 2021 (edited) hostknox.com/tutorials/prestashop/1.5-1.6/products/pac describes default software for product packs and there might be other guides. Product Packs. Packed products can't have combinations of attributes, and I don't think a customer can change them, so I don't know how a customer could choose the types of coffee in the pack this way. From memory, there are limits to do with stock control; you cannot combine one product with stock control like 25 shirts, with another product like 1,000,000 combinations of ebroidered lettering, which would clock clog the database if you tried to treat them as stock , even if that is possible, and there is no need. You just have to count your shirts in some other way if you sell embroidered shirts and use the default product packs. You can keep stock control for other products, like un-embroidered shirts, and do something by hand to the stock levels if you embroider one. Attributes Another from-memory thing: the default software can show product attributes as drop-down menus, radio buttons, or colors (which can have an image file to present a texture, or whatever you want like a picture of coffee). (There isn't an option for check-boxes, although this might be quite easy to change and the css files allow for check-boxes. ) Adapting the CSS for all pages from the back office Whatever you choose might involve some small changes to the product.tpl template to make it intuitive and pretty. If you use the "texture" option to show pictures of coffee, you might want them larger than the default CSS allows for example and do something-or-other to the template file to make the pictures bigger. This can be in example.com/backoffice/preferences/custom code/css ...if you want the css code at the top of every single page of your web site. Maybe that's OK for color/texture icons because the css code is probably quite specific, but you can also change the product template file.Adapting the product template selected for this product Talking of boxes, there are boxes you can put round a parts of a form.https://www.w3schools.com/tags/tag_fieldset.asp There is already an example of a changed product template called product-wide.tpl that you can select for any product, and you can choose it from backoffice > products > example > template manager ...which is near the bottom of the list on the left hand side of your product editing page. If you want to find this file on your server, it is at example.com/themes/niara/templates/product-wide.tpl You can add any template file next to it in the same directory and select it from the back office for one or more products.. The default product.tpl template on github is at https://github.com/thirtybees/niara/tree/master/templates/product ... and you might want to adapt that one. If it's awkward to get access to the server files, there is a module from https://dh42.com/free-prestashop-modules/that lets you add or edit server files from the back office. I forget which one, but ask if important. Customization The software has an option called Customization built-in, but it's just a start. It makes a text box at the bottom of the product page with its own "save" button, that the customer has to remember to press before pressing the "buy" button. You can't move the box above the "buy" button just by changing the template; it doesn't work. Customers might as well use the comment box on an order form when ordering. There's a module I use for pressing both buttons at once, and there's a more advanced one for charging according to the customisation as well: it's on https://store.thirtybees.com/shop-modules Afterthought: cart rules? There might be some way to write that any 4 coffees from a list get a lower price, or any order over £200 gets free UK delivery, or something like that. It might be the cart rules part of the back office that sets this. I haven't tried but there might be a guide online somewhere. Suppose that all eligible coffees were presented on a page with your special offer written above them, that would come a bit closer to the select-a-gift-pack idea. Cart button for gift wrap There are some tick-boxes on the shopping cart that you'd usually want to cover-up just to simplify it, but you could leave one on for "gift wrap". Or it might be "recycled packing", but you can change the text to what you want on the backoffice translation menu. I wrote this for anyone who finds the thread rather than checking-out the person who asked. Hope this helps anyway Edited October 7, 2021 by veganline cart rules, gift-wrap, no combinations of attributes in the pack
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now