2017 © Pedro Peláez
 

magento2-module m2-core

Trezo Core module, with general functionality used in Magento 2 project

image

trezoteam/m2-core

Trezo Core module, with general functionality used in Magento 2 project

  • Wednesday, May 9, 2018
  • by trezo
  • Repository
  • 2 Watchers
  • 0 Stars
  • 927 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

Trezo_Core

General

The purpose of this module is to offer general functionality that is usefull for different Magento 2 projects., (*1)

Install in all projects and modules m2 by trezo, (*2)

Install

    composer require trezoteam/m2-core

Create Trezo Admin Tab

    trezo

Functions

Product

getCurrentCategory

You can get the current category by using this code in the view template:, (*3)

helper('Trezo\Core\Helper\Product');
$currentCategory = $_helper->getCurrentCategory();

echo $currentCategory->getName();
?>

getCurrentProduct

You can get the current product by using this code in the view template:, (*4)

helper('Trezo\Core\Helper\Product');
$currentProduct = $_helper->getCurrentProduct();

echo $currentProduct->getName();
?>

Store

getCurrentStore

Return the current store, (*5)

<?php
$_helper = $this->helper('Trezo\Core\Helper\Store');
$currentStore = $_helper->getCurrentStore();
?>

getLocale

Return the current locale associated with the current store., (*6)

<?php
$_helper = $this->helper('Trezo\Core\Helper\Store');
echo $_helper->getLocale();
?>

Customer

isLoggedIn

Checks if the customer is logged in, (*7)

<?php
$_helper = $this->helper('Trezo\Core\Helper\Customer');
$isLoggedIn = $_helper->isLoggedIn();
?>

getCurrentCustomer

Returns the current customer if logged in. If not logged in, it will return false., (*8)

<?php
$_helper = $this->helper('Trezo\Core\Helper\Customer');
$customer = $_helper->getCurrentCustomer();
?>

The Versions

09/05 2018

dev-master

9999999-dev

Trezo Core module, with general functionality used in Magento 2 project

  Sources   Download

OSL-3.0

The Requires

 

09/05 2018

2.2.2

2.2.2.0

Trezo Core module, with general functionality used in Magento 2 project

  Sources   Download

OSL-3.0

The Requires

 

03/10 2017

2.2.1

2.2.1.0

Trezo Core module, with general functionality used in Magento 2 project

  Sources   Download

OSL-3.0

The Requires

 

11/01 2017

2.1.1

2.1.1.0

Studio Emma Core module, with general functionality used in Magento 2 project

  Sources   Download

OSL-3.0 AFL-3.0

The Requires

  • php ~5.6.0|~7.0.0
  • magento/framework >=100.0.0
  • magento/module-catalog >=100.0.0