kimhf/sage-woocommerce-support 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

kimhf/sage-woocommerce-support

Composer 安装命令:

composer require kimhf/sage-woocommerce-support

包简介

Add Woocommerce blade template and controllers support for Sage 9 based themes.

README 文档

README

Add Woocommerce blade template and controllers support for Sage 9 based themes.

Installation

Run inside theme directory.

composer require kimhf/sage-woocommerce-support

Requirements

PHP 7.1 or above

Usage

Example: To override the template plugins/woocommerce/templates/single-product.php create themes/yoursagetheme/resources/views/single-product.blade.php or themes/yoursagetheme/resources/views/woocommerce/single-product.blade.php

Example: To override the partial plugins/woocommerce/templates/content-product.php create themes/yoursagetheme/resources/views/partials/content-product.blade.php or themes/yoursagetheme/resources/views/woocommerce/content-product.blade.php or themes/yoursagetheme/resources/views/content-product.blade.php

Details

The package will look for templates in the paths defined in the Sage config view.paths. It will search for both .php and .blade.php files.

Data from controllers and args from woocommerce will always be added to blade templates, even if you mix usage between php and blade templates.

With default Sage and WooCommerce config:

A template from the template hierarchy will loaded from resources/views/woocommerce or resources/views as entry template. (WC_Template_Loader will only load the empty resources/index.php in this case.)

wc_get_template() Will with default config look inside resources/views/woocommerce and resources/views. $args added by Woocommerce will take priority over controller data if there are any conflicts.

wc_get_template_part() Will with default config look inside resources/views/woocommerce, resources/views/partials and resources/views.

wc_get_template_html() Is not supported.

统计信息

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

GitHub 信息

  • Stars: 11
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固