Home › Forums › WoodMart support forum › "Return to Shop" Button on wishlist and compare
"Return to Shop" Button on wishlist and compare
- This topic has 7 replies, 2 voices, and was last updated 4 years, 5 months ago by
Elise Noromit.
-
AuthorPosts
-
October 24, 2020 at 6:56 am #235737
MDPParticipantHi,
We are trying to change target of “Return to Shop” button on wish-list and compare pages. While discussing this matter with support team, we came to know that there is no such options in theme setting and this can be achieved by customizing following files.
woodmart/inc/integrations/woocommerce/modules/compare.php” and “woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php”
I want to know if these files can be overridden in child theme? We tried to copy file at child theme under the folder “woodmart-child/inc/integrations/woocommerce/modules/compare.php” but its not working.
But following code customization in parent theme file is working fine.
On line 373 of “woodmart/inc/integrations/woocommerce/modules/compare.php”, following code is written.We changed it to
then we applied following filter in functions.php files,
function wmcompare_change_empty_cart_button_url() {
return get_site_url();
}
add_filter( ‘wmcompare_return_to_shop_redirect’, ‘wmcompare_change_empty_cart_button_url’ );This customization is working fine and “return to shop” button points to homepage of the website.
But as changing parent theme file is not advisable, we tried to override file in child theme by putting the same under “woodmart-child/inc/integrations/woocommerce/modules/compare.php”
but overriding is not working for this file.I suggest you should provide filters in both “class-ui.php” and “compare.php”. This will make these pages more flexible for customization. Specifically for ecommerec website having many types of products, moving to shop page doesn’t look good and we generally wish to move to other custom page.
I can understand this customization is beyond support scope. I just wish to know if these are allowed to override in child theme? If not, you should consider to provide filters as shown above to make them more flexible.
Woodmart is an amazing theme. Keep it up.
Thank you.
October 24, 2020 at 6:59 am #235740
MDPParticipantIt looks like some code is not visible in my request due to double quote, let me send theme again
On line 373 of “woodmart/inc/integrations/woocommerce/modules/compare.php”, following code is written.
echo esc_url( wc_get_page_permalink( ‘shop’ ) );
We changed it to
echo esc_url( apply_filters( ‘wmcompare_return_to_shop_redirect’, wc_get_page_permalink( ‘shop’ )) );
October 24, 2020 at 7:00 am #235741
MDPParticipantHi,
We are trying to change target of “Return to Shop” button on wish-list and compare pages. While discussing this matter with support team, we came to know that there is no such options in theme setting and this can be achieved by customizing following files.
woodmart/inc/integrations/woocommerce/modules/compare.php” and “woodmart/inc/integrations/woocommerce/modules/wishlist/class-ui.php”
I want to know if these files can be overridden in child theme? We tried to copy file at child theme under the folder “woodmart-child/inc/integrations/woocommerce/modules/compare.php” but its not working.
But following code customization in parent theme file is working fine.
On line 373 of “woodmart/inc/integrations/woocommerce/modules/compare.php”, following code is written.echo esc_url( wc_get_page_permalink( ‘shop’ ) );
We changed it to
echo esc_url( apply_filters( ‘wmcompare_return_to_shop_redirect’, wc_get_page_permalink( ‘shop’ )) );
then we applied following filter in functions.php files,
function wmcompare_change_empty_cart_button_url() {
return get_site_url();
}
add_filter( ‘wmcompare_return_to_shop_redirect’, ‘wmcompare_change_empty_cart_button_url’ );This customization is working fine and “return to shop” button points to homepage of the website.
But as changing parent theme file is not advisable, we tried to override file in child theme by putting the same under “woodmart-child/inc/integrations/woocommerce/modules/compare.php”
but overriding is not working for this file.I suggest you should provide filters in both “class-ui.php” and “compare.php”. This will make these pages more flexible for customization. Specifically for ecommerec website having many types of products, moving to shop page doesn’t look good and we generally wish to move to other custom page.
I can understand this customization is beyond support scope. I just wish to know if these are allowed to override in child theme? If not, you should consider to provide filters as shown above to make them more flexible.
Woodmart is an amazing theme. Keep it up.
Thank you.
October 26, 2020 at 8:42 am #236125
Elise NoromitMemberHello,
We shall add these filters in the nearest update:
woodmart_wishlist_return_to_shop_url
woodmart_compare_return_to_shop_url
Best Regards
October 26, 2020 at 8:51 am #236129
MDPParticipantHello Elise,
Thank you for the quick response. It’s really appreciable.
I will wait for the coming update eagerly.Thank you,
Mukesh Parsana
October 26, 2020 at 10:07 am #236148
Elise NoromitMemberYou are welcome! If you have any questions please feel free to contact us.
Best Regards
November 5, 2020 at 2:51 pm #239124
MDPParticipantHi Elise Noromit,
I received latest woodmart update today and I am extremely happy that all the issues reported by me in 3 topics started by me has been resolved in this update. I am going to give 5 star to this theme for everything and great support. Your team is doing very good work. Keep it up.
Have a nice day ahead. Take care.
Regards,
Mukesh D. Parsana
November 5, 2020 at 9:39 pm #239219
Elise NoromitMemberHello,
Thank you very much for the high rate and warm feedback. Our team appreciates highly. We’ll do our best to help.
Please feel free to contact us.
Best Regards
-
AuthorPosts
The topic ‘"Return to Shop" Button on wishlist and compare’ is closed to new replies.
- You must be logged in to create new topics. Login / Register