Don't get lost: IMan Connectors > Magento Connector User Guide > Magento Connector Reference > RAPID Web Sync > Contract Prices
Overview
This extension is used for Customer / Contract Pricing. IMan is not necessary for this extension to work, simply the data is required.
Extension
This extension creates an observer for the catalog_product_get_final_price event. If the current customer is logged in, their customer_id and customer_group_code is grabbed along with the current product, from which we extract the sku. We then use these three values to do a lookup on the price column. If there is 1 result, we override the price by calling $product->setFinalPrice(). If there is more than 1 result then we write to error_log and do not update the price.
Database Table
Title: | ECInternet_CustomerPricing | |
Fields: | id | int(11) |
customer_id | varchar(30) | |
sku | varchar(45) | |
price | decimal(10,2) | |
pricelist | varchar(45) |