1// Miva Merchant 2// 3// This file and the source codes contained herein are the property of 4// Miva, Inc. Use of this file is restricted to the specific terms and 5// conditions in the License Agreement associated with this file. Distribution 6// of this file or portions of this file for uses not covered by the License 7// Agreement is not allowed without a written agreement signed by an officer of 8// Miva, Inc. 9// 10// Copyright 1998-2016 Miva, Inc. All rights reserved. 11// http://www.miva.com 12// 13// $Id: runtime.js 58257 2016-05-11 21:38:32Z rguisewite $ 14// 15 16/*! 17 * \file 18 * \brief JavaScript stubs to call runtime functionality in json.mvc 19 */ 20 21// Runtime AJAX Calls 22//////////////////////////////////////////////////// 23 24function Runtime_AttributeAndOptionList_Load_Product( product_code, callback ) { return AJAX_Call( callback, 'runtime', 'Runtime_AttributeAndOptionList_Load_Product', 'Product_Code=' + encodeURIComponent( product_code ) ); } 25function Runtime_AttributeList_Load_ProductVariant_Possible( product_code, dependency_resolution, 26 last_selected_attr_id, last_selected_attmpat_id, last_selected_option_id, 27 selected_attr_ids, selected_attmpat_ids, selected_option_ids, selected_attr_types, 28 unselected_attr_ids, unselected_attmpat_ids, 29 callback ) { return AJAX_Call( callback, 'runtime', 'Runtime_AttributeList_Load_ProductVariant_Possible', 30 'Product_Code=' + encodeURIComponent( product_code ) + 31 '&Dependency_Resolution=' + encodeURIComponent( dependency_resolution ) + 32 '&Last_Selected_Attribute_ID=' + encodeURIComponent( last_selected_attr_id ) + '&Last_Selected_AttributeTemplateAttribute_ID=' + encodeURIComponent( last_selected_attmpat_id ) + '&Last_Selected_Option_ID=' + encodeURIComponent( last_selected_option_id ) + 33 '&Selected_Attribute_IDs=' + EncodeArray( selected_attr_ids ) + 34 '&Selected_AttributeTemplateAttribute_IDs=' + EncodeArray( selected_attmpat_ids ) + 35 '&Selected_Option_IDs=' + EncodeArray( selected_option_ids ) + 36 '&Selected_Attribute_Types=' + EncodeArray( selected_attr_types ) + 37 '&Unselected_Attribute_IDs=' + EncodeArray( unselected_attr_ids ) + 38 '&Unselected_AttributeTemplateAttribute_IDs=' + EncodeArray( unselected_attmpat_ids ) ); } 39function Runtime_AttributeList_Load_ProductVariant_Possible_PredictDiscounts( product_code, dependency_resolution, 40 last_selected_attr_id, last_selected_attmpat_id, last_selected_option_id, 41 selected_attr_ids, selected_attmpat_ids, selected_option_ids, selected_attr_types, 42 unselected_attr_ids, unselected_attmpat_ids, 43 callback ) 44{ 45 var data; 46 47 data = new Object(); 48 data.product_code = product_code; 49 data.dependency_resolution = dependency_resolution; 50 data.predictdiscounts = 0; 51 data.last_selected_attr_id = last_selected_attr_id; 52 data.last_selected_attmpat_id = last_selected_attmpat_id; 53 data.last_selected_option_id = last_selected_option_id; 54 data.selected_term_id = 0; 55 data.selected_attr_ids = selected_attr_ids; 56 data.selected_attmpat_ids = selected_attmpat_ids; 57 data.selected_option_ids = selected_option_ids; 58 data.selected_attr_types = selected_attr_types; 59 data.unselected_attr_ids = unselected_attr_ids; 60 data.unselected_attmpat_ids = unselected_attmpat_ids; 61 62 return v96_Runtime_AttributeList_Load_ProductVariant_Possible_PredictDiscounts( data, callback ); 63} 64 65function v96_Runtime_AttributeList_Load_ProductVariant_Possible_PredictDiscounts( data, callback ) { return AJAX_Call( callback, 'runtime', 'Runtime_AttributeList_Load_ProductVariant_Possible', 66 'Product_Code=' + encodeURIComponent( data.product_code ) + 67 '&Dependency_Resolution=' + encodeURIComponent( data.dependency_resolution ) + 68 '&Predict_Discounts=' + ( data.predictdiscounts ? '1' : '0' ) + 69 '&Last_Selected_Attribute_ID=' + encodeURIComponent( data.last_selected_attr_id ) + '&Last_Selected_AttributeTemplateAttribute_ID=' + encodeURIComponent( data.last_selected_attmpat_id ) + '&Last_Selected_Option_ID=' + encodeURIComponent( data.last_selected_option_id ) + 70 '&Selected_Term_ID=' + encodeURIComponent( data.selected_term_id ) + 71 '&Selected_Attribute_IDs=' + EncodeArray( data.selected_attr_ids ) + 72 '&Selected_AttributeTemplateAttribute_IDs=' + EncodeArray( data.selected_attmpat_ids ) + 73 '&Selected_Option_IDs=' + EncodeArray( data.selected_option_ids ) + 74 '&Selected_Attribute_Types=' + EncodeArray( data.selected_attr_types ) + 75 '&Unselected_Attribute_IDs=' + EncodeArray( data.unselected_attr_ids ) + 76 '&Unselected_AttributeTemplateAttribute_IDs=' + EncodeArray( data.unselected_attmpat_ids ) ); } 77function Runtime_ProductVariant_Load_Attributes( product_code, 78 attr_ids, attmpat_ids, option_ids, 79 callback ) { return AJAX_Call( callback, 'runtime', 'Runtime_ProductVariant_Load_Attributes', 80 'Product_Code=' + encodeURIComponent( product_code ) + 81 '&Attribute_IDs=' + EncodeArray( attr_ids ) + 82 '&AttributeTemplateAttribute_IDs=' + EncodeArray( attmpat_ids ) + 83 '&Option_IDs=' + EncodeArray( option_ids ) ); } 84 85function Runtime_ProductImageList_Load_Product_Variant( product_code, variant_id, 86 image_sizes, callback ) { return AJAX_Call( callback, 'runtime', 'Runtime_ProductImageList_Load_Product_Variant', 87 'Product_Code=' + encodeURIComponent( product_code ) + 88 '&Variant_ID=' + encodeURIComponent( variant_id ) + 89 '&Image_Sizes=' + EncodeArray( image_sizes ) ); }
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.