1

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.

asked Nov 25, 2014 at 14:08
4
  • I dont understand your question, but my understanding is create an attribute for that and add values that required, then use this attribute options. Commented Nov 25, 2014 at 14:36
  • I'll try to rephrase. Commented 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. Commented Nov 25, 2014 at 14:42
  • @vBuck removed the other Q. Commented Nov 25, 2014 at 14:44

2 Answers 2

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.

answered Nov 25, 2014 at 14:49
1

Are you looking for Admin->Catalog->Manage Products-> ->Custom Options where you can edit the existing options or add new product options.

answered Nov 25, 2014 at 14:41
1
  • 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. Commented Nov 25, 2014 at 14:42

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.