View Categories

Programming Guides

5 articles

Basic Rental Module Flow (Version 1.4+)

Last Updated: February 10, 2023

// functions used by the calendar js/itwebexperts_payperrentals/datepick/calendarFunctions.js // global require js file used for loading js files js/itwebexperts_payperrentals/utils/frontendApp.js // require js file used on frontend calendar js/itwebexperts_payperrentals/utils/app.js // loads the calendar app/design/frontend/base/default/template/payperrentals/calendar/global_calendar.phtml 1. Requirejs and settings are loaded in the app/design/frontend/base/default/template/payperrentals/html/header.phtml file which is loaded on every page. The file for settings is js/itwebexperts_payperrentals/utils/frontendApp.js 2.  Extra templates are...

Theme Customization

Last Updated: February 10, 2023

Customizing the Rental System Templates the templates are in app/design/frontend/base/default/template/payperrentals DO NOT modify these files directly, or the changes you do will be lost when you upgrade our rental extension. Rather copy ONLY the files you need to change to your theme that you are using. For example if using the default RWD package and...

Inventory Calculations (Version 1.3+)

Last Updated: February 13, 2023

Here is the basic flow of how inventory calculations work in Version 1.3+ Product Page Calendar 1. On the product page there is an ajax request that gets the inventory available per day and appends it to the calendar. If all inventory is reserved than that day is disabled. See app/code/community/ITwebexperts/Payperrentals/controllers/AjaxController.php where it makes the call...

Rental Programming Guide Basics

Last Updated: February 13, 2023

An Important Note Do not “hack” the core or the rental extension module directly. All your code should be in app/code/local/yourcompany/yourmodule. That way if we update the rental system your changes will not be overwritten. This is generally how most programming frameworks work. You don’t directly edit the classes and methods, you extend them. Are...

Basic Rental Module Flow (Version 1.3 and earlier)

Last Updated: February 13, 2023

// Basic flow 1. Extra templates are added to the product page using the layout xml file app/design/frontend/base/default/layout/payperrentals.xml note the line <block type=”payperrentals/catalog_product_view_rental” name=”product.info.payperrentals” as=”product-rental” template=”payperrentals/catalog/product/view_rental.phtml”> and <block type=”payperrentals/catalog_product_view_price” name=”product.info.payperrentals.price” as=”product-price” template=”catalog/product/price.phtml”/> this adds the calendar and pricing templates   2. Notice in app/design/frontend/base/default/template/payperrentals/catalog/product/view_rental.phtml the load order. First the php_initialisations.phtml is called. app/design/frontend/base/default/template/payperrentals/calendar/php_initialisations.phtml loads all variables so they are...