Hi z4m0lx3,
Welcome to OpenCart.
1. You can change option type under Catalog > Options here:
option_type.jpg (35.91 KiB) Viewed 13220 times
2. Open and edit /catalog/controller/product/product.php:
Around line 253-264:
Change from:
Code: Select all
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
$option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($option_value['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false,
'price_prefix' => $option_value['price_prefix']
);
}
}
To:
Code: Select all
foreach ($option['option_value'] as $option_value) {
if (!$option_value['subtract'] || ($option_value['quantity'] > 0)) {
$option_value_data[] = array(
'product_option_value_id' => $option_value['product_option_value_id'],
'option_value_id' => $option_value['option_value_id'],
'name' => $option_value['name'],
'image' => $this->model_tool_image->resize($option_value['image'], 50, 50),
'price' => (float)$option_value['price'] ? $this->currency->format($this->tax->calculate($product_info['special'] ? $option_value['price'] + $product_info['special'] : $option_value['price'] + $product_info['price'], $product_info['tax_class_id'], $this->config->get('config_tax'))) : false,
'price_prefix' => ''//$option_value['price_prefix']
);
}
}
Notice the 'price' and 'price_prefix'.
Several things to note:
-this is a hard-coded change and all other options will be affected by it.
-this won't be logical if you have more than 1 option for each product because the price only shows price of product + that particular option value, not all selected options for the product.
Hope this will help you get started in your modification.