PHP code example of highliuk / reserve-with-google
1. Go to this page and download the library: Download highliuk/reserve-with-google library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
highliuk / reserve-with-google example snippets
use HighLiuk\Rwg\Feeds\Merchants;
use HighLiuk\Rwg\Models\Merchant;
// create the merchants feed
$merchants = new Merchants;
// add a merchant to the feed
$merchant = new Merchant(
id: 'appointments-merchant-1',
name: 'Lorem ipsum Barbershop',
telephone: '+11111222233',
url: 'https://barbershop.com',
latitude: 37.422113,
longitude: -122.084041,
country: 'US',
locality: 'Mountain View',
region: 'California',
postal_code: '94043',
street_address: '1600 Amphitheater Drive'
);
$merchants->add($merchant);
// export the feed
$merchants->export(__DIR__);
use HighLiuk\Rwg\Models\Action;
$action = new Action(
merchant_id: 'appointments-merchant-1',
link_id: 'appointment-link-1',
url: 'https://www.epapartnerwebsite.com/appointment/appointment-partner-1',
);
use HighLiuk\Rwg\Feeds\Services;
use HighLiuk\Rwg\Models\Duration;
use HighLiuk\Rwg\Models\Price;
use HighLiuk\Rwg\Models\Range;
use HighLiuk\Rwg\Models\Service;
use HighLiuk\Rwg\Models\ServiceInfo;
ervice Type 1',
category: 'Haircut',
description: 'Lorem ipsum dolor sit amet'
),
'es' => new ServiceInfo(
name: 'Servicio Tipo 1',
category: 'Cortes de pelo',
description: 'el cliente esta muy contento'
),
],
service_price: new Price(
range: Range::exact(40000000),
currency_code: 'USD',
),
action_link: 'https://www.rwgpartnerwebsite.com/appointment/service-1/in-person-1',
service_duration: new Duration(
range: Range::exact(360),
),
);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.