Aucune image disponible

Theme core module

Required for theme to work.

Developed by Igor Stępień

Get This Module Free on GitHub
PS 8.0 – 9.x License: GPL-3.0 Status: Active Health: Excellent

Info updated 1 month ago

Sources
Stars: 13 Forks: 15 Last commit: Nov 21, 2024
Type
Module

Info checked: Mar 2, 2026

Theme core module

Prestashop module created for starter theme

How to use assets.yml file

<code>assets.yml</code> file have to be placed inside <code>themes/THEME_NAME/config/</code> to work. Example of <code>assets.yml</code> file:

css:

product: fileName: product.css priority: 200 include:

product

checkout: fileName: checkout.css priority: 200 include:

cart order orderconfirmation

blog: fileName: blog.css priority: 200 include:

module-blog-*

example_remote_bootstrap: fileName: //cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css server: remote # required to set server: remote for remote file priority: 200

js: product: fileName: product.js priority: 200 include:

product

checkout: fileName: checkout.js priority: 200 include:

cart order orderconfirmation

blog: fileName: blog.js priority: 200 include:

module-blog-*

example_remote_bootstrap: fileName: //cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.min.js server: remote # required to set server: remote for remote file priority: 200

You are able to use windcard <code>*</code> with include page name.

Structured data modification

You are able to modify structured data with hooks. List of hooks:

  • <code>actionStructuredDataBreadcrumb</code>
  • <code>actionStructuredDataProduct</code>
  • <code>actionStructuredDataShop</code>
  • <code>actionStructuredDataWebsite</code>

Every hook $param is an array with two keys:

  • <code>$data</code> - reference of structured data array
  • <code>$rawData</code> - raw structured data array (provided by data provider)
Partytown

You are able to use partytown with this module. You have to enable it first in module configuration. Example of usage for GTAG:

    <script>

window.partytown.forward.push(&#039;datalayer.push&#039;); window.partytown.forward.push(&#039;gtag&#039;); &lt;/script&gt; &lt;script type=&quot;text/partytown&quot; src=&quot;https://www.googletagmanager.com/gtag/js?id=YOUR_GTAG_CODE&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/partytown&quot;&gt; dataLayer = window.dataLayer || []; window.gtag = function () { dataLayer.push(arguments); };

window.gtag(&#039;js&#039;, new Date());

window.gtag(&#039;config&#039;, &#039;YOUR_GTAG_CODE&#039;); &lt;/script&gt;

##### Beware that partytown is still in beta, and it may not work as expected. Make sure to test it before using in production.

  • Référence
    is_themecore

  • License
    GPL-3.0
  • PS Compatibility
    8.x
    9.x
  • Status
    Actif

Commentaires (0)

Aucun avis n'a été publié pour le moment.
Chargement...