Is it possible to disable SKU and have a product code per product not per variation? Also I want to display that product in the cart.
I tried to add a field named product code to product type but, couldn’t display it in the cart or confirmation.
I remove that field and added to the product variation of that type, but then it shows up in every variation, but I want it like title only one per product.

In short I want one SKU or Product code per product. Any help, very much appreciated.

Comments

fhdrupal’s picture

Can someone help me with that, I really need this thing. We have a type of product (fabrics), for which we need to have a top level product code, never mind with SKU, it can stay where it is, but need to have a product code field like title and should be able to submit it to cart.

It seems very simple, but I don’t know if it is or not.

Thanks a lot,

fhdrupal’s picture

I Love Drupal, it has a big community, but I haven't received any response yet. At least if someone can tell me if I am duplicating the issue, is it already been discussed, or is it being discussed somewhere.

Anyway one possibility that I found is to use "Commerce Customizable Products" module, create a new line items and disclose it to the cart. But many products types are using same 'Products Line items', and I used in many views and blocks. To this point my problem may be solved but I may get the problem with combining new line items and products line items in views, blocks and searches.

My question is how can I use both 'Product Line Items' and 'Custom Line Items' in the same views and blocks, because eventually I have to use them together, or if there is any other solution.

Many thanks.

jsacksick’s picture

You start the issue by asking a question then you reply to yourself asking other questions? What's the real question here, if you need some kind of "SKU" on the product display type then add a field, and within the views using the relationships you should be able to retrieve it even though it won't be really optimal.

fhdrupal’s picture

Thanks for response and sorry for being silly, just wanted to include further updates as I researched through.

OK, I have different products types and I need the field product code in only one type of products. If I added the field to product type I can't recall it in the cart view, because I can only see line items types there.

I don't want it in the variation types because I want this field as one per product.

So my question was should I add the field to Product line item, if I add it there won't it be included in all types of products.

Thanks again

jsacksick’s picture

Status: Active » Fixed

Of course you can retrieve your product displays in the cart view, See http://www.apsinfrastructure.co.uk/blog/drupal-commerce-cart-node-fields for a detailed explanation.

fhdrupal’s picture

Thank you very much, that works perfectly. That exactly what I wanted. I am just playing around with it, to do the same thing in other place like order invoice etc.

Thanks again.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.