Jump to content

Changing Attribute Impact Price to a Static Price


Recommended Posts

Hey All,

First of all I want to thank all the developers for sharing this great ecom app. Ok my client needed 8 price tears for the customers. Once the in user logs in they see a new price depending on the price tear that has been assigned in the BO. I've been able to make all the changes needed for this to work.(Updated DB, Classes, BO Tabs, etc.) So the static prices display fine. I also needed to make the attributes have a static price... So I've got everything setup in the BO where it saves the price tears for the attributes and thats working fine. Now I need to display the price when the attributes are updated. I started with product.tpl in the themes dir looking for the event that fires the method that updates the price and found

onchange="[removed]findCombination();{if $colors|@count > 0}$('#resetImages').show('slow');{/if}"

Following the rabbit down the hole I look into product.js, also in the themes dir, to find that method. Well I found the function but it seems that it needs a pram. I'm a AS3 programmer and if the pram isn't null then there has to be some data type pass through.

JS function findCombination(firstTime)

AS3 function findCombination(firstTime:*=null)

I think to myself that this must be fired the firstTime Haha. I remembered when working with the BO I had to change attributeBack.js in order to update the BO product attribute form so I check the root js dir and BAM attributteFront.js But didn't find that method :( OK back into the product.js and product.tpl Stepping through the code in the product.js I find

selectedCombination['price'] = combinations[combination]['price'];




var combinations = new Array();
var selectedCombination = new Array();

So inside this for each in loop I see that price is being "pushed" into selectedCombination['price']. Well where is combinations[0]['price'] coming from? And in the updateDisplay() it seems that tax and sales are being applied not the price impact so where is this being possess? Am I looking over something in the product class? Please help guys I'm bugin out here O_o.

Many thanks - Wes

PS I've been tracking all my notes on how to do all of this on Tomboys Notes(ubuntu) and will gladly share. Step by step

Share this post

Link to post
Share on other sites

Ok I found these two post which has help a lot



Using the info from them I've been able to get somewhere. It will take few hours to set this up to my needs, once done I'll post how I was able to do it. It will be quick and dirty. ;)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More