debugging access denied
This commit is contained in:
parent
7673b8e4dc
commit
3f43980699
@ -141,8 +141,6 @@ try {
|
|||||||
|
|
||||||
if ($product['is_loyalty']) {
|
if ($product['is_loyalty']) {
|
||||||
$loyalty_items_indices[] = count($processed_items);
|
$loyalty_items_indices[] = count($processed_items);
|
||||||
} elseif ($redeem_loyalty) {
|
|
||||||
throw new Exception("Redemption is only allowed when all items in the cart are loyalty-eligible.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$processed_items[] = [
|
$processed_items[] = [
|
||||||
|
|||||||
@ -690,10 +690,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (data.success) {
|
if (data.success) {
|
||||||
receiptData.orderId = data.order_id;
|
receiptData.orderId = data.order_id;
|
||||||
|
|
||||||
// Show receipt for Quick Pay (where paymentTypeId is provided)
|
// Show receipt for both Quick Pay and Place Order
|
||||||
if (paymentTypeId !== null) {
|
printThermalReceipt(receiptData);
|
||||||
printThermalReceipt(receiptData);
|
|
||||||
}
|
|
||||||
|
|
||||||
showToast(`${_t('order_placed')} #${data.order_id}`, 'success');
|
showToast(`${_t('order_placed')} #${data.order_id}`, 'success');
|
||||||
clearCart();
|
clearCart();
|
||||||
|
|||||||
@ -1,6 +0,0 @@
|
|||||||
PAYMENT_TYPES.forEach(pt => {
|
|
||||||
const col = document.createElement('div');
|
|
||||||
col.className = 'col-12';
|
|
||||||
col.innerHTML = `<button class="btn btn-outline-primary w-100 py-3 payment-btn" onclick="processOrder(${pt.id}, '${pt.name}')">${pt.name}</button>`;
|
|
||||||
paymentMethodsContainer.appendChild(col);
|
|
||||||
});
|
|
||||||
@ -225,7 +225,7 @@ function render_pagination_controls($pagination, $extra_params = []) {
|
|||||||
* Get the project root URL
|
* Get the project root URL
|
||||||
*/
|
*/
|
||||||
function get_base_url() {
|
function get_base_url() {
|
||||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] ?? 80) == 443 ? "https://" : "http://";
|
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] ?? 80) == 443 || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? "") === "https" ? "https://" : "http://";
|
||||||
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
$host = $_SERVER['HTTP_HOST'] ?? 'localhost';
|
||||||
|
|
||||||
$script = $_SERVER['SCRIPT_NAME'] ?? '/index.php';
|
$script = $_SERVER['SCRIPT_NAME'] ?? '/index.php';
|
||||||
@ -264,7 +264,7 @@ function init_session() {
|
|||||||
ini_set('session.gc_maxlifetime', (string)$lifetime);
|
ini_set('session.gc_maxlifetime', (string)$lifetime);
|
||||||
|
|
||||||
// Set cookie parameters before session_start
|
// Set cookie parameters before session_start
|
||||||
$isSecure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] ?? 80) == 443;
|
$isSecure = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] ?? 80) == 443 || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? "") === "https";
|
||||||
|
|
||||||
session_set_cookie_params([
|
session_set_cookie_params([
|
||||||
'lifetime' => $lifetime,
|
'lifetime' => $lifetime,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user