Add to cart insted of select option on products listing in category

Hi I've just added some global options to my products, but now when I go to a Category where the products are listed, the “add to cart button is replaced with “select option” link!

I want to have “add to cart button” as before below the image, not the select option linк in the products listing on the category pages?

If your products have options, then you get that change. Isn't it better for the customer to select the options before adding the product to their cart?



Thanks,



Brandon

Unless ALL of the product options are NOT set to 'Required', then the product cannot be added to the cart without a considerable amount of core changes.

[quote name='brandonvd' timestamp='1355485168' post='151156']

If your products have options, then you get that change. Isn't it better for the customer to select the options before adding the product to their cart?



Thanks,



Brandon

[/quote]

Thanks for the reply Brandon!

I use the options to offer extra product(accessories), not required product option, so I don't need in any case to choose an option it is just optional if they want to add extra product at discount.

Do you have idea how to replace it back so the “add to cart button” is as before below the image, not the select option linк?

[quote name='StellarBytes' timestamp='1355492413' post='151167']

Unless ALL of the product options are NOT set to 'Required', then the product cannot be added to the cart without a considerable amount of core changes.

[/quote]

Thanks for the reply!

No they are not set as required, I just explained in the post how I use the options.

Use the Product Configurator addon which will allow you to add other products as options. Make the 'extra' products Optional and your 'Select Options' button will change back to the Add to Cart button.

I'm having this same issue however my product option isn't global and is an option, not another product, it's setup within the product. Is there a way to display this one product option on the category listing and have the add to cart button instead of the select options link.

Still the problem exists… I want to add option customers to choose size for example, but to be possible to order the product directly from the category page without choosing size, so the add to cart butto to be visible instead of select option…

exosto, did you find the solution for this?

exosto, did you find the solution for this?

Try to use the products:add_to_cart hook in the design/themes/THEME/templates/common/product_data.tpl to replace:

        {if $product.has_options && !$show_product_options && !$details_page}
            {if $but_role == "text"}
                {$opt_but_role="text"}
            {else}
                {$opt_but_role="action"}
            {/if}
            {include file="buttons/button.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_text=__("select_options") but_href="products.view?product_id=`$product.product_id`" but_role=$opt_but_role but_name="" but_meta="ty-btn__primary ty-btn__big"}
        {else}
            {if $extra_button}{$extra_button nofilter} {/if}
                {include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta}
{include file="buttons/button.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add.buy_now.`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta but_text=__('buy_now')}
            {assign var="cart_button_exists" value=true}
        {/if}

with

            {if $extra_button}{$extra_button nofilter} {/if}
                {include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta}
{include file="buttons/button.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add.buy_now.`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta but_text=__('buy_now')}
            {assign var="cart_button_exists" value=true}

(!) Not tested

Thanks, eCom.

It worked partially, 2 buttons appeared (Add to cart and Buy now), but the buttons show regardless of availability (0 in stock).

Thanks, eCom.

It worked partially, 2 buttons appeared (Add to cart and Buy now), but the buttons show regardless of availability (0 in stock).

In the same template find how the availability is checked and add corresponding condition

I did this (works):

{if $product.has_options && !$show_product_options && !$details_page}
            {if $but_role == "text"}
                {$opt_but_role="text"}
            {else}
                {$opt_but_role="action"}
            {/if}
            {include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta}
        {else}
            {if $extra_button}{$extra_button nofilter} {/if}
                {include file="buttons/add_to_cart.tpl" but_id="button_cart_`$obj_prefix``$obj_id`" but_name="dispatch[checkout.add..`$obj_id`]" but_role=$but_role block_width=$block_width obj_id=$obj_id product=$product but_meta=$add_to_cart_meta}
        {assign var="cart_button_exists" value=true}
    {/if}