Skip to content

0.9.121

Compare
Choose a tag to compare
@donrestarone donrestarone released this 25 Aug 21:36
· 7 commits to master since this release
865914b

What's Changed

Living Doc: #1562

Currency

Printify has two currency settings;

  • catalog currency: This is the currency in which we can view different product prices in Printify's catalog.
  • billing currency : This is the currency in which the shop owner will be charged by Printify.

We can find further details about it over Printify webpage. LINK 1, LINK 2

The Printify's products API does not provide any details regarding the currency being used. It only returns the price in figures. Screenshot 2023-05-26 at 4 54 58 PM

So, to overcome this barrier, we would have to manually set the currency, which is being used or has been setup in Printify platform, in Violet-Rails end. It will be saved under a shop api-resource's properties as below; TEST-NET LINK

Screenshot 2023-05-26 at 5 12 42 PM

This currency information will be used to show the prices in products-listing, product-detail, cart and Stripe's checkout page.

Note: For now, we are using USD currency over the test-net.

HOW TO RUN PRINTIFY PLUGIN INSTALER SCRIPT

#1557

Export variables

  • cd to violet_rails root

Required Variables

  • export SHOP_NAME="Restarone"
  • export PRINTIFY_API_KEY="your api key"

Optional Variables

  • export STRIPE_SECRET_KEY="your stripe secret key"
  • export PRODUCTS_PAGE_SLUG="your products page url"
  • export BUSINESS_NAME="your business name in printify account"

Run Installer

In development

  • docker-compose run --rm -e SHOP_NAME -e PRINTIFY_API_KEY -e STRIPE_SECRET_KEY -e PRODUCTS_PAGE_SLUG -e BUSINESS_NAME solutions_app rails r ./plugins/installers/printify_stripe_e_commerce.rb

In production

  • rails r ./plugins/installers/printify_stripe_e_commerce.rb

In test server with dokku

  • dokku run -e SHOP_NAME -e PRINTIFY_API_KEY -e STRIPE_SECRET_KEY -e PRODUCTS_PAGE_SLUG -e BUSINESS_NAME <APP_NAME> rails r ./plugins/installers/printify_stripe_e_commerce.rb

Variables

SHOP_NAME:

Name of the printify shop you want to sync to violet rails.

Screenshot 2023-05-30 at 5 30 19 PM

PRINTIFY_API_KEY:

Screen.Recording.2023-05-23.at.10.49.13.PM.mov

STRIPE_SECRET_KEY:

Screen.Recording.2023-05-30.at.5.41.53.PM.mov

BUSINESS_NAME:

Business name in your printify account.

Screen.Recording.2023-05-30.at.5.45.03.PM.mov

PRODUCTS_PAGE_SLUG:

The url you want for your products list page. Default is 'products'

Screen.Recording.2023-05-30.at.5.46.52.PM.mov

STORE MANAGEMENT

How to hide product from the store:

Screenshot 2023-06-04 at 9 12 04 AM
Screen.Recording.2023-06-04.at.9.09.05.AM.mov

How to change who pays processing fees (Pass On to customer or Absorb Fees)

If pass_processing_fees_to_customer is set to true, the Convenience fee, ie. the stripe processing fee (2.9% + $0.30) and stripe tax collection charge (0.5% if sales tax enabled) will be passed to customers

Screenshot 2023-06-04 at 9 33 51 AM Screenshot 2023-06-04 at 9 34 32 AM

Screen.Recording.2023-06-04.at.9.26.33.AM.mov

DEBUGGING

If any feature is not working, please check shop_logs namespace. We store error logs there.

Stuck in publishing state?

  • Run sync_printify_products plugin
Screen.Recording.2023-06-05.at.6.59.29.AM.mov

How to check if Printify webhooks are created?

  • On rails console
PRINTIFY_API_KEY="your api key"
PRINTIFY_HEADERS = {                                             
  "Content-Type" => 'application/json;charset=utf-8',
  "Authorization" => "Bearer #{PRINTIFY_API_KEY}" 
}

shop_id = ApiNamespace.friendly.find('shops').api_resources.first.properties['printify_shop_id']

response = HTTParty.get("https://api.printify.com/v1/shops/#{shop_id}/webhooks.json", headers: PRINTIFY_HEADERS)

JSON.parse(response.body)

Full Changelog: 0.9.120...0.9.121