unopim/shopify-connector 问题修复 & 功能扩展

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

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

unopim/shopify-connector

最新稳定版本:v1.4.0

Composer 安装命令:

composer require unopim/shopify-connector

包简介

A Shopify integration package for Unopim, enabling seamless product data synchronization between Unopim and Shopify.

README 文档

README

Effortlessly integrate your Shopify store with UnoPim for seamless product data management and synchronization. You can currently export catalogs, including categories and both simple and variant products, from UnoPim to Shopify.

Requiremenets:

  • Unopim: v2.0.0

✨ Features

  • Sync Multiple Stores
    This feature exports products from UnoPim to Shopify and allows syncing multiple Shopify stores.

    Sync Multiple Stores Interface

  • Export Attribute Mapping
    With this module, you can map attributes to export the attribute from UnoPim to Shopify.

    Export Attribute Mapping Interface

  • Locale Mapping
    This feature allows you to map all UnoPim published locale to corresponding Shopify locale.

    Locale Mapping Interface

  • Metafields Mapping
    You can map Meta fields like strings, integers, and JSON strings to easily export product details from UnoPim to Shopify.

    Metafields Mapping Interface

  • Tags, MetaFields, and Other Settings
    This module provides additional settings for exporting products data from UnoPim to Shopify.

    Tags, MetaFields, and Other Settings Interface

  • Filter Data From Export
    Channel, Currency, and Product (SKU) are among the data that may be filtered with this module.

    Filter Data From Export Interface

  • Export Product
    This module allows you to export products from UnoPim to Shopify along with associated data, such as an attribute, image, and all.

    Export Product Interface

  • Export Category
    This module allows you to export the category to Shopify from Unopim.

    Export Category Interface

Installation with composer

  • Run the following command
composer require unopim/shopify-connector
  • Run the command to execute migrations and clear the cache.
php artisan shopify-package:install;
php artisan optimize:clear;

Enable Queue Operations

  • Start the queue to execute actions, such as job operations, by running the following command:
    php artisan queue:work
  • If the queue:work command is configured to run via a process manager like Supervisor, restart the Supervisor (or related) service after module installation to apply changes:
    sudo service supervisor restart

This ensures that the latest updates to the module are reflected in all background tasks.

Running Test Cases with composer

  1. Register Test Directory
    In the composer.json file, register the test directory under the autoload-dev psr-4 section:

    "Webkul\\Shopify\\Tests\\": "vendor/unopim/shopify-connector/tests/"
  2. Configure TestCase
    Open the tests/Pest.php file and add this line:

    uses(Webkul\Shopify\Tests\ShopifyTestCase::class)->in('../vendor/unopim/shopify-connector/tests');
  3. Dump Composer Autoload for Tests

    composer dump-autoload
  4. Run Tests
    To run tests for the Shopify package, use the following command:

    ./vendor/bin/pest ./vendor/unopim/shopify-connector/tests

Installation without composer

Download and unzip the respective extension zip. Rename the folder to Shopify and move into the packages/Webkul directory of the project's root directory.

  1. Regsiter the package provider Add the following to bootstrap/providers.php at the top, add the use statement

       use Webkul\Shopify\Providers\ShopifyServiceProvider;

    In the return array, in the Webkul package service providers section, add:

       ShopifyServiceProvider::class,
  2. In the composer.json file register the test directory under the autoload psr-4 section

    "Webkul\\Shopify\\": "packages/Webkul/Shopify/src"
  3. Run below given commands

    composer dump-autoload
    php artisan shopify-package:install
    php artisan optimize:clear

Enable Queue Operations

  • Start the queue to execute actions, such as job operations, by running the following command:
    php artisan queue:work
  • If the queue:work command is configured to run via a process manager like Supervisor, restart the Supervisor (or related) service after module installation to apply changes:
    sudo service supervisor restart

This ensures that the latest updates to the module are reflected in all background tasks.

Running test cases

  1. Register Test Directory Register test directory in composer.json under the autoload-dev psr-4 section

    "Webkul\\Shopify\\Tests\\": "packages/Webkul/Shopify/tests"
  2. Configure TestCase

    • Configure the testcase in tests/Pest.php. Add the following line:
    uses(Webkul\Shopify\Tests\ShopifyTestCase::class)->in('../packages/Webkul/Shopify/tests');
  3. Dump Composer Autoload for Tests

    • Dump composer autolaod for tests directory
    composer dump-autoload;
  4. Run Tests

    • Run tests for only this package with the below command
    ./vendor/bin/pest ./packages/Webkul/Shopify/tests/Feature

🚀 Upgrade Guide

Follow the steps below to upgrade the Shopify module to the latest version:

1. Update Module Files

Replace the existing Shopify module with the latest version:

2. Run Database Migration

Execute the following command to update your database:

php artisan migrate

This step is mandatory to apply new database changes (e.g., added columns like clientId, clientSecret).

3. Clear Cache (Recommended)

php artisan optimize:clear

⚠️ Important Notes

  • Skipping migration may result in errors like: SQLSTATE[42S22]: Column not found: Unknown column 'clientId'
  • Always take a database backup before upgrading.

统计信息

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

GitHub 信息

  • Stars: 17
  • Watchers: 2
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固