Giter Club home page Giter Club logo

shopify's Introduction

Hey there! ๐Ÿ‘‹

This is the very, very beginning of something new. We want to assemble a crew that can work independently of the core Statamic team to build Addons and Starter Kits that serve the community. We're currently figuring out how this will all work but wanted to lock down the org name for now. ๐Ÿ˜Ž

shopify's People

Contributors

dwainscheeren avatar edalzell avatar hmalaud avatar jackabox avatar jackmcdade avatar jonkaric avatar mikemartin avatar ryanmitchell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

shopify's Issues

Inventory quantity below 0 doesn't list as out of stock

Hello!

I think I found a bug with inventory that's below 0. (I have some inventory that's negative numbers).

here's what the variant shows for this product:

product_slug: retro-tee
title: XS
inventory_quantity: -1

And Im using this loop from the docs:
{{ product_variants:generate :product="slug" show_price="true" show_out_of_stock="false" class="border" }}
(it also shows the XS size which is out of stock if I use show_out_of_stock="false" )

Screenshot of the frontend:
image

Storefront API initialization not working properly

I might be doing something wrong, but I can't get the addon (starter kit or not) to work. I'm using a Shopify development store protected by password (might come from that?) with 3 active products.

Steps to reproduce

  1. Install Starter kit, create user and publish assets as described here: https://statamic-shopify.jackwhiting.co.uk/starter-kit
  2. Publish Assets with php artisan vendor:publish --provider="Jackabox\Shopify\ServiceProvider"
  3. Create Shopify private app as described here: https://statamic-shopify.jackwhiting.co.uk/setup
  4. Fill .env file with variables as described here: https://statamic-shopify.jackwhiting.co.uk/env
  5. Update Statamic (from CP or command line)
  6. Import products in admin (working fine)
  7. Go to product page
  8. Click "add to cart"

Result

Nothing happens. On load, shopify checkout returns null as node's value.

[Feature] Allow user to set custom names for the taxonomies rather than default

Problem

Currently, when we import the products they are given tags such as type, vendor, category. These are universal terms and may conflict with other taxonomies on the site.

Solution

  • Create config options that let the user set the desired slug of the taxonomy to be matched too.

Thoughts

  • Can we create stubs for the taxonomies so we set the taxonomy slug on import rather than having to update.

Collections import doesn't import all my collections

Hey Jack!

I might have done something wrong but wanted to open this issue in case there's a chance there's a bug.

Here's what I did:

  1. I updated the Shopify addon to the latest (1.4.2)
  2. Ran php artisan shopify:import:collections in the CLI
  3. ran php artisan vendor:publish --provider="Jackabox\Shopify\ServiceProvider" in CLI
  4. Cleared the stache cache just in case

I got a gazillion changes in content/collections/products which seems expected because it created my products in that folder.
I also got a gazillion changes in content/collections/variants/...
If these content additions are expected behavior then great! I have 100 products and 312 variants so I wasn't expected them all to be replicated in collections.

When I navigate to the taxonomies > Product Collections, I see only 1:
image

However here's what I've got in the shopify admin panel:
image

NOTE: I missed this step: You'll need to publish the assets or create a new taxonomy for them in the admin panel. that's listed in the update readme, however it seems like the import created that taxonomy. ๐Ÿค” I can delete all the collections and start over if you think that would help.

Are there any other reasons why the collections import would have missed collections?

Thanks!

Versions:
Statamic: 3.1.18
Shopify addon: 1.4.2
PHP: 7.4

[Docs] Webhooks - Product Update endpoint looks incorrect?

Hey, me again!

Just setting up and testing webhooks for product creation/update and noticed the docs for product update say to use the /webhook/product/create endpoint. I checked the source routes in action.php and noticed there is an endpoint for /webhook/product/update, .

I know you only just added this feature last week so you might have just forgot to update this one?

Debugging output in ImportSingleProductJob causing error

After upgrading to 1.3. it was not possible to run imports until I removed the ray() statement that was forgotten in ImportSingleProductJob

Call to undefined function Jackabox\Shopify\Jobs\ray()
  at vendor/jackabox/statamic-shopify/src/Jobs/ImportSingleProductJob.php:46

Add in detection for if a product variant is out of stock

This will touch several areas as we'll need to ensure it can be used in a multitude of ways. These are

  • Variants Tag
  • Filter for Loop (only show in stock)
  • New tag to wrap price elements

product_variants tag:

We'll need to add a disabled element to the options and show an (Out of Stock) message.

Filter for Loop

If we can add a filter for the loop in here we'll be able to only show in-stock products. This could be useful for building out a select box/filtering options of the items.

New Tag

We need to make a new tag so we can wrap the whole form elements in, this will ensure that we can only show the add to cart if a product is in stock, or disable the button. This would be ideally up to the user and would only return true or false

FR: Import shipping costs from Shopify

I'm not sure if this is possible based on the shopify API's but I think it would be super helpful to be able to display shipping costs on the cart page.

Here's an example:
image

How to change currency?

Hi Jack,

I've just installed statamic-shopify and set up a partner shop with Shopify (for the first time).
Everything went super smoothly, I'm absolutely thrilled. One tiny problem I'm having is I can't figure out how to show the correct currency within my antlers templates. My Shop is set up to use EUR, but Statamic always shows me a pound sign and I don't really know where to dig.

I installed the plugin via composer and manually copied the required templates and scripts from the starter kit.

Thanks,
Daniel

Sync Shopify from Statamic?

Would it be possible to sync changes from Statamic's collections to update Shopify products so that user can avoid using Shopify as much as possible or is Shopify's admin completely closed?

Class Jackabox\Shopify\Http\Controllers\Api\VariantsController located in ./vendor/jackabox/statamic-shopify/src/Http/Controllers/Actions/VariantsController.php does not comply with psr-4 autoloading standard. Skipping.

When running composer require jackabox/statamic-shopify we get this error Class Jackabox\Shopify\Http\Controllers\Api\VariantsController located in ./vendor/jackabox/statamic-shopify/src/Http/Controllers/Actions/VariantsController.php does not comply with psr-4 autoloading standard. Skipping.

Which reflects to an error when trying to create a new product Error Call to undefined method Statamic\Entries\Collection::slug()

How to localize price format?

product_price always renders โ‚ฌ20.00, but I need it to be 20,00 โ‚ฌ.

If it's not possible to change the tags format, is there a way to just get the raw number into templates?

[Feature] Add webhook for when a product is saved.

Reason:

If a user has 1000s of products reimporting them all, or manually finding the one to import, will be a pain in the ass.

Required:

Integrate a webhook for when a product is saved/updated so we can catch the user product updating.

Impact:

  • No impact on other elements.

Duplicate entries for same product id

After letting my client add products in Shopify I started noticing duplicate item in the Statamic product collection with the same product_id.

Differences I noticed where:

  • published status in one case
  • image URLs with/without timestamp suffix (like in #86)
  • the markdown files were suffixed with a 1 (screenshot 1)
  • There are variants in Statamic that don't exist in Shopify (screenshot 2)

I'm using webhooks to update Statamic.

screenshot 1

screenshot 2

Clicking on Variants collection throws an error

[2021-05-12 21:57:42] local.ERROR: Call to a member function columns() on null {"userId":"cba0aed3-26f9-4ca9-a67f-8261a605d37b","exception":"[object] (Error(code: 0): Call to a member function columns() on null at /Users/erin/Sites/newtex/vendor/statamic/cms/src/Http/Controllers/CP/Collections/CollectionsController.php:68)
[stacktrace]
#0 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): Statamic\\Http\\Controllers\\CP\\Collections\\CollectionsController->show(Object(Illuminate\\Http\\Request), Object(Statamic\\Entries\\Collection))
#1 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(45): Illuminate\\Routing\\Controller->callAction('show', Array)
#2 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Routing/Route.php(254): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Statamic\\Http\\Controllers\\CP\\Collections\\CollectionsController), 'show')
#3 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Routing/Route.php(197): Illuminate\\Routing\\Route->runController()
#4 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Routing/Router.php(695): Illuminate\\Routing\\Route->run()
#5 /Users/erin/Sites/newtex/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(128): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))

CleanShot 2021-05-12 at 14 57 53@2x

Configured currency not used in Cart

Hi,

I've configured 'currency' => 'โ‚ฌ', and this works on the Products template, but the cart still shows product prices as ยฃ. Is this possibly still hard coded somewhere?

[Feature] Allow the user to pull in collections

Reasoning

Allow users to sync collections as recommended by discussion #22. This would help to build dynamic collections within Shopify and then import them.

Changes Required

  • New collection sync to import to Statamic Collections.
  • New dashboard interaction.
  • Needs to be completely optional as users may or may not want this.

Products marked as draft are imported and shown in the front-end

In Shopify, when you create a product, by default it's set to draft.

When importing all products, the draft product is imported anyways and shows up on the website, but won't do anything when you add it to your cart (as the product is not active).

Best case
Product is imported but unpublished.

Min case
Product is skipped and not imported.

CurlException when trying to fetch products

Disclaimer: I have not purchased the add-on yet as I wanted to try it out to make sure it works as expected and fits our use-case.

--

Installing went fine, everything is set up within Shopify and Statamic is running. But when I want to fetch products, I get the following error:

[2021-10-18 09:46:50] live.ERROR: 3 :  {"userId":"a25f2d67-72f5-4fd5-af3e-4f39cd3466ab","exception":"[object] (PHPShopify\\Exception\\CurlException(code: 0): 3 :  at /home/webapps/shopify-test/releases/20211018094131/vendor/phpclassic/php-shopify/lib/CurlRequest.php:200)
[stacktrace]
#0 /home/webapps/shopify-test/releases/20211018094131/vendor/phpclassic/php-shopify/lib/CurlRequest.php(95): PHPShopify\\CurlRequest::processRequest()
#1 /home/webapps/shopify-test/releases/20211018094131/vendor/phpclassic/php-shopify/lib/HttpRequestJson.php(71): PHPShopify\\CurlRequest::get()
#2 /home/webapps/shopify-test/releases/20211018094131/vendor/phpclassic/php-shopify/lib/ShopifyResource.php(343): PHPShopify\\HttpRequestJson::get()
#3 /home/webapps/shopify-test/releases/20211018094131/vendor/jackabox/statamic-shopify/src/Traits/FetchAllProducts.php(15): PHPShopify\\ShopifyResource->get()
#4 /home/webapps/shopify-test/releases/20211018094131/vendor/jackabox/statamic-shopify/src/Http/Controllers/CP/ImportProductsController.php(19): Jackabox\\Shopify\\Http\\Controllers\\CP\\ImportProductsController->fetchProducts()

Is this because the add-on is not purchased yet, or related to something else? Tried both locally and on a production server.

FR: Shopify Collections Image

IDEA

It would be super nice if when the shopify collections were imported, the string/url of the "collection image" would be included. (I did set this up in Statamic but I think its best to rely on Shopify as much as possible for the product content)

SCREENSHOT:

image

Import variant images

Hey,

thanks for your work on this plugin! Is there a way to import all variant images? I need to implement a slider which changes images to match the selected variant.

Thanks a lot!

Out of Stock status for products that are not inventory managed

Is there a way to check if stock is applicable before checking inventory of a product? I have a client that delivers made-to-order meals so inventory tracking doesn't make sense. We could just put in a large number as a workaround, but we also want to sell gift cards which don't even have the option to set an inventory in Shopify.

Import metafields as defined in Shopify

I want to expand the add-on to account for meta fields in some way.

Matching these up automatically I don't believe will work, but I'm keen to add support for this so you can extend as needed.

Some predefined types should be made, such as:

  • Text
  • Image

Then you can extend as necessary with your own classes to map the importer.

Sorting the variants dropdown alphabetically

Hello, is there a possibility to sort the variants dropdown alphabetically? Should probably be doable in parseOptions of the ProductVariants class, am I missing something here? :)

[Bug] Additional Statamic fields being removed on product sync

I added a new field called short_description to my product blueprint and added some content to a product, then updated and synced from Shopify and noticed it wiped my short_description. It also removed the updated_by and updated_at and modified the vendor and type fields from strings to arrays. See below:

Original Import:

---
product_id: 6622716625061
published_at: '2021-04-02 17:25:11'
title: 'Fill Up My Purchase Hole'
vendor: 'XX Shop'
type: Print
featured_image: Shopify/IMG_8024.jpg
gallery:
  - Shopify/IMG_8024.jpg
id: ba771be1-8f56-40a1-bdc2-d2faf65ece46
---
Giclee Gloss Print

Edit in Statamic with new field:

---
product_id: 6622716625061
published_at: '2021-04-02 17:25:00'
title: 'Fill Up My Purchase Hole'
vendor:
  - 'XX Shop'
type:
  - Print
featured_image: Shopify/IMG_8024.jpg
gallery:
  - Shopify/IMG_8024.jpg
short_description: 'House paint on canvas. 2019'
updated_by: 97dff0d7-f47e-4f45-91e8-9942d2e03096
updated_at: 1617583665
id: ba771be1-8f56-40a1-bdc2-d2faf65ece46
---
<p>Giclee Gloss Print</p>

After new sync from Shopify:

---
product_id: 6622716625061
published_at: '2021-04-02 17:25:11'
title: 'Fill Up My Purchase Hole'
vendor: 'XX Shop'
type: Print
featured_image: Shopify/IMG_8024.jpg
gallery:
  - Shopify/IMG_8024.jpg
id: ba771be1-8f56-40a1-bdc2-d2faf65ece46
---
Giclee Gloss Print

Edit: I am using version 1.2 but i'm also on Statamic 3.1.0-alpha.4

Bug: Product image URLs are getting appended with numbers

This just started at least a week ago? days ago, but basically looks the addon might have a bug that keeps adding a string of numbers to the end of product Image URLs. It happens every time I import which results in dozens of duplicate image files.

I updated to v1.5.2 but it still happens whenever I import an item. Erin in the discord said its probably a bug because it looks like a timestamp.

Diff screenshot:

image

Originally posted by @austriker27 in #85

Call to a member function handle() on null

Just a quick question if you have ever seen this error when importing products?

'blueprint' => $this->blueprint()->handle(), is the line it errors on.

exception: "Error"
file: "/Users/pixney/Development/Web/uf/vendor/statamic/cms/src/Entries/Entry.php"
line: 449
message: "Call to a member function handle() on null"

[Suggestion] Differentiate single product vs product with variants

I know Shopify handles single products as products with one variant, but there is no way to differentiate an imported product that is single vs one that has variants (ie even just one)

In our case we are displaying information from the variant in our content / description such as it's title and at the moment the only way to tell if a product is single is by the variant title being set to "Default Title" which I don't know is a great idea either? this should probably just be the product title again? or null?

Anyway my suggestion is to add something like has_variants: false to the product yaml.

Thoughts?

Debounce graphql requests

If I hammer the plus (or minus) on the quantity boxes, if fires a boat load of requests and causes the UI to have a bit of a fit. It might be a good idea to debounce these so requests aren't fired as often, it'll prbably help against Shopify's limits as well.

Importing product without an image fails.

I created a test product and had not added an image when tried to import all products. An exception was thrown:
Argument 1 passed to Jackabox\Shopify\Jobs\ImportSingleProductJob::importImages() must be of the type array, null given, called in /Users/pixney/Development/Repos/statamic/vendor/jackabox/statamic-shopify/src/Jobs/ImportSingleProductJob.php on line 79

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.