LiteMage + Magento + External Price Update Software

#1
Good morning,

I'm wondering how to force LiteMage to purg while prices and stock quantities in Magento database are remotly updated by external software (integration beetween Magento and ERP). Please, give me any ideas.

Kind regards
 
#3
Hello,
I want to purge dynamically for the affected products?

My idea so far is to run cron and purge last affected products, but I need to know if there is some way to run purge for product Id via some API or sth?

Maybe is there better sollution?
 

Lauren

LiteSpeed Staff
Staff member
#4
LiteMage allow purge by tag, so should be easy to implement. but I may need to add code to support this.
currently, if you put 127.0.0.1 in Admin IP, and if you know the affected URL, you can append ?LITEMAGE_CTRL=PURGE to the url, then it will purge that page by Product ID, or if it's a category page, it will purge by that category ID. But I'm guessing you don't really know the url, only know by IDs.
So I will need to add a new interface for you, which will take command from Admin IP and purge by tags, like litemagefronturl?LITEMAGE_CTRL=PURGE_TAGS&DATA=P.124,P.125,C.12. Will this way work? maybe data should be in the POST, for GET we have to limit the number of items.
Let me know your thought and we can work together to make this feature available in the next build.

Thanks,
Lauren
 
#5
LITEMAGE_CTRL=PURGE_TAGS&DATA=P.124,P.125,C.12 - it will be realy helpfull.

Does purging product will affect also category page (for example if price was changed)?

When can I expect next build with that feature?
 

Lauren

LiteSpeed Staff
Staff member
#6
right now, if you save a product from admin panel, it will try to find out all the related categories and purge it. But for this purge by tag feature, it's too expensive to do categories, as many products can have same category. So you can do from your program, find all the affected products and doing the calculation in database and get all the affected category IDs, then purge those. How big will be for that DATA part? should it in POST body? How many tags do you think to have for one batch?

How soon, if you we reply in time, can be next week.
 
#7
I think max 20 DATA items in one batch. I think GET will be good.

And I wondering if cache is purging while price indexer is running (for example when catalog promotion rule is applied)?
 

Lauren

LiteSpeed Staff
Staff member
#8
If you turn on debug log, you can check when price indexer update, purge tag header sent or not. It should trigger save product event, and in turn will trigger purge product, and that purge will include related categories.
 

Lauren

LiteSpeed Staff
Staff member
#9
1.0.11 released, included your feature request.
If you add your IP to Admin IPs, you can use GET request to do purge tags in your script.
url is base_url/litemage/admin/purge?tags=P.345,C.4
it's a comma separated list, tag must be P (for product), C (for catalog), G (for cms page), followed by a dot, then a numeric id.
This purge by product ID will not auto search for related categories and purge that. It is strictly for that product. If that product page has various version, like for different store, different currencies, all will be purged, as they share the same tag.
Let me know if it works as expected.
 
Top