سؤال

I'm working for a computer components store.

My end goal is to make a 'Build your own computer' page where customers can pick components from each category (CPU, Memory, etc) and add them all to the cart.

I began by making a custom template file and just making it on a CMS page, but I've hit the point where items need to be added to carts etc, and I was planning on making another php page to add the item to the cart, and access it by AJAX, and I'm starting to get a bit flustered with what I'm making (I'll admit I'm out of my league, but I'm a programming student and am trying to learn.)

How should I be tackling this? Is it wrong to be making such a thing in template files alone? I have an extremely rough understanding of how modules work, but as far as I could tell, you can't have a CMS page with modules on them.

هل كانت مفيدة؟

المحلول

Bundled products are a good way to go if you need to have a unique SKU for each option such as Ram, CPU, Hard Drive, etc. Another option is to use a simple product with custom options. Custom options allow you to add options to a product and are very flexible. You can add text boxes, drop downs, radio buttons, multi-select boxes, date selectors, and even file uploads. Each custom option that you add to a product has the ability to be configured stand alone (eg, you can have a dropdown for RAM which has dropdown items of 4gb, 8gb, 16gb, 32gb and another dropdown for CPU that has 3.4, 3.7, 4.0 for dropdown items). Each custom option also has the ability to add an amount to your simple item price.

Please see the following screenshots:

Magento SKU setup for simple product: http://imgur.com/nvrgRIJ Magento SKU setup for simple product

Magento PDP for simple product using custom options: http://imgur.com/0lbNY62 Magento PDP for simple product using custom options

Magento Cart with this product added: http://imgur.com/wrxaWyn Magento Cart with this product added

NOTE: The above screenshots were generated with out of the box functionality for Magento CE v1.7.0.2. The only modification that was done was to add a FREE design theme.

نصائح أخرى

Take a look at the 'Build Your own' category (under Electronics=>Computers) that comes with the sample data, here you can configure options like memory, harddisk options and more. This is done by creating a bundle product to select the corresponding simple product for that option. You can control the items that are available to select and you can use the Magento functionality to add the ordered items to the cart.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top