Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize propduct properties?? #10160

Open
avadhesh82 opened this issue May 13, 2020 · 6 comments
Open

How to customize propduct properties?? #10160

avadhesh82 opened this issue May 13, 2020 · 6 comments

Comments

@avadhesh82
Copy link

How to customize the product properties. when I added any properties validate each field and each textbox will we one checkbox thats click enable and disabled for textbox.. Please tell me if any idea about.

@MatthewKennedy
Copy link
Contributor

Hi @avadhesh82,

I have often thought Product Properties could have more power than just displaying all of them at once, power to pass data in extensions that you wouldn't want showing on the frontend.

I created PR #10163 that I think addresses the feature request that you mentioned here.

Take a look and see if this is what you are looking for, the pull request may never make it into the Spree project, but it is simple enough to recreate on your own project by looking at the files changed in the pull request.

@ganeshdevis
Copy link

ganeshdevis commented May 13, 2020

whats is the use of this feature, if you don't want any particular property to be not shown in frontend simply don't assign it to the product at the backend.

@MatthewKennedy I saw your comment in the #10163 that it will give additional ability to pass on information in JSON and XML, my only doubt is, product properties are master variant-specific right,? so a product with many variants may not be able to use this functionality as proposed.

Correct me if I am wrong. @damianlegawiec

@MatthewKennedy
Copy link
Contributor

MatthewKennedy commented May 13, 2020

Hi @NetViz

Product Properties are master product specific, and thats one of their strengths.

Let me give you a great example of when this feature would come in handy.

You are selling a Mens Leather Jacket, it comes in 3 sized and 2 colors, you create these in the variants, all is good so far.

You want to pass the product to Google Merchant Center using a Spree product feed extension. Due to it's product category clothing and accessories Google requires the following information in the feed:
<g:adult>yes</g:adult>
<g:material>Leather</g:material>
<g:size_system>GB</g:size_system>

Irrespective of what variant option you pick (Size, Color), it is still a Mens Leather jacket, with a size_system of GB, these product properties are true across all variants of this product, and need passing into a feed for Google Merchant Center.

Properties are perfect for this, but you might not want to display some of these properties on your site:
g: adult: yes
g:size_system: GB

Or any other funky required property for a feed of any other kind.

@ganeshdevis
Copy link

Agree with your point, between I have seen your product_feed gem it's shaping up really well. I texted you regarding this some 10 days before.

@MatthewKennedy
Copy link
Contributor

Hi @NetViz

I will message you on the slack message you sent me, I read your text 10 days ago, but at the time I was unsure exactly what direction the extension was going and then found myself knee deep in javascript for a week.

@ganeshdevis
Copy link

Sure, thanks.

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

No branches or pull requests

4 participants