Skip to content
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

HTML Templatization of Product page #3846

Closed

Conversation

areeshatariq
Copy link
Contributor

Description:
HTML Templatization of Product page using Template::Toolkit
display_product() has been templatized

Related issues and discussion: #2416

@teolemon teolemon added the Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. label Jul 14, 2020
@teolemon teolemon requested a review from a team July 15, 2020 19:08
@stephanegigandet
Copy link
Contributor

I'm testing on the dev server, one issue is that the same image is displayed for the front of the product, the ingredients, and the nutrition facts.
e.g. https://world.openfoodfacts.dev/product/2000000116683 (I may deploy other branches on the dev server)

image

@areeshatariq
Copy link
Contributor Author

I'm testing on the dev server, one issue is that the same image is displayed for the front of the product, the ingredients, and the nutrition facts.

I'll look into this

# obsolete product

if ((defined $product_ref->{obsolete}) and ($product_ref->{obsolete})) {

$template_data_ref->{product_ref_obsolete} = $product_ref->{obsolete};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

product_is_obsolete might be a better key name. $product_ref is just named like this since it's a reference variable.

</div>

<div class="show-for-large-up large-4 xlarge-4 xxlarge-4 columns" style="padding-left:0">
$html_image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a TT variable instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yes!

@sonarcloud
Copy link

sonarcloud bot commented Aug 2, 2020

SonarCloud Quality Gate failed.

Bug B 1 Bug
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.1% 0.1% Duplication

@stephanegigandet
Copy link
Contributor

(closing this pull request and making a new one, for some reason github shows changes that are in fact already merged, and the test fails)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants