Developer forum

Forum » Development » Order Discount list update

Order Discount list update

Vilius Janulis
Reply
Hi,

How to update sales discount list in the backend, when values are inserted directly to database ? 

For example : if there is one sales discount created manually in backend (and it shows only one in Managment center -> Ecom -> Product catalog -> Sales discount), and when you add 10 more to the database with correct values and etc but from the code. The database shows them all, but backend shows only the same one that was before.

And it is like that until you do any kind of action in Sales discount backend, for example if i delete that one discount, all other 10 that i created starts to be shown (or create new or etc.), so it is not problem of inserting them, everything is fine, just how to update backend list ? is there some kind of line of code to update that list, or is there some xml file that holds that list of sales discounts and is not updates since some action ?

Thank you very much for help.

Replies

 
Vilius Janulis
Reply
 Found the bug in the list : 

7536: Bug 
Area: Dynamicweb eCommerce - Sales Discounts
Title: The discount list are not reloaded with the localized discounts when you change language
Description: The discount list does now reloaded correct and shows the correct localized discounts when you change language in the backend list.
Workaround: None

can it be the same as i mentioned above ?
 
Vladimir
Reply
Hi Vilius!

Yes, these are related issues - there was a cache of sale discounts, that was almost never  refreshed.
So with fix of bug 7536 you can to see new discounts just by changing of the selected language

Best regards,
Vladimir

 
Vilius Janulis
Reply
Hi

How to refresh it manually, throughout the code ?
 
Vladimir
Reply
Hi Vilius!
There is no direct way to clear cache.
But it is cleared when any discount is saved or is deleted
or when you call SalesDiscount.getSalesDiscounts(ByVal language As International.Language)
with a language <> CurrentLanguage

 
Vilius Janulis
Reply
 Thank you, will try to call that sales discount get function and will check id they are updated.
 
Vilius Janulis
Reply
 Did not helped. The sales discounts in backend still does not update. They are in database but until you do some action in backend they dont show up. For example i see one discount, but in database there are two, if i go to backend and create ne discount, save it, then backend shows three (all of them), but until i do that they dont show up.. Any other suggestions how to update backend discounts ?
 
Vladimir
Reply
Hi Vilius !

hmm... it works realy... only problem that this code should be executed by cms itself...
and I afraid, there are no standard facilities for that:( only triks and haks:(

for example (just theoretically), you replace url of salesdiscount list (stored in ecom7tree table)
on somethig like '/../../../../../ViliusCustomModule/RefreshSalesDiscounts.aspx'
and from this form execute SalesDiscount.getSalesDiscounts(ByVal language As International.Language)
with a language <> CurrentLanguage and then redirrect back to the real salesdiscount list...

Best regards,
Vladimir

 

You must be logged in to post in the forum