Posted: February 24, 2014 at 9:49 pm
|
How can I get the “view cart” link in a Post to a change to a button. I was able to get the “Add to Cart” link to change to a button using the following code [ESPRESSO_CART_LINK event_id=”10″ anchor=” direct_to_cart=1 moving_to_cart=”Redirecting to cart…”] but haven’t been able to get the “View Cart” to change to a button. Thanks. |
|
Hi, The shortcode you linked will never show the view cart link as the user is redirected to the cart, unless of course they hit the back button. To change it, you will need to use CSS. For example: .ee_view_cart { padding: 10px; background-color: orange; border: #000 1px solid; border-radius: 10px; color: #fff; } You could also use CSS to repalce the text with an image http://css-tricks.com/css-image-replacement/ |
|
To clarify: Currently, after someone clicks on the “Add To Cart” button in a “Post” the link “View Cart” automatically shows. After an item is added to the cart how would I get the “View Cart” link to show a button instead of a link in a “Post”. I already have the below code in CSS but it only works in the EE Event Description. .ee_view_cart { .ee_add_item_to_cart { |
Hi, May I ask where you currently have that CSS? The code you have posted should work throughout the site. |
|
|
The code is currently in the theme’s custom-css file. |
Hmm then that should work fine within Post’s. Are you running a caching plugin at all? |
|
|
No, not that I am aware of. |
|
Can you provide a link to an example Post where the view link is not changing please? |
|
Yes, the link is http://temporaryurl.scripteen.com/il although now when I click on Add To Cart it goes directly to the cart whereas before it would stay on the same page. But the link is above if you want to go ahead and test it. Thanks. |
Automatically redirecting to the cart means the shortcode is using the direct_to_cart attribute. Such as: [ESPRESSO_CART_LINK direct_to_cart=1 moving_to_cart=”Redirecting to cart…”] If you remove that attribute the link will no longer re-direct to the cart. However, I added and event to the cart then clicked the browsers back button to return to the previous part and was shown the ‘View Cart’ image http://take.ms/fQGLS If you would like to remove the above attribute from the shortcode we can then test again without the re-direct. |
|
The support post ‘View Cart Button in a Post’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.