As for 1C Bitrix to hide or disable one of the delivery services, if the goods are not in stock?

We have two service delivery: "Pickup" and "delivery city".
There are also two warehouses: the "Basic" and "Retail store", in fact: shipping is available from any of the warehouses, but the Self is only possible from a Retail store.
Question: How to hide the service option of delivery "Ex works" if the item is not available in a Retail store, but to show the delivery service "delivery city" if the product at this point is at the main warehouse?

Ready-made solutions I found...
Maybe someone has some information or ideas?
April 7th 20 at 11:00
1 answer
April 7th 20 at 11:02
Found ready solution, but not 100% sure
Solution Marketplace

Maybe someone used and suggest how this option will work for me?

Find more questions by tags 1C-Bitrix