Jump to content
tesshsu

customise shipment method

Recommended Posts

Hi experts,

I used: prestashop 1.7

I need to develop the customise shipment, which has 2 /

1 shipment for distributors : so as they are login, they will see the shipment price should be hide ( or show Shipping calculated in quote)

2 Free shipment : in france area if user buy over 60 euro they will get free shipment

 

the second is good to go

but the first one shipment for distributors , i found there's no option to hide the price as configure shipement method:

 

Ajouter les frais de manutention
OUINON
Livraison gratuite
OUINON
Facturation
En fonction du prix total.
En fonction du poids total.
Taxes
 Aucune taxe CN Reduced Rate (13%) CN Standard Rate (17%) CN Super Reduced Rate (3%) CN Super Reduced Rate (6%) EU VAT For Virtual Products FR Taux réduit (10%) FR Taux réduit (5.5%) FR Taux standard (20%) FR Taux super réduit (2.1%) JP Standard Rate (5%) TW Standard Rate (5%) UK Reduced Rate (5%) UK Standard Rate (20%) US-AK Rate (0%) US-AL Rate (4%) US-AR Rate (6%) US-AZ Rate (6.6%) US-CA Rate (8.25%) US-CO Rate (2.9%) US-CT Rate (0%) US-DC Rate (6%) US-DE Rate (0%) US-FL Rate (6%) US-GA Rate (4%) US-HI Rate (4%) US-IA Rate (6%) US-ID Rate (6%) US-IL Rate (6.25%) US-IN Rate (7%) US-KS Rate (5.3%) US-KY Rate (6%) US-LA Rate (4%) US-MA Rate (6.25%) US-MD Rate (6%) US-ME Rate (5%) US-MI Rate (6%) US-MN Rate (6.875%) US-MO Rate (4.225%) US-MS Rate (7%) US-MT Rate (0%) US-NC Rate (5.5%) US-ND Rate (5%) US-NE Rate (5.5%) US-NH Rate (0%) US-NJ Rate (7%) US-NM Rate (5.125%) US-NV Rate (6.85%) US-NY Rate (4%) US-OH Rate (5.5%) US-OK Rate (4.5%) US-OR Rate (0%) US-PA Rate (6%) US-PR Rate (5.5%) US-RI Rate (7%) US-SC Rate (6%) US-SD Rate (4%) US-TN Rate (7%) US-TX Rate (6.25%) US-UT Rate (4.75%) US-VA Rate (4%) US-VT Rate (6%) US-WA Rate (6.5%) US-WI Rate (5%) US-WV Rate (6%) US-WY Rate (4%) 
Comportement hors tranches
 Prendre la tranche la plus grande Désactiver le transporteur 

Plages

Sera appliquée lorsque le poids est >=
kg
Sera appliquée lorsque le poids est <
kg
All
AUSTRALIA
BULGARIE
CHYPRE
DANMARK
FINLANDE
FRANCE
GRECE
JAPON
MALTE
SUEDE
Suisse
Zone 2
Zone 6
Zone 7
Zone 8
Zone A
Zone B
Zone Outre Mer 1
Zone Outre Mer 2
Zone R/S ECO
Zone R/S ECO Extra
Zone T ECO
Zone T ECO Extra
     

 

The price should be hide or just show message: Shipping calculated in quote instead

then in backOffice this will be calculate by our stuff:

 

Date   Transporteur Poids Frais d'expédition Numéro de suivi  
30/03/2018 11:16:14   Frais de port calculés dans le devis 0.993 kg 0,00 €    Modifier

 

 

I knew there's discussion about this, but my case is only if show this shipement method in checkout page, hide the price or change to string, but so far has no clue what's best way to deal with this

 

thank you

 

Share this post


Link to post
Share on other sites

i tried to make it by changing the code:

 

florial.com/classes/checkout/DeliveryOptionsFinder.php

I add this code if carrier name has this string value= Frais de port calculés dans le devis

line 69

private function isDevisShipping(array $carrier)
    {
        $devis_shipping = false;

        if ($carrier['name'] == 'Frais de port calculés dans le devis') {
            $devis_shipping = true;
        }

        return $devis_shipping;
    }

then in the getDeliveryOptions function, I add this condition if is this carrier name, then it should add the translation: devis_shipment instead of Free translation

 

elseif ($this->isDevisShipping($this->context->cart, $carriers_list)) {
                                $carrier['price'] = $this->translator->trans(
                                    'Devis shipment', array(), 'Shop.Theme.Checkout'
                                );
                            }

 

But after changed the code, I still see no add this translation, could someone had better solution?

 

thank you so much

 

5ac34578333d5_ScreenShot2018-04-03at11_11_56.thumb.png.ef21856e6abbb2a38afd63dc08e6933a.png

Edited by tesshsu (see edit history)

Share this post


Link to post
Share on other sites

Tu es sur la partie francophone du forum donc tu peux t'exprimer dans ta langue, ce sera mieux pour tout le monde B)

Share this post


Link to post
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...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More