Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
63fc3ea
Added suggestion for the guest to select guest detail while using boo…
vishal-singh-webkul Feb 15, 2025
06ad156
Merge branch 'develop' into gli-2538
vishal-singh-webkul Feb 25, 2025
cbd927f
Updated the flow, changed the customer guest detail database, save u…
vishal-singh-webkul Mar 18, 2025
bc7339e
Updated the flow for customer guest creation and deletion process
vishal-singh-webkul Mar 18, 2025
dd9d4be
updated some function names according to their working
vishal-singh-webkul Mar 18, 2025
f4f802c
Merge branch 'develop' into gli-2538
vishal-singh-webkul Mar 28, 2025
ada8d86
Optimized the design for guest selection process on checkout page in …
vishal-singh-webkul Apr 28, 2025
83218a8
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 7, 2025
03b17ad
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 7, 2025
e30e771
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 14, 2025
65ba68d
Updated the functions name, added vaidation in admin guest user updat…
vishal-singh-webkul May 15, 2025
1bf4052
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 15, 2025
893a937
added comment on the functions in customer guest details class
vishal-singh-webkul May 15, 2025
187a913
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 16, 2025
2d6bc3e
added more validation to customer guest, fixed issue after merge
vishal-singh-webkul May 16, 2025
df5eead
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 19, 2025
3ffa3b5
Updated the functions names
vishal-singh-webkul May 19, 2025
b6fffa0
Merge branch 'develop' into gli-2538
vishal-singh-webkul May 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,38 @@
</table>
{/if}
</div>
{if $customer_guests && count($customer_guests)}
<div class="panel">
<div class="panel-heading">
<i class="icon-user"></i>
{l s='Customer Guests'}
<span class="badge customer-guests-count">{count($customer_guests)}</span>
</div>
<table class="table customer-guests">
<thead>
<tr>
<th><span class="title_box ">{l s='Email'}</span></th>
<th><span class="title_box ">{l s='First name'}</span></th>
<th><span class="title_box ">{l s='Last name'}</span></th>
<th><span class="title_box ">{l s='phone'}</span></th>
<th colspan="2"><span class="title_box ">{l s='Actions'}</span></th>
</tr>
</thead>
<tbody>
{foreach $customer_guests AS $key => $customer_guest}
<tr class="customer_guest_detail_{$customer_guest['id_customer_guest_detail']} customer_guest_details">
<td>{$customer_guest['email']}</td>
<td>{$customer_guest['firstname']}</td>
<td>{$customer_guest['lastname']}</td>
<td>{$customer_guest['phone']}</td>
<td><a href="#" class="edit-customer-guest-detail" data-id_customer_guest_detail="{$customer_guest['id_customer_guest_detail']}"><i class="icon-pencil"></i></a></td>
<td><a href="#" class="delete-customer-guest-detail" data-id_customer_guest_detail="{$customer_guest['id_customer_guest_detail']}"><i class="icon-trash"></i></a></td>
</tr>
{/foreach}
</tbody>
</table>
</div>
{/if}
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{*
* Since 2010 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 Since 2010 Webkul IN
* @license https://store.webkul.com/license.html
*}

<div class="modal-body">
<div class="text-left errors-wrap"></div>
<form id="customer-guest-details-form">
<div class="form-group row">
<input type="hidden" value="{$customerGuestDetail->id}" name="id_customer_guest_detail">
<div class="col-sm-2">
<label class="control-label">{l s='Title'}</label>
<select name="id_gender">
{foreach from=$genders key=k item=gender}
<option value="{$gender->id_gender}"{if $customerGuestDetail->id_gender == $gender->id_gender} selected="selected"{/if}>{$gender->name}</option>
{/foreach}
</select>
</div>
<div class="col-sm-5">
<label class="control-label">{l s='First Name'}</label>
<input type="text" value="{$customerGuestDetail->firstname}" name="firstname">
</div>
<div class="col-sm-5">
<label class="control-label">{l s='Last Name'}</label>
<input type="text" value="{$customerGuestDetail->lastname}" name="lastname">
</div>
</div>
<div class="form-group row">
<div class="col-sm-6">
<label class="control-label">{l s='Email'}</label>
<input type="text" value="{$customerGuestDetail->email}" name="email" readonly>
</div>
<div class="col-sm-6">
<label class="control-label">{l s='Phone'}</label>
<input type="text" value="{$customerGuestDetail->phone}" name="phone">
</div>
</div>
</form>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* 2010-2020 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-2020 Webkul IN
* @license https://store.webkul.com/license.html
*/

header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');

header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache');

header('Location: ../../../../../../');
exit;
124 changes: 0 additions & 124 deletions classes/CartCustomerGuestDetail.php

This file was deleted.

19 changes: 4 additions & 15 deletions classes/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ public function update($nullValues = false)
}
}

$objOldCustomer = new Customer($this->id);
$success = parent::update(true);
return $success;
return parent::update(true);
}

public function delete()
Expand Down Expand Up @@ -327,6 +325,9 @@ public function delete()

CartRule::deleteByIdCustomer((int)$this->id);
// delete customer data from customerGuest table
$objCustomerGuestDetail = new CustomerGuestDetail();
$objCustomerGuestDetail->deleteCustomerGuestByIdCustomer($this->id);

return parent::delete();
}

Expand Down Expand Up @@ -518,18 +519,6 @@ public function getAddresses($id_lang)
return Cache::retrieve($cache_id);
}

public static function getPhone($id_customer)
{

return Db::getInstance()->getValue(
'SELECT cgd.`phone`
FROM `'._DB_PREFIX_.'customer` c
INNER JOIN `'._DB_PREFIX_.'cart_customer_guest_detail` cgd
ON (cgd.`email` = c.`email`)
WHERE `id_cart` = 0 AND c.`id_customer` = '.(int)($id_customer)
);
}

public static function getCustomerIdAddress($id_customer, $use_cache = true)
{
$cache_id = 'Customer::getCustomerIdAddress'.(int)$id_customer;
Expand Down
Loading