Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
kedo
Nov 27, 2007

ddiddles posted:

WooCommerce is a pretty great eCommerce plugin for WP, as far as WP plugins go.

This is the right answer.


This is also the right answer (use it with WooCommerce).

Adbot
ADBOT LOVES YOU

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Beat. posted:

can you all recommend an e-commerce package to use with wordpress (or any other cPanel type addon content manager)
something simple to sell/update 10-20 products a year ; nothing that, say, an enterprise would need - ideally something I can setup to interface with a bank checking account simply that doesnt charge tons of fees - square or a square alternative?

Yeah as you can see there's 2 answers. One is the actual shopping cart/online store software itself, for which I'd recommend Woo for what you're saying. If you want to do anything fancy with Woo it's a PITA, but for simple stuff it's pretty straightforward and free as chips.

The second is the payment processor, the guy who takes the payment info, approves it, and puts the money in your account. PayPal is very straightforward, but has some problematic policies. Stripe is okay, but a flat rate card processor is usually going to be more on average than a "real" per transaction processor (unless your customers use exclusively Amex and Diner's Club). Both PayPal and Stripe have free plugins that can go into Woocommerce to handle payment processing.

darthbob88
Oct 13, 2011

YOSPOS
Is there a way to put focus on an area? I have a menu on the left side of the page which toggles content in a div on the right; you click menu item Foo, we show a writeup on Foo, you click Bar, we tell you why Bar is great, that kind of thing. Works pretty well so far. The problem is, if you're navigating by keyboard, you tab over to menu item Foo, hit Enter, and the next item that gets tab-focus is menu item Bar, not the writeup you wanted to look at. Check this Codepen to see what I mean.

I'm tempted to solve this by putting tabindex="1" on the writeup to preempt the other menu items, but a) I'm given to understand that setting tabindex > 0 is frowned upon, and b) I don't really want focus on the div itself, I want it on the first link or other focusable content in that div. I could also add tabindex=1 to that first link or whatever, but I don't have any real control over the content I show, it just gets pulled from an API and vomited on the page. I suppose I could add something to showDiv to set tabIndex=-1 on any menu items after the one that got clicked, but I do still want those items to be selectable, I just don't want them to be the next items to get focus. Apparently this is a major problem for accessibility, so I need to do something about it, I'm just not sure what.

Clark Nova
Jul 18, 2004

use the focus event (onfocus() if you're inlining it) instead of the click event/onclick.

ModeSix
Mar 14, 2009

I'm starting work on a new personal/demo project and am looking for some suggestions.

I am planning on using React and some google cloud functions.

The scope of the project is as follows:
* I am going to build a site that users can rate items in a collection. There will be approximately 1000'ish items that are able to be rated.
* The items in the list may need to be updated from an external API occasionally, every month or two.
* I'd like to be able to scrape the data from the API and store it in my own database (Firebase in this case).
* The app will likely be an SPA with several different views, this may grow in scope later, but for now I am picturing only 4 different views. List of all items, details of an individual item, registration/login, account view (email view and password change only)

So here are my questions for tech:
1) For something of this scope, would it be beneficial to use Redux to handle the data side of things or would it be overkill?
--1a) I don't want page reloads when users are sorting or filtering, so this may negate point 3, I'm not totally sure.
2) Is it possible to scrape the API using React, or do I need to do this through the nodejs/GCF side of things?
3) Would using GraphQL be overkill for the database calls? There may be a fair amount of filtering of data possible, which could include various different data views. (Yes I am a masochist and am going to try to set up a GraphQL server on Google Cloud Functions [it's possible]).


This will be my first real test of my React knowledge/abilities so input is appreciated.

ModeSix fucked around with this message at 02:39 on Aug 10, 2017

my bony fealty
Oct 1, 2008

Beat. posted:

can you all recommend an e-commerce package to use with wordpress (or any other cPanel type addon content manager)
something simple to sell/update 10-20 products a year ; nothing that, say, an enterprise would need - ideally something I can setup to interface with a bank checking account simply that doesnt charge tons of fees - square or a square alternative?

One of my client sites is a WooCommerce setup with Square which works pretty great for the most part and best of all integrates with their physical POS so all their money is in one place; the Square extension is like $79/year. Only downside is that there's no test/sandbox mode, but I've had no trouble testing with real money and refunding from Square as necessary. If you want to use Square with WordPress then WooCommerce is AFAIK the only option.

Another of my WordPress client sites uses a Gravity Forms + Stripe setup and it also works great, I actually prefer this to WooCommerce as it gives you a lot more flexibility without buying any addons other than the Stripe extension (though you do have to have the GF license of course). I originally had this using Ninja Forms + Stripe which worked ok but not as good as Gravity Forms, but NF is free so there's that.

So seconding everyone else in that WooCommerce or Stripe is the way to go.

my bony fealty fucked around with this message at 03:19 on Aug 10, 2017

darthbob88
Oct 13, 2011

YOSPOS

Clark Nova posted:

use the focus event (onfocus() if you're inlining it) instead of the click event/onclick.
I'm pretty sure that's solving the wrong problem. If I do that, then navigation would go like "Tab to menu item Foo- Open writeup Foo, Tab to menu item Bar- Open writeup Bar, Tab to menu item Baz- Open writeup Baz", and at no point would I be able to navigate by tab to the content of writeup Foo, which is what I want to do.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

ModeSix posted:

I'm starting work on a new personal/demo project and am looking for some suggestions.

I am planning on using React and some google cloud functions.

The scope of the project is as follows:
* I am going to build a site that users can rate items in a collection. There will be approximately 1000'ish items that are able to be rated.
* The items in the list may need to be updated from an external API occasionally, every month or two.
* I'd like to be able to scrape the data from the API and store it in my own database (Firebase in this case).
* The app will likely be an SPA with several different views, this may grow in scope later, but for now I am picturing only 4 different views. List of all items, details of an individual item, registration/login, account view (email view and password change only)

So here are my questions for tech:
1) For something of this scope, would it be beneficial to use Redux to handle the data side of things or would it be overkill?
--1a) I don't want page reloads when users are sorting or filtering, so this may negate point 3, I'm not totally sure.
2) Is it possible to scrape the API using React, or do I need to do this through the nodejs/GCF side of things?
3) Would using GraphQL be overkill for the database calls? There may be a fair amount of filtering of data possible, which could include various different data views. (Yes I am a masochist and am going to try to set up a GraphQL server on Google Cloud Functions [it's possible]).


This will be my first real test of my React knowledge/abilities so input is appreciated.

1) since its a learning project, use Redux!
1a) there won't be.
2) no. React is a view layer. That said, you can fetch data on the client with Javascript assuming the API allows it.
3) Since you are using Firebase, you really don't need GraphQL. Your filtering will all happen on the client side, do you make one call (or Firebase read) for the whole list, keep filter settings in your store, and use selectors to make cached subsets on the client. Unless I'm grossly misunderstanding your app, with only 1000 items, the client does all the work quite easily.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



awesomeolion posted:

Looking for a recommendation for wiki hosting. Here's some info:
  • Needs to have API access / able to do stuff like import and export data or make mass edits
  • Doesn't have to be free but cheap is good
  • Not tied to some wiki hosting service that has ads or may disappear a year from now
  • Needs to support UTF8 (any language)
I have web hosting but the cost for upgrading my plan to support Wiki stuff would 2 or 3x my bill there which seems not great. Thanks!

IDK what your bill is now but I know the cheapo shared hosting I pay ~$10/mo for from Dreamhost has a feature that'll install MediaWiki for me, if I wanted it. Lots of people hate Dreamhost, though, so :shrug:

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

IDK what your bill is now but I know the cheapo shared hosting I pay ~$10/mo for from Dreamhost has a feature that'll install MediaWiki for me, if I wanted it. Lots of people hate Dreamhost, though, so :shrug:

If "good enough" is good enough, Dreamhost is great!

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Munkeymon posted:

IDK what your bill is now but I know the cheapo shared hosting I pay ~$10/mo for from Dreamhost has a feature that'll install MediaWiki for me, if I wanted it. Lots of people hate Dreamhost, though, so :shrug:

Alright, maybe I'll just do the upgrade then. That's the cost that my hosting would increase to.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Lumpy posted:

If "good enough" is good enough, Dreamhost is great!

I mean, it does what I ask of it just fine but maybe I'm not asking much

awesomeolion posted:

Alright, maybe I'll just do the upgrade then. That's the cost that my hosting would increase to.

Then again, I didn't realize you could get hosting for $3-4/mo :stare:

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Munkeymon posted:

Then again, I didn't realize you could get hosting for $3-4/mo :stare:

Yeah used to be $4/mo if you bought a year and now it's $8.5/mo for the plan that supports shell access. Shout out to Goon run hostineer.com (formerly Apis)!

ModeSix
Mar 14, 2009

awesomeolion posted:

Yeah used to be $4/mo if you bought a year and now it's $8.5/mo for the plan that supports shell access. Shout out to Goon run hostineer.com (formerly Apis)!

If you have any sort of experience managing your own server you could also use DigitalOcean. You can get a VPS there for $5/month that should be ok unless you have thousands of visits per hour.

Referral Link: https://m.do.co/c/68ee5647567d -> you get $10 free credit and I get $25 after you spend $25.

Non-referral link: https://digitalocean.com/ -> you get nothing I get nothing.

ModeSix fucked around with this message at 19:11 on Aug 10, 2017

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Yeah, DigitalOcean is cool and good. I like that it has a deployment API.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Munkeymon posted:

I mean, it does what I ask of it just fine but maybe I'm not asking much

I was agreeing with you. I have an account with them, and while I wouldn't host "mission critical " stuff on there, it's great for all my goofy personal projects. Plus, the email hosting is worth the price by itself.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Lumpy posted:

I was agreeing with you. I have an account with them, and while I wouldn't host "mission critical " stuff on there, it's great for all my goofy personal projects. Plus, the email hosting is worth the price by itself.

I wasn't trying to disagree :v:

I stopped using their email hosting and pointed it at Google because I wasn't sure SquirrelMail was a very safe web UI. Love that they give me shell access - feels like when I had access to shared Unix servers in college.

MrMoo
Sep 14, 2000

Totally appropriate that the CSS 4 spec is broken by CSS today:

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

ModeSix posted:

If you have any sort of experience managing your own server you could also use DigitalOcean. You can get a VPS there for $5/month that should be ok unless you have thousands of visits per hour.

Referral Link: https://m.do.co/c/68ee5647567d -> you get $10 free credit and I get $25 after you spend $25.

Non-referral link: https://digitalocean.com/ -> you get nothing I get nothing.

drat! I have used Digital Ocean for some client stuff in the past. Will keep in mind thanks :)

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice
We are doing some machines learning stuff and the person doing it collected ~250G of images for us. We want him to put them somewhere so we can use them at a later date to train other models, etc. What is a good and sane way of having somebody get you that much data reasonably quickly and relatively cheaply? S3? Paying for more Google Drive space and giving him a folder link?? :v:

The Fool
Oct 16, 2003


Fedex an external HD?

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me
You can get thumb drives that size now, why not use that?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Skandranon posted:

You can get thumb drives that size now, why not use that?

Aren't they slow as poo poo?

The Fool
Oct 16, 2003


fletcher posted:

Aren't they slow as poo poo?

Faster than going up and down from google drive or some poo poo

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

fletcher posted:

Aren't they slow as poo poo?

I mean, if you really care about that, you can splurge on a portable SSD https://www.newegg.ca/Product/Product.aspx?Item=9SIA9ZP5VH9765

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
I have a pretty weird issue. I'm trying find a regex that I can use in a js replace() that will replace all digits in a string, but not the digits that have letters next to them.

So if I had

123 3rd st

it would output

3rd st

And keep the 3. Any ideas?

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Grump posted:

I have a pretty weird issue. I'm trying find a regex that I can use in a js replace() that will replace all digits in a string, but not the digits that have letters next to them.

So if I had

123 3rd st

it would output

3rd st

And keep the 3. Any ideas?

As a poo poo tier programmer I just do things in a few steps/the naive way. That being said, find the substrings with numbers you want to save with something like ([0-9])[a-z]\w+, delete all the remaining numbers, then put em back together and voila.

Question for y'all. My aunt is a writer and wants to make a site that involves people being able to make accounts and make text posts. I advised just keeping thing simple with a static blog (tumblr, medium, squarespace, whatever) and soliciting stories via email or a form which she can curate. However, I was thinking about what would be the best solution if she did want to go ahead and make a fully fledged site people could post on that should could admin. What would you suggest in that case?

my bony fealty
Oct 1, 2008

awesomeolion posted:

Question for y'all. My aunt is a writer and wants to make a site that involves people being able to make accounts and make text posts. I advised just keeping thing simple with a static blog (tumblr, medium, squarespace, whatever) and soliciting stories via email or a form which she can curate. However, I was thinking about what would be the best solution if she did want to go ahead and make a fully fledged site people could post on that should could admin. What would you suggest in that case?

Wordpress prolly

The Fool
Oct 16, 2003


Ghost is thing, but I know nothing about it apart from that it exists.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

my bony fealty posted:

Wordpress prolly

Yeah, Wordpress with some kind of membership plugin would be my gut feel. That way the authors could have profiles, pictures, links to their sites, bios, etc.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

Alright cool. Most of my experience is with Wordpress so that's good to hear. Cheers!

kedo
Nov 27, 2007

awesomeolion posted:

Alright cool. Most of my experience is with Wordpress so that's good to hear. Cheers!

Yeah, she could do out-of-the-box WordPress and set up her contributors with "contributor" level accounts (which can add posts but do little else). She might not even need to customize the look and feel of it all that much, depending on what she's going for and how much WP branding she's comfortable with people seeing.

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

awesomeolion posted:

Alright cool. Most of my experience is with Wordpress so that's good to hear. Cheers!

Wait did I say Wordpress I meant React/Redux and Node.js on a mongodb backend.

awesomeolion
Nov 5, 2007

"Hi, I'm awesomeolion."

kedo posted:

Yeah, she could do out-of-the-box WordPress and set up her contributors with "contributor" level accounts (which can add posts but do little else). She might not even need to customize the look and feel of it all that much, depending on what she's going for and how much WP branding she's comfortable with people seeing.

Awesome, thanks!

Scaramouche posted:

Wait did I say Wordpress I meant React/Redux and Node.js on a mongodb backend.

I think you're joking but I legit know people like this.

huhu
Feb 24, 2006
I think I finally, hopefully at least partially, understand what a REST framework is... please let me know if I'm correct. The front end would be something like Angular or React. The backend, since I work in Python, would be Flask or Django. The front end is a single web app that grabs all the data it needs via JSON and Ajax. Flask, on the back end, would be responsible for taking the Ajax requests, grabbing data from the DB, turning that into JSON, and sending it back to the front end. This would be achieved with urls like "/recentPosts/10" or "/recentPosts/50" or "/topPosts/10".

Edit: Is REST the foundation for how APIs like Twitter and Instagram work?

huhu fucked around with this message at 20:44 on Aug 17, 2017

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

huhu posted:

I think I finally, hopefully at least partially, understand what a REST framework is... please let me know if I'm correct. The front end would be something like Angular or React. The backend, since I work in Python, would be Flask or Django. The front end is a single web app that grabs all the data it needs via JSON and Ajax. Flask, on the back end, would be responsible for taking the Ajax requests, grabbing data from the DB, turning that into JSON, and sending it back to the front end. This would be achieved with urls like "/recentPosts/10" or "/recentPosts/50" or "/topPosts/10".

Edit: Is REST the foundation for how APIs like Twitter and Instagram work?

Yes and no. You are more referring to making async calls to an external API via JavaScript, and having your page respond. Yes this is how Twitter works. No, it's not necessarily REST. REST stands for Representation State Transfer, and talks mostly about a how you would organize your URLs and the data that they would return. Most APIs do not strictly adhere to this standard. Some people think this is a big deal, others do not.

Rubellavator
Aug 16, 2007

^^ that's a better explanation

That's the basic idea of it. Rest has some additional concerns about what http verbs to use and how to structure your apis resource urls and that your backend be stateless. None of these concerns are really enforced in the backend frameworks I've used, so you don't need to strictly adhere to rest to get the benefits of the service architecture.

Rubellavator fucked around with this message at 20:47 on Aug 17, 2017

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

huhu posted:

I think I finally, hopefully at least partially, understand what a REST framework is... please let me know if I'm correct. The front end would be something like Angular or React. The backend, since I work in Python, would be Flask or Django. The front end is a single web app that grabs all the data it needs via JSON and Ajax. Flask, on the back end, would be responsible for taking the Ajax requests, grabbing data from the DB, turning that into JSON, and sending it back to the front end. This would be achieved with urls like "/recentPosts/10" or "/recentPosts/50" or "/topPosts/10".

Edit: Is REST the foundation for how APIs like Twitter and Instagram work?

You've got the basic idea of how modern web apps work down, but just to clarify and expand on what has already been said:

You're describing a web API that is not necessarily REST. REST is a description of a sane way of interacting between a client and a server.

Also, REST doesn't describe the format of the returned data, you could (and its not uncommon too) return HTML instead of JSON.

Also also, most of what we web developers do isn't strictly REST, it's REST-ish, because it's usually easier to not implement everything exactly in the most hypothetically ideal way.

edit: Oh, I forgot to explain the main idea of REST. REST describes how urls are nouns and the HTTP methods GET, POST, etc are verbs. URLS are machine-readable descriptions to things, to concepts, and HTTP methods are actions we can apply to those things.

Thermopyle fucked around with this message at 22:12 on Aug 17, 2017

Scaramouche
Mar 26, 2001

SPACE FACE! SPACE FACE!

Yeah REST as a buzzword was really (in my opinion) to try and enforce some kind of standard on the rapidly proliferating API world instead of being some magic new technology. I implemented quite a few API s before realizing REST was even a thing, just thinking "oh hey this just like the other one, handy". Speaking as someone coming from originally big iron and EDI though, it's a welcome, if sometimes overwrought in its own purity, idea.

Adbot
ADBOT LOVES YOU

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
I have a <a></a> that by default is unclickable

code:

.element{
   pointer-events:none;
}

and then I want to later make it clickable

code:

  $('.element').css("pointer-events", "unset");

This doesn't work in IE. It stays unclickable. Is there a better way to do this?

teen phone cutie fucked around with this message at 15:46 on Aug 18, 2017

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply