Skip to content

Commit

Permalink
Merge pull request PrestaShop#601 from yannicka/tpl-quotes
Browse files Browse the repository at this point in the history
Templates: double quotes => single quote (for Smarty strings)
  • Loading branch information
Hlavtox authored Feb 29, 2024
2 parents 204533b + 14b39b2 commit 9446868
Show file tree
Hide file tree
Showing 51 changed files with 128 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*}
<section class="best-sellers-products mt-3">
<div class="container">
{include file="components/section-title.tpl" title={l s="Best Sellers" d="Shop.Theme.Catalog"}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='Best Sellers' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
<div class="best-sellers-products-footer text-center">
<a class="all-product-link btn btn-outline-primary" href="{$allBestSellers}">
{l s='All best sellers' d='Shop.Theme.Catalog'}<i class="material-icons rtl-flip" aria-hidden="true">&#xE315;</i>
Expand Down
2 changes: 1 addition & 1 deletion modules/ps_brandlist/views/templates/hook/ps_brandlist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<div>
{if $brands}
{include file="module:ps_brandlist/views/templates/_partials/$brand_display_type.tpl" brands=$brands}
{include file='module:ps_brandlist/views/templates/_partials/$brand_display_type.tpl' brands=$brands}
{else}
<p class="mb-0">{l s='No brand' d='Shop.Theme.Catalog'}</p>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<section class="category-products mt-3">
<div class="container">
{if $products|@count == 1}
{include file="components/section-title.tpl" title={l s='%s other product in the same category' sprintf=[$products|@count] d='Shop.Theme.Catalog'}}
{include file='components/section-title.tpl' title={l s='%s other product in the same category' sprintf=[$products|@count] d='Shop.Theme.Catalog'}}
{else}
{include file="components/section-title.tpl" title={l s='%s other products in the same category' sprintf=[$products|@count] d='Shop.Theme.Catalog'}}
{include file='components/section-title.tpl' title={l s='%s other products in the same category' sprintf=[$products|@count] d='Shop.Theme.Catalog'}}
{/if}

{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
</div>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<section class="featured-products mt-3">
<div class="container">
{include file="components/section-title.tpl" title={l s='Customers who bought this product also bought:' d='Shop.Theme.Catalog'}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='Customers who bought this product also bought:' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
</div>
</section>
4 changes: 2 additions & 2 deletions modules/ps_customeraccountlinks/ps_customeraccountlinks.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
{if $configuration.return_enabled && !$configuration.is_catalog}
<li><a href="{$urls.pages.order_follow}" title="{l s='Merchandise returns' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Merchandise returns' d='Shop.Theme.Customeraccount'}</a></li>
{/if}
{hook h="displayMyAccountBlock"}
{hook h='displayMyAccountBlock'}
<li><a href="{$urls.actions.logout}" title="{l s='Log me out' d='Shop.Theme.Customeraccount'}" class="logout" rel="nofollow">{l s='Sign out' d='Shop.Theme.Actions'}</a></li>
{else}
<li><a href="{$urls.pages.guest_tracking}" title="{l s='Order tracking' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Order tracking' d='Shop.Theme.Customeraccount'}</a></li>
<li><a href="{$urls.pages.my_account}" title="{l s='Log in to your customer account' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Sign in' d='Shop.Theme.Actions'}</a></li>
<li><a href="{$urls.pages.register}" title="{l s='Create account' d='Shop.Theme.Customeraccount'}" rel="nofollow">{l s='Create account' d='Shop.Theme.Customeraccount'}</a></li>
{hook h="displayMyAccountBlock"}
{hook h='displayMyAccountBlock'}
{/if}
</ul>
</div>
4 changes: 2 additions & 2 deletions modules/ps_emailalerts/views/templates/hook/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

<div class="card card-body text-center js-mailalert mb-3 mt-3 bg-light" data-url="{url entity='module' name='ps_emailalerts' controller='actions' params=['process' => 'add']}">
{if isset($email) AND $email}
<p>{l s="Interested in this product? Drop us an email and we will let you know when it's available for order." d='Modules.Emailalerts.Shop'}</p>
<p>{l s='Interested in this product? Drop us an email and we will let you know when it\'s available for order.' d='Modules.Emailalerts.Shop'}</p>
<input class="form-control" type="email" placeholder="{l s='[email protected]' d='Modules.Emailalerts.Shop'}"/>
{else}
<p>{l s="Interested in this product? Click below and we will let you know when it's available for order." d='Modules.Emailalerts.Shop'}</p>
<p>{l s='Interested in this product? Click below and we will let you know when it\'s available for order.' d='Modules.Emailalerts.Shop'}</p>
{/if}

{if !empty($id_module)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*}
<section class="featured-products">
<div class="container">
{include file="components/section-title.tpl" title={l s="Popular Products" d="Shop.Theme.Catalog"}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='Popular Products' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
</div>

<div class="featured-products-footer text-center">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

<section class="new-products mt-3">
<div class="container">
{include file="components/section-title.tpl" title={l s="New products" d="Shop.Theme.Catalog"}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='New products' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
<div class="new-products-footer text-center">
<a class="all-product-link btn btn-outline-primary" href="{$allNewProductsLink}">
{l s='All new products' d='Shop.Theme.Catalog'}<i class="material-icons rtl-flip" aria-hidden="true">&#xE315;</i>
Expand Down
4 changes: 2 additions & 2 deletions modules/ps_specials/views/templates/hook/ps_specials.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

<section class="sale-products mt-3">
<div class="container">
{include file="components/section-title.tpl" title={l s="On sale" d="Shop.Theme.Catalog"}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='On sale' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
<div class="sale-products-footer text-center">
<a class="all-product-link btn btn-outline-primary" href="{$allSpecialProductsLink}">
{l s='All sale products' d='Shop.Theme.Catalog'}<i class="material-icons rtl-flip" aria-hidden="true">&#xE315;</i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<div>
{if $suppliers}
{include file="module:ps_supplierlist/views/templates/_partials/$supplier_display_type.tpl" suppliers=$suppliers}
{include file='module:ps_supplierlist/views/templates/_partials/$supplier_display_type.tpl' suppliers=$suppliers}
{else}
<p>{l s='No supplier' d='Shop.Theme.Catalog'}</p>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*}
<section class="viewed-products mt-3">
<div class="container">
{include file="components/section-title.tpl" title={l s="Viewed products" d="Shop.Theme.Catalog"}}
{include file="catalog/_partials/productlist.tpl" products=$products productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='Viewed products' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$products productClass='col-6 col-lg-4 col-xl-3'}
</div>
</section>
2 changes: 1 addition & 1 deletion modules/psgdpr/views/templates/hook/displayGDPRConsent.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file="modules/psgdpr/views/templates/hook/displayGDPRConsent.tpl"}
{extends file='modules/psgdpr/views/templates/hook/displayGDPRConsent.tpl'}
{block name='gdpr_checkbox'}
<div id="gdpr_consent" class="mt-2 gdpr_module_{$psgdpr_id_module|escape:'htmlall':'UTF-8'}">
<span class="form-check">
Expand Down
10 changes: 5 additions & 5 deletions templates/_partials/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

{block name='head_seo'}
{block name='head_preload'}
{include file="_partials/preload.tpl"}
{include file='_partials/preload.tpl'}
{/block}

<title>{block name='head_seo_title'}{$page.meta.title}{/block}</title>
Expand All @@ -39,13 +39,13 @@
{/block}

{block name='head_microdata'}
{include file="_partials/microdata/head-jsonld.tpl"}
{include file='_partials/microdata/head-jsonld.tpl'}
{/block}

{block name='head_microdata_special'}{/block}

{block name='head_pagination_seo'}
{include file="_partials/pagination-seo.tpl"}
{include file='_partials/pagination-seo.tpl'}
{/block}

{block name='head_open_graph'}
Expand All @@ -67,11 +67,11 @@
{/block}

{block name='stylesheets'}
{include file="_partials/stylesheets.tpl" stylesheets=$stylesheets}
{include file='_partials/stylesheets.tpl' stylesheets=$stylesheets}
{/block}

{block name='javascript_head'}
{include file="_partials/javascript.tpl" javascript=$javascript.head vars=$js_custom_vars}
{include file='_partials/javascript.tpl' javascript=$javascript.head vars=$js_custom_vars}
{/block}

{block name='hook_header'}
Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/_partials/category-header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="js-product-list-header">
{if $listing.pagination.items_shown_from == 1}
<div class="block-category">
{include file="components/page-title-section.tpl" title={$category.name}}
{include file='components/page-title-section.tpl' title={$category.name}}
{if $category.description}
<div id="category-description" class="rich-text mb-4">{$category.description nofilter}</div>
{/if}
Expand Down
4 changes: 2 additions & 2 deletions templates/catalog/_partials/product-accessories.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
* file that was distributed with this source code.
*}
<section class="product-accessories mt-3">
{include file="components/section-title.tpl" title={l s='You might also like' d='Shop.Theme.Catalog'}}
{include file="catalog/_partials/productlist.tpl" products=$accessories productClass="col-6 col-lg-4 col-xl-3"}
{include file='components/section-title.tpl' title={l s='You might also like' d='Shop.Theme.Catalog'}}
{include file='catalog/_partials/productlist.tpl' products=$accessories productClass='col-6 col-lg-4 col-xl-3'}
</section>
4 changes: 2 additions & 2 deletions templates/catalog/_partials/productlist.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-6 col-xl-4{/if}{/capture}

<div class="products{if !empty($cssClass)} {$cssClass}{else} row{/if}">
{foreach from=$products item="product" key="position"}
{include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position productClasses=$productClasses}
{foreach from=$products item='product' key='position'}
{include file='catalog/_partials/miniatures/product.tpl' product=$product position=$position productClasses=$productClasses}
{/foreach}
</div>
2 changes: 1 addition & 1 deletion templates/catalog/_partials/products.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* file that was distributed with this source code.
*}
<div id="js-product-list">
{include file="catalog/_partials/productlist.tpl" products=$listing.products}
{include file='catalog/_partials/productlist.tpl' products=$listing.products}

{block name='pagination'}
{include file='_partials/pagination.tpl' pagination=$listing.pagination}
Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/_partials/quickview.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{/block}
{block name='product_customization'}
{if $product.is_customizable && count($product.customizations.fields)}
{include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
{include file='catalog/_partials/product-customization.tpl' customizations=$product.customizations}
{/if}
{/block}
{block name='product_buy'}
Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/brands.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{block name='content'}
{block name='brand_header'}
{include file="components/page-title-section.tpl" title={l s='Brands' d='Shop.Theme.Catalog'}}
{include file='components/page-title-section.tpl' title={l s='Brands' d='Shop.Theme.Catalog'}}
{/block}

{block name='brand_miniature'}
Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/listing/manufacturer.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list_header'}
{include file="components/page-title-section.tpl" title={l s='List of products by brand %brand_name%' sprintf=['%brand_name%' => $manufacturer.name] d='Shop.Theme.Catalog'}}
{include file='components/page-title-section.tpl' title={l s='List of products by brand %brand_name%' sprintf=['%brand_name%' => $manufacturer.name] d='Shop.Theme.Catalog'}}
<div id="manufacturer-short_description" class="rich-text">{$manufacturer.short_description nofilter}</div>
<div id="manufacturer-description" class="rich-text">{$manufacturer.description nofilter}</div>
{/block}
7 changes: 4 additions & 3 deletions templates/catalog/listing/product-list.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<h1 id="js-product-list-header" class="h2 mb-4">{$listing.label}</h1>
{/block}

{hook h="displayHeaderCategory"}
{hook h='displayHeaderCategory'}

<section id="products">
{if $listing.products|count}
Expand All @@ -28,7 +28,7 @@
{/block}

{block name='product_list'}
{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-6 col-xl-4"}
{include file='catalog/_partials/products.tpl' listing=$listing productClass='col-6 col-xl-4'}
{/block}

{block name='product_list_bottom'}
Expand All @@ -51,8 +51,9 @@
{/if}
</section>


{block name='product_list_footer'}{/block}

{hook h="displayFooterCategory"}

{hook h='displayFooterCategory'}
{/block}
4 changes: 2 additions & 2 deletions templates/catalog/listing/search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list'}
{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-6 col-md-4 col-xl-3"}
{include file='catalog/_partials/products.tpl' listing=$listing productClass='col-6 col-md-4 col-xl-3'}
{/block}

{block name="error_content"}
{block name='error_content'}
<p>{l s='Search again what you are looking for.' d='Shop.Theme.Catalog'}</p>
{/block}

Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/listing/supplier.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
{extends file='catalog/listing/product-list.tpl'}

{block name='product_list_header'}
{include file="components/page-title-section.tpl" title={l s='List of products by supplier %s' sprintf=[$supplier.name] d='Shop.Theme.Catalog'}}
{include file='components/page-title-section.tpl' title={l s='List of products by supplier %s' sprintf=[$supplier.name] d='Shop.Theme.Catalog'}}
<div id="supplier-description" class="rich-text">{$supplier.description nofilter}</div>
{/block}
2 changes: 1 addition & 1 deletion templates/catalog/product.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

{block name='product_customization'}
{if $product.is_customizable && count($product.customizations.fields)}
{include file="catalog/_partials/product-customization.tpl" customizations=$product.customizations}
{include file='catalog/_partials/product-customization.tpl' customizations=$product.customizations}
{/if}
{/block}

Expand Down
2 changes: 1 addition & 1 deletion templates/catalog/suppliers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
{extends file='catalog/brands.tpl'}

{block name='brand_header'}
{include file="components/page-title-section.tpl" title={l s='Suppliers' d='Shop.Theme.Catalog'}}
{include file='components/page-title-section.tpl' title={l s='Suppliers' d='Shop.Theme.Catalog'}}
{/block}
2 changes: 1 addition & 1 deletion templates/checkout/_partials/address-form.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{/if}
{/block}

{block name="address_form_url"}
{block name='address_form_url'}
<form
method="POST"
action="{url entity='order' params=['id_address' => $id_address]}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</a>

{if is_array($product.customizations) && $product.customizations|count}
{include file="catalog/_partials/product-customization-modal.tpl" product=$product}
{include file='catalog/_partials/product-customization-modal.tpl' product=$product}
{/if}

{foreach from=$product.attributes key="attribute" item="value"}
Expand Down
2 changes: 1 addition & 1 deletion templates/checkout/_partials/order-confirmation-table.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
{/if}

{if is_array($product.customizations) && $product.customizations|count}
{include file="catalog/_partials/product-customization-modal.tpl" product=$product}
{include file='catalog/_partials/product-customization-modal.tpl' product=$product}
{/if}

{hook h='displayProductPriceBlock' product=$product type="unit_price"}
Expand Down
4 changes: 2 additions & 2 deletions templates/checkout/_partials/steps/addresses.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{if isset($delivery_address_error)}
<p class="alert alert-danger js-address-error" name="alert-delivery" id="id-failure-address-{$delivery_address_error.id_address}">{$delivery_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s="Your address is incomplete, please update it." d="Shop.Notifications.Error"}</p>
<p class="alert alert-danger js-address-error" name="alert-delivery" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}

<a href="{$new_address_delivery_url}" class="btn btn-outline-primary btn-with-icon w-100 w-md-auto mb-3">
Expand Down Expand Up @@ -87,7 +87,7 @@
{if isset($invoice_address_error)}
<p class="alert alert-danger js-address-error" name="alert-invoice" id="id-failure-address-{$invoice_address_error.id_address}">{$invoice_address_error.exception}</p>
{else}
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s="Your address is incomplete, please update it." d="Shop.Notifications.Error"}</p>
<p class="alert alert-danger js-address-error" name="alert-invoice" style="display: none">{l s='Your address is incomplete, please update it.' d='Shop.Notifications.Error'}</p>
{/if}

<a href="{$new_address_invoice_url}" class="btn btn-outline-primary btn-with-icon w-100 w-md-auto">
Expand Down
2 changes: 1 addition & 1 deletion templates/checkout/checkout-navigation.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

<div class="{$componentName}__mobile mb-0 d-flex align-items-center d-md-none">
<div class="{$componentName}__left mx-3">
{include file="components/progress-circle.tpl" classes="text-success col-4" size=74 stroke=4}
{include file='components/progress-circle.tpl' classes="text-success col-4" size=74 stroke=4}
</div>

<div class="{$componentName}__step d-none" data-step="checkout-personal-information-step">
Expand Down
2 changes: 1 addition & 1 deletion templates/checkout/checkout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{/block}

{block name='content_columns'}
{include file="checkout/checkout-navigation.tpl"}
{include file='checkout/checkout-navigation.tpl'}

{block name='checkout_notifications'}
{include file='_partials/notifications.tpl'}
Expand Down
4 changes: 2 additions & 2 deletions templates/contact.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
{block name='page_header_container'}{/block}

{if $layout === 'layouts/layout-left-column.tpl'}
{block name="left_column"}
{block name='left_column'}
<div id="left-column" class="wrapper__left-column col-md-4 col-lg-3">
{hook h='displayContactLeftColumn'}
</div>
{/block}
{else if $layout === 'layouts/layout-right-column.tpl'}
{block name="right_column"}
{block name='right_column'}
<div id="right-column" class="wrapper__right-column col-md-4 col-lg-3">
{hook h='displayContactRightColumn'}
</div>
Expand Down
Loading

0 comments on commit 9446868

Please sign in to comment.