27 lines
735 B
PHP
27 lines
735 B
PHP
|
|
<?php
|
|||
|
|
// ####################################################
|
|||
|
|
// carrito_update.php
|
|||
|
|
// parte de shoop
|
|||
|
|
// <20> ff 2005
|
|||
|
|
|
|||
|
|
include("_incl/wfCart.php");
|
|||
|
|
|
|||
|
|
session_start();
|
|||
|
|
|
|||
|
|
// ####################################################
|
|||
|
|
// cargo el carrito o lo creo nuevo si fuera menester
|
|||
|
|
|
|||
|
|
$cart =& $_SESSION['cart'];
|
|||
|
|
if(!is_object($cart)) $cart = new wfCart();
|
|||
|
|
|
|||
|
|
$items = $cart->get_contents();
|
|||
|
|
foreach($items as $item) {
|
|||
|
|
$cart->edit_item($item['id'], $_REQUEST['ud' . $item['id']]);
|
|||
|
|
if(isset($_REQUEST['color' . $item['id']])) {
|
|||
|
|
$item['info']['color'] = $_REQUEST['color' . $item['id']];
|
|||
|
|
$cart->edit_iteminfo($item['id'], $item['info']);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
header('Location: '.$HTTP_SERVER_VARS['HTTP_REFERER']);
|
|||
|
|
?>
|