Giter Club home page Giter Club logo

is_themecore's Introduction

Theme core module

Prestashop module created for starter theme

How to use assets.yml file

assets.yml file have to be placed inside themes/THEME_NAME/config/ to work. Example of assets.yml 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/[email protected]/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/[email protected]/dist/js/bootstrap.min.js
    server: remote # required to set server: remote for remote file
    priority: 200

You are able to use windcard * with include page name.

Structured data modification

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

  • actionStructuredDataBreadcrumb
  • actionStructuredDataProduct
  • actionStructuredDataShop
  • actionStructuredDataWebsite

Every hook $param is an array with two keys:

  • $data - reference of structured data array
  • $rawData - 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('datalayer.push');
        window.partytown.forward.push('gtag');
    </script>
    <script type="text/partytown" src="https://www.googletagmanager.com/gtag/js?id=YOUR_GTAG_CODE"></script>
    <script type="text/partytown">
        dataLayer = window.dataLayer || [];
        window.gtag = function () {
            dataLayer.push(arguments);
        };

        window.gtag('js', new Date());

        window.gtag('config', 'YOUR_GTAG_CODE');
    </script>
Beware that partytown is still in beta, and it may not work as expected. Make sure to test it before using in production.

is_themecore's People

Contributors

fofoy avatar glukash avatar oksydan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.