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

Blockifying Single Product Template: Related Products block #8481

Closed
Tracked by #8054
gigitux opened this issue Feb 20, 2023 · 1 comment · Fixed by #8522
Closed
Tracked by #8054

Blockifying Single Product Template: Related Products block #8481

gigitux opened this issue Feb 20, 2023 · 1 comment · Fixed by #8522
Assignees
Labels
focus: template Related to API powering block template functionality in the Site Editor

Comments

@gigitux
Copy link
Contributor

gigitux commented Feb 20, 2023

image

The classic Single Product Template has a section called Related Products. We have to replicate it for the Single Product Template. We could:

  • use the Products block.
  • create a dedicated block that wraps the PHP code.

Do you think that should be possible using the Products block? I believe we could use the Products block, but I don't think we can recreate a Related Products behavior with the current settings available. We could create a new variation of the Products Block and pass a custom query via PHP code.

What do you think? @sunyatasattva @imanish003

@gigitux gigitux added the focus: template Related to API powering block template functionality in the Site Editor label Feb 20, 2023
@gigitux gigitux self-assigned this Feb 20, 2023
@sunyatasattva
Copy link
Contributor

Already replied on Slack, but I'll add the reply here too for public and future visibility:

I agree that would be awesome to use the Products block in these cases, but how should the query be built? Should such options be available to the merchants via the inspector panel, or should perhaps “Related” and “Cross-sell” be pre-determined variation with “hidden” attributes that have no corresponding controls?
[…]
I didn’t mean that the block itself is hidden or that merchants can’t add it. Only that these settings are not available on the inspector controls of a regular “Products” block, but can still be passed to the block by creating a variation that’s insertable.

@gigitux gigitux linked a pull request Feb 23, 2023 that will close this issue
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: template Related to API powering block template functionality in the Site Editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants