Home › Forums › Free Themes › Easy Commerce › Call-to-Action button
- This topic has 10 replies, 2 voices, and was last updated 5 years, 5 months ago by Erum Shaheen.
-
AuthorPosts
-
September 22, 2018 at 2:54 am #80200Erum ShaheenParticipant
Please advise how can I change the “wordings” of a call-to-action button on shop page. As it shows “Select Options” however I want it as “Shop now”. Please advise for it.
September 22, 2018 at 11:26 am #80223wensolutionsKeymasterHello @erum-shaheen,
Actually, we are quite clear which section you are referring to so can you please provide the screenshot marking the text so that we can help you further.
Thank you.
regards!!
September 27, 2018 at 6:24 am #80653Erum ShaheenParticipantHi,
Please see attached pic.
September 28, 2018 at 2:04 am #80720wensolutionsKeymasterHello @erum-shaheen,
The “Select Options” text in the add to cart button is actually added by woocommerce plugin itself in case of the variable product ( with multiple options ) and is not controlled by the theme.
However, if you wish to change the text, you can add in the following code in your child theme’s functions.php file to set your desired text:
add_filter( 'woocommerce_product_add_to_cart_text', woocommerce_var_pricing_options_add_to_crt_txt, 10 ); function woocommerce_var_pricing_options_add_to_crt_txt( $text ) { global $product; if ( $product->is_type( 'variable' ) ) { $text = $product->is_purchasable() ? __( 'Custom options text', 'woocommerce' ) : __( 'Read more', 'woocommerce' ); } return $text; }
You can change the “Custom options text” and “Read more” texts as per your requirements.
Hope this helps,
Best Regards !!
October 8, 2018 at 11:11 am #81304Erum ShaheenParticipantHi, I want the text as “Shop Now” instead of “Select Option”. In your given code I didn’t See wordings “Shop Now”. Please advise.
Further, also send send me screen shots as how to add the Code in website.
October 9, 2018 at 10:54 am #81400wensolutionsKeymasterHello @erum-shaheen,
To add the custom code you need to go through the child theme.
To know how to create and activate the child theme please follow below given link:
https://wptravel.io/how-to-create-a-child-theme/
After activating the child theme in your child theme add below given code:
add_filter( 'woocommerce_product_add_to_cart_text', woocommerce_var_pricing_options_add_to_crt_txt, 10 ); function woocommerce_var_pricing_options_add_to_crt_txt( $text ) { global $product; if ( $product->is_type( 'variable' ) ) { $text = $product->is_purchasable() ? __( 'Shop Now', 'woocommerce' ) : __( 'Read more', 'woocommerce' ); } return $text; }
Hope this helps.
Let us know if you have any confusion further.
Thank you.
Regards!!
October 10, 2018 at 9:51 am #81626Erum ShaheenParticipantThanks a lot. Now it looks as I want.
October 10, 2018 at 11:46 am #81633wensolutionsKeymasterHello @erum-shaheen,
Glad to help you.
Let us know if you have any issues further.
Thank you.
Regards!!
October 11, 2018 at 2:47 am #81677Erum ShaheenParticipantPlease advise How can I add an image of Size chart here. I want if visitor put cursor on Tab of “Size Chart” it shows them an image that include the details of sizes.
Further, I want to remove “Underline” for every Heading and Gap between “Side Bar” and “Main Bar”.
Your help will be highly appreciated.
Thanks
October 11, 2018 at 6:40 am #81686wensolutionsKeymasterHello @erum-shaheen,
Currently, the feature you are looking for is not available in the theme.
If you want to exactly display as you described then you can hire a professional developer.
To hire a developer please refer to below given link:
http://themepalace.com/hire-a-customizer
Thank you.
Regards!!
May 24, 2019 at 2:03 am #98457Erum ShaheenParticipantHi Wen,
In reply 81400, you advised me how to change wording from Select Option to “Shop Now” I did it and it was successfully changed. But now when I add any product, it is coming with “Selecct Option”, however I need it to show “Shop Now”.
In back end, I checked function.PHP file in Child theme and all the words are correctly placed there like what you advised in reply # 81400.
Please advise to resolve the issue asap.
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.