1

I need to display products based on the country of the visiting user, the countries have the same language (Spanish), but different systems of currency, I installed the module smart ip to identify the country of the visiting user and the countries module for creating the product can select the country or countries where the product will be available, my goal now is to make filter in the view to show only the products available in the country of the visiting user.

0

According to the countries module page:

Views Integration

The 2.x branch supports View operations. The views filter is supported via 'select list' in the following way:

  1. Create a Relationship (under 'Advanced') to 'Field: Country (field-country)' ('Country' being the field label, 'field_country' the field name).

The field is shown twice in the list

Field: Country

Field: Country (field-country)

The first one is not working. This broken relationship has been removed in the latest dev version.

  1. Add a Field/Filter/Sort of type 'Countries: xyz' with the new relationship.

Also, you might consider Nick's answer for hiding the product "Add to cart" based on country.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.