Skip to content

Commit

Permalink
Merge pull request #63 from rohit053/v1.3.2
Browse files Browse the repository at this point in the history
V1.3.2 released: Guest Checkout, New Designed Checkout Page, Custom CMS Link, Data Cleaner module
  • Loading branch information
webkul authored Feb 21, 2019
2 parents 0533e5f + e05b328 commit 639ab28
Show file tree
Hide file tree
Showing 528 changed files with 41,049 additions and 4,031 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ after_failure:
- cat /etc/apache2/sites-available/000-default.conf
- sudo cat /var/log/php-fpm.log
- sudo ls -l /var/log/apache2
- sudo cat /var/log/apache2/other_vhosts_access.log
- sudo cat /var/log/apache2/other_vhosts_access.log
32 changes: 31 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
####################################
# V1.3.2
####################################

## Added Features:

[+] CO : pscleaner module is added for cleaning demo data from QloApps.

[+] FO : Option for Guest checkout is given at Preferences->Orders tab. So Guest Checkout is enabled.

[+] FO : Option for Shorter registration/address form is given at Preferences->Customers tab. (In this case address will be created from customer chosen room type's hotel address automatically).

[+] CO : wkfooterexploreblock :: Admin can add custom explore links to show at footer explore block and navigation menu also. table 'htl_custom_explore_link' added with multilang.

## Improved/changed features:

[-] BO : New category option from "quick access" links is removed.
[+] FO : Checkout page design has been changed.
[+] CO : Images validation improved.


## Bug/Issues Resolved:

[-] CO : 56% Installation issue.

[-] BO : Dashboard graphs not loading issues on php 7.2
[-] BO : feature update issue on not selecting image while updating the feature.
[-] BO : Category bug resolve (Should not be created updated deleted from anywhere). Will be handled from hotel creation/updation/deletion.


####################################
# V1.3.1
####################################
Expand Down Expand Up @@ -342,4 +372,4 @@
[-] MO : wktestimonialblock : Fixed while adding the image in valid format on configuration page then showing error page.
[-] MO : wkpaypaladaptive : Fixed paypal is not working because paypal api has been changed.
[-] MO : wkpaypaladaptive : Fixed fopen issues fixed, done by CURL.
[-] MO : wkpaypaladaptive : Fixed payment negative value bug fixed.
[-] MO : wkpaypaladaptive : Fixed payment negative value bug fixed.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
<div id="category_block">
{$category_tree}
</div>
<a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')|escape:'html':'UTF-8'}&amp;addcategory">
{* <a class="btn btn-link bt-icon confirm_leave" href="{$link->getAdminLink('AdminCategories')|escape:'html':'UTF-8'}&amp;addcategory">
<i class="icon-plus-sign"></i> {l s='Create new category'} <i class="icon-external-link-sign"></i>
</a>
</a> *}
</div>
</div>
<div class="form-group">
Expand Down
2 changes: 2 additions & 0 deletions classes/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ public function delete()
if (Validate::isUnsignedId($this->id_customer)) {
Customer::resetAddressCache($this->id_customer, $this->id);
}
// reset checkout process if addresses deletes
CheckoutProcess::refreshCheckoutProcess();

if (!$this->isUsed()) {
return parent::delete();
Expand Down
9 changes: 5 additions & 4 deletions classes/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,11 @@ protected static function _subTree(&$categories, $id_category, &$n)
}
$right = (int)$n++;

Db::getInstance()->execute('
UPDATE '._DB_PREFIX_.'category
SET nleft = '.(int)$left.', nright = '.(int)$right.'
WHERE id_category = '.(int)$id_category.' LIMIT 1');
Db::getInstance()->execute(
'UPDATE '._DB_PREFIX_.'category
SET nleft = '.(int)$left.', nright = '.(int)$right.'
WHERE id_category = '.(int)$id_category.' LIMIT 1'
);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion classes/Feature.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class FeatureCore extends ObjectModel
'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'),

/* Lang fields */
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isGenericName', 'required' => true, 'size' => 128),
'name' => array('type' => self::TYPE_STRING, 'lang' => true, 'validate' => 'isCatalogName', 'required' => true, 'size' => 128),
),
);

Expand Down
9 changes: 6 additions & 3 deletions classes/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,7 @@ public static function getHookModuleExecList($hook_name = null)
*
* @return string/array modules output
*/
public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true,
$use_push = false, $id_shop = null)
public static function exec($hook_name, $hook_args = array(), $id_module = null, $array_return = false, $check_exceptions = true, $use_push = false, $id_shop = null)
{
if (defined('PS_INSTALLATION_IN_PROGRESS')) {
return;
Expand Down Expand Up @@ -462,7 +461,11 @@ public static function exec($hook_name, $hook_args = array(), $id_module = null,

// Look on modules list
$altern = 0;
$output = '';
if ($array_return) {
$output = array();
} else {
$output = '';
}

if ($disable_non_native_modules && !isset(Hook::$native_module)) {
Hook::$native_module = Module::getNativeModuleList();
Expand Down
82 changes: 82 additions & 0 deletions classes/checkoutProcess/AbstractCheckoutStep.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/

abstract class AbstractCheckoutStep implements CheckoutStepInterface
{
public $step_is_reachable = 0;
public $step_is_complete = 0;
public $step_is_current = 0;
public $step_key;
private $checkoutProcess;

public function __construct()
{
$this->context = Context::getContext();
}

public function setCheckoutProcess(CheckoutProcess $checkoutProcess)
{
$this->checkoutProcess = $checkoutProcess;

return $this;
}

public function setReachable($step_is_reachable)
{
$this->step_is_reachable = $step_is_reachable;

return $this;
}

public function isReachable()
{
return $this->step_is_reachable;
}

public function setComplete($step_is_complete)
{
$this->step_is_complete = $step_is_complete;

return $this;
}

public function isComplete()
{
return $this->step_is_complete;
}

public function setCurrent($step_is_current)
{
$this->step_is_current = $step_is_current;

return $this;
}

public function isCurrent()
{
return $this->step_is_current;
}
}
44 changes: 44 additions & 0 deletions classes/checkoutProcess/CheckoutCartSummaryStep.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* 2010-2018 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2018 Webkul IN
* @license https://store.webkul.com/license.html
*/

class CheckoutCartSummaryStep extends AbstractCheckoutStep
{
public function __construct() {
parent::__construct();
$this->step_key = 'checkout_rooms_summary';
}

public function handleRequest()
{
// set data in checkout_session cookie
if (Tools::getValue('proceed_to_customer_dtl')) {
$this->step_is_reachable = 1;
$this->step_is_complete = 1;
$this->step_is_current = 0;
$this->context->cookie->__set('cart_summary_proceeded', 1);
} elseif ($this->context->cookie->__get('cart_summary_proceeded')) {
$this->step_is_reachable = 1;
$this->step_is_complete = 1;
$this->step_is_current = 0;
}

return $this;
}
}
77 changes: 77 additions & 0 deletions classes/checkoutProcess/CheckoutCustomerDetailsStep.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php
/**
* 2010-2018 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2018 Webkul IN
* @license https://store.webkul.com/license.html
*/

class CheckoutCustomerDetailsStep extends AbstractCheckoutStep
{
public function __construct() {
parent::__construct();
$this->step_key = 'checkout_customer';
}

public function handleRequest()
{
$idAddressDelivery = $this->context->cart->id_address_delivery;
$objAddress = new Address($idAddressDelivery);
if (Tools::getValue('proceed_to_customer_dtl')) {
$this->step_is_reachable = 1;
$this->step_is_current = 1;
if ($idAddressDelivery) {
if (!Validate::isLoadedObject($objAddress)) {
if ($this->context->cookie->__get('customer_details_proceeded')) {
$this->step_is_current = 0;
$this->step_is_complete = 1;
}
}
}
} elseif (Tools::getValue('proceed_to_payment')) {
$this->step_is_reachable = 1;
$this->step_is_current = 1;
if ($idAddressDelivery) {
if (Validate::isLoadedObject($objAddress)) {
$this->step_is_current = 0;
$this->step_is_complete = 1;
$this->context->cookie->__set('customer_details_proceeded', 1);
}
}
} elseif ($this->context->cookie->__get('customer_details_proceeded')
|| $this->context->cookie->__get('cart_summary_proceeded')
) {
if ($idAddressDelivery) {
if (!Validate::isLoadedObject($objAddress)) {
$this->context->cookie->__set('customer_details_proceeded', 0);
$this->step_is_reachable = 1;
$this->step_is_current = 1;
}
} else {
$this->step_is_reachable = 1;
$this->step_is_current = 1;
$this->context->cookie->__set('customer_details_proceeded', 0);
}
} elseif ($this->context->customer->logged) {
$this->step_is_reachable = 1;
if ($idAddressDelivery) {
$this->step_is_complete = 1;
} else {
$this->step_is_complete = 0;
$this->step_is_current = 1;
}
}
}
}
37 changes: 37 additions & 0 deletions classes/checkoutProcess/CheckoutPaymentStep.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* 2010-2018 Webkul.
*
* NOTICE OF LICENSE
*
* All right is reserved,
* Please go through this link for complete license : https://store.webkul.com/license.html
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade this module to newer
* versions in the future. If you wish to customize this module for your
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
*
* @author Webkul IN <[email protected]>
* @copyright 2010-2018 Webkul IN
* @license https://store.webkul.com/license.html
*/

class CheckoutPaymentStep extends AbstractCheckoutStep
{
public function __construct() {
parent::__construct();
$this->step_key = 'checkout_payment';
}

public function handleRequest()
{
if ($this->context->cookie->__get('customer_details_proceeded')) {
$this->step_is_reachable = 1;
$this->step_is_current = 1;
$this->step_is_complete = 0;
}
}
}

Loading

0 comments on commit 639ab28

Please sign in to comment.