This content has been marked as final. Show 1 reply
Possible option to use Account Site Use level price lists?
Out-of-the-box iStore currently supports Customer Account Level pricelist as you noted. These are stored in HZ_CUST_ACCOUNTS table.
The following document offers a workaround solution to allow support for Customer Address Level (Account Site Use) Price List -
Does iStore Support Customer Site Use(Address) Level Price List Functionality [ID 373270.1]
From this Note -
No - By Default, iStore does not support Customer Address Level (Account Site Use) pricelist
Customer Account pricelist is associated with Customer Account table (Hz_Cust_Accounts) whereas Site Use level pricelist is stored in Site Uses table (Hz_Cust_Site_Uses).
Per current functionality, iStore supports customer account level pricelist stored in HZ_CUST_ACCOUNTS table.
To support Customer Address level pricelist, minor customization would be required , details as follows:
Step 1: Write a custom java class with a method to retrieve the pricelistId from HZ_CUST_SITE_USES table.
CustomJava file will have an API "getAddrPriceListId(Number AccountId)" which reads the pricelist for the current customer from his PRIMARY BillTo or ShipTo address for the passed in Cust Account Id.
Note: Use the Party Site Id associated to the shoppingcart and the required Site Use Type (Bill To or Ship To) to determine the Acct Site Use.
Step 2: Change the logic in the java API Session.setAccount().
BigDecimal priceListId = null;
String pValue = IBEUtil.getSiteProfile("IBE_USE_ACCT_PRICE_LIST");
if(pValue!=null && pValue.equals("Y"))
priceListId = CustomJavaClass.getAddrPriceListId(RequestCtx.getAccountId());
if (priceListId == null)
priceListId = account.getPriceList();
Per this logic, If the profile 'IBE: Use Customer Account Price List is set to Yes' is yes, look for the pricelist at customer address level. If not set, retrieve the pricelist at customer account level.
1.) Customization in the java layer is strictly NOT recommended by the iStore development team due to the drawbacks and complexity involved. Also, Customer has to maintain the custom code.
2.) Pricelist of the address identified in the catalog will be set in the session. If the Address (Bill To/ Ship To) is changed during checkout, any pricelist associated to these addresses will NOT be used for the session. This is not recommended due to the fact that pricing is cached for iStore, so would lead to some discrepancy in the item price during the session.