Magento: Add Configurable Product Options to Wishlist

This article shows how to add configurable products to wishlist along with their options value. By default, you don’t need to select any configurable product option when you want to add the configurable product to wishlist. But, you will have to select the configurable option while adding the product to cart.

So, you might be in need to make the “Add to Wishlist” behave exactly like “Add to Cart”. The other benefit of doing so (asking user to choose configurable options while adding to wishlist) is that when you move the wishlist item (configurable product) to cart then it will directly go to cart without returning back to product page asking to select options.

For this, you just need to comment all delete Validation.methods lines from the following Javascript code present in file app/design/frontend/YOUR_PACKAGE/YOUR_THEME/template/catalog/product/view.phtml, like done below:


productAddToCartForm.submitLight = function(button, url){
    if(this.validator) {
        var nv = Validation.methods;
        //delete Validation.methods['required-entry'];
        //delete Validation.methods['validate-one-required'];
        //delete Validation.methods['validate-one-required-by-name'];
        // Remove custom datetime validators
        for (var methodName in Validation.methods) {
            if (methodName.match(/^validate-datetime-.*/i)) {
                //delete Validation.methods[methodName];
            }
        }

        if (this.validator.validate()) {
            if (url) {
                this.form.action = url;
            }
            this.form.submit();
        }
        Object.extend(Validation.methods, nv);
    }
}.bind(productAddToCartForm);

Hope this helps. Thanks.