Tagged: x
-
AuthorPosts
-
August 23, 2016 at 7:14 am #1142958
Hi Themeco,
I’ve found the code to add a woocommerce ‘add to cart’ button to any page;
[add_to_cart id=”99″]
I’ve also found this styling code;
array(
‘id’ => ’99’,
‘style’ => ‘border:4px solid #ccc; padding: 12px;’,
‘sku’ => ‘FOO’
)It doesn’t seem to work, when I try to get rid of the border & even when I’ve deleted this code the border still seems to be visible…
take a look on this page;
http://honestyforyourskin.co.uk/honesty-skincare-shop/
how can I make this button & quantity box appear like on this page?
http://honestyforyourskin.co.uk/product/protect-nourishing-cleanse-balm/
Thanks,
Cheryl
August 23, 2016 at 10:07 am #1143193Hey There,
Thanks for writing in.
You can remove the border from the Add to Cart section.
Find the following code
element.style { border: 4px solid #ccc; padding: 12px; }
Replace it with
element.style { padding: 12px; }
This will remove the border from that section.
Let us know how it goes!
August 23, 2016 at 11:18 am #1143350Hi Rahul… at the moment I don’t have any custom code on this page… as far as I’m aware. Where should I find this code snippet?
Thanks,
Cheryl
August 23, 2016 at 1:48 pm #1143580I Cheryl,
As your second link is not working I am not entirely sure what you want to achieve,
Would you mind providing a screenshot to clarify so we can provide you a tailored solution?
Thanks
Joao
August 24, 2016 at 2:09 am #1144306Hi Joao,
That is strange, I just clicked on it and it worked fine… I’m also attaching a screenshot…
Cheryl
August 24, 2016 at 8:29 am #1144669Glad that worked for you.
If you still have anything to ask, let us know. We’d be happy to assist you with everything.
Thanks for using X.
August 25, 2016 at 2:27 am #1146204Hi Rahul – I think you misunderstand, the link I shared with you, to show you the page with the formatting I want to change works…
so this is what I want to do…
take a look on this page;
http://honestyforyourskin.co.uk/honesty-skincare-shop/
how can I make this button & quantity box appear like on this page?
http://honestyforyourskin.co.uk/product/protect-nourishing-cleanse-balm/
Cheryl
August 25, 2016 at 3:56 am #1146299Hey Cheryl,
This first link returns a 404. Please check.
Thanks.
August 25, 2016 at 4:08 am #1146311Hi Christian,
Sorry – I changed the URL yesterday… this is the new one http://honestyforyourskin.co.uk/store/
Cheryl
August 25, 2016 at 5:13 am #1146375Hey Cheryl,
Adding the quantity field would require filtering the WooCommerce add to cart shortcode. Since this doesn’t come with WooCommerce and X out of the box, this would require custom development. You might want to check this out https://docs.woocommerce.com/document/override-loop-template-and-show-quantities-next-to-add-to-cart-buttons/. Or, you might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/
Thank you for understanding.
August 25, 2016 at 8:10 am #1146556Hi Christian,
ahh ok thankyou… for the meantime, how do I get rid of the border around this element? … and add a little padding in-between the price & Add to cart button?
Thanks,
Cheryl
August 25, 2016 at 10:13 am #1146748Please add the code below in your Appearance > Customize > Custom > Global CSS
.woocommerce.add_to_cart_inline { border: 0 !important; } .woocommerce-Price-amount { margin-right: 20px }
Hope that helps. 🙂
August 25, 2016 at 10:23 am #1146763Thanks Christian!
Is there a way to;
1. Remove the padding in front of the price (see picture), the space were the border used to be…
2. Stop this red highlight from visualising (in picture)
3. Adjust ‘view cart’ text to be spaced from the button.p.s. I’ve added this code to the customizer in cornerstone which is specific for the page. I haven’t added it to the global page as the normal shop page doesn’t have these problems. It’s only on this new one I’ve built using the woocommerce short-codes. Is this ok? Will this remain in place if I updated the theme?
Thanks so much,
Cheryl
August 25, 2016 at 2:43 pm #1147119Hi Cherlyn,
#1 Please fine this code:
.woocommerce.add_to_cart_inline { padding-left: 0 !important; }
and update it to
.woocommerce.add_to_cart_inline { border: 0 !important; padding-left: 0 !important; }
#2 Would you mind giving us more info about this item?
#3
a.added_to_cart.wc-forward { display: inline-block; position: relative; top: 2px; }
It should not be affected during upgrade not unless you made some customization to the theme and didn’t used it in the child theme.
August 30, 2016 at 5:16 am #1153079Hi Jade,
Thankyou, #1 worked a treat!
#2, after I’ve pressed the add to cart button, and the curser is removed from the button area, it brings up the highlighted red box around the button… (I’m using Mozilla), you can try and see what I mean (www.honestyforyourskin.co.uk/store).
#3 I added the code, but the text remains the same as in the screenshot I attached before…
Cheryl
-
AuthorPosts