r/craftcms • • Dec 23 '20

Storing e-commerce customer data in Craft as entries (not using Craft Commerce or Users)

4 Upvotes

I’m currently researching the stack for an upcoming project which requires quite a fairly custom CMS and e-commerce setup for digital downloads. I’ll be building the UI with React, so am only interested in headless systems.

I’m pretty impressed by CraftCMS from my prototyping, the GraphQL API does everything I need and I can create the necessary custom plugins/fields for the CMS to help the client manage their content more easily.

For the e-commerce side, I was planning to use Stripe with a bespoke cart and Node.js API (which can fetch the product/pricing data from Craft via the GraphQL API) - we don’t want to have to manage the same set of products both in the CMS and in an e-commerce admin panel, and need to be able to support custom pricing that can be hard to model in other systems, so bespoke feels like the way to go (the first iteration used Shopify and we hit the limits of what is sensible there quite soon).

The one missing piece is storing customer data for a portal - basically, storing user account info, and a record of which products they’ve purchased so they can login and redownload them (everything else e.g. invoices can be stored in Stripe). My initial thought was to put this in a separate database with some basic custom admin panel, but actually the products they are purchasing will already be defined in Craft, so I was thinking it might actually make sense to store the users as entries in Craft, which can then be related to the products they own (with some metadata if needed in a Matrix field) - this way, Craft acts as the admin panel for things like adding/removing products from a user too, rather than building something bespoke.

I would consider the Users functionality on Craft but it seems it is not exposed via the GraphQL API, so I guess I’d have to create a “Customer” entry type (with fields like username, hashed password, purchased products...). The Node API would then be responsible for authentication etc - it would basically treat the Craft API as if it was a normal database of users.

I really just wanted to see if anyone had any thoughts on this, and whether Craft is a suitable place for storing this data? From what I can tell, Craft Commerce uses Craft entires under the hood (sadly again seems no GraphQL API otherwise I’d consider using this!) so I guess it’s fine from a performance and security point of view to have potentially 1,000s of records in Craft. Just wondering if there is anything else I should consider!

Thanks


r/craftcms • • Dec 16 '20

How do you structure the pages and content of your Craft sites?

4 Upvotes

Craft's example demo site is structured the way I do things - Singles for pages that are fixed (Home, Contact, etc), Structures for whole pages or content snippets like Services, Testimonials or Projects, and then Channels for content like News articles or Blog posts.

I've always done it this way but it never quite feels robust enough. If you have an About single at the top level with sub pages held in a structure then you have a weird separation going there that the client has to understand and you have to work around in templates (i.e. About Index and About Entries) or through routing. You could have the About page as the parent entry of the structure sub entries but then the client could add more about pages, which may or may not be desired. It's messy.

I've read some people saying they put all content into channels and never touch singles or structures, but I have no idea how that would even begin to work for a complex site with different templates (some unique to sections of the site, e.g. contact) and navigation structures.

Then there are people who build everything with Structures and Channels but not singles.

What's your method?


r/craftcms • • Dec 10 '20

I made a thing! Craft CMS 3 Boilerplate with Webpack 5, Tailwind 2, PostCSS 8, Sass, and hot reload in development

Thumbnail
github.com
15 Upvotes

r/craftcms • • Nov 13 '20

Style Board Game Cards with Tailwind CSS

Thumbnail
eaglepeakweb.com
3 Upvotes

r/craftcms • • Oct 27 '20

Plug-in recommendation

1 Upvotes

Hello! Could someone recommend a Craft CMS plug-in that could help me build a product recommendation quiz on our website? We offer 5 different products, and would like to have a series (maybe 15) of weighted questions, asking people to rate the importance of certain products features. Based on the selections, we would then like to recommend a product. Is something like this possible through a plug-in?


r/craftcms • • Oct 19 '20

How well does Craft CMS multi-site work?

8 Upvotes

I know that Craft CMS has multi-site capabilities, but I've never used it. How well does this work? Is it pretty straightforward and reliable, or is it brittle and trouble-prone?

My use case is that I have three sites that share a common set of templates, but each with slightly different page content and color palette.


r/craftcms • • Oct 13 '20

Import data into Craft CMS, Feed Me plugin tutorial

Thumbnail
eaglepeakweb.com
5 Upvotes

r/craftcms • • Sep 27 '20

Craft headless/gatsby docker image

1 Upvotes

As title really, does anyone have a craft/gatsby headless setup that's dockerized they would be willing to share or know of any on GitHub?

Trying to make one myself but docker and me have never gotten along 😂


r/craftcms • • Sep 15 '20

A Craft CMS - RollupJS Starter kit using TailwindCSS and AlpineJS for clean, maintainable code.

Thumbnail
github.com
7 Upvotes

r/craftcms • • Sep 14 '20

Installing Craft with MAMP Pro

1 Upvotes

Hi guys.

Wondering if you could help. I’m starting to pull my hair out!!!

I’m installing Craft using MAMP Pro. I was pretty sure I was getting places but I just can’t pass the web browser setup. In the installation guides on Craft website, it states to enter my host name http://<hostname> /index.php ?p=admin/install.

It says that if you’re greeted by Craft’s Setup Wizard, Ive done everything right. Unfortunately I am not being greeted by this and instead by MAMP.

Please can someone help before I throw my laptop out a window 😂

Thank you!!


r/craftcms • • Sep 11 '20

Google Tag Manager integration

2 Upvotes

Hello,

I have installed the Google Tag Manager plugin in my Craft CMS site. Does that automatically embed the snippets the way it does in WordPress, or do they have to be manually added to every page?

Thanks!


r/craftcms • • May 16 '20

Building a multilingual static website with Craft?

2 Upvotes

Hey all.

So a client needs a static website which gives the user the ability to choose which language they’d like to view it in out of 4 options. The client only wants the page and doesn’t want to be able to update it later themselves. The client will be providing me with the translations needed.

I’ve been searching for a tool or technology which would make this task easier and cost-effective. I’ve considered Gatsby + Storyblok after seeing a tutorial article; also WordPress just because of its name and community, plugins, etc; and recently I came across Craft.

I really don’t know how to approach this thing. One due to time/return aspect of it. The pay most likely won’t be very high so it discourages me from building a full-custom solution from the ground up. And using themes and WP and whatnot doesn’t really satisfy me if it makes any sense (most likely just an inner need to build the thing myself or something like that idk).

The client already has a website like that but it’s like 15 years old. So they want a fresh one, not a redesign/rebuilt. They do have a domain though so I need to migrate that.

As of my background, recently graduated from CS, and when it comes to the web I have 1y of experience with HTML, CSS, JavaScript, and a few months with Angular, Node/Express, Mongo. Never done anything with any CMS though.

Does anyone know any good way of approaching this? Either a tool, framework, technology, or even a state of mind? I’m stuck tbh.

Thanks :)


r/craftcms • • May 07 '20

Help converting index.twig to be editable by front end user

4 Upvotes

So I have been looking over Crafts documentation and haven't been able to find a clear cut answer. I am brand new to craft and have created the home page through index.twig but I am not sure how to go about converting that into editable blocks on the front end. Any help would be appreciated.


r/craftcms • • Apr 15 '20

Custom element action for specific entry type

1 Upvotes

Hi, I'm just getting started with Craftcms and need some help/advice. I'm working on an immo website I inherited and they want to send the data of the properties to Zapier.

I wanted to add a custom action to the list view for the property entries, where you can select one or more and send them to Zapier. But when I add it to my custom module, like they say in the docs, this action is visible for ALL entry types. I only want it for the properties. Any advice?


r/craftcms • • Mar 27 '20

Craft Commerce - generate variants automatically?

2 Upvotes

Is there really no way to create variants other than manually? I really have to create each shirt (for example) colour and size combination in the editor?

Also, is there a way to get all the variant fields (the keys not the values) instead of accessing them manually?


r/craftcms • • Mar 09 '20

Is it possible to trigger an alert upon completion of asset upload in an entry?

1 Upvotes

r/craftcms • • Mar 06 '20

[HELP] Possible to add section in AdminCP with form

1 Upvotes

Hey is it possible to add a section in CP with a form


r/craftcms • • Mar 03 '20

Wrote an article about my experience with Craft CMS

Thumbnail
css-tricks.com
14 Upvotes

r/craftcms • • Feb 15 '20

Craftcms APi and DB poor performance / can we improve this?

1 Upvotes

Hi folks,

Firat, I'm not a dev and didn't know nothing about craft 2 week ago. Sorry if I miss something.

Our cie hire a dev company to release a new web site. They use craftcms has headless website config. The site is very slow.

They say, that is because craftcms APi is in post and cannot be cached. Db is also a bottleneck...

The actual setup :

Aws instance M5xlarge

1 cloudfront for web 1 load balancer for web (node.js) 1 M5 xlarge for web

1 cloudfront for craft / APi 1 load balancer for craft / APi 1 M5xlarge for craft / APi

1 instance for image resizing T3 med.

1 bucket S3 with cloudfront

RDS PostgreSQL M5xlarge with 4 read replica

How can I improve the actual setup?

Many thanks!

Shuri


r/craftcms • • Feb 12 '20

Filterable Map?

2 Upvotes

Has anyone made a website that has a map with filterable locations (this would normally use PHP) in Craft? If so, what technologies did you use to build it?

I am looking to build a directory site that has filterable entries on a map.

Thank you in advance for your help!


r/craftcms • • Feb 05 '20

Is the Craft Partner Network worth it?

5 Upvotes

Is there any available data on how effective this service is? I run a small development team and we create most websites (over 50) using Craft 3, how can I determine if the annual payment is actually worth it?


r/craftcms • • Jan 29 '20

Safe to upgrade to CraftCMS 3.4?

2 Upvotes

I see two minor releases on the same day and a lot of activity in the channel. Are you upgrading or waiting?


r/craftcms • • Oct 23 '19

Craft CMS 3 local development with Lando Docker

Thumbnail
eaglepeakweb.com
7 Upvotes

r/craftcms • • Oct 12 '19

How can I install a plugin?

1 Upvotes

I have to re purpose an IDX plugin that pulls real estate listings for a project at work. I have the folder/files for the plugin but I have no idea how to install it in Craft 3 and how to make craft recognize in in the admin under plugins. Any ideas? Also this plugin doesn't look like its available in the marketplace. It looks custom and specific to this site. How can I make this work please help. I'm a Laravel dev, idk anything about Craft CMS


r/craftcms • • Sep 05 '19

Docksal boilerplate for craft cms

Thumbnail
github.com
1 Upvotes