Hi all,
I understand posibilities of Option, i.e. size, color etc., there is possible to add or subtract some value from base price of product. But, my question is: have anyone solution for situation, where is the same product in different weight package, for example food for parrots which is produced in 1 kg, 4 kg and 15 kg bags? I would like to have one product with complete description and posibility to choice from those options. Each option should have own price, without + or - sign, which replace base product price..
Yes, I know that I can simply use each package as separate product, but there will be many times the same description in database..
You could change the product.php file like this:
Bear in mind when you use weights or volumes for your product options that this influences the shipping costs: For example, a user selects the 10KG instead of the default 1KG option, hence the shipping costs will be much higher. Hence, you also need to update your shipping module to take this into account!
Code: Select all
.........
foreach ($values as $value) {
$option_value_info = $database->getRow("select * from option_value where option_value_id = '" . (int)$value['option_value_id'] . "' and option_id = '" . (int)$key . "' and language_id = '" . (int)$language->getId() . "'");
$price = $product_info['price'];
$price = ($value['prefix']=='-') ? $price-$value['price'] : $price+$value['price'];
$price = $currency->format($tax->calculate($price, $product_info['tax_class_id'], $config->get('config_tax')));
$option_value_data[] = array(
'product_to_option_id' => $value['product_to_option_id'],
'option_value_id' => $value['option_value_id'],
'name' => $option_value_info['name'],
'price' => $price,
'prefix' => $value['prefix']
);
}
..........
Bear in mind when you use weights or volumes for your product options that this influences the shipping costs: For example, a user selects the 10KG instead of the default 1KG option, hence the shipping costs will be much higher. Hence, you also need to update your shipping module to take this into account!
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Who is online
Users browsing this forum: No registered users and 1 guest