I am working on a site for a client and he needs a M.A.P. Restriction modification where if the M.A.P. (Minimum Advertised Price) is less than the Price that the script will output a $language variable that says “Call for Price” or something to that affect.
I have added the map_price to the product table of the database and modified the admin product.update where the M.A.P. can be entered and edited. I have also created the language variables for both.
What I need to do now is add a hook that will compare the map_price and the price and then override the price on the product.view and categories.view controller pages. Or maybe not. This is where I am stuck.
I would also have to do away with the calculated discount if the above criteria are met.
I had someone quote a $100 to do the mod for me, but that will pretty much take all profit out of this venture for me and I’d like to learn what others can teach.
Thanks so much for your assistance.
Suggest you go to the Developers Corner and read recent post on PHP Controllers. You should NEVER change the products table or directly change the templates for the admin product details. You’ll only end up with problems at the next upgrade and may end up losing your data.
There is a php hook for product data and there is a template hook for the pricing block. I would probably do it in the product data hook since it leaves all the templates alone.
The addon ‘movie’ discussed in the Developers Corner could very easily be adjusted to meet the needs of a MAP restriction.
[quote name=‘tbirnseth’]Suggest you go to the Developers Corner and read recent post on PHP Controllers. You should NEVER change the products table or directly change the templates for the admin product details. You’ll only end up with problems at the next upgrade and may end up losing your data.
There is a php hook for product data and there is a template hook for the pricing block. I would probably do it in the product data hook since it leaves all the templates alone.
The addon ‘movie’ discussed in the Developers Corner could very easily be adjusted to meet the needs of a MAP restriction.[/QUOTE]
Thank you very much
In process of creating a MAP addon if you can wait a couple of days more…
Addon is now available. Please see this thread for info: [url]http://forum.cs-cart.com/showthread.php?t=23420[/url]