Jump to content

Display only the cheaper carrier


Recommended Posts

Look for the following at about line 63 of order-carrier.tpl in your theme:
                            {foreach $option_list as $key => $option}

and change it to:

                            {foreach $option_list as $key => $option}
                                {if $option.is_best_price}

and the following at about line 259 from:

                                </div> <!-- end delivery_option -->

to:

                                </div> <!-- end delivery_option -->
                                {/if}

This should only display a carrier if it has the best price.

  • Like 3
Link to comment
Share on other sites

Yes, I'm not aware of any option or module that does it, but someone else may know. The changes above are pretty easy and if you've copied the default theme instead of modifying it directly, it won't be overwritten when you upgrade.

Link to comment
Share on other sites

Yes, if you're using the default PrestaShop theme, it's better to copy it, rename it and then modify. The reason I recommend this is that PrestaShop will overwrite the default theme when it upgrades, which will cause you to lose all your changes. If you copy and rename, that won't happen.

Link to comment
Share on other sites

curious, (learning shipping)

 

back office-->shipping-->preferences

 

if we set default carrier to best price, this will be used as default shipping at add to cart.

 

at check out, if you have other carriers they are an option to visitor, but the best price would be default.

 

if one just wanted one carrier, then would not just define 'one' carrier. :)

Link to comment
Share on other sites

Yes I understand what you said but in my shop the shipping is free for everyone, but I need to make my customers to select always the shipping with best price, because I'll pay it anyway, so I need it's the best price selected. I made me understand?

 

Thanks

 

lol no I don't get it yet.  Do you want one carrier displayed at checkout that offers free shipping?  Or do you have multiple carriers, one free shipping and you want free shippting to be automatically default to free shipping and leave others as options (or not show at checkout so they cannot be selected?)

  • Like 1
Link to comment
Share on other sites

lol no I don't get it yet. Do you want one carrier displayed at checkout that offers free shipping? Or do you have multiple carriers, one free shipping and you want free shippting to be automatically default to free shipping and leave others as options (or not show at checkout so they cannot be selected?)

My understanding ( or misunderstanding. Lol) is that shipping is free for all customers but he wants to ship it the cheapest way depending on where the customer is. He sounds like me. If it isn't complicated, make it so! lol

 

It is confusing. He wants the cheapest carrier for his customer, which can only be figured out after a customer places an order, because he wants to save money on shipping since he has to pay for it, so good luck figuring out how to help him, El Patron!

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

My understanding ( or misunderstanding. Lol) is that shipping is free for all customers but he wants to ship it the cheapest way depending on where the customer is. He sounds like me. If it isn't complicated, make it so! lol

 

It is confusing. He wants the cheapest carrier for his customer, which can only be figured out after a customer places an order, because he wants to save money on shipping since he has to pay for it, so good luck figuring out how to help him, El Patron!

I couldn't explain better ;)

 

The reason why I want it that way is because the shipping is free only for my customers, but in reality I pay it anyway right? (I think we all do it) So for that reason, I need to make my customers follow the path I want, make them select the only carrier available for that order (the most cheaper carrier) even if I have another carrier which is available for that zone

  • Like 1
Link to comment
Share on other sites

ok...thanks for patience with grandpa/master/legend :)

 

at checkout you want the cheapest carrier to be displayed and all other carrier options suppressed (not shown).  The key is that only one carrier is made available and all  other suppressed.  Thanks I am big student of  shipping now, but I getting the hang of native shipping for improvements...happy day, el

 

 

razaro where are you?

Edited by El Patron (see edit history)
  • Like 1
Link to comment
Share on other sites

I'm the interpreter for Rafael. :) He wants a module or other uncomplicated way of doing this, most likely because (like me), he's learning his way around PrestaShop and coding.

 

I have a different shipping problem that I will post soon.

 

I tried to click "like this" for you legends but exceeded my likes for today. Will do it tomorrow.

Link to comment
Share on other sites

True, Rocky, but what you just said looks easier than your first reply. :) Plus, maybe Rafael doesn't know where to find the file to edit, if he knows how to edit.

 

Now I'm afraid to ask my shipping question. Lol. Just kidding. I added my question to someone else's post because it's very similar.

Link to comment
Share on other sites

Rafael - do you have an FTP (File Transfer Protocol) program? It allows you to download the files to edit and upload the edited file to your server.

 

You can get it free here: https://filezilla-project.org

 

If you need help with the login credentials I'll help as best I can.

 

I make a new folder named "PrestaShop edits" right on my desktop to find it fast.

 

When you download the order-carrier.tpl to your computer, make a backup of the file and keep it safe. Rename it to order-carrier-original.tpl and don't do anything to it.

 

Once we have the order-carrier.tpl file we edit the lines Rocky showed us.

 

I will continue this very soon. If you can upload your order-carrier.tpl file I can edit it for you and give it back.

 

Masters / Legends / Ambassadors - is there any personal info in this file? I don't want Rafael to send it if there is.

Link to comment
Share on other sites

 

Look for the following at about line 63 of order-carrier.tpl in your theme:
                            {foreach $option_list as $key => $option}

and change it to:

                            {foreach $option_list as $key => $option}
                                {if $option.is_best_price}

and the following at about line 259 from:

                                </div> <!-- end delivery_option -->

to:

                                </div> <!-- end delivery_option -->
                                {/if}

This should only display a carrier if it has the best price.

 

 

Hi everybody!  Rocky is one of my heroes and I missed this in my quest for understanding.  i would follow Rocky's advice here, I've followed his advice for many years now.

  • Like 2
Link to comment
Share on other sites

  • 1 year later...

Anyone know how to modify the above solution to work with 1.7.3 shippin.tpl?  I've tried every variation that I can think of, to no avail.  I would like to display the best price carrier (dynamic), as well as two other carriers hard-coded in.  Thank you.

 

Link to comment
Share on other sites

it's a long way to the top of you want to ecommerce.

here  is solution that 'hacks' cannot proivde:  Visitors Shipping Assurance for PrestaShop  for non-logged and logged in visitors.  Nobody ever done this and we did it before Amazon.  For PS eco we won't get rich off of it lol.

see how the widget works on on the demo:

https://localizedshippingpro.com

What's important to display all shipping carriers not just the cheapest.   This allows shop manager to actually use their shipping as a market tool.

this module also integrates with our geo targeting prod moudle as well as native geo location (we don't reccommend that however)

PrestaHeroes rules the pool when it comes to visitor localzation.

 

happy selling,  el

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...