Is there a way to get a specific attribute value?
So I want to grab an attribute I created "Pieces Per Case" and add it to
default/en/common/price_parts/price.tpl How do I specifically get the value of the attribute to modify Code:
<li><span class="price product-price">{formatPrice(getListPrice(),null,1):h}</span><span> per case</span></li> I would like the end result to be <li><span class="price product-price">{formatPrice(getListPrice(),null,1):h}</span><span> per case (##AttributeValue## Pieces Per Case</span></li> Edit: It looks like the attribute is <select class="form-control" name="attribute_values[50]" data-attribute-id="50"> <option selected="selected" value="371">12</option> <option value="372">36 (+$42.00)</option> <option value="540">100 (+$125.00)</option> </select> Also I really wish i could change the +$42.00 and +125.00 to just be the price of those values... if default is $30.00 which it just said 36 ($72.00) and 100 ($150.00)... A lot of customers have said the + is confusing. |
Re: Is there a way to get a specific attribute value?
You should look into creating a custom module that will decorate \XLite\View\Product\AttributeValue\Customer\Select ::getModifierTitle() method and change the way how it displays the modifier surcharge.
Another method that you may to customize is \XLite\Model\AttributeValue\AttributeValueSelect:: formatModifier(). |
Re: Is there a way to get a specific attribute value?
Quote:
I couldn't find AttributeValueSelect when I looked for it. |
Re: Is there a way to get a specific attribute value?
Quote:
It is in the [XC5]/classes/XLite/Model/AttributeValue/AttributeValueSelect.php file. But you should not edit the file directly. Instead create a custom module that decorates the methods of the class that you want to change. Please refer to the documentation for developers at http://kb.x-cart.com/ |
All times are GMT -8. The time now is 03:11 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.