Greenpilgrim Posted November 18, 2011 Share Posted November 18, 2011 Is it possible to add a price to the drop down menu for attributes? For example. 15kg - £12.50 5kg - £6.50 Something like that? Any help would be appriciated. Thanks Chris Link to comment Share on other sites More sharing options...
Mike Kranzler Posted November 18, 2011 Share Posted November 18, 2011 Hi Chris, I'm not sure if this would work based on what you are selling, but you could always rename the attributes. For example, in the "Weight" Attribute Group, you could name the attributes 15kg - £12.50, 5kg - £6.50, etc. to accomplish this. I hope this helps. -Mike Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted November 18, 2011 Share Posted November 18, 2011 You are correct Mike. That is exactly what I was going to suggest. Marty Shue Link to comment Share on other sites More sharing options...
Greenpilgrim Posted November 21, 2011 Author Share Posted November 21, 2011 Hi Guys Thanks for the respone, unfortunatly most of the products are based on the weight ranges so this wouldnt really work out as i have lots of products with teh same atributes, It is not a huge issue, It would just have been nice for the prices to show. Thanks Chris Link to comment Share on other sites More sharing options...
MeRuud Posted November 21, 2011 Share Posted November 21, 2011 Not sure if this works with taxes and stuff but try this. Open product.tpl Search for: <!-- attributes --> You will see: {if isset($groups)} <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count} <p> <label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var="groupName" value="group_$id_attribute_group"} <select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'}</option> {/foreach} </select> </p> {/if} {/foreach} </div> {/if} Change it to: {if isset($groups)} <!-- attributes --> <div id="attributes"> {foreach from=$groups key=id_attribute_group item=group} {if $group.attributes|@count} <p> <label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label> {assign var="groupName" value="group_$id_attribute_group"} <select name="{$groupName}" id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};"> {foreach from=$group.attributes key=id_attribute item=group_attribute} <option value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute} selected="selected"{/if} title="{$group_attribute|escape:'htmlall':'UTF-8'}">{$group_attribute|escape:'htmlall':'UTF-8'} - {convertPrice price=$productPrice}</option> {/foreach} </select> </p> {/if} {/foreach} </div> {/if} Or you instead of changing, add - {convertPrice price=$productPrice} Behind: {$group_attribute|escape:'htmlall':'UTF-8'} .. If you want I can write you a module for this (I think). Hope this helps (I'm still new so still trying to figure everything out).. Thanks, Ruud Link to comment Share on other sites More sharing options...
Greenpilgrim Posted November 22, 2011 Author Share Posted November 22, 2011 Thanks MeRuud I will have a look at this and see how it works. I will let you know. Thanks Chris Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted November 22, 2011 Share Posted November 22, 2011 I just implemented it in my test store and it worked perfectly. As meruud said, I didn't make any actual purchases so I don't know how it works with taxes either. Thanks for the clever solution meruud! Marty Shue Link to comment Share on other sites More sharing options...
Greenpilgrim Posted November 22, 2011 Author Share Posted November 22, 2011 Hi meruud I added this i did have a slight problem tho the prices are set at 0. See pic. I am not sure if this is down to the way i have setup the attributes. Basicly i add a base price the do weight and price increase/decreases. e,g. 1kg bag Start price: £15 Start Weight: 1kg then for next i use. 2kg bag Price increase £10 Weight Increase 1kg Not sure if this would make any difference. Thanks Chris Link to comment Share on other sites More sharing options...
MeRuud Posted November 22, 2011 Share Posted November 22, 2011 Hi Guys! It seems like I rushed myself a bit to much and I think I made a pretty big mistake. I think the trick I gave you above only shows the original price of the product, hence this might explain Chris (if I might call you that) his problems.. I am in class right now, I will look at it tonight. If anyone can confirm that this is indeed the issue, this would help a lot. Thanks, Ruud Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted November 22, 2011 Share Posted November 22, 2011 Hi Ruud! It looks like you are right. In my haste I didn't even pay attention to the prices. It does show the original price on each attribute. Marty Shue Link to comment Share on other sites More sharing options...
Greenpilgrim Posted November 24, 2011 Author Share Posted November 24, 2011 Hi guys Sorry for the late reply. Thanks for the help so far it is much appriciated. Link to comment Share on other sites More sharing options...
Greenpilgrim Posted November 28, 2011 Author Share Posted November 28, 2011 anyone have any ideas how this may be acheived. Thanks Link to comment Share on other sites More sharing options...
Greenpilgrim Posted February 9, 2012 Author Share Posted February 9, 2012 Hi Guys Anyone have any idea if this is possible? Link to comment Share on other sites More sharing options...
bewaz Posted August 13, 2012 Share Posted August 13, 2012 Up Someone have a solution ? Me still not ... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now