monak1983 Posted December 30, 2024 Share Posted December 30, 2024 (edited) 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 December 31, 2024 by monak1983 (see edit history) Link to comment Share on other sites More sharing options...
Daresh Posted December 30, 2024 Share Posted December 30, 2024 Maybe use a hidden category? Link to comment Share on other sites More sharing options...
Prestashop Addict Posted December 31, 2024 Share Posted December 31, 2024 Attribute or feature? Link to comment Share on other sites More sharing options...
monak1983 Posted December 31, 2024 Author Share Posted December 31, 2024 Feature! Link to comment Share on other sites More sharing options...
Prestashop Addict Posted January 2 Share Posted January 2 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} 1 Link to comment Share on other sites More sharing options...
monak1983 Posted April 9 Author Share Posted April 9 Good, it works very good! Where can I put this file to make an override and avoid to loose customization updating theme? Thansk a lot Marco Link to comment Share on other sites More sharing options...
Knowband Plugins Posted April 9 Share Posted April 9 To override the theme files, you need to create a child theme. Refer to doc regarding how to create the child theme and how to override the template. https://devdocs.prestashop-project.org/8/themes/reference/template-inheritance/parent-child-feature/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now