承接 trezoteam/m2-core 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

trezoteam/m2-core

最新稳定版本:2.2.2

Composer 安装命令:

composer require trezoteam/m2-core

包简介

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

README 文档

README

General

The purpose of this module is to offer general functionality that is usefull for different Magento 2 projects.

Install in all projects and modules m2 by trezo

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:

<?php
$_helper = $this->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:

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

echo $currentProduct->getName();
?>

Store

getCurrentStore

Return the current store

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

getLocale

Return the current locale associated with the current store.

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

Customer

isLoggedIn

Checks if the customer is logged in

<?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.

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

统计信息

  • 总下载量: 16.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2017-10-03