Try ERPNext Buy Support Partners Foundation Foundation Members

How do I add a Item doc custom field to the item.html page of the website?

How do I add a Item doc custom field to the item.html page of the website?

I can add all of the default Item fields by using the existing code as example, but the custom fields return “none”.

Best to concat your custom field in the description or just add it in Website Specifications. What is your use case?

@rmehta

I really do appreciate the quick responses, but I know very little to nothing about how to apply your suggestions. I’m just trying to find simple methods of getting custom item information into the website.

You stated: “Best to concat your custom field in the description or just add it in Website Specifications”. Could you please give a generic example?

Because if this requires writing a custom script, I have no idea how to proceed.

I’ve seen the examples in custom scripts, but they are not relevant.

Is there further documentation with some basic examples for the uninitiated?
ErpNext for dummies…

@brianl Since description is already displayed on the page, I meant adding this to description itself which is text / html so that it gets displayed

For help:

http://frappe.github.io/frappe/user/

@rmehta

I’m aware of the web specification area.

Is there a problem adding the custom field?

Could you just please offer an example of how one would add a custom field’s data to the website pages, if indeed that is what they want to do.

Or at least explain what you meant by concat the field.

“Best to concat your custom field in the description or just add it in Website Specifications.”

How does one concatenate a custom field into the description or Website Specifications?

I can find no example of this…

This is not a good idea. Add your stuff in description property

I am not sure how else to explain.

@rmehta

I would like to restate the case with a related example.

Product Variants/Attributes - The current setup is lacking. I have seen a similar situation as follows, and while the suggestion as to how to remedy the problem works in theory, in practice when applied to the website product page is a failure.

Take the 2 most basic variant attributes, Color & Size, the current setup assumes every item can apply the same attributes’ values equally or the solution is to name the attribute to reflect the disparate items or group of items values in particular, i.e. Item A Colors, Item B Colors, Item A Sizes, Item B Sizes.

Yes this would work, but you do not want the label for the attribute selector on the website to read “Item A Colors”.

To remedy this, one could simply add a custom field for item attribute, attribute_label, with the text “Color” or “Size”, then use that field in place of the attribute name.

How does one do that?

I got it by adding a field to the Item Variant Attribute Doc, once the field was set in the master item and I changed the following in item.html

class=“text-muted”>{{ _(d.attribute) }}
to
class=“text-muted”>{{ _(d.attribute_label) }}

Then it worked…but there should be a way to set the label once in the Item Attribute Doc and pull it, would make it easier…ideally an alternate label field should be added permanently. It’s value could be set to default to the Attribute Name…

@brianl variants in website released with 6.6.0

@rmehta

I do not understand your reply…

I am running
“erpnext”: “6.6.4”,
“frappe”: “6.6.1”

The problem isn’t whether or not variants ( and their attributes ) are displaying in the website, they are.

The example I referred to dealt with the attribute selector’s “label” ( as well as the auto created variant atribute values inserted into the description field )

The assumption that a single generic attribute “color” can apply across a broad range products ( items ) is wrong.

Using a more specific attribute “item type A colors” then results in a website attribute label of “item type A colors”, which is not practical or desirable.

I can add a custom field, attribute label, then the question was, how does use that custom field as the label for the attribute. Which I then stated how I did it ( probably not very effectively )

Ideally, this should not be made by any custom work, but as an enhancement to the standard.

I agree, there can be a label on Item Attribute that will be shown in the web-cart.

@rmehta

I just had a dope slap moment…

You can rename the attribute_name of the Attribute, and the original name is maintained as the record’s ID

( or…I guess you can stop the auto-naming of the ID, and request a user prompt to name the ID? )

Though, that does not solve the label issue completely, because the label used in the website ( and the auto-generated variant description ) is essentially the attribute’s ID ( the original name ). :frowning:

So it’s either a custom job or a re-work of the norms in the end …

This discussion seems to be very close to what I am looking for (although I don’t have an answer yet).

In our website there is a need for extra explanatory comments (web notes) for selected item variant attributes. Here is an example:

I have created a field ‘web_note’ in he DocType ‘Item Variant Attribute’ but I can’t figure out, how to show it on the item web page. For example if i write a code like this:
{% if has_variants %}
{% for row in doc.attributes %}


Note:{{ row.web_note }}

{% endfor %}
{% endif %}

It grabs the ‘web_note’ field of the Item, but not of a selected variant (attribute). How should I edit this code to get the job done?

Hello @Evaldas_Pabreza
What is ur company name and what do you sell?
Seems u sell something interested for me.

Regards
Bilal

Check out this https://integratedoptics.com

OK, what kind of applications for this laser?
Why people are buying it?

Regards
Bilal

Google is perfect to discover that!

Direct me to the aim. I am checking if we can sell it in our market.

Ahh I see you are a marketer seeking a marketer?

I am not the parson for that - isn’t Google ideal for that too!?

edit: Another option is to simply contact them?