Skip to content

Commit

Permalink
Buy now button url updated
Browse files Browse the repository at this point in the history
  • Loading branch information
amjedsaleel committed Dec 6, 2021
1 parent 5a0b782 commit d0bb511
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
2 changes: 1 addition & 1 deletion templates/store/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h6 class="pl-3 small-gray-text">
<a href="#" class="btn btn-outline-primary"
onclick="addToCart(event, '{% url 'cart:add-to-cart' variant.slug %}')">Add
to cart</a>
<a href="#" class="btn btn-primary">Buy now</a>
<a href="{% url 'cart:buy-now-checkout' %}?variant={{ variant.slug }}" class="btn btn-primary">Buy now</a>
</div>
</div>
</div>
Expand Down
34 changes: 1 addition & 33 deletions templates/store/product-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -90,44 +90,12 @@ <h2 class="title">{{ variant.product.name | capfirst }}</h2>
<div class="d-flex pl-3 pr-3 justify-content-start mb-4">
<a href="#" class="btn btn-outline-primary"
onclick="addToCart(event, '{% url 'cart:add-to-cart' variant.slug %}')">Add to cart</a>
<a href="#" class="btn btn-primary ml-2">Buy now</a>
<a href="{% url 'cart:buy-now-checkout' %}?variant={{ variant.slug }}" class="btn btn-primary ml-2">Buy now</a>
</div>
</article>
</main>
</div>
</div>
{# {% if suggestions %}#}
{# <h4 class="mt-5">Suggestions</h4>#}
{# <div class="row mt-5">#}
{# {% for i in suggestions %}#}
{# <div class="col-12 col-md-6 col-lg-4">#}
{# <div class="card card-product-grid">#}
{# <a href="{% url 'store:products-details' i.product.brand.slug i.slug %}"#}
{# class="img-wrap mt-4 mb-4"> <img src="{{ i.image1.url }}" alt=""/>#}
{# </a>#}
{# <hr>#}
{# <h5 class="pl-3">{{ i.product.name | capfirst }}</h5>#}
{# <h6 class="pl-3 small-gray-text">#}
{# ({{ i.ram }}, {{ i.storage }}, {{ i.color }})#}
{# </h6>#}
{# <div class="d-flex pl-3 pr-3 justify-content-between align-items-center mb-4">#}
{# <p class="price regular-text-bold">₹{{ i.price }}</p>#}
{# <p class="original-price small-gray-text">#}
{# <del>25999</del>#}
{# </p>#}
{# <p class="offer small-gray-text">10% off</p>#}
{# </div>#}
{# <div class="d-flex pl-3 pr-3 justify-content-between mb-4">#}
{# <a href="" class="btn btn-outline-primary"#}
{# onclick="addToCart(event, '{% url 'cart:add-to-cart' i.slug %}')">Add to#}
{# cart</a>#}
{# <a href="#" class="btn btn-primary">Buy now</a>#}
{# </div>#}
{# </div>#}
{# </div>#}
{# {% endfor %}#}
{# </div>#}
{# {% endif %}#}
</div>
{% endblock %}
{% block script %}
Expand Down
2 changes: 1 addition & 1 deletion templates/store/store.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ <h6 class="pl-3 small-gray-text">
<a href="#" class="btn btn-outline-primary"
onclick="addToCart(event, '{% url 'cart:add-to-cart' variant.slug %}')">Add
to cart</a>
<a href="#" class="btn btn-primary">Buy now</a>
<a href="{% url 'cart:buy-now-checkout' %}" class="btn btn-primary">Buy now</a>
</div>
</div>
</div>
Expand Down

0 comments on commit d0bb511

Please sign in to comment.