rjpatel43 wrote:Hi ,
Currently i am customizing NOP Solution, i need to hide Price & ADD TO CART button , for few selective countries.
i can hide country from shipping & billing restrictions but that does not server my purpose.
i dont want user of particuler country , not to see product price as well.
Is there any settings available or some code needs to be change.
Your question is a bit off topic from this thread, however, awhile ago this same item came up and I ended up doing my own solution back in 3.2.
Take a quick read of this thread.
Now, since I did that previous implementation, I have started to do a 3.4 upgrade and am improving on this. A few key changes I am making is that I am not going to use the customer admin field anymore, but going to use a new key in the generic attribute table. This just makes sense as I am interested in the country/state origin of a customer... and the generic attributes table is a great fit for this....plus I want my customer admin field back :-)
The other change...and this one is more significant... I am not going to do a separate store/tenant like I did previously. Instead, I am extending the core and expanding on the price tier structure to include country. So each product will have tier prices set for quantity of 1 (effectively overriding the base), and just like we can filter on store and customer role, I am adding a 3rd dropdown to filter on country (that their IP is from). If the country component of the check is true on a product, the model returns it as a "call for price"...of which the default text can be changed to whatever makes sense. The first attempt was a bit crude also... I didn't use dependency injection on the home controller for the geoservice lookkup (which i should have). The rest is the same as before... when a guest/customer hits the site, I will check for my new "countryorigin" key in the generic attribute...if it doesn't exist, do a lookup based on their IP (just like before) and store it. Thus... only 1 check is ever done for a guest/customer...once they get assigned a country origin, the key is in memory when they return for future visits.
Anyway, as far as I know, I am not aware of anyone else doing this specific customization other than myself. Should you want to discuss further, lets use my original thread (
here) rather than this one, as this one is really about something different.