Home › Forums › WoodMart support forum › After 'Add to cart' button content
After 'Add to cart' button content
- This topic has 11 replies, 2 voices, and was last updated 4 years, 2 months ago by
Elise Noromit.
-
AuthorPosts
-
February 14, 2021 at 10:13 am #266322
atpd23ParticipantHello,
In Theme Settings > Product page I can set custom after ‘Add to cart’ button content by HTML blocks. That’s what I need to, but not to keep the same HTML block for all product pages. What I would rather need to achieve is individual HTML block for every product page. I mean, I would like to highlight in 2-3 lines product features exactly after the ‘Add to cart’ button and it means, I would need to create individual HTML blocks, not a general one used for all product pages by Theme Settings.
Best Regards
February 14, 2021 at 5:03 pm #266421
Elise NoromitMemberHello,
In this case, you would better consider using Extra content on the product page: https://xtemos.com/docs/woodmart/html-blocks-2/#extra_content_options
The content would not be placed right after adding to cart button, however, it is the option to add individual content in to the product page.
Best Regards
February 14, 2021 at 6:36 pm #266457
atpd23ParticipantHello,
Thanks for the fast response. Extra content is the way, unfortunately as you’ve mentioned, it doesn’t place right after adding to cart button, what is exactly I need to.
If that feature isn’t possible in WoodMart, could I ask you to give me some clue how to do it by myself? In the image is shown, what I would like to achieve.
Best Regards
Attachments:
You must be logged in to view attached files.February 15, 2021 at 10:13 am #266627
Elise NoromitMemberHello,
Please add this code to the functinons.php of the child theme and the extra content block would move after Add to cart.
add_action( 'wp', function() { remove_action( 'woodmart_after_product_content', 'woodmart_product_extra_content', 20 ); add_action( 'woocommerce_single_product_summary', 'woodmart_product_extra_content', 31 ); }, 1200 );
Best Regards
February 15, 2021 at 11:54 pm #266854
atpd23ParticipantHello,
Great, it works, thank you! Please and how could I set a border/shadow for desired elements in product page summary? I would like to separate some elements like quantity, price and button. To do that, to apply CSS style, I guess it’s necessary to set a container for that elements, but don’t know how.
In the image border.jpg you can clearly see what I mean.
Best Regards
Attachments:
You must be logged in to view attached files.February 16, 2021 at 11:03 am #266954
Elise NoromitMemberHello,
Please add this code to the Theme Settings > Custom CSS > Global:
body.single-product .woocommerce-variation-add-to-cart{ padding:7px 0 0 7px; box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
Best Regards
February 17, 2021 at 12:30 am #267168
atpd23ParticipantHello,
It’s working, but only for variable products. Also, it borders only quantity field and add to cart button, not the price as is shown in the image border.png – there is shown desired effect.
I have moved the price from default position to above the add to cart button and I would like to add there the border. Maybe it’s needed to give all that three elements into an container, but don’t know how – also in this way, it would be very useful if I had to give into border some more elements, let’s say some meta values. Therefore it would be great if something like that (adding container into desired elements) would be possible, because of flexibility in the future.
Best Regards
February 17, 2021 at 5:31 pm #267396
Elise NoromitMemberHello,
Please provide your product page URL and show the screen of what you want to do on your product pages.
Best Regards
February 17, 2021 at 10:01 pm #267443
atpd23ParticipantHello,
The website is located on my testing server, so I am sending IP address in the private content.
In the attach image you can see the actual look and I would need to border the selection – not only the quantity field and add to cart as your previous code does, but also the price (I have moved the price to different position, it’s not the default one).
Best Regards
Attachments:
You must be logged in to view attached files.February 18, 2021 at 8:16 pm #267679
Elise NoromitMemberHello,
Unfortunately, it is not possible to make shadows as you show. These blocks are different and shadow is applied to the integral block.
Best Regards
February 18, 2021 at 11:41 pm #267737
atpd23ParticipantHello,
Isn’t there a way to add starting class tag before the price and ending class tag after the add to cart button and then apply style (border) to that class?
Best Regards
February 19, 2021 at 11:59 am #267832
Elise NoromitMemberHello,
There is no option to add any classes, that would require complicated customization that is not covered by our support.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register