2

I have configured several discounts based on usergroup conditions in Craft Commerce. Now i would like to create a price list for the shop owner, that contains the prices for the several usergroups. Below is a (try...) code example on how it should work. Is such a price list possible with Craft Commerce? How can i get this?

    {% set products = craft.commerce.products.type('normal').find() %}

    {% for product in products %}
      {% for variant in product.variants %}
        {{ variant.sku }} - {{ variant.salePrice|forUsergroup("normal") }} -  {{ variant.salePrice|forUsergroup("silver") }} - {{ variant.salePrice|forUsergroup("gold") }} <br>
      {% endfor %}
    {% endfor %}

0

Your Answer

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

Browse other questions tagged or ask your own question.