timcross
(Tim Cross)
April 17, 2016, 8:58pm
#1
Hello
I’m having problems with the checkout page
Whenever I click checkout from the cart page it redirects back to itself
On the checkout page, the chunk scCheckoutForm has a FormItRetriever snippet with redirectToOnNotFound
This just seems to kick in all the time. If I take it out the checkout page is displayed.
Why is the FormItRetriever failing? I’m just submitting from the cart page and have followed all the documentation for setting up these pages. Are there any other settings I need to add?
Thanks
Tim
mhamstra
(Mark Hamstra)
April 17, 2016, 11:23pm
#2
Hey Tim, have you made any tweaks to the formit call in the cart chunk?
timcross
(Tim Cross)
April 18, 2016, 7:26am
#3
Hi Mark
Thanks for getting back to me.
I haven’t made any changes. I’ve just downloaded and followed the docs.
Here’s what I have in my cart page :
[[!scGetCart]]
And the chunk looks like this :
[[!FormIt?
&store=`1`
&hooks=`spam,redirect`
&submitVar=`checkout`
&redirectTo=`[[*id:scFirstChild]]`
]]
[[!scCartUpdate]]
<div id="simplecart">
<form action="[[~[[*id]]]]" method="post" id="form_cartoverview">
<input type="hidden" name="updatecart" value="true" />
<table>
<tr>
<th class="desc">[[%simplecart.cart.description]]</th>
<th class="price">[[%simplecart.cart.price]]</th>
<th class="quantity">[[%simplecart.cart.quantity]]</th>
[[+cart.total.vat_total:notempty=`
<th class="quantity">[[%simplecart.cart.vat]]</th>
`:isempty=``]]
<th class="subtotal">[[%simplecart.cart.subtotal]]</th>
<th> </th>
</tr>
[[+cart.wrapper]]
[[+cart.total.discount:notempty=`
<tr class="total first discount">
<td colspan="[[+cart.total.vat_total:notempty=`3`:isempty=`2`]]"> </td>
<td class="label">[[%simplecart.cart.discount]]</td>
<td class="value">- [[+cart.total.discount_formatted]]</td>
<td class="extra">[[+cart.total.discount_percent:notempty=`([[+cart.total.discount_percent]]%)`:isempty=` `]]</td>
</tr>
`:isempty=``]]
[[+cart.total.vat_total:notempty=`
<tr class="total [[+cart.total.discount:notempty=`second`:isempty=`first`]]">
<td colspan="3"> </td>
<td class="label">[[%simplecart.cart.total_ex_vat]]</td>
<td class="value">[[+cart.total.price_ex_vat_formatted]]</td>
<td class="extra"> </td>
</tr>
[[+cart.vat_rates]]
<tr class="total [[+cart.total.discount:notempty=`third`:isempty=`second`]]">
<td colspan="3"> </td>
<td class="label">[[%simplecart.cart.total_vat]]</td>
<td class="value">[[+cart.total.vat_total_formatted]]</td>
<td class="extra"> </td>
</tr>
<tr class="total [[+cart.total.discount:notempty=`fourth`:isempty=`third`]]">
<td colspan="3"> </td>
<td class="label">[[%simplecart.cart.total_in_vat]]</td>
<td class="value">[[+cart.total.price_formatted]]</td>
<td class="extra"> </td>
</tr>
`:isempty=`
<tr class="total [[+cart.total.discount:notempty=`second`:isempty=`first`]]">
<td colspan="2"> </td>
<td class="label">[[%simplecart.cart.total]]</td>
<td class="value">[[+cart.total.price_formatted]]</td>
<td class="extra"> </td>
</tr>
`]]
</table>
<div class="submit">
<input type="submit" value="[[%simplecart.cart.update]]" />
</div>
</form>
[[!scCouponCode]]
<h2>[[%simplecart.cart.delivery_method]]</h2>
<form action="[[~[[*id]]]]" method="post" id="form_deliverymethod">
[[!scDeliveryMethods]]
<div class="submit">
[[+cart.minimum_order_amount_reached:notempty=`
<input type="submit" name="checkout" value="[[%simplecart.cart.checkout]]" />
`:isempty=`
[[%simplecart.cart.minimum_order_amount? &amount=`[[+cart.minimum_order_amount_formatted]]`]]
`]]
</div>
</form>
</div>
Could it be failing because I’m working locally? Does FormItRetriever have any settings that affect this?
Thanks
Tim
mhamstra
(Mark Hamstra)
April 18, 2016, 5:03pm
#4
As long as your sessions are working locally that should work as expected… I don’t see anything out of order, so perhaps that does point to an environment issue?