Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Missing important pages #958

Closed
kevinp1 opened this issue Apr 26, 2021 · 9 comments · Fixed by #988
Closed

Missing important pages #958

kevinp1 opened this issue Apr 26, 2021 · 9 comments · Fixed by #988
Assignees

Comments

@kevinp1
Copy link

kevinp1 commented Apr 26, 2021

Sales of goods require various policies to be available. Individually, these include but are not limited to:

  • Privacy Policy
  • T & C's
  • Conditions of sale
  • Returns policy

I suggest adding a new 'Policies' option to the Settings menu.

For each policy, shop owners should have the option to either, link to one or more of their existing policies using https URL's or, add new policies as editable text to be stored similar to About page content.

Links to policies could then be accessed in the footer of themes.

An option can also be added in the Settings > Checkout settings to toggle On or Off an 'I agree to terms and conditions'

@phyninja phyninja self-assigned this Apr 27, 2021
@phyninja
Copy link
Contributor

phyninja commented Apr 28, 2021

Hi @kevinp1 (cc @franckc),

Because this idea of Dshop not supporting "mandatory" policy-related pages also being brought up elsewhere, I chose to take a second look at it. Given my familiarity with the 'CKEditor' module (the editor used by Shop Admins to edit their stores' About pages) however, I decided to pursue an alternative path towards a possible resolution here.

The CKEditor module may allow us to expose a 'Source' button on the toolbar, allowing Shop Admins to edit the HTML Source Code of their shops' About pages. In the GIF below, I illustrate how one might leverage this feature to solve the main issue:
Mandatory pages

I'm checking in to establish consensus on one of the above ideas, because there are technical decisions to be made if this route is chosen. For example, security-minded folks may have concerns about Shop Admins embedding potentially-unsafe Javascript content in the About section of shops.

@phyninja
Copy link
Contributor

Hi @kevinp1,

The editor found under Settings > Appearence already allows shop admins ("owners") to link to external webpages as shown in the screenshots below:
1
2

Does this suffice to meet the requirement of having "various policies [...] available"?

@kevinp1
Copy link
Author

kevinp1 commented May 11, 2021

Hi @phyninja

The option to use Settings > Appearance on the About page could be used by shop admins temporarily but I do not believe it is a fix for the problem because of:

a) Experienced (and new) Retailers looking to use or migrate to DShop expect to be able to add links to, or the content of specific "mandatory" policy-related pages, and for those pages to appear in the footer of their websites.

b) Buyers expect to see links to "mandatory" policy-related pages in the footer and where none are immediately visible, trust is lost which leads to reduced or zero sales.

c) Convention holds that the About page is where shop admins can detail content about them, their business/brand and concepts such as goals and ambitions. From the legal perspective I believe that "mandatory" policy-related pages need to be clearly defined and it could be argued that combining 'About' content with 'Legal' content may invalidate the legal consent in some jurisdictions.

d) Having links to "mandatory" policy-related pages that are contained within the About page does not allow for an option to be added to the Settings > Checkout settings to toggle On or Off a clearly defined and specific 'I have read and agree to terms and conditions'

That said, if there were a CKEditor box called for example 'Legal Pages' and the title 'Legal Pages' could be added to the footer independently, then a shop admin could add links to their required "mandatory" policy-related pages (or the content) and a check-box option for confirming the buyer has read and agrees to the terms contained, could be added to Settings > Checkout at a later date.

As a follow up to your thoughts about exposing the source button in CKEditor to allow advanced users to create on-page links to in page anchored content, my understanding is that the project is following the security and privacy first approach. While I would like to see greater ability to 'customise' my content, I am concerned that allowing this would be unsafe. Certainly my experience with end-users tells me that having that capability is not the simple approach many need.

(As a side note: testing the option to add links/content to Settings > Appearance > About your store, none of the changes made actually appear on the About page when using the Minimal theme (or others) when published.)

@phyninja
Copy link
Contributor

phyninja commented Jun 2, 2021

Hi @kevinp1,

The engineering team's @mikeshultz has kindly shared some concrete steps to help implement the feature(s) requested in this thread as it relates to the 'back end' of the DShop infrastructure. I have been working on the 'front end' (i.e. UI/UX) so far:

#958 - Legal pages mockup
but need more time to get all the parts working.

@phyninja
Copy link
Contributor

phyninja commented Jun 9, 2021

In the rendering (GIF) below, one may see what the shop's website will look like to a customer when the Shop Admin configures Legal policies using the interface shown in the previous image:

Customer-end mockup

@kevinp1
Copy link
Author

kevinp1 commented Jun 9, 2021

I think this is looking good and is very positive.

@phyninja
Copy link
Contributor

@kevinp1,

I have published the 'front-end' code in a [development] branch. Before this code can become useful, however, it will need to go through an approval process involving other members of the DShop team.

Meanwhile, I would appreciate if you shared the name of the theme you've used for your store; this will help me incorporate it into upcoming changes.

@phyninja
Copy link
Contributor

phyninja commented Jul 13, 2021

Update:

I'm now working on the 'back-end' of the codebase by referencing information shared by a team member of Origin (@mikeshultz).

Mike,
In attempting to create the API Endpoints as per your guidance, I'm running into the following error:
SequelizeDatabaseError

Could you please share any insight you may have on this? I will make sure that my local version of the DShop code is on par with the branch add-shop-policies.

Update 2 [Jul 24, 2021]:

It was found that the error above was the result of setting the underscored option to true in the 'Policies' model:

const Policies = sequelize.define(
'Policies',
{
allPolicies: DataTypes.JSON
},
{
underscored: true,
tableName: 'policies'
}
)

DShop's 'backend' documentation now contains a section that may steer newcomers away from facing this again.

@phyninja
Copy link
Contributor

phyninja commented Aug 6, 2021

@kevinp1,

The code in the development branch now allows a shop admin to save policy-related information [to the database] successfully. In no particular order, two steps remain before the branch can be submitted for peer-review in the form of a pull request:

  1. Add a button to allow shop admins to delete policy pages.
  2. Load the information stored in the database on the customer-facing page of Dshop.

In case you are interested in previewing the UI at this point, please find it attached in the form of a screen-capture below.

Legal.settings.-.Admin.UI.mov

Best,
Rajath

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants