Geotex, on Jun 21 2009, 02:57 AM, said:
George
Not yet - I put another 4 hours into it the other day, but haven't made it through your whole list of suggestions... I'm totally at a loss! I hope to work on it tomorrow or Monday again.
Posted 21 June 2009, 02:59
Geotex, on Jun 21 2009, 02:57 AM, said:
Posted 21 June 2009, 03:03
desmoworks, on Jun 20 2009, 09:59 PM, said:
Posted 21 June 2009, 03:08
Geotex, on Jun 21 2009, 03:03 AM, said:
Posted 21 June 2009, 03:29
desmoworks, on Jun 20 2009, 10:08 PM, said:
Posted 21 June 2009, 03:36
desmoworks, on Jun 21 2009, 03:08 AM, said:
Posted 21 June 2009, 03:46
desmoworks, on Jun 21 2009, 03:36 AM, said:
Posted 21 June 2009, 04:06
desmoworks, on Jun 20 2009, 10:46 PM, said:
Quote
Posted 29 June 2009, 00:36
Posted 29 June 2009, 01:15
Zappo, on Jun 28 2009, 07:36 PM, said:
Posted 02 July 2009, 04:17
//Master Products
// customer adds multiple products from the master_listing page
case 'add_slave' :
reset($HTTP_POST_VARS);
while ( list( $key, $val ) = each( $HTTP_POST_VARS ) ) {
if (substr($key,0,11) == "Qty_ProdId_") {
$prodId = substr($key,11);
$qty = $val;
if(isset($HTTP_POST_VARS["id_$prodId"]) && is_array($HTTP_POST_VARS["id_$prodId"])) {
// We have attributes
$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$HTTP_POST_VARS["id_$prodId"]))+$qty, $HTTP_POST_VARS["id_$prodId"]);
} else {
// No attributes
$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
}
}
}
if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
//Master Products EOF
if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
} Edited by desmoworks, 02 July 2009, 04:17.
Posted 02 July 2009, 13:53
Geotex, on Jun 29 2009, 03:15 AM, said:
Posted 02 July 2009, 21:53
desmoworks, on Jul 1 2009, 11:17 PM, said:
//Master Products
// Shopping cart actions
if (isset($_GET['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
}
if ($_GET['products_set_only']) {
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO . '?products_id=' . $_GET['products_master']));
}
if (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
$goto = basename($PHP_SELF);
if ($_GET['action'] == 'buy_now') {
$parameters = array('action', 'pid', 'products_id');
} else {
$parameters = array('action', 'pid');
}
}
switch ($_GET['action']) {
// customer wants to update the product quantity in their shopping cart
case 'update_product' : for ($i=0, $n=sizeof($_POST['products_id']); $i<$n; $i++) {
if (in_array($_POST['products_id'][$i], (is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array()))) {
$cart->remove($_POST['products_id'][$i]);
// denuz text attr
// tep_db_query("delete from customers_basket_text_attributes where products_id = " . tep_get_prid($_POST['products_id'][$i]) . " and session_id = '" . $osCsid . "'");
// eof denuz text attr
} else {
if (PHP_VERSION < 4) {
// if PHP3, make correction for lack of multidimensional array.
reset($_POST);
while (list($key, $value) = each($_POST)) {
if (is_array($value)) {
while (list($key2, $value2) = each($value)) {
if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
$id2[$var[1]][$var[2]] = $value2;
}
}
}
}
$attributes = ($id2[$_POST['products_id'][$i]]) ? $id2[$_POST['products_id'][$i]] : '';
} else {
$attributes = ($_POST['id'][$_POST['products_id'][$i]]) ? $_POST['id'][$_POST['products_id'][$i]] : '';
}
$cart->add_cart($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, false);
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
// customer adds a product from the products page
case 'add_product' : if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) {
$cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $_POST['id']))+$quantity, $_POST['id']);
// denuz text attr
// tep_db_query("delete from customers_basket_text_attributes where products_id = " . $_POST['products_id'] . " and session_id = '" . $osCsid . "'");
// $attr_query = tep_db_query("select * from products_text_attributes_enabled where products_id = " . $_POST['products_id']);
// while ($attr = tep_db_fetch_array($attr_query)) {
// tep_db_query("insert into customers_basket_text_attributes values ('$osCsid', " . $_POST['products_id'] . ", " . $attr['products_text_attributes_id'] . ", '" . addslashes($_POST['products_text_attributes_' . $attr['products_text_attributes_id']]) . "');");
}
// eof denuz text attr
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
//Master Products
// customer adds multiple products from the master_listing page
case 'add_slave' :
reset($_POST);
while ( list( $key, $val ) = each( $_POST ) ) {
if (substr($key,0,11) == "Qty_ProdId_") {
$prodId = substr($key,11);
$qty = $val;
if(isset($_POST["id_$prodId"]) && is_array($_POST["id_$prodId"])) {
// We have attributes
$cart->add_cart($prodId, $cart->get_quantity(tep_get_uprid($prodId,$_POST["id_$prodId"]))+$qty, $_POST["id_$prodId"]);
} else {
// No attributes
$cart->add_cart($prodId, $cart->get_quantity($prodId)+$qty);
}
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
//Master Products EOF
// performed by the 'buy now' button in product listings and review page
case 'buy_now' : if (isset($_GET['products_id'])) {
if (tep_has_product_attributes($_GET['products_id'], (int)$languages_id)) {
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']));
} else {
$cart->add_cart($_GET['products_id'], $cart->get_quantity($_GET['products_id'])+1);
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
case 'notify' : if (tep_session_is_registered('customer_id')) {
if (isset($_GET['products_id'])) {
$notify = $_GET['products_id'];
} elseif (isset($_GET['notify'])) {
$notify = $_GET['notify'];
} elseif (isset($_POST['notify'])) {
$notify = $_POST['notify'];
} else {
tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
}
if (!is_array($notify)) $notify = array($notify);
for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $customer_id . "'");
$check = tep_db_fetch_array($check_query);
if ($check['count'] < 1) {
tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', now())");
}
}
tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action', 'notify'))));
} else {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
break;
case 'notify_remove' : if (tep_session_is_registered('customer_id') && isset($_GET['products_id'])) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $customer_id . "'");
$check = tep_db_fetch_array($check_query);
if ($check['count'] > 0) {
tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $customer_id . "'");
}
tep_redirect(tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action'))));
} else {
$navigation->set_snapshot();
tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
}
break;
case 'cust_order' : if (tep_session_is_registered('customer_id') && isset($_GET['pid'])) {
if (tep_has_product_attributes($_GET['pid'])) {
tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['pid']));
} else {
$cart->add_cart($_GET['pid'], $cart->get_quantity($_GET['pid'])+1);
}
}
tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
break;
}
}
Posted 10 July 2009, 15:59
Posted 10 July 2009, 16:31
jasonabc, on Jul 10 2009, 10:59 AM, said:
Posted 10 July 2009, 17:16
Posted 18 August 2009, 12:53
$master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master LIKE '%" . $HTTP_GET_VARS['products_id'] . "%'");
with$master_query = tep_db_query("select products_master from " . TABLE_PRODUCTS . " where products_master = " . $HTTP_GET_VARS['products_id']);
Posted 20 August 2009, 08:42
Posted 17 September 2009, 14:11
Posted 17 September 2009, 14:32
Posted 18 September 2009, 08:28
concorde44, on Sep 17 2009, 03:32 PM, said: