I have multiple products that have many different custom options for the customer to choose from. One of these products must have a different custom option naming implementation than the rest of them (one that doesn't correspond to the naming in the backend). Therefore, I have created an attribute that only this product possesses.
I plan to check the products with custom options for this attribute. If this attribute is found I plan to have alternate naming functionality.
However, I can't seem to find where exactly custom option dropdown names are generated.
-
I dont understand your question, but my understanding is create an attribute for that and add values that required, then use this attribute options.Manikandan Arunachalam– Manikandan Arunachalam2014年11月25日 14:36:19 +00:00Commented Nov 25, 2014 at 14:36
-
I'll try to rephrase.hownowbrowncow– hownowbrowncow2014年11月25日 14:37:48 +00:00Commented Nov 25, 2014 at 14:37
-
This is a clone of your other question, it appears: magento.stackexchange.com/questions/45242/… -- Please delete the other question if you want to get your answer from this one.Rick Buczynski– Rick Buczynski2014年11月25日 14:42:03 +00:00Commented Nov 25, 2014 at 14:42
-
@vBuck removed the other Q.hownowbrowncow– hownowbrowncow2014年11月25日 14:44:47 +00:00Commented Nov 25, 2014 at 14:44
2 Answers 2
If you want to know where it's rendered, you'll need to start with what type of custom option you have (drop-down, text, radio, etc). Once you know that, you can locate the template in: app/design/frontend/base/default/template/catalog/product/view/options/type/*.
Each template should have its own renderer. For example, if you are dealing with a select field, it's template will be found in the folder shown above, and it's rendering block will be found in: app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php -- see a snippet of it here:
public function getValuesHtml()
{
...
foreach ($_option->getValues() as $_value) {
$priceStr = $this->_formatPrice(array(
'is_percent' => ($_value->getPriceType() == 'percent') ? true : false,
'pricing_value' => $_value->getPrice(true)
), false);
$select->addOption(
$_value->getOptionTypeId(),
$_value->getTitle() . ' ' . $priceStr . ''
);
}
...
You can see how it generates that title ... so you'll want to modify this based on what attribute that option corresponds to. Hopefully that gets you in the right direction.
Are you looking for Admin->Catalog->Manage Products-> ->Custom Options where you can edit the existing options or add new product options.
-
No. That part is taken care of. I need to find where these custom options are added to the dropdown on the product page. I clarified my question a bit, hope this helps.hownowbrowncow– hownowbrowncow2014年11月25日 14:42:31 +00:00Commented Nov 25, 2014 at 14:42
Explore related questions
See similar questions with these tags.