Here's what I got so far. I added two products with same model number, different price and name for testing.
Here's extra cart action
if I use this stringCode:if (isset($_GET['action']) && $_GET['action']=='buy_now' && isset($_GET['m']) && isset($_GET['aribrand']) && !isset($_GET['products_id'])) { $sql= "select products_id from " . TABLE_PRODUCTS . " where products_model = :themodel:"; $sql= "select products_id from " . TABLE_PRODUCTS . " where manufacturers_id = :brand:"; $sql = $db->bindvars($sql, ':themodel:', $_GET['m'], 'string'); $sql = $db->bindvars($sql, ':brand:', $_GET['aribrand'], 'string'); $lookup = $db->Execute($sql); if ($lookup->RecordCount() == 1) { $_GET['products_id'] = $lookup->fields['products_id']; unset($_GET['aribrand']); unset($_GET['m']); zen_redirect(zen_href_link($goto, zen_get_all_get_params('m'))); } } ?>
it adds product by its manufacturer and model. But when using other manufacturer it's not adding anything to cartCode:index.php?action=buy_now&m=aaa111sss&aribrand=17
Another question I ran in to is, how can I define that manufacturers_id = 17 = EXM?Code:index.php?action=buy_now&m=aaa111sss&aribrand=4


Reply With Quote

