uspetznaz Posted March 22, 2013 Share Posted March 22, 2013 (edited) Hello I am configuring my shop to run the "1 page checkout" but theres a small modification I am trying to do yet I have not been able so far. When we configured our shop to run the quick order process, the checkout consists of a single page in which the following sections are rendered: 1 - Shopping Cart 2 - Order Addresses 3 - Order Carrier 4 - Order Payment If the customer has not logged in or is a new customer, step 2 shows the "New account" form instead of the Order Addresses, and in step 3 there are no carriers. Once the customer fills in the New account form, and after clicking "Save", the page is refreshed and step 2 shows "Order Addresses" and step 3 shows the carriers available. What I have been unsuccessfully trying to do is, when customer is not logged in to show only the New account section, and once he has created his account after clicking the "Save" button, to show all the steps (cart, addresses, carriers, payment). I have been trying to do this by editing the order-opc.tpl (I am running prestashop 1.5.2). The original code is {if $productNumber} <!-- Shopping Cart --> {include file="$tpl_dir./shopping-cart.tpl"} <!-- End Shopping Cart --> {if $isLogged AND !$isGuest} {include file="$tpl_dir./order-address.tpl"} {else} <!-- Create account / Guest account / Login block --> {include file="$tpl_dir./order-opc-new-account.tpl"} <!-- END Create account / Guest account / Login block --> {/if} <!-- Carrier --> {include file="$tpl_dir./order-carrier.tpl"} <!-- END Carrier --> <!-- Payment --> {include file="$tpl_dir./order-payment.tpl"} <!-- END Payment --> {else} {capture name=path}{l s='Your shopping cart'}{/capture} {include file="$tpl_dir./breadcrumb.tpl"} <h2>{l s='Your shopping cart'}</h2> <p class="warning">{l s='Your shopping cart is empty.'}</p> {/if} And what I did was just to insert into the IF block that checks if customer isLogged (" {if $isLogged AND !$isGuest}") the Shopping cart, Carrier and Payment sections, leaving the new order section within the corresponding else. When the customer goes to checkout it is fine, only the new account form is shown, but when the form is filled and "Save" button is clicked, the other steps (Shopping cart, carrier, payment) do not show. Any ideas as to why is this happening? I have tried with other variables for the IF but to no avail. Any ideas are more than welcome. Thanks!! Elias Edited March 22, 2013 by uspetznaz (see edit history) Link to comment Share on other sites More sharing options...
arno9 Posted November 20, 2015 Share Posted November 20, 2015 Did you ever figure out how to do this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now