smoke.IO WordPress/ WooCommerce Auto Poster

in #utopian-io5 years ago (edited)

Repository

https://github.com/DunnCreativeSS/smokeIOWordPressWooCommerceAutoPoster

Sites

https://tradeitforweed.club
https://smoke.io

Bug Fixes

  • What was the issue(s)?
  1. Along the way of development for initial commit, WooCommerce .get('products') returned 1 page or 10 items
  • What was the solution?
  1. I had a look at Woo API's docs and found you have to pass params (like page=2) through the .get('products?page=2') in order to get additional products. It now receives all 27 products we have published.

27.png

New Features

  • What feature(s) did you add?
  1. Posts on Smoke.IO will be added as a WP post
  2. Posts on WP added with the tag 'smokeio' (which I used to create a posts widget that shows only this tag)
  3. Posts on WP added with a tag that has the permlink from Smoke.IO, so that the same posts aren't re-posted
  4. Products on WP will be added as a Smoke.io post
  5. Posts on Smoke.io added with a permlink of the last split('/') of the url of the WP item, as well as random string, we don't post more than once
  6. Posts on Smoke.io have images from a loop of images on WP
  7. Posts on Smoke.io have a link back to the WP item
  8. Posts on Smoke.io have an application metadata
  • How did you implement it/them?
    1, 2 and 3 newPost.png

4: smokePOst.png
5: perm.png
6: images.png
7: link.png
8: app.png

New Projects

  • What is the project about?

This project automates our existing WP site https://tradeitforweed.club and https://smoke.io. See: https://smoke.io/@tradeitforweed

  • Technology Stack
  1. Ubuntu
  2. Node
  3. Npm
  4. git clone repo
  5. npm i
  6. add these exports to your ~/.bashrc:

a. your smoke posting WIF in steemPostPw
b. your author name as author
c. your wordpass password as wpsecret
d. wookey, woosec to your WooCommerce REST Api credentials

  1. edit the code so that the wordpress site and user are correct
  • Roadmap
  1. Escrow services with Smoke
  2. Figure out legality of crypto barter for marijuana in Canada first
  • How to contribute?

Contact me here SteemIt @hodlorbust, or Smoke @tradeitforweed, or GitHub dunncreativess.

GitHub Account

https://github.com/DunnCreativeSS

Sort:  

Thanks for the contribution, @hodlorbust! Surprisingly enough as a Dutch guy I don't smoke weed, nor do I use WordPress or Woocommerce, but I can imagine this could be useful to some people who do.

Nearly the entire project was uploaded in this commit, which has 59 changed files and 12,962 additions. I am sure not every part of this commit is relevant to this contribution, so it would be better to split them up so you actually have a comprehensible commit history. Currently it's pretty difficult for me to see what you actually did, so I will just assume it's what you show in the screenshots in the post itself.

I would recommend you use let and const instead of var and that you remove the console.logs that aren't being used. Also, comments like

perm, // Permlink
title, // Title

aren't really adding anything to the readability of the code, so it's better to just leave them out in my opinion. Other than that it looks good, except maybe the naming of index1 and index2 - what are these actually?


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for your review, @amosbastian! Keep up the good work!

Hi @hodlorbust, I'm @checky ! While checking the mentions made in this post I noticed that @tradeitforweed doesn't exist on Steem. Did you mean to write @tradeitforward ?

If you found this comment useful, consider upvoting it to help keep this bot running. You can see a list of all available commands by replying with !help.

Hi @hodlorbust!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.033
BTC 63464.16
ETH 3111.33
USDT 1.00
SBD 3.98