Jump to content

How to remove "shipping" step in checkout process in Prestashop 1.5.3


Recommended Posts

Hi,

 

I have installed Prestashop 1.5.3.1 and in my shop I offer free shipping and hence customer has nothing to do with "shipping" step and carrier list.

 

I tried various edits to remove shipping from the checkout process and jump directly from address to Payment but its not getting right.

 

Can anyone guide me how to proceed further.

 

Thanks for every suggestion.

Edited by PrestaFanBoy (see edit history)
  • Like 2
Link to comment
Share on other sites

Hi Nemo1,

 

Thanks for your solution.

 

However, it did only partial job. I added a virtual product and then the "shipping" step is still there only difference is there is no carrier list but terms and conditions are still there.

 

I would like to retain 5 step process but make it 4 step..

 

Is it possible to move terms and conditions clause to other step( may be payments) and remove shipping from the display.

 

I was successful to some extent but failed to relocate the terms and conditions clause. Can you guide me how to do that.

  • Like 2
Link to comment
Share on other sites

Nemo1,

 

Thank you.

 

Yes, ordercontroller needs to be changed and I did a little modification to redirect directly to AssignPayments after ProcessAddress and accordingly changed order-steps.tpl to remove display of 'shipping" step.

 

Till this point im managed to do. Now, it comes to terms and conditions clause which was in shipping step which is now disappeared.

 

Im not able to relocate terms and cond clause to payments step. Got struck here.

 

I attached a screenshot. This is how I am looking now.

 

Any suggestions..

post-494308-0-01224800-1377253091_thumb.png

Edited by PrestaFanBoy (see edit history)
Link to comment
Share on other sites

This is what you're looking for, order-carrier.tpl, line 264 of the default template

 

{if $conditions AND $cms_id}
<h3 class="condition_title">{l s='Terms of service'}</h3>
<p class="checkbox">
 <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
 <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(Read the Terms of Service)'}</a>
</p>
<script type="text/javascript">$('a.iframe').fancybox();</script>
{/if}
</div>

  • Like 1
Link to comment
Share on other sites

This is what you're looking for, order-carrier.tpl, line 264 of the default template

 

{if $conditions AND $cms_id}
<h3 class="condition_title">{l s='Terms of service'}</h3>
<p class="checkbox">
 <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
 <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(Read the Terms of Service)'}</a>
</p>
<script type="text/javascript">$('a.iframe').fancybox();</script>
{/if}
</div>

 

You got it correct, Nemo1. Thanks for quick reply.

 

But, it isnt working correct..not sure why. There are two minor issues.

 

1) I couldnt get it displayed with the presence of "{*{if $conditions AND $cms_id}*}" got it only after I commented it.

2) When I click "read' link, im supposed to get a fancy box with terms and cond, but got an error there.

 

Attached the screenshot.

 

Can you check it Nemo1..

 

{* added terms and cond to payments step *}
{*{if $conditions AND $cms_id}*}
<h3 class="condition_title">{l s='Terms of service'}</h3>
<p>
 <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
 <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(read)'}</a>
</p>
<script type="text/javascript">$('a.iframe').fancybox();</script>
{*{/if}*}

 

This is where I posted it.

post-494308-0-41256800-1377255538_thumb.png

Edited by PrestaFanBoy (see edit history)
Link to comment
Share on other sites

From Shipping tab and select Carriers from the menu.

 

From the Shipping -> Edit Carriers screen, scroll down until you see the Status field.

 

You have to disable the carrier in your front office.

 

Regards

 

Sandip

 

Hi Sandeep,

 

Thank you.

 

Here, im trying to get the regular 5 step checkout to 4 step checkout process not just removing carrier list...but entire "shipping" step.

  • Like 1
Link to comment
Share on other sites

You got it correct, Nemo1. Thanks for quick reply. But, it isnt working correct..not sure why. There are two minor issues. 1) I couldnt get it displayed with the presence of "{*{if $conditions AND $cms_id}*}" got it only after I commented it. 2) When I click "read' link, im supposed to get a fancy box with terms and cond, but got an error there. Attached the screenshot. Can you check it Nemo1..
{* added terms and cond to payments step *} {*{if $conditions AND $cms_id}*}
[b]	{l s='Terms of service'}[/b]

{l s='I agree to the terms of service and will adhere to them unconditionally.'} [url="{$link_conditions}"]{l s='(read)'}[/url]
{*{/if}*} 

This is where I posted it.

 

Hello Nemo1,

 

I tried numberous ways to to get two things done..but solved one of them.

 

[solved] Population of fancy box with terms and conditions in fancy box - I just replaced the {$link_conditions} with absolute link.

 

However, I couldnt make the dependency of terms and conditions before payment. Now, its going to process payment module regardless of whether terms and cond is checked or not.

 

Do you have any suggestions for my problem.

 

I want to make a dependency that only if terms are agreed, then only payment should happen else populate message and stay there.

 

I have attached my order-payment.tpl code and ordercontroller.php file.

 

{* begin bring terms and cond ck box to payment step *}
	var msg = "{l s='You must agree to the terms of service before continuing.' js=1}";
{literal}
function acceptCGV()
{
 if ($('#cgv').length && !$('input#cgv:checked').length)
 {
  alert(msg);
  return false;
 }
 else
  return true;
}
{/literal}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{* begin include terms and cond in payment step *}
{*{if $conditions AND $cms_id}*}
<h3 class="condition_title">{l s='Terms of service'}</h3>
<p>
 <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} />
 <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="http://omytus.com/content/3-terms-and-conditions-of-use?content_only=3" class="iframe">{l s='(read)'}</a>
</p>
<script type="text/javascript">$('a.iframe').fancybox();</script>
{*{/if}*}
{* end-added terms and cond box *}

{* begin-changed to go back to step 1 instead of step 2(carrier) *}
{if !$opc}
<p class="cart_navigation"><a href="{$link->getPageLink('order', true, NULL, "step=1")}" title="{l s='Previous'}" class="button">« {l s='Previous'}</a>

	{* begin-added pay button instead of image for ccavenue *}
	<a href="javascript:document.ecom.submit();" title="{l s='Pay'}" class="button" style=float:right>{l s='Pay'}</a>
	{*added pay button-end*}
</p>

OrderController.php

post-494308-0-28853600-1377286183_thumb.png

Edited by PrestaFanBoy (see edit history)
  • Like 2
Link to comment
Share on other sites

So you integrated it to the last step? Why not going this way:

 

hide payment options by default.

 

Then, with javascript: if the box is checked, show them, otherwise they stay hidden

 

How does it sound?

Its very nice idea and UI looks good too. :)

 

Can you guide me what files exactly I need to work on..I mean js,tpl..

 

Still, I need to improve a lot to understand prestashop structure and detailed functionality from developer point of view.

 

Thank you Nemo1. You are so quick.

Edited by PrestaFanBoy (see edit history)
Link to comment
Share on other sites

Its very nice idea and UI looks good too. :) Can you guide me what files exactly I need to work on..I mean js,tpl.. Still, I need to improve a lot to understand prestashop structure and detailed functionality from developer point of view. Thank you Nemo1. You are so quick.

 

Hello Nemo1,

 

Thanks for your quick help..:):)

 

I did the hide/show button way using JS in the same order-payment.tpl and it looks fine.

Link to comment
Share on other sites

  • 1 year later...

Hello Nemo1,

 

Thanks for your quick help.. :) :)

 

I did the hide/show button way using JS in the same order-payment.tpl and it looks fine.

 

PrestaFanBoy,

 

did you by any chance in the meantime adapt this to 1.6? It would be great if you'd share your modifications. Also I'm having trouble finding exactly what you are overriding in the orders controller since to me it looks like you uploaded the original OrderController.php from 1.5.3.1 release.

 

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

Hello Nemo1,

 

Thanks for your quick help.. :) :)

 

I did the hide/show button way using JS in the same order-payment.tpl and it looks fine.

Hello PrestaFanBoy,

 

i do not know how to you solve this problem. IF you solved this issue i hope you guide to help me 

 

thanks alot

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...
×
×
  • Create New...