elgentos/magento2-convert 问题修复 & 功能扩展

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

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

elgentos/magento2-convert

Composer 安装命令:

composer require elgentos/magento2-convert

包简介

Elgentos_Convert for Magento 2

README 文档

README

Dan you optimize this documentation

Elgentos Convert

This is a module to connect Magento 2 to Convert.

Installation

Composer

To install this module you run:

composer require elgentos/magento2-convert
bin/magento setup:di:compile
bin/magento setup:upgrade

Configuration

When the module is required in composer and installed through the setup we need to configure the store config settings.

Navigate:

  • Go to the Magento Backend
  • Press Stores
  • Press Settings -> Configuration
  • Press Extensions (Depending on Magento version) -> Elgentos -> Convert

Now you are in the settings for the module. Here you have 2 options:

  • Enabled (Yes / No) - This determines if the functionality is active.
  • Convert JS URL (URL obtained from Convert) - This is the URL used to load the Javascript from Convert

Page Types

To set the _conv_page_type value you can use our prepared block convert.page-type. This is a example where we set the page type as Foo Bar.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="convert.page-type">
            <arguments>
                <argument name="_conv_page_type" xsi:type="string">Foo Bar</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

By using this layout in the correct handles you can configure the which page type is used in wich location.

Events

By Javascript

If you want to push a event to conv we have a function prepared that you can use:

convQPush(12345);

This is usable over the entire page and is loaded wherever you have the script loaded. If the module is not enabled in the store config this function will not brake your application. It will create a fake function in order that the application does not brake.

By XML

This triggers a event to convert when the page is loaded. You can create a layout file on any handle you want.

This is a example to trigger a event when the user opens the cart in the layout file checkout_cart_index.xml:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="head.additional">
            <block
                    name="convert.event.view_cart"
                    template="Elgentos_Convert::event.phtml"
                    ifconfig="elgentos_convert/general/enabled"
            >
                <arguments>
                    <argument name="event_id" xsi:type="number">12345</argument>
                </arguments>
            </block>
        </referenceContainer>
    </body>
</page>

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-10-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固