New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CO: Add new variable in product.php, to sort features in front #9356

Merged
merged 1 commit into from Sep 4, 2018

Conversation

Projects
None yet
7 participants
@Lathanao
Contributor

Lathanao commented Jul 20, 2018

Questions Answers
Branch? develop
Description? This commit allows to be able to sort features in front. By a range system, it's possible to add, e.g. title for sorted features. It's useful for product with a lot of features, like computers for example.
Type? improvement
Category? CO
BC breaks? No
Deprecations? No
Fixed ticket? No
How to test? Just add a small snippet in templates\catalog_partials\product-details.tpl . An example of the snippet is in the archive attachment.

product-details.zip
!
demo2


This change is Reviewable

@rdy4ever

This comment has been minimized.

Show comment
Hide comment
@rdy4ever

rdy4ever Jul 25, 2018

Contributor

Hi there. This is nice, but seems complicated.
I did something like this with no core modification, by playing a bit with custom features, a bit of js and css. I think it would be easier and reusable to create the group titles as features, with the value "@title" (or something else that you will never use as a regular value). Then, for each product add the title feature above its children. Then, use js to add a class to each feature that has the value "@title" and CSS to style it (hide the "@title" value and style the label). If you'd like to add icons for each title, then you can add the feature id as a class in the tpl.file for each feature (lke "feature-23") and use the :before pseudo in css to add an icon for each case.

Contributor

rdy4ever commented Jul 25, 2018

Hi there. This is nice, but seems complicated.
I did something like this with no core modification, by playing a bit with custom features, a bit of js and css. I think it would be easier and reusable to create the group titles as features, with the value "@title" (or something else that you will never use as a regular value). Then, for each product add the title feature above its children. Then, use js to add a class to each feature that has the value "@title" and CSS to style it (hide the "@title" value and style the label). If you'd like to add icons for each title, then you can add the feature id as a class in the tpl.file for each feature (lke "feature-23") and use the :before pseudo in css to add an icon for each case.

@kpodemski

This comment has been minimized.

Show comment
Hide comment
@kpodemski

kpodemski Jul 27, 2018

Contributor

LGTM

Contributor

kpodemski commented Jul 27, 2018

LGTM

@Lathanao

This comment has been minimized.

Show comment
Hide comment
@Lathanao

Lathanao Jul 29, 2018

Contributor

Hi,
@rdy4ever Create group titles as features could be confused for the shopper when add features for new product (which features are title, which ones are regular features).
For the CSS and JS, for my solution, no need to add CSS, cause, title CSS is same that one used in description tab. And no need to add JS.

I would also add that this commit allow the possibility to make a module to make this functionality more user friendly.

Contributor

Lathanao commented Jul 29, 2018

Hi,
@rdy4ever Create group titles as features could be confused for the shopper when add features for new product (which features are title, which ones are regular features).
For the CSS and JS, for my solution, no need to add CSS, cause, title CSS is same that one used in description tab. And no need to add JS.

I would also add that this commit allow the possibility to make a module to make this functionality more user friendly.

@Quetzacoalt91 Quetzacoalt91 changed the base branch from 1.7.4.x to develop Sep 3, 2018

CO: Add new variable in product.php, to be able to sort features in f…
…ront

| Questions     | Answers
| ------------- | -------------------------------------------------------
| Branch?       | 1.7.4.x
| Description?  | This commit allows to be able to sort features in front. By a range system, it's possible to add, e.g. title for sorted features.
It's useful for product with a lot of features, like computers for example.
| Type?         | improvement
| Category?     | CO
| BC breaks?    | No
| Deprecations? | No
| Fixed ticket? | No
| How to test?  | Just add a small range snippet in templates\catalog\_partials\product-details.tpl . I can provide snippet.

@Quetzacoalt91 Quetzacoalt91 added waiting for QA and removed 1.7.4.x labels Sep 3, 2018

@marionf marionf self-assigned this Sep 4, 2018

@marionf marionf added QA ✔️ and removed waiting for QA labels Sep 4, 2018

@marionf marionf removed their assignment Sep 4, 2018

@Quetzacoalt91 Quetzacoalt91 added this to the 1.7.5.0 milestone Sep 4, 2018

@Quetzacoalt91 Quetzacoalt91 merged commit dff92e8 into PrestaShop:develop Sep 4, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Show comment
Hide comment
@Quetzacoalt91
Member

Quetzacoalt91 commented Sep 4, 2018

Thank you @Lathanao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment