2nd update
This commit is contained in:
37
cart.php
37
cart.php
@@ -104,17 +104,19 @@ foreach ($products_in_cart as $num => $product) {
|
||||
$subtotal += (float)$product['options_price'] * (int)$product['quantity'];
|
||||
}
|
||||
|
||||
template_header(($shopping_cart_header ?? 'Shopping Cart'));
|
||||
$view = template_header(($shopping_cart_header ?? 'Shopping Cart'),'');
|
||||
|
||||
$view = '
|
||||
$view .= '
|
||||
<div class="cart content-wrapper">
|
||||
|
||||
<h1>'.$h1_cart_name.'</h1>
|
||||
<h2 style="text-align: center;margin-top: -35px;">
|
||||
<a href="'.url(link_to_collection).'" style="text-decoration: none;color: #555555;padding: 10px 10px;font-size: 10px;">
|
||||
<div class="cart-header">
|
||||
<h1>'.$h1_cart_name.'</h1>
|
||||
<h4>
|
||||
<a href="'.url(link_to_collection).'">
|
||||
'.$navigation_back_to_store.'
|
||||
</a>
|
||||
</h2>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<form id="cart-form" action="" method="post">
|
||||
<table>
|
||||
@@ -164,21 +166,21 @@ $view = '
|
||||
'.htmlspecialchars(substr($prod_options, 0,-2), ENT_QUOTES).'
|
||||
<input type="hidden" name="options" value="['.implode(',',$product['options']).']">
|
||||
</td>
|
||||
<td class="price rhide">'.currency_code.''.number_format($product['options_price'],2).'</td>';
|
||||
<td class="cart_price rhide">'.currency_code.''.number_format($product['options_price'],2).'</td>';
|
||||
|
||||
if ($product['options'] == $h2_cart_sample_product && !empty(category_id_checkout_samples)){
|
||||
|
||||
$view .= '
|
||||
<td class="quantity">
|
||||
<td class="cart_quantity">
|
||||
<input type="number" class="ajax-update" name="quantity-'.$num.'" value="1" min="1" max="1" placeholder="Quantity" readonly>
|
||||
</td>';
|
||||
} else {
|
||||
$view .= '
|
||||
<td class="quantity">
|
||||
<td class="cart_quantity">
|
||||
<input type="number" class="ajax-update" name="quantity-'.$num.'" value="'.$product['quantity'].'" min="1" placeholder="Quantity" required>
|
||||
</td>';
|
||||
}
|
||||
$view .= ' <td class="price product-total">'.currency_code.''.number_format($product['options_price'] * $product['quantity'],2).'</td>
|
||||
$view .= ' <td class="cart_price product-total">'.currency_code.''.number_format($product['options_price'] * $product['quantity'],2).'</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
@@ -202,23 +204,16 @@ $view .= '
|
||||
</div>
|
||||
|
||||
<div class="buttons">
|
||||
<input type="submit" form ="cart-form" value="'.$btn_emptycart.'" name="emptycart" class="btn" title="Remove cart" style="background:none;">
|
||||
<input type="submit" form ="cart-form" value="'.$btn_emptycart.'" name="emptycart" class="btn" title="Remove cart" style="font-size:10px;background:none;">
|
||||
<input type="submit" form ="cart-form" value="'.$btn_update.'" name="update" class="btn" title="Refresh cart">
|
||||
<input type="submit" form ="cart-form" value="'.$btn_checkout.'" name="checkout" class="btn" style="background-color:green;">
|
||||
</div>
|
||||
|
||||
|
||||
<h4 style="text-align: right;margin-top: -35px;">
|
||||
<a href="'.url(link_to_collection).'" style="text-decoration: none;color: #555555;padding: 10px 10px;font-size: 10px;">
|
||||
'.$navigation_back_to_store.'
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
$view .= template_footer();
|
||||
//OUTPUT
|
||||
echo $view;
|
||||
|
||||
template_footer();
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user