elcodi / bamboo

Meet Bamboo, an e-commerce project built on top of Elcodi and Symfony. Give us a star to support our project :)
http://bamboo.elcodi.com
MIT License
198 stars 44 forks source link

Bad route in checkout-payment.html.twig template #616

Closed kolmanpav closed 8 years ago

kolmanpav commented 8 years ago

When someone create more than one shipping method than error occures on the third page of cart (on checkout-payment.html.twig template).

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "store_checkout_shipping_range_apply" as such route does not exist.") in StoreTemplateBundle:Pages:checkout-payment.html.twig at line 23.

You must replace this:

{% for shippingMethod in shippingMethods %}
{% if shippingMethod.id == actualShippingMethod %}
<div class="col-1-3"><i class="fa fa-caret-right"></i> <strong>{{ shippingMethod.carrierName }} - {{ shippingMethod.price|print_convert_money }}</strong></div>
{% else %}
<div class="col-1-3"><a href="{{ url("store_checkout_shipping_range_apply", { 'rangeId': shippingMethod.id }) }}">
{{ shippingMethod.carrierName }} - {{ shippingMethod.price|print_convert_money }}
</a></div>
{% endif %}
{% endfor %}

by this:

{% for shippingMethod in shippingMethods %}
{% if shippingMethod.id == actualShippingMethod %}
<div class="col-1-3"><i class="fa fa-caret-right"></i> <strong>{{ shippingMethod.carrierName }} - {{ shippingMethod.price|print_convert_money }}</strong></div>
{% else %}
<div class="col-1-3"><a href="{{ url("store_checkout_shipping_method_apply", { 'shippingMethod': shippingMethod.id }) }}">
{{ shippingMethod.carrierName }} - {{ shippingMethod.price|print_convert_money }}
</a></div>
{% endif %}
{% endfor %}
EmanueleMinotto commented 8 years ago

Was solved in https://github.com/elcodi/bamboo/commit/22bb156582779a598fbc2133bc223e89d4900469

@kolmanpav check https://github.com/elcodi/bamboo/blob/master/CHANGELOG-1.0.md and ping me (on Gitter) if you need a help migrating your codebase