Skip to content

Structured data for store/organisation#6

Draft
rahulsingh321 wants to merge 13 commits intogms-electronics:mainfrom
rahulsingh321:5905-add-store-fields
Draft

Structured data for store/organisation#6
rahulsingh321 wants to merge 13 commits intogms-electronics:mainfrom
rahulsingh321:5905-add-store-fields

Conversation

@rahulsingh321
Copy link

@rahulsingh321 rahulsingh321 commented Feb 3, 2025

Store form UI:
Screenshot from 2025-02-03 23-31-47

@rahulsingh321 rahulsingh321 changed the title Structured data for store / organisation Structured data for store/organisation Feb 3, 2025
@fthobe
Copy link

fthobe commented Feb 3, 2025

@rahulsingh321 translations for labels are entirely missing.
Also here labels are acronyms:
VAT all capitalized as acronym for Value added tax therefor VAT ID
Tax ID not, because tax is not an acronym

@rahulsingh321
Copy link
Author

Todos:
1: Address optional in store.
2: Need to add the translation
3: Need to add the test cases.

@fthobe
Copy link

fthobe commented Feb 5, 2025

@kennyadsl we are unsure if using addresses or just make columns here.

Specs by google are following:

The address (physical or mailing) of your organization, if applicable. Include all properties that apply to your country. The more properties you provide, the higher quality the result is for users. You can provide multiple addresses if you have a location in multiple cities, states, or countries.

<html>
  <head>
    <title>About Us</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Organization",
      "url": "https://www.example.com",
      "sameAs": ["https://example.net/profile/example1234", "https://example.org/example1234"],
      "logo": "https://www.example.com/images/logo.png",
      "name": "Example Corporation",
      "description": "The example corporation is well-known for producing high-quality widgets",
      "email": "contact@example.com",
      "telephone": "+47-99-999-9999",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "Rue Improbable 99",
        "addressLocality": "Paris",
        "addressCountry": "FR",
        "addressRegion": "Ile-de-France",
        "postalCode": "75001"
      },
      "vatID": "FR12345678901",
      "iso6523Code": "0199:724500PMK2A2M1SQQ228"
    }
    </script>
  </head>
  <body>
  </body>
</html>

@fthobe
Copy link

fthobe commented Feb 5, 2025

@rahulsingh321 shoot at solidusio/solidus (main) as draft and check if tests fail. see below comment

@fthobe
Copy link

fthobe commented Feb 5, 2025

@rahulsingh321 wait for PR description by me before making pr

@fthobe
Copy link

fthobe commented Feb 6, 2025

@rahulsingh321 please update the screenshot

@rahulsingh321 rahulsingh321 force-pushed the 5905-add-store-fields branch 2 times, most recently from bb18ebd to c31ef6d Compare February 10, 2025 19:37
Copy link

@fthobe fthobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally it looks good, some minor things:

  • try to align the section headers with what they do in the new admin
  • try to be more consistent with naming throughout a PR

Rest looks good, form is well structured, tests are there. I don't see why this wouldn't be ok. @shahmayur001 needs to remove the wrongly placed commits from here.

benjaminwil and others added 4 commits February 28, 2025 11:01
This event fires when the order `#cancel!` event is fired as part of the
stock order state machine events.

Co-Authored-By: Adam Mueller <adam@super.gd>
This event fires when `OrderCancellations#short_ship` is fired when an
an inventory unit is canceled from an order.

Co-Authored-By: Adam Mueller <adam@super.gd>
This adds a `:carton_shipped` event that is published whenever
`OrderShipping#ship` succeeds to mark a carton as shipped.

Co-Authored-By: Adam Mueller <adam@super.gd>
@rahulsingh321 rahulsingh321 force-pushed the 5905-add-store-fields branch 3 times, most recently from d9c8bdd to 28bd919 Compare March 2, 2025 11:40
fthobe and others added 3 commits March 2, 2025 20:21
The comment was inconsistent with the default setting. 
No functional changes have been made.
…onfig

[Docs] Fix Meta Data Restriction Comment to reflect default setting
This PR fixes an HTML structure break caused by an unclosed form_tag, ensuring that forms added after using ui/table are rendered correctly.

## Background

While customizing the index page to add a new form, I encountered a problem where the added form was not displayed in the browser. Upon investigation, I discovered that the issue stemmed from the form_tag in ui/table/component.html.erb not being explicitly closed, which resulted in subsequent form tags disappearing.

``` rb
<%= render component("ui/table/toolbar").new("data-#{stimulus_id}-target": "batchToolbar", role: "toolbar", "aria-label": t(".batch_actions"), hidden: true) do %>
  <%= form_tag '', id: batch_actions_form_id %>
  <% @data.batch_actions.each do |batch_action| %>
    <%= render_batch_action_button(batch_action) %>
  <% end %>
<% end %>
```

Due to the lack of a proper block structure closing the form_tag, the HTML became malformed, and any form tags declared afterward were not rendered.

Updated the form_tag to use a block form, ensuring that the opening and closing tags are explicitly defined.
@rahulsingh321 rahulsingh321 force-pushed the 5905-add-store-fields branch 3 times, most recently from 76b10b9 to a7fa008 Compare March 3, 2025 17:33
chaimann and others added 2 commits March 3, 2025 18:54
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
In HTML, the initial content of a <textarea> is specified
between its opening and closing tags, not as a `value`
attribute.

Therefore we must set `content`, rather than passing `value` for
 text areas.
Fix ui/forms/input component for tag: :textarea
@rahulsingh321 rahulsingh321 force-pushed the 5905-add-store-fields branch from a7fa008 to fc8e744 Compare March 4, 2025 07:16
tvdeyen and others added 4 commits March 6, 2025 10:35
…in_admin_table_component

[Admin] Fix Unclosed form_tag in table component
…-actions-permission

Revert "GH: Allow backport workflow to trigger actions"
This Commit provides the possibility to store legal information in the
store resource. Given the wide array of different information required
by country, the information stored here provides a baseline for most
countries, but might need to be augmented in some jurisdictions. This
commit is not meant as legal advisory. Inform yourself about eventual
requirements in your country of operation.

Some additional information that might be needed:
 - Legal Representative,
 - Share Capital of the company,
 - Contacts for privacy.

Schema.org has a schema to markup organizations that has been widely
adopted by various search engines:

|        | https://schema.org/Organization Support / Docs
|
|--------|-----------------------------------------------------------------------------------|
| Bing   | https://www.bing.com/webmasters/help/?topicid=cc507c09
|
| Google |
https://developers.google.com/search/docs/appearance/structured-data/organization
|
| Yandex |
https://yandex.com/support/webmaster/schema-org/what-is-schema-org.html
|

This update allows to return all organization data on frontend via jsonb
if implemented according to schema documentation on a per store basis
and edit the data via API and Backend (Old / New).

The implemented fields are:

- legal_name,
- contact_email,
- contact_phone,
- vat_id,
- tax_id,
- address1,
- address2,
- Zip code and city,
- state_name,
- country_id,
- and state_id.

Some additional notes regarding the size of the commit:
While this commit seems massive in size, no functionality has been added
apart from storing the values, no logical changes have been made, hence
the commit while bigger in size is simple to analyse. Apart from testing
routines, this commit does not contain functional code. Where possible
the structure of current address forms has been adopted.

Fixes solidusio#6173
@rahulsingh321 rahulsingh321 force-pushed the 5905-add-store-fields branch from fc8e744 to a1b1502 Compare March 6, 2025 18:36
@fthobe
Copy link

fthobe commented Mar 6, 2025

@kennyadsl should be good to go.

@fthobe
Copy link

fthobe commented Apr 7, 2025

@kennyadsl could you check again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants