| 1 |
<?php |
| 2 |
|
| 3 |
function usces_filter_get_post_metadata( $null, $object_id, $meta_key, $single){ |
| 4 |
global $wpdb; |
| 5 |
$query = $wpdb->prepare("SELECT meta_value FROM {$wpdb->postmeta} WHERE post_id = %d AND meta_key = %s", $object_id, $meta_key); |
| 6 |
$metas = $wpdb->get_col($query); |
| 7 |
if ( !empty($metas) ) { |
| 8 |
return array_map('maybe_unserialize', $metas); |
| 9 |
} |
| 10 |
|
| 11 |
if ($single) |
| 12 |
return ''; |
| 13 |
else |
| 14 |
return array(); |
| 15 |
} |
| 16 |
|
| 17 |
function usces_action_reg_orderdata( $args ){ |
| 18 |
global $wpdb, $usces; |
| 19 |
$options = get_option('usces'); |
| 20 |
extract($args); |
| 21 |
|
| 22 |
/* Register decorated order id ***************************************************/ |
| 23 |
$olimit = 0; |
| 24 |
if( ! $options['system']['dec_orderID_flag'] ){ |
| 25 |
$dec_order_id = str_pad($order_id, $options['system']['dec_orderID_digit'], "0", STR_PAD_LEFT); |
| 26 |
}else{ |
| 27 |
$otable = $wpdb->prefix . 'usces_order_meta'; |
| 28 |
while( $ukey = usces_get_key( $options['system']['dec_orderID_digit'] ) ){ |
| 29 |
$ores = $wpdb->get_var($wpdb->prepare("SELECT meta_key FROM $otable WHERE meta_key = %s AND meta_value = %s LIMIT 1", 'dec_order_id', $ukey)); |
| 30 |
if( !$ores || 100 < $olimit ) |
| 31 |
break; |
| 32 |
$olimit++; |
| 33 |
} |
| 34 |
$dec_order_id = $ukey; |
| 35 |
} |
| 36 |
$dec_order_id = apply_filters( 'usces_filter_dec_order_id_prefix', $options['system']['dec_orderID_prefix'], $args ) . apply_filters( 'usces_filter_dec_order_id', $dec_order_id, $args ); |
| 37 |
|
| 38 |
if( 100 < $olimit ){ |
| 39 |
$usces->set_order_meta_value('dec_order_id', uniqid(), $order_id); |
| 40 |
}else{ |
| 41 |
$usces->set_order_meta_value('dec_order_id', $dec_order_id, $order_id); |
| 42 |
} |
| 43 |
unset($dec_order_id, $otable, $olimit, $ukey, $ores); |
| 44 |
/***********************************************************************************/ |
| 45 |
} |
| 46 |
|
| 47 |
function usces_action_reg_orderdata_stocks($args){ |
| 48 |
global $usces; |
| 49 |
extract($args); |
| 50 |
|
| 51 |
foreach($cart as $cartrow){ |
| 52 |
$sku = urldecode($cartrow['sku']); |
| 53 |
$zaikonum = $usces->getItemZaikoNum( $cartrow['post_id'], $sku ); |
| 54 |
if($zaikonum == '') continue; |
| 55 |
$zaikonum = $zaikonum - $cartrow['quantity']; |
| 56 |
$usces->updateItemZaikoNum( $cartrow['post_id'], $sku, $zaikonum ); |
| 57 |
if($zaikonum <= 0) $usces->updateItemZaiko( $cartrow['post_id'], $sku, 2 ); |
| 58 |
} |
| 59 |
} |
| 60 |
|
| 61 |
function usces_action_ogp_meta(){ |
| 62 |
global $usces, $post; |
| 63 |
if( empty($post) || !$usces->is_item($post) || !is_single() ) |
| 64 |
return; |
| 65 |
|
| 66 |
$item = $usces->get_item( $post->ID ); |
| 67 |
$pictid = $usces->get_mainpictid($item['itemCode']); |
| 68 |
$image_info = wp_get_attachment_image_src( $pictid, 'thumbnail' ); |
| 69 |
|
| 70 |
$ogs['title'] = $item['itemName']; |
| 71 |
$ogs['type'] = 'product'; |
| 72 |
$ogs['description'] = strip_tags( get_the_title($post->ID) ); |
| 73 |
$ogs['url'] = get_permalink($post->ID); |
| 74 |
$ogs['image'] = $image_info[0]; |
| 75 |
$ogs['site_name'] = get_option('blogname'); |
| 76 |
$ogs = apply_filters( 'usces_filter_ogp_meta', $ogs, $post->ID ); |
| 77 |
|
| 78 |
foreach( $ogs as $key => $value ){ |
| 79 |
echo "\n" . '<meta property="og:' . $key . '" content="' . $value . '">'; |
| 80 |
} |
| 81 |
|
| 82 |
} |
| 83 |
|
| 84 |
function wc_purchase_nonce($html, $payments, $acting_flag, $rand, $purchase_disabled){ |
| 85 |
if( strpos($html, 'wc_nonce') || !in_array( $payments['settlement'], array('COD', 'installment', 'transferAdvance', 'transferDeferred', 'acting_zeus_card')) ) |
| 86 |
return $html; |
| 87 |
$wc_nonce = wp_create_nonce('wc_purchase_nonce'); |
| 88 |
$html .= wp_nonce_field( 'wc_purchase_nonce', 'wc_nonce', false, false )."\n"; |
| 89 |
return $html; |
| 90 |
} |
| 91 |
|
| 92 |
function wc_purchase_nonce_check(){ |
| 93 |
global $usces; |
| 94 |
$entry = $usces->cart->get_entry(); |
| 95 |
if( !isset($entry['order']['payment_name']) || empty($entry['order']['payment_name']) ){ |
| 96 |
wp_redirect( home_url() ); |
| 97 |
exit; |
| 98 |
} |
| 99 |
|
| 100 |
$payments = usces_get_payments_by_name($entry['order']['payment_name']); |
| 101 |
if( !in_array( $payments['settlement'], array('COD', 'installment', 'transferAdvance', 'transferDeferred' )) ) |
| 102 |
return true; |
| 103 |
|
| 104 |
$nonce = isset($_REQUEST['wc_nonce']) ? $_REQUEST['wc_nonce'] : ''; |
| 105 |
if( wp_verify_nonce($nonce, 'wc_purchase_nonce') ) |
| 106 |
return true; |
| 107 |
|
| 108 |
wp_redirect( home_url() ); |
| 109 |
exit; |
| 110 |
} |
| 111 |
|
| 112 |
function wc_mkdir(){ |
| 113 |
global $usces; |
| 114 |
if( is_admin() && !WCUtils::is_blank($usces->options['logs_path']) && false !== strpos($_SERVER['SERVER_SOFTWARE'],'Apache')){ |
| 115 |
$welcart_file_dir = $usces->options['logs_path'] . '/welcart'; |
| 116 |
$logs_dir = $welcart_file_dir . '/logs'; |
| 117 |
if( !file_exists($welcart_file_dir) ){ |
| 118 |
$res = @mkdir($welcart_file_dir, 0700); |
| 119 |
if(!$res){ |
| 120 |
$msg = '<div class="error"><p>下記のディレクトリーを、所有� |
| 121 |
:' . get_current_user() . '、パーミッション:700 で作成してください。 <br />' . $welcart_file_dir . '</p></div>'; |
| 122 |
add_action('admin_notices', $c = create_function('', 'echo "' . addcslashes($msg,'"') . '";')); |
| 123 |
} |
| 124 |
} |
| 125 |
$stat = stat($welcart_file_dir); |
| 126 |
print_r($stat); |
| 127 |
die(); |
| 128 |
if( is_writable($welcart_file_dir) ){ |
| 129 |
$res = @mkdir($logs_dir, 0700); |
| 130 |
if(!$res){ |
| 131 |
$msg = '<div class="error"><p>下記のディレクトリーを、所有� |
| 132 |
:' . get_current_user() . '、パーミッション:700 で作成してください。 <br />' . $welcart_file_dir . '</p></div>'; |
| 133 |
add_action('admin_notices', $c = create_function('', 'echo "' . addcslashes($msg,'"') . '";')); |
| 134 |
} |
| 135 |
} |
| 136 |
} |
| 137 |
} |
| 138 |
|
| 139 |
function usces_reg_ordercartdata( $args ){ |
| 140 |
global $usces, $wpdb; |
| 141 |
/* |
| 142 |
$args = array( |
| 143 |
'cart'=>$cart, 'entry'=>$entry, 'order_id'=>$order_id, 'member_id'=>$member['ID'], |
| 144 |
'payments'=>$set, 'charging_type'=>$charging_type); |
| 145 |
*/ |
| 146 |
extract($args); |
| 147 |
|
| 148 |
if( !$order_id ) |
| 149 |
return; |
| 150 |
|
| 151 |
$cart_table = $wpdb->prefix . "usces_ordercart"; |
| 152 |
$cart_meta_table = $wpdb->prefix . "usces_ordercart_meta"; |
| 153 |
foreach( $cart as $row_index => $value ){ |
| 154 |
$item_code = get_post_meta( $value['post_id'], '_itemCode', true); |
| 155 |
$item_name = get_post_meta( $value['post_id'], '_itemName', true); |
| 156 |
$skus = $usces->get_skus($value['post_id'], 'code'); |
| 157 |
$sku_encoded = $value['sku']; |
| 158 |
$skucode = urldecode($value['sku']); |
| 159 |
$sku = $skus[$skucode]; |
| 160 |
if( empty($usces->option['tax_rate']) ){ |
| 161 |
$tax = 0; |
| 162 |
|
| 163 |
}else{ |
| 164 |
$tax = ($value['price'] * $value['quantity']) * $usces->options['tax_rate'] / 100; |
| 165 |
$cr = $usces->options['system']['currency']; |
| 166 |
$decimal = $usces_settings['currency'][$cr][1]; |
| 167 |
$decipad = (int)str_pad( '1', $decimal+1, '0', STR_PAD_RIGHT ); |
| 168 |
switch( $usces->options['tax_method'] ){ |
| 169 |
case 'cutting': |
| 170 |
$tax = floor($tax*$decipad)/$decipad; |
| 171 |
break; |
| 172 |
case 'bring': |
| 173 |
$tax = ceil($tax*$decipad)/$decipad; |
| 174 |
break; |
| 175 |
case 'rounding': |
| 176 |
if( 0 < $decimal ){ |
| 177 |
$tax = round($tax, (int)$decimal); |
| 178 |
}else{ |
| 179 |
$tax = round($tax); |
| 180 |
} |
| 181 |
break; |
| 182 |
} |
| 183 |
} |
| 184 |
$query = $wpdb->prepare("INSERT INTO $cart_table |
| 185 |
( |
| 186 |
order_id, row_index, post_id, item_code, item_name, |
| 187 |
sku_code, sku_name, cprice, price, quantity, |
| 188 |
unit, tax, destination_id, cart_serial |
| 189 |
) VALUES ( |
| 190 |
%d, %d, %d, %s, %s, |
| 191 |
%s, %s, %f, %f, %d, |
| 192 |
%s, %d, %d, %s |
| 193 |
)", |
| 194 |
$order_id, $row_index, $value['post_id'], $item_code, $item_name, |
| 195 |
$skucode, $sku['name'], $sku['cprice'], $value['price'], $value['quantity'], |
| 196 |
$sku['unit'], $tax, NULL, $value['serial'] |
| 197 |
); |
| 198 |
$wpdb->query($query); |
| 199 |
|
| 200 |
$cart_id = $wpdb->insert_id ; |
| 201 |
if($value['options']){ |
| 202 |
foreach((array)$value['options'] as $okey => $ovalue){ |
| 203 |
$okey = urldecode($okey); |
| 204 |
if(is_array($ovalue)) { |
| 205 |
$temp = array(); |
| 206 |
foreach( $ovalue as $k => $v ){ |
| 207 |
$temp[$k] = urldecode($v); |
| 208 |
} |
| 209 |
$ovalue = serialize($temp); |
| 210 |
} else { |
| 211 |
$ovalue = urldecode($ovalue); |
| 212 |
} |
| 213 |
$oquery = $wpdb->prepare("INSERT INTO $cart_meta_table |
| 214 |
( cart_id, meta_type, meta_key, meta_value ) VALUES (%d, %s, %s, %s)", |
| 215 |
$cart_id, 'option', $okey, $ovalue |
| 216 |
); |
| 217 |
$wpdb->query($oquery); |
| 218 |
} |
| 219 |
} |
| 220 |
|
| 221 |
if( $value['advance'] ) { |
| 222 |
foreach( (array)$value['advance'] as $akey => $avalue ) { |
| 223 |
$advance = maybe_unserialize( $avalue ); |
| 224 |
if( is_array($advance) ) { |
| 225 |
$post_id = $value['post_id']; |
| 226 |
if( is_array( $advance[$post_id][$sku_encoded] ) ) { |
| 227 |
$akeys = array_keys( $advance[$post_id][$sku_encoded] ); |
| 228 |
foreach( (array)$akeys as $akey ) { |
| 229 |
$avalue = serialize( $advance[$post_id][$sku_encoded][$akey] ); |
| 230 |
$aquery = $wpdb->prepare("INSERT INTO $cart_meta_table |
| 231 |
( cart_id, meta_type, meta_key, meta_value ) VALUES ( %d, 'advance', %s, %s )", |
| 232 |
$cart_id, $akey, $avalue |
| 233 |
); |
| 234 |
$wpdb->query( $aquery ); |
| 235 |
} |
| 236 |
} else { |
| 237 |
$akeys = array_keys( $advance ); |
| 238 |
$akey = ( empty($akeys[0]) ) ? 'advance' : $akeys[0]; |
| 239 |
$avalue = serialize( $advance ); |
| 240 |
$aquery = $wpdb->prepare("INSERT INTO $cart_meta_table |
| 241 |
( cart_id, meta_type, meta_key, meta_value ) VALUES ( %d, 'advance', %s, %s )", |
| 242 |
$cart_id, $akey, $avalue |
| 243 |
); |
| 244 |
$wpdb->query( $aquery ); |
| 245 |
} |
| 246 |
} else { |
| 247 |
$avalue = urldecode( $avalue ); |
| 248 |
$aquery = $wpdb->prepare("INSERT INTO $cart_meta_table |
| 249 |
( cart_id, meta_type, meta_key, meta_value ) VALUES ( %d, 'advance', 'advance', %s )", |
| 250 |
$cart_id, $avalue |
| 251 |
); |
| 252 |
$wpdb->query( $aquery ); |
| 253 |
} |
| 254 |
} |
| 255 |
} |
| 256 |
|
| 257 |
do_action( 'usces_action_reg_ordercart_row', $cart_id, $row_index, $value, $args ); |
| 258 |
} |
| 259 |
} |
| 260 |
function fiter_mainTitle($title, $sep){ |
| 261 |
global $usces; |
| 262 |
|
| 263 |
if( empty($title) ){ |
| 264 |
$newtitle = $title; |
| 265 |
}else{ |
| 266 |
$title = trim( str_replace( $sep, '', $title ) ); |
| 267 |
switch($usces->page){ |
| 268 |
case 'cart': |
| 269 |
$newtitle = apply_filters('usces_filter_title_cart', __('In the cart', 'usces')); |
| 270 |
break; |
| 271 |
|
| 272 |
case 'customer': |
| 273 |
$newtitle = apply_filters('usces_filter_title_customer', __('Customer Information', 'usces')); |
| 274 |
break; |
| 275 |
|
| 276 |
case 'delivery': |
| 277 |
$newtitle = apply_filters('usces_filter_title_delivery', __('Shipping / Payment options', 'usces')); |
| 278 |
break; |
| 279 |
|
| 280 |
case 'confirm': |
| 281 |
$newtitle = apply_filters('usces_filter_title_confirm', __('Confirmation', 'usces')); |
| 282 |
break; |
| 283 |
|
| 284 |
case 'ordercompletion': |
| 285 |
$newtitle = apply_filters('usces_filter_title_ordercompletion', __('Order Complete', 'usces')); |
| 286 |
break; |
| 287 |
|
| 288 |
case 'error': |
| 289 |
$newtitle = apply_filters('usces_filter_title_error', __('Error', 'usces')); //new fitler name |
| 290 |
break; |
| 291 |
|
| 292 |
case 'search_item': |
| 293 |
$newtitle = apply_filters('usces_filter_title_search_item', __("'AND' search by categories", 'usces')); |
| 294 |
break; |
| 295 |
|
| 296 |
case 'maintenance': |
| 297 |
$newtitle = apply_filters('usces_filter_title_maintenance', __('Under Maintenance', 'usces')); |
| 298 |
break; |
| 299 |
|
| 300 |
case 'login': |
| 301 |
$newtitle = apply_filters('usces_filter_title_login', __('Log-in for members', 'usces')); |
| 302 |
break; |
| 303 |
|
| 304 |
case 'member': |
| 305 |
$newtitle = apply_filters('usces_filter_title_member', __('Membership information', 'usces')); |
| 306 |
break; |
| 307 |
|
| 308 |
case 'newmemberform': |
| 309 |
$newtitle = apply_filters('usces_filter_title_newmemberform', __('New enrollment form', 'usces')); |
| 310 |
break; |
| 311 |
|
| 312 |
case 'newcompletion': |
| 313 |
$newtitle = apply_filters('usces_filter_title_newcompletion', __('New enrollment complete', 'usces'));//new fitler name |
| 314 |
break; |
| 315 |
|
| 316 |
case 'editmemberform': |
| 317 |
$newtitle = apply_filters('usces_filter_title_editmemberform', __('Member information editing', 'usces'));//new fitler name |
| 318 |
break; |
| 319 |
|
| 320 |
case 'editcompletion': |
| 321 |
$newtitle = apply_filters('usces_filter_title_editcompletion', __('Membership information change is completed', 'usces'));//new fitler name |
| 322 |
break; |
| 323 |
|
| 324 |
case 'lostmemberpassword': |
| 325 |
$newtitle = apply_filters('usces_filter_title_lostmemberpassword', __('The new password acquisition', 'usces')); |
| 326 |
break; |
| 327 |
|
| 328 |
case 'lostcompletion': |
| 329 |
$newtitle = apply_filters('usces_filter_title_lostcompletion', __('New password procedures for obtaining complete', 'usces'));//new fitler name |
| 330 |
break; |
| 331 |
|
| 332 |
case 'changepassword': |
| 333 |
$newtitle = apply_filters('usces_filter_title_changepassword', __('Change password', 'usces')); |
| 334 |
break; |
| 335 |
|
| 336 |
case 'changepasscompletion': |
| 337 |
$newtitle = apply_filters('usces_filter_title_changepasscompletion', __('Password change is completed', 'usces')); |
| 338 |
break; |
| 339 |
|
| 340 |
default: |
| 341 |
$newtitle = apply_filters('usces_filter_title_main_default', $title);//new fitler name |
| 342 |
} |
| 343 |
$newtitle = $newtitle .' '.$sep.' '; |
| 344 |
} |
| 345 |
return $newtitle; |
| 346 |
} |
| 347 |
|
| 348 |
//Univarsal Analytics |
| 349 |
function usces_Universal_trackPageview(){ |
| 350 |
global $usces; |
| 351 |
|
| 352 |
switch($usces->page){ |
| 353 |
case 'cart': |
| 354 |
$push = array(); |
| 355 |
$push[] = "'page' : '/wc_cart'"; |
| 356 |
break; |
| 357 |
|
| 358 |
case 'customer': |
| 359 |
$push = array(); |
| 360 |
$push[] = "'page' : '/wc_customer'"; |
| 361 |
break; |
| 362 |
|
| 363 |
case 'delivery': |
| 364 |
$push = array(); |
| 365 |
$push[] = "'page' : '/wc_delivery'"; |
| 366 |
break; |
| 367 |
|
| 368 |
case 'confirm': |
| 369 |
$push = array(); |
| 370 |
$push[] = "'page' : '/wc_confirm'"; |
| 371 |
break; |
| 372 |
|
| 373 |
case 'ordercompletion': |
| 374 |
$sesdata = $usces->cart->get_entry(); |
| 375 |
$order_id = $sesdata['order']['ID']; |
| 376 |
$data = $usces->get_order_data($order_id, 'direct'); |
| 377 |
$cart = unserialize($data['order_cart']); |
| 378 |
$total_price = $usces->get_total_price( $cart ) + $data['order_discount'] - $data['order_usedpoint']; |
| 379 |
$push =array(); |
| 380 |
$push[] = "'page' : '/wc_ordercompletion'"; |
| 381 |
$push[] = "'require', 'ecommerce', 'ecommerce.js'"; |
| 382 |
$push[] = "'ecommerce:addTransaction', { |
| 383 |
id: '". $order_id ."', |
| 384 |
affiliation: '". get_option('blogname') ."', |
| 385 |
revenue: '". $total_price ."', |
| 386 |
shipping: '". $data['order_shipping_charge'] ."', |
| 387 |
tax: '". $data['order_tax'] ."' }"; |
| 388 |
for( $i=0; $i<count($cart); $i++ ){ |
| 389 |
$cart_row = $cart[$i]; |
| 390 |
$post_id = $cart_row['post_id']; |
| 391 |
$sku = urldecode($cart_row['sku']); |
| 392 |
$quantity = $cart_row['quantity']; |
| 393 |
$itemName = $usces->getItemName($post_id); |
| 394 |
$skuPrice = $cart_row['price']; |
| 395 |
$cats = $usces->get_item_cat_genre_ids( $post_id ); |
| 396 |
if( is_array($cats) ) |
| 397 |
sort($cats); |
| 398 |
$category = ( isset($cats[0]) ) ? get_cat_name($cats[0]): ''; |
| 399 |
|
| 400 |
$push[] = "'ecommerce:addItem', { |
| 401 |
id: '". $order_id ."', |
| 402 |
sku: '". $sku ."', |
| 403 |
name: '". $itemName."', |
| 404 |
category: '". $category."', |
| 405 |
price: '". $skuPrice."', |
| 406 |
quantity: '". $quantity."' }"; |
| 407 |
} |
| 408 |
$push[] = "'ecommerce:send'"; |
| 409 |
break; |
| 410 |
|
| 411 |
case 'error': |
| 412 |
$push = array(); |
| 413 |
$push[] = "'page' : '/wc_error'"; |
| 414 |
break; |
| 415 |
|
| 416 |
case 'search_item': |
| 417 |
$push = array(); |
| 418 |
$push[] = "'page' : '/wc_search_item'"; |
| 419 |
break; |
| 420 |
|
| 421 |
case 'maintenance': |
| 422 |
$push = array(); |
| 423 |
$push[] = "'page' : '/wc_maintenance'"; |
| 424 |
break; |
| 425 |
|
| 426 |
case 'login': |
| 427 |
$push = array(); |
| 428 |
$push[] = "'page' : '/wc_login'"; |
| 429 |
break; |
| 430 |
|
| 431 |
case 'member': |
| 432 |
$push = array(); |
| 433 |
$push[] = "'page' : '/wc_member'"; |
| 434 |
break; |
| 435 |
|
| 436 |
case 'newmemberform': |
| 437 |
$push = array(); |
| 438 |
$push[] = "'page' : '/wc_newmemberform'"; |
| 439 |
break; |
| 440 |
|
| 441 |
case 'newcompletion': |
| 442 |
$push = array(); |
| 443 |
$push[] = "'page' : '/wc_newcompletion'"; |
| 444 |
break; |
| 445 |
|
| 446 |
case 'editmemberform': |
| 447 |
$push = array(); |
| 448 |
$push[] = "'page' : '/wc_editmemberform'"; |
| 449 |
break; |
| 450 |
|
| 451 |
case 'editcompletion': |
| 452 |
$push = array(); |
| 453 |
$push[] = "'page' : '/wc_editcompletion'"; |
| 454 |
break; |
| 455 |
|
| 456 |
case 'lostmemberpassword': |
| 457 |
$push = array(); |
| 458 |
$push[] = "'page' : '/wc_lostmemberpassword'"; |
| 459 |
break; |
| 460 |
|
| 461 |
case 'lostcompletion': |
| 462 |
$push = array(); |
| 463 |
$push[] = "'page' : '/wc_lostcompletion'"; |
| 464 |
break; |
| 465 |
|
| 466 |
case 'changepassword': |
| 467 |
$push = array(); |
| 468 |
$push[] = "'page' : '/wc_changepassword'"; |
| 469 |
break; |
| 470 |
|
| 471 |
case 'changepasscompletion': |
| 472 |
$push = array(); |
| 473 |
$push[] = "'page' : '/wc_changepasscompletion'"; |
| 474 |
break; |
| 475 |
|
| 476 |
default: |
| 477 |
$push = array(); |
| 478 |
break; |
| 479 |
} |
| 480 |
return $push; |
| 481 |
} |
| 482 |
|
| 483 |
//Classic Analytics |
| 484 |
function usces_Classic_trackPageview(){ |
| 485 |
global $usces; |
| 486 |
|
| 487 |
switch($usces->page){ |
| 488 |
case 'cart': |
| 489 |
$push = array(); |
| 490 |
$push = usces_trackPageview_cart($push); |
| 491 |
break; |
| 492 |
|
| 493 |
case 'customer': |
| 494 |
$push = array(); |
| 495 |
$push = usces_trackPageview_customer($push); |
| 496 |
break; |
| 497 |
|
| 498 |
case 'delivery': |
| 499 |
$push = array(); |
| 500 |
$push = usces_trackPageview_delivery($push); |
| 501 |
break; |
| 502 |
|
| 503 |
case 'confirm': |
| 504 |
$push = array(); |
| 505 |
$push = usces_trackPageview_confirm($push); |
| 506 |
break; |
| 507 |
|
| 508 |
case 'ordercompletion': |
| 509 |
$push =array(); |
| 510 |
$push = usces_trackPageview_ordercompletion($push); |
| 511 |
break; |
| 512 |
|
| 513 |
case 'error': |
| 514 |
$push = array(); |
| 515 |
$push = usces_trackPageview_error($push); |
| 516 |
break; |
| 517 |
|
| 518 |
case 'login': |
| 519 |
$push = array(); |
| 520 |
$push = usces_trackPageview_login($push); |
| 521 |
break; |
| 522 |
|
| 523 |
case 'member': |
| 524 |
$push = array(); |
| 525 |
$push = usces_trackPageview_member($push); |
| 526 |
break; |
| 527 |
|
| 528 |
case 'newmemberform': |
| 529 |
$push = array(); |
| 530 |
$push = usces_trackPageview_newmemberform($push); |
| 531 |
break; |
| 532 |
|
| 533 |
case 'newcompletion': |
| 534 |
$push = array(); |
| 535 |
$push = usces_trackPageview_newcompletion($push); |
| 536 |
break; |
| 537 |
|
| 538 |
case 'editmemberform': |
| 539 |
$push = array(); |
| 540 |
$push = usces_trackPageview_editmemberform($push); |
| 541 |
break; |
| 542 |
|
| 543 |
case 'search_item': |
| 544 |
$push = array(); |
| 545 |
$push = usces_trackPageview_search_item($push); |
| 546 |
break; |
| 547 |
|
| 548 |
case 'maintenance': |
| 549 |
case 'editcompletion': |
| 550 |
case 'lostmemberpassword': |
| 551 |
case 'lostcompletion': |
| 552 |
case 'changepassword': |
| 553 |
case 'changepasscompletion': |
| 554 |
default: |
| 555 |
$push = array(); |
| 556 |
break; |
| 557 |
} |
| 558 |
return $push; |
| 559 |
} |
| 560 |
|
| 561 |
?> |