I have been trying to add (custom) fields from the table AOS_Products_cstm into AOS_Products_Quotes line items .
I have edited line_items.js and the sqs_objects var in the function insertLineItems like so (my custom field is ‘variant_c’ from the table ‘AOS_Products_cstm’):
sqs_objects[“product_name[” + prodln + “]”] = {
“form”: “EditView”,
“method”: “query”,
“modules”: [“AOS_Products”],
“group”: “or”,
“field_list”: [“name”, “id”,“part_number”,“variant_c”, “cost”, “price”,“description”,“currency_id”],
“populate_list”: [“product_name[” + prodln + “]”,
“product_product_id[” + prodln + “]”,
“product_part_number[” + prodln + “]”,
“product_variant_c[” + prodln + “]”,
“product_product_cost_price[” + prodln + “]”,
“product_product_list_price[” + prodln + “]”,
“product_item_description[” + prodln + “]”,
“product_currency[” + prodln + “]”],
“required_list”: [“product_id[” + prodln + “]”],
“conditions”: [{
“name”: “name”,
“op”: “like_custom”,
“end”: “%”,
“value”: “”
}],
“order”: “name”,
“limit”: “30”,
“post_onblur_function”: “formatListPrice(” + prodln + “);”,
“no_match_text”: “No Match” };
and then inserted the extra cell with the following code:
var bb = x.insertCell(3);
bb.innerHTML = “”;
And i have modified insertProductHeader so the table header matches the new field added.
However I am getting no data for the custom field when i select a product to add to line items. I have not been able to find any documentation that adequately explains the steps necessary to make this work and I have not been able to find any help on how to modify SQS objects to include custom variables in the related XXXX_cstm tables.
If it were just this one field that i need to add to line items; I could have seconded a field from the main AOS_Products table, however, I have a few more custom fields to add to line items, so I need a better method.
Thanks in advance