1. Upload file on the server
Before the installation, please upload files .htaccess and rwdgate.php located in the installation package. Other files from the package are additional and are only the demonstration of the installation. Server configuration file (.htacess) has to be installed on the main folder of the project (the index.php file will be located there as well)), rwdgate.php file may be uploaded in any location but make sure to set the correct path during implementation of the library (see point 2).
2. Library implementation (in the constructor, provide affilliate identificator which can be found on the administration bar in the VacationsCMS panel):
<?php require_once 'rwdGate.php'; $rwdgate = new rwdGate('3987123456'); ?>
3. Widget implementation (using id):
<?php $widgets = array(lista_id); ?>
sample:
<?php $widgets = array(2120310, 2120315, 2120320, 2120330, 2138306); $rwdgate->fetch($widgets); ?>
Widget Id can be found in the VacationsCMS administration panel after selecting preview ID option (top menu of the panel, black bar - Configuration).
4. Addition of the code required to access Javascript/CSS resources using client's server. Any test/HTML content cannot be sent to a browser prior to requesting the code.
<?php if ($rwdgate->isRawResult()) { $rwdgate->printRawResult(); die(); } ?>
5. Header implementation in the head section:
<?php echo $rwdgate->getSection('HEAD'); ?>
6. Implementation of parts:
Any iteration method can be used, either by elements or element id (sample):
<?php $list = $rwdgate->getSectionsList(); if (in_array('2120310', $list )) { echo '<div>'.$rwdgate->getSection('2120310').'</div>'; } ?>
Notice: it is necessary to implement BODY element, which is responsible for further steps of search process (results, details, booking and confirmation).
<?php $rwdgate->getSection('BODY'); ?>
If you want to show some elements on the main site but not on the other subpages, use the
following condition:
<?php if (in_array('BODY', $list )) { echo $rwdgate->getSection('BODY'); } else { echo 'elementy strony głównej'; } ?>
7. Footer implementation (after implementation of every other element/widget)
<?php $rwdgate->getSection('FOOTER'); ?>

8. Offer cart
Display of the amount of offers added to the cart (information displayed in any place on the website):
<a href="#" class="btn-cart text text-color-16 text-hover-18"> <span class="yourCart">Schowek ofert: <span class="countCart"> <script> if( sessionStorage.getItem('EasyCart')) { if (document.readyState == 'complete' || document.readyState =='interactive' || document.readyState == 'loaded') $('countCart').html(JSON.parse( sessionStorage.getItem('EasyCart')).length); else document.write(JSON.parse( sessionStorage.getItem('EasyCart')).length); } else if (document.readyState == 'complete' || document.readyState == 'interactive' || document.readyState == 'loaded') $('countCart').html('0'); else document.write("0"); </script> </span> </span> </a>
Display of the open cart with offers as a new layer. Needs to be implemented just before the BODY element.
<?php echo '<main></main>'; ?>

9. Autosearch
Quicksearch field.
Add autosearch to a list of received elements:
<?php $widgets = array(2120310, 2120315, 2120320, 2120330, 2138306,'quicksearch'); $rwdgate->fetch($widgets); ?>
Display search field in the chosen location:
<?php echo $rwdgate->getSection('quicksearch'); ?>
|