Skip to content

Instantly share code, notes, and snippets.

@dimovdaniel
Created February 13, 2021 00:41
Show Gist options
  • Save dimovdaniel/7a3fad29bf15241fe310fdecd8e0da68 to your computer and use it in GitHub Desktop.
Save dimovdaniel/7a3fad29bf15241fe310fdecd8e0da68 to your computer and use it in GitHub Desktop.
app/Order.php
config/config.php
resources/views/messages/social.blade.php
@emicantero
Copy link

emicantero commented Feb 13, 2021

Hi Daniel,
please consider this code:

@if($order->delivery_method==1)
//Deliver?
📍 {{ __('Delivery Details') }}
{{ __('Client').": ".$order->client->name }} //change _ to->

{{ __('Address').": ".$order->whatsapp_address }}< //seems no works
{{ $order->address?$order->address->address:"" }} //use orderinfo.blade data for address details

{{ __("Apartment number") }}: {{ $order->address->apartment }}
{{ __("Entry number") }}: {{ $order->address->entry }}
{{ __("Floor") }}: {{ $order->address->floor }}
{{ __("Intercom") }}: {{ $order->address->intercom }}
{{ __('Contact')}}: {{ $order->client->phone }}

{{ __('Delivery time').": ".$order->getTimeFormatedAttribute() }}
@else

✅ {{ __('Pickup Details') }}
{{ __('Client').": ".$order->client->name }} //change _ to->

{{ __('Pickup time').": ".$order->getTimeFormatedAttribute() }}
@endif

@rodolfoportalles
Copy link

rodolfoportalles commented Feb 19, 2021

Hi @emicantero, Your code worked perfectly for me! thanks!
But I saw that there is still an error! When sending the request via whatsapp it does not add the delivery fee.
Only the total value of the items appears.
Can it be corrected?

@emicantero
Copy link

Hi @rodolfoportalles, I prepared these modifications for FoodTiger, and it is not necessary to include the delivery price. which template do you use?

@rodolfoportalles
Copy link

@emicantero,
I use the foodtiger ...
But on the admin page you can add the fixed delivery fee - At / siteinfo / Delivery cost - fixed.

It would be interesting at the time of the whatsapp request that this fee appears to not take the customer by surprise when paying in cash

@emicantero
Copy link

@rodolfoportalles, you are right, you have to test these two lines of code.
{{ __("Delivery") }}: @money( $order->delivery_price, $currency,$convert)
{{ __("TOTAL") }}: @money( $order->delivery_price+$order->order_price, $currency,true)
*from resources\views\orders\partials\orderinfo.blade.php

@rodolfoportalles
Copy link

thanks @emicantero
I managed to add this way --->
below TOTAL:
on the way --------> resources/views/messages/social.blade.php

🛵 {{ __("Delivery: ").money($order->delivery_price, config('settings.cashier_currency'), config('settings.do_convertion')) }}

@rodolfoportalles
Copy link

Problem that must be the script. Even after checking in at the restaurant that delivery is free, he continues to charge the order cart. you notice this after adding the location

@iliassehk
Copy link

hello i want to know how i can change footer of Whatsapp ordering
and how to change colors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment