Wednesday, 18 March 2020

Installing Stripe for magento 2

On this occasion and in some future posts for brevity I will cut the extraneous text and just list the sequence of commands I had to follow / steps taken. I find when following other peoples' guides I get frustrated when the extra "fluff" distracts me from the few commands I need to enter. Explanations will be given where needed, but no fluff.


1. Download the plugin from https://stripe.com/docs/plugins/magento/install#download
I downloaded the composer version

2. Place the file in the same directory as your composer.json. Typically this is the root magento folder. Copy it by FTP or whatever.

3. SSH into the machine or if a dev instance using docker then docker exec -it <magento2dev> bin/bash to get to the console (I test using docker - I will document this later also, highly recommended).

4. Switch to the folder you put the file in and tar -xvf stripe-magento2-x.x.x.tgz

5. composer require stripe/stripe-php:^6


  • 6. php bin/magento setup:upgrade
  • php bin/magento cache:flush
  • php bin/magento cache:clean
7
  • php bin/magento setup:di:compile 
  • php bin/magento setup:static-content:deploy
  • php bin/magento setup:static-content:deploy


Then go to the backend and configure it from stores->configuration.

Starting and stopping magento batch duties.

As we are learning about magento 2, we are becoming increasingly aware that many of the tasks that worked fine on magento 1 don't always seem to want to work on magento 2. Exporting CSV files, bulk editing items, it simply doesn't work, with messages telling you these actions are queued on various lists. Even if you have cron configured correctly it still doesn't work.

Well, this is a note to remember how to start services, I will add as I discover new issues and the corresponding services.

1. Export CSV doesn't start.


2. Bulk edit attributes product grid, doesn't start processing.

You need to start: bin/magento queue:consumer:start product_action_attribute.update