HOW TO REDIRECT ADD TO CART BUTTON TO CART PAGE???!

Highlighted
New Member
1 0 0

Hey I am trying to redirect my ADD TO CART button to go straight to my cart page instead of staying on product page

 

below is my product.liquid code if anyone knows where/what I need to change! 

 

I am using Debut theme

 

<!-- spurit_stp-added -->
{% include 'spurit_stp-product-snippet' %}
<!-- /spurit_stp-added -->
{% comment %}
The contents of the product.liquid template can be found in /sections/product-template.liquid
{% endcomment %}

{% section 'product-template' %}
{% section 'product-recommendations' %}

{% if collection %}
<div class="text-center return-link-wrapper page-width">
<a href="{{ collection.url }}" class="btn btn--secondary btn--has-icon-before return-link">
{% include 'icon-arrow-left' %}
{{ 'products.product.back_to_collection' | t: title: collection.title }}
</a>
</div>
{% endif %}

<script>
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: {{ 'products.product.add_to_cart' | t | json }},
soldOut: {{ 'products.product.sold_out' | t | json }},
unavailable: {{ 'products.product.unavailable' | t | json }}
}
</script>

{% assign current_variant = product.selected_or_first_available_variant %}

<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"@id": {{ canonical_url | append: '#product' | json }},
"name": {{ product.title | json }},
"url": {{ shop.url | append: product.url | json }},
{%- if product.featured_image -%}
{%- assign image_size = product.featured_image.width | append: 'x' -%}
"image": [
{{ product.featured_image.src | img_url: image_size | prepend: "https:" | json }}
],
{%- endif -%}
"description": {{ product.description | strip_html | json }},
{%- if current_variant.sku != blank -%}
"sku": {{ current_variant.sku | json }},
{%- endif -%}
"brand": {
"@type": "Thing",
"name": {{ product.vendor | json }}
},
"offers": [
{%- for variant in product.variants -%}
{
"@type" : "Offer",
{%- if variant.sku != blank -%}
"sku": {{ variant.sku | json }},
{%- endif -%}
"availability" : "http://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
"price" : {{ variant.price | divided_by: 100.00 | json }},
"priceCurrency" : {{ cart.currency.iso_code | json }},
"url" : {{ shop.url | append: variant.url | json }}
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
]
}
</script>

0 Likes
Highlighted
Shopify Expert
3907 559 938

Hi @emmaormesher 

If you want to remove ajax add to cart and want to send user to cart page after add to cart then follow this:

1. open Section->product-template.liquid -> find class "product-form__cart-submit" and remove this class.

2. open Asset->theme.scss file add below code at bottom of page:

[name="add"]{width:100%;}
Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Tourist
9 0 1

Hi, someone can help. How to change the setting of the "Add to cart" button. After adding to the cart, it immediately redirects to the cart, how to cancel it?

0 Likes
Highlighted
Shopify Expert
3907 559 938

Which theme you have and send store url,

 you have to find ajax cart function in asset->theme.js file where from you can set 'location.href="/cart" in success function.

 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Tourist
9 0 1
0 Likes
Highlighted
Shopify Expert
3907 559 938

As i can see you can not redirect to cart page after adding to cart.

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Tourist
9 0 1

No, this is exactly what I wanted, thanks, I found a solution to this problem.

0 Likes
Highlighted
New Member
1 0 0

I'm having issues with the same problem - add to cart doesn't go to cart page. Can anyone assist?

0 Likes
Highlighted
Shopify Expert
3907 559 938

Send your store url

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
2 0 0

Hello I am having the exact same problem. I want my customers to click on "Add to Cart" and be redirected to "View Cart" page. How should I do it?

0 Likes