Jump to content

discounts based on feature hidden


monak1983

Recommended Posts

Hi to all,
 I'm on PS 8.1.7 and I manage a clothing shop.
I would make discounts based on attribute SEASON that indicates what's product's season (ex: fall/winter2022, fall/finter2023, etc) and this is simple but I would not shown this attribute on product page.
Is possible to add an attribute hidden for front office and usable on back office to manage discounts based on this attribute ?
There is another way to do this?
Thanks

monak1983

Edited by monak1983 (see edit history)
Link to comment
Share on other sites

  • monak1983 changed the title to discounts based on feature hidden

I don't really understand why to hide a season characteristic, should be a main category for me 😉  But if you want to hide this feature in product page 2 ways depending on PS configuration. Change the template themes/yourtheme/templates/catalog/_partials/product-details.tpl
Example based on feature named Season.

if you don't have multiple languages, you can use the feature name

  {block name='product_features'}
    {if $product.grouped_features}
      <section class="product-features">
        <p class="h6">{l s='Data sheet' d='Shop.Theme.Catalog'}</p>
        <dl class="data-sheet">
          {foreach from=$product.grouped_features item=feature}
            {if $feature.name!='Season'}
            <dt class="name">{$feature.name}</dt>
            <dd class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</dd>
            {/if}
          {/foreach}
        </dl>
      </section>
    {/if}
  {/block}

with multiple languages you need to use the feature ID (ie: 3 in the example)

  {block name='product_features'}
    {if $product.grouped_features}
      <section class="product-features">
        <p class="h6">{l s='Data sheet' d='Shop.Theme.Catalog'}</p>
        <dl class="data-sheet">
          {foreach from=$product.grouped_features item=feature}
            {if $feature.id_feature!=3}
            <dt class="name">{$feature.name}</dt>
            <dd class="value">{$feature.value|escape:'htmlall'|nl2br nofilter}</dd>
            {/if}
          {/foreach}
        </dl>
      </section>
    {/if}
  {/block}

 

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...