0

Variable products only on the homepage are being added to the card instead of navigating to the product page when i press the select options button. I am using tyche theme

By default, Woocommerce ajax add to cart functionality is only supposed to apply to simple products But for some reason it is also adding variable products to the cart when I click "Select Options."

Select Options is supposed to go to the product page. How can I disable ajax add to cart on variable products on the homepage of the theme?

Those products on the homepage are added using Tyche Product widget.

My website sample

2
  • If you look at the markup you can see that your widget is outputting add to cart buttons. Unless you've added code somewhere else to modify add to cart buttons it sounds like your theme is doing something wrong. Questions about third-party plugins are off-topic here though, so I'd suggest contacting the theme's support channels. Sep 11, 2017 at 13:17
  • i did but they do not answer
    – csandreas1
    Sep 11, 2017 at 17:19

1 Answer 1

0

I was trying to fix this at the last 4 hours and I got it. You need to change: ajax_add_to_cart add_to_cart_button button for this: button product_type_variable add_to_cart_button on the follow archives:

wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-a.php
wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-b.php
wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-c.php
wp-content/themes/tyche/inc/libraries/widgets/widget-tyche-products/view/layout-d.php

Its located between lines 60~90. You need to change in every archive.

Sorry for my bad English.

Love the community, so helpful <3

Good lucky for all !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.