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

SEO - Add hreflang links for multilang pages #8652

Merged
merged 1 commit into from Jan 22, 2018

Conversation

Projects
None yet
5 participants
@Quetzacoalt91
Member

Quetzacoalt91 commented Jan 4, 2018

Questions Answers
Branch? develop
Description? List all equivalent URLs for all enabled langs on the shop in the <head> tag.
Type? improvement
Category? FO
BC breaks? Nope
Deprecations? Nope
Fixed ticket? http://forge.prestashop.com/browse/FF-159
How to test? Check the <head> of a front-office page. You should see this kind of content being displayed:
<link rel="alternate" href="http://localhost/PrestaShop/fr/connexion?back=my-account" hreflang="fr">
<link rel="alternate" href="http://localhost/PrestaShop/gb/login?back=my-account" hreflang="en-gb">

This change is Reviewable

$meta_language = array();
foreach ($languages as $lang) {
$meta_language[] = $lang['iso_code'];
}

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Jan 4, 2018

Member

Not really related to the PR, but these lines were executed for nothing (variable not used).

return $alternativeLangs;
}
foreach (Language::getLanguages(true, $this->context->shop->id) as $lang) {

This comment has been minimized.

@Matt75

Matt75 Jan 6, 2018

Contributor

Why not use $languages here instead of make a 2nd call to Language::getLanguages(true, $this->context->shop->id) ?

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Jan 8, 2018

Member

You're right, I forgot the variable replacement while refactoring the function.

Thanks

@LittleBigDev

This comment has been minimized.

Contributor

LittleBigDev commented Jan 8, 2018

Reviewed 1 of 2 files at r1, 1 of 1 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@LittleBigDev

👍

@marionf marionf added QA ✔️ and removed waiting for QA labels Jan 10, 2018

Quetzacoalt91 added a commit to Quetzacoalt91/StarterTheme that referenced this pull request Jan 16, 2018

@Quetzacoalt91

This comment has been minimized.

Member

Quetzacoalt91 commented Jan 16, 2018

@eternoendless eternoendless merged commit 3e854f9 into PrestaShop:develop Jan 22, 2018

3 checks passed

Codacy/PR Quality Review Good work! A positive pull request.
Details
code-review/reviewable 2 files reviewed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

eternoendless added a commit to PrestaShop/StarterTheme that referenced this pull request Jan 24, 2018

@eternoendless eternoendless added this to the 1.7.4.0 milestone Apr 13, 2018

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