Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Add to cart button not centered
- This topic has 9 replies, 3 voices, and was last updated 12 years, 10 months ago by admin.
-
AuthorPosts
-
January 29, 2012 at 10:52 pm #5381sevannMember
I followed the direction listed below to move the add to cart button to the right, however the button is not centered with the price input box, please see screenshot > [http://img1.UploadScreenshot.com/images/main/1/2808461898.png]
I am using the [wp_eStore_add_to_cart id=1] shortcode. Can you please let me know how to fix this? Also is it possible to add some text between the input box and the add to cart button? Tks in advance for your help. Great plugin btw.
Open the “eStore_misc_functions.php” file and look for the following line of code:
$output = get_button_code_for_element($ret_product);
Once you find it please change it with the following:
$output = get_button_code_for_element($ret_product,false);
The 2nd argument (false) tells it not to use break line when it creates the button.
January 30, 2012 at 4:35 am #41381adminKeymasterYou will need some CSS adjustment. Remove the image URL from the “Button Image URL” field and then post a link to the page where you are using it so I can check the HTML.
You can use the following code to center the add to cart button on a page.
<div style="text-align: center;">[wp_eStore_add_to_cart id=2]</div>
January 30, 2012 at 5:40 pm #41382sevannMemberOk done, I removed the button image URL. The default add to cart is now showing and is perfectly centered. The issue is when I add the “Button Image URL”
Here is the link > [http://www.sandbox.deeptraxdigital.com/#409/nightshift-ep]
Tks
January 31, 2012 at 12:39 am #41383sevannMemberwhere is default add to cart button located? Can i just replace it, would it solve the issue?
January 31, 2012 at 1:12 am #41384PeterMemberHi,
Any chance that you can leave that product with the default button on the page and also add another test product with the problematic button underneath?
This will make it easier to troubleshoot the CSS with firebug.
January 31, 2012 at 1:18 pm #41385sevannMemberHi,
There you go > [http://www.sandbox.deeptraxdigital.com/#409/nightshift-ep]
Tks for your help
February 1, 2012 at 6:15 am #41386adminKeymasterI can’t see anything obvious but the input image attribute on your theme must be adding some style to it which is causing the image to line up. The default add to cart button is a standard HTML button (not an image) which is why it lines up fine.
February 1, 2012 at 11:03 pm #41387sevannMemberI think i can make it work with the add to cart button underneath but I need to add some text next to the name you price entry box, something short like ($2,00 or more) . Is there a way for me to do this?
February 2, 2012 at 2:48 am #41388sevannMemberJust an fyi. it’s not the theme. I switched theme and same thing happen
February 2, 2012 at 6:14 am #41389adminKeymasterRevert the custom modification you did so the “Add to Cart” button goes on its own line. Then simply change the language file to correct the message. This post will explain more:
You will need to change
define("WP_ESTORE_YOUR_PRICE", "Your Price");
to
define("WP_ESTORE_YOUR_PRICE", "Name your price ($2.00 or more):");
-
AuthorPosts
- You must be logged in to reply to this topic.