================================================================== Gift Voucher (Chèque Cadeau) v1.1.5 dids - des idées et des sites - http://www.dids.fr ================================================================== Description : ------------ With the module "Gift Voucher" you can allow your customers to buy, customize and send immediately by email a gift voucher (discount code) generated automatically after validation of payment. As shop's manager, you don't need anymore to create a "physical" gift voucher; the module "Gift Voucher" does all operations and offers many essential features for your customers: - Customizing the message joined with the gift voucher - Gift voucher automatic generation (discount code) - Set different options: - Immediate send email with gift voucher to the beneficiary after payment validation or - Ability for customers to customize and print the gift voucher to deliver to the beneficiary Now, you can disable shipping cost if a customer buy only gift cards. Installation : ------------- - warning : Ajax cart must be enabled! - attention : your theme must display "Top" hook ("Top of pages") (you must have {$HOOK_TOP} markup in your template). - unzip archive in 'modules' directory - enable module in prestashop's back office - in '/modules/blockcart/ajax-cart.js' file, add this line : giftvoucher.addToCart(jsonData); in "updateCart" function, before this line : (IF YOU ARE USING A PRESTASHOP VERSION LESSER THAN 1.4.1) ajaxCart.expand(); (IF YOU ARE USING A PRESTASHOP VERSION EQUAL OR UPPER THAN 1.4.1) ajaxCart.updateCartEverywhere(jsonData); - you must edit "Cart.php" file (in "/classes/" directory) and add these lines: include_once(dirname(__FILE__).'/../modules/giftvoucher/giftvoucher.php'); $dgv = new GiftVoucher(); if ($dgv->checkFreeShippingPriceCart($this)) return 0; in the "getOrderShippingCost" function, after the line: $configuration = Configuration::getMultiple(array('PS_SHIPPING_FREE_PRICE', 'PS_SHIPPING_HANDLING', 'PS_SHIPPING_METHOD', 'PS_SHIPPING_FREE_WEIGHT')); - IF YOU ARE USING A PRESTASHOP VERSION LESSER THAN 1.4 : you must edit "order.php" file (in "/" directory) and add these lines: include_once(dirname(__FILE__).'/modules/giftvoucher/giftvoucher.php'); $dgv = new GiftVoucher(); $dgv->checkFreeShippingOrder(); in the "displaySummary" function, before the line: $smarty->assign($summary); - configure module through the back office to suit your needs Changelog : ------------ - v0.1.1: . adaptation to version 1.3 of Prestashop . bug correction : discount was not combined with other promotions - v0.1.2: . minor bugs fix - v1.0.2: . free shipping can be enabled when a customer buy only gift cards - v1.0.3: . mails : english translation update - v1.0.4: . bug fix - v1.0.5: . minor bug fix - v1.0.6: . change of use of hook ("top" instead of "header") - v1.0.7: . bug fix - v1.0.9/1.0.10: . documentation update - v1.0.11 : . bug fix (IE) - v1.1.0 : . compatibility with Prestashop 1.4 - v1.1.3 : . improved compatibility with the functionality opc . compatibility with Prestashop 1.4.1