Magento: How do I create multiple products each with different custom options? - magento

I am setting up a new store and this time I want multiple products. Each of those products should have its own custom options and some options might be valid for all of the products. An important point is that the custom options should also depend on each other. I am looking for a flexible way to achieve that.
As an example, I will have cars (Chevrolet, GMC, Ford, ...) and motor-bikes (Honda, Yamaha, ...). There will be much more, its just an example. Whats the best way to start this requirement?
Thanks!

You can try this module (not free).

Related

selecting more than one product type for product in magento

i am using two extensions in my magento site and both extensions work upon choosing product type as their type. So i am able to get feature of only one of extension. Is there any way to set product type as multiple so that i can get features of both extensions?
There is no way of doing that.
I mean everything is possible but you will have to rethink the whole architecture.
one of Magento's base rules is: one product can only have one type.
Maybe you can try to change the extensions (or at least one of them) so you can work with both product types you need.

Updating Magento Inventory through Extension on simple and complex products

I am updating the Stock on Hand Inventory Qty on a Magento store through an extension that I have developed, using the following code:
Mage::getModel("cataloginventory/stock_item")
->loadByProduct($pid)
->setQty($qty)
->save();
Now, from my testing, this works fine, however I am a little concerned if this is having any negative affects on the different types of product that can be created in Magento (such as simple and complex products).
Is the above the correct way to update the SOH, and do I need to handle Complex products any differently? My gut feeling is that I don't need to do anything differently with complex products as they all end up deriving from a Simple product which has its own Stock on Hand?
Any advice appreciated
As long as you only update simples you'll be fine like this. Indeed all other non-virtual product types derive their stock from the simples.
You might even want to add
$stockItem = Mage::getModel("cataloginventory/stock_item")
->loadByProduct($pid)
->setQty($qty);
if ($stockItem->getCanBackInStock() && $stockItem->getQty() > $stockItem->getMinQty()) {
$stockItem->setIsInStock(true)
->setStockStatusChangedAutomaticallyFlag(true);
}
$stockItem->save();
See Mage_CatalogInventory_Model_Stock::backItemQty() to see how Magento adds stock.

A/B (Split) testing the shopping cart in Magento

We would like to implement A/B (or split) testing on our shopping cart in Magento.
The new design is enough of a departure from the existing one, that we cannot easily create the test using something like Visual Web Optimizer. The only way we would be able to do something with VWO is to create two different URLs for the cart, displaying the original one in the normal /checkout/cart and the new one in /checkout/shoppingcart - or something like that.
Is it possible to do something like this within Magento or am I going to delve deeper into the code?
One possible solution I was looking at was (doing a really dodgy hack) copying the CartController.php and creating a new controller called ShoppingcartController.php. I'm not a fan of this, it's just way to dodgy...but as it's going to be throw away code, I think I'd be able to sleep at night ;)
I'm completely lost as how I could do this. Ultimately, it would be great if I could create two front routes, pointing back to the same controller...but I don't think Magento is that flexible.
One way to accomplish this, is to create two "views" (under one website), and use different URL's for each view, such as: www.site.com www1.site.com.
Once this is set up have Google's A/B testing functionality (or some other JS) direct users to the different views.
Good luck!

Magento, add a custom attribute to a customer address

I'm looking for a way to add a drop down for a customer's address (during registration, editing, checkout, etc..) that indicates whether or not it is a Residential or Business address. I have spent hours going through tutorials but they are all out of date or poorly written. I have read 6 different ones telling me how to do the same thing 6 different ways. Can someone outline a simple process that you need to do in order to add a custom attribute to an address? I'm on Magento 1.6
Try something like this tutorial at Fontis: Know More About Your Customers - Adding Custom Signup Attributes
Whilst this was written for 1.3.2.4, most (if not all) is still relevant for 1.6. I've done a very similar thing by allowing a customer to choose the customer group they wish to belong to, by following these directions.
Oh, and there are some great comments on the post as well.
These tutorials should give you a good idea how to do what you want:
http://www.unexpectedit.com/magento/add-new-customer-attribute-onepage-magento-checkout
http://www.excellencemagentoblog.com/magento-adding-custom-field-to-customer-address
Best regards

how to add more simple products into configurable products using magento API

How can I simply add new simple products incrementally to configurable products?
or do I still need to retrieve the 2 original arrays of the pre-defined configurable product (getConfigurableAttributesData and getConfigurableProductsData) first, append the new arrays and set them again? Is it worked for my case just as the first-time creation?
And if the new simple product owns a new attribute / attribute options, do I also need to create /edit the attribute first before adding?
Thanks in advance!
The API as it stands does not have the functionality to do this.
Your options are:
Extend the API. (Hours of fun)
Do it with Magento methods in your own module or standalone code that includes Mage.php.
SQL script mixed in with your existing API code.
Buy someone's module - (Hope your German is good)
The approach you take also depends on your SKU naming scheme, if you have a simple BASECODE-SIZE-COLOUR type of scheme then the SQL option can work a treat, and in next to no time, but will be heavily scorned on by Magento evangelists.
That means you are probably going to have to write your own code. Here is a very useful site that should help get you started:
http://www.ayasoftware.com/
As well as being able to import configurables (by a variety of means including SQL) there are also snippets of code useful for updating superattribute price differentials. No readymade complete solution, but, you may need to roll your own anyway depending on your SKU naming scheme.
Whilst you are at it you may also want to write some code to find simple products that are not hooked up to anything when they should be, i,e. the ones with no visibility.

Resources