PageSourceSearch

https://markselden.net/applications/application_site/js/cart.js

js markselden.net collected 2026-10-09 17:51:02 UTC 1,849 bytes, 80 lines download raw bytes

1$.getScript("/applications/application_site/js/plugins/sweetalert/sweetalert.min.js", function( data, textStatus, jqxhr ) {
2
3});
4
5$("head").append("<link>");
6var css = $("head").children(":last");
7css.attr({
8	rel:  "stylesheet",
9    type: "text/css",
10    href: "/applications/application_site/css/plugins/sweetalert/sweetalert.css"
11});
12
13
14function ShoppingCartIconRefresh(){
15	jQuery.ajax({
16		type: 'POST',
17		url: '/maincontroller/shopping_cart_icon',
18		data: {},
19		success: function(response){
20			$('.shopping_cart_icon_area').html(response);
21		}
22	});
23}
24
25function ShoppingCartAdd(formObj){
26	_ShoppingCartAdd($(formObj).serialize());
27}
28
29function _ShoppingCartAdd(postParams, goToCheckout){
30	if(!goToCheckout){
31		goToCheckout = 0;
32	}
33	jQuery.ajax({
34		type: 'POST',
35		url: '/maincontroller/shopping_cart_add',
36		data: postParams,
37		dataType:'json',
38		success: function(response){
39			if(goToCheckout){
40				document.location.href = '/cart';
41			}else{
42				ShoppingCartIconRefresh();
43				swal({
44					type: response['type'],
45					title: response['title'],
46					showCancelButton: true,
47			        confirmButtonColor: "#449d44",
48			        cancelButtonText: "Close",
49			        confirmButtonText: "Show Cart",
50			        closeOnConfirm: false
51				}, function () {
52			        swal.close();
53			        document.location.href = '/cart';
54			    });
55			}
56		}
57	});
58}
59
60function ShoppingCartAddParams(qtyField, params){	
61	var postParams = {
62		qty: $(qtyField).val(),
63		p: params
64	};	
65	_ShoppingCartAdd(postParams);
66}
67
68function ShoppingCartAddCheckout(formObj,extra_form){
69	var extra_params = '';
70	if(extra_form){
71		extra_params = '&'+$(extra_form).serialize()
72	}
73	
74	_ShoppingCartAdd($(formObj).serialize()+extra_params, 1);
75}
76
77
78$(document).ready(function(){
79	ShoppingCartIconRefresh();
80});

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.