gchrt,
Ever get a solution to this? I am attempting to integrate an sppc modified shopping_cart.php with Add Weight to Products v0.2. In other words, I must have separate pricing per customer and attribute weights (for shipping) working together.
For catalog/includes/classes/shopping_cart.php, in the add weight contrib we have:
if (isset($this->contents[$products_id]['attributes'])) {
reset($this->contents[$products_id]['attributes']);
while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
$attribute_price_query = tep_db_query("select options_values_price, price_prefix, options_values_weight from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$prid . "' and options_id = '" . (int)$option . "' and options_values_id = '" . (int)$value . "'");
which corresponds to this in the sppc contrib:
if (isset($this->contents[$products_id]['attributes'])) {
reset($this->contents[$products_id]['attributes']);
$where = " AND ((";
while (list($option, $value) = each($this->contents[$products_id]['attributes'])) {
$where .= "options_id = '" . (int)$option . "' AND options_values_id = '" . (int)$value . "') OR (";
}
$where=substr($where, 0, -5) . ')';
$attribute_price_query = tep_db_query("SELECT products_attributes_id, options_values_price, price_prefix FROM " . TABLE_PRODUCTS_ATTRIBUTES . " WHERE products_id = '" . (int)$products_id . "'" . $where ."");
Obviously, some tweaking of $attribute_price_query is needed, but I still have not come up with the solution. Any help or pointers are appreciated.