get_row("SELECT * FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `id`=$catid LIMIT 1",ARRAY_A); $output = ''; $output .= "
"; $output .= "

".str_replace("[categorisation]", htmlentities(stripslashes($product['name'])), __('You are editing the "[categorisation]" Category', 'wpsc'))."

\n\r"; $output .= "

".str_replace(""[categorisation]"", "current", __('+ Add new category to the "[categorisation]" Group', 'wpsc'))."

"; $output .="
\n\r"; $output .="
Display Category Shortcode:
\n\r"; $output .="
[wpsc_products category_url_name='{$product['nice-name']}']
\n\r"; $output .="
Display Category Template Tag:
\n\r"; $output .="
<?php echo wpsc_display_products_page(array('category_url_name'=>'{$product['nice-name']}')); ?>
\n\r"; $output .="
\n\r"; //$output .= " [ ".__('Edit This Group', 'wpsc')." ]"; $output .= "
"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; if ($product['display_type'] == 'grid') { $display_type1="selected='selected'"; } else if ($product['display_type'] == 'default') { $display_type2="selected='selected'"; } switch($product['display_type']) { case "default": $product_view1 = "selected ='selected'"; break; case "grid": if(function_exists('product_display_grid')) { $product_view3 = "selected ='selected'"; break; } case "list": if(function_exists('product_display_list')) { $product_view2 = "selected ='selected'"; break; } default: $product_view0 = "selected ='selected'"; break; } $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; if(function_exists("getimagesize")) { if($product['image'] != '') { $imagepath = WPSC_CATEGORY_DIR . $product['image']; $imagetype = @getimagesize($imagepath); //previously exif_imagetype() $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; } else { $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; } } $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; /* START OF TARGET MARKET SELECTION */ $countrylist = $wpdb->get_results("SELECT id,country,visible FROM `".WPSC_TABLE_CURRENCY_LIST."` ORDER BY country ASC ",ARRAY_A); $selectedCountries = $wpdb->get_col("SELECT countryid FROM `".WPSC_TABLE_CATEGORY_TM."` WHERE categoryid=".$product['id']." AND visible= 1"); // exit('
'.print_r($countrylist,true).'

'.print_r($selectedCountries,true).'
'); $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; //////// $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; if(function_exists("getimagesize")) { $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; } $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $used_additonal_form_set = wpsc_get_categorymeta($product['id'], 'use_additonal_form_set'); $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " "; $output .= " "; $output .= " "; $uses_billing_address = (bool)wpsc_get_categorymeta($product['id'], 'uses_billing_address'); $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= "
\n\r"; $output .= __('Name', 'wpsc').": "; $output .= " \n\r"; $output .= ""; $output .= "
\n\r"; $output .= __('Description', 'wpsc').": "; $output .= " \n\r"; $output .= ""; $output .= "
\n\r"; $output .= __('Category Parent', 'wpsc').": "; $output .= " \n\r"; $output .= wpsc_parent_category_list($product['group_id'], $product['id'], $product['category_parent']); $output .= "
\n\r"; $output .= __('Category Image', 'wpsc').": "; $output .= " \n\r"; $output .= ""; $output .= "
\n\r"; $output .= " \n\r"; $output .= __('Height', 'wpsc').": ".__('Width', 'wpsc').":
$nzshpcrt_imagesize_info
\n\r"; $output .= "".__('You can upload thumbnail images for each group. To display Group details in your shop you must configure these settings under Presentation Settings.', 'wpsc')."\n\r"; $output .= "
\n\r"; $output .= " \n\r"; $output .= __('Height', 'wpsc').": ".__('Width', 'wpsc').":
$nzshpcrt_imagesize_info
\n\r"; $output .= "".__('You can upload thumbnail images for each group. To display Group details in your shop you must configure these settings under Presentation Settings.', 'wpsc')."\n\r"; $output .= "
\n\r"; $output .= __('Delete Image', 'wpsc').": "; $output .= " \n\r"; $output .= ""; $output .= "

Target Market Restrictions

 
\n\r"; $output .= __('Target Markets', 'wpsc').":\n\r"; $output .= " \n\r"; if(@extension_loaded('suhosin')) { $output .= "".__("The Target Markets feature has been disabled because you have the Suhosin PHP extension installed on this server. If you need to use the Target Markets feature then disable the suhosin extension, if you can not do this, you will need to contact your hosting provider. ",'wpsc').""; } else { $output .= "Select: All  None
"; $output .= "
\n\r"; foreach($countrylist as $country){ if(in_array($country['id'], $selectedCountries)) /* if($country['visible'] == 1) */{ $output .= " ".$country['country']."
\n\r"; }else{ $output .= " ".$country['country']."
\n\r"; } } $output .= "


"; $output .= " Select the markets you are selling this category to.\n\r"; } $output .= "
\n\r"; $output .= "

".__('Presentation Settings', 'wpsc')."

\n\r"; $output .= " ".__('To over-ride the presentation settings for this group you can enter in your prefered settings here', 'wpsc')."\n\r"; $output .= "
\n\r"; $output .= " ". __('Catalog View', 'wpsc').":\n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= "
\n\r"; $output .= __('Thumbnail Size', 'wpsc').": "; $output .= " \n\r"; $output .= __('Height', 'wpsc').": "; $output .= __('Width', 'wpsc').":
"; $output .= "
\n\r"; $output .= "

".__('Checkout Settings', 'wpsc')."

\n\r"; //$output .= " ".__('To over-ride the presentation settings for this group you can enter in your prefered settings here', 'wpsc')."\n\r"; $output .= "
\n\r"; $output .= __("This category requires additional checkout form fields",'wpsc').": "; $output .= " \n\r"; $output .= " \n\r"; //$output .= " "; //$output .= " "; $output .= "
\n\r"; $output .= __("Products in this category use the billing address to calculate shipping",'wpsc').": "; $output .= " \n\r"; $output .= " "; $output .= " "; $output .= "
\n\r"; $output .= " \n\r"; $output .= ""; $output .= ""; $output .= ""; $output .= "".__('Delete', 'wpsc').""; $output .= "
\n\r"; return $output; } function nzshpcrt_getvariationform($variation_id) { global $wpdb,$nzshpcrt_imagesize_info; $variation_sql = "SELECT * FROM `".WPSC_TABLE_PRODUCT_VARIATIONS."` WHERE `id`='$variation_id' LIMIT 1"; $variation_data = $wpdb->get_results($variation_sql,ARRAY_A) ; $variation = $variation_data[0]; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= "
\n\r"; $output .= __('Name', 'wpsc').": "; $output .= " \n\r"; $output .= ""; $output .= "
\n\r"; $output .= __('Variation Values', 'wpsc').": "; $output .= " \n\r"; $variation_values_sql = "SELECT * FROM `".WPSC_TABLE_VARIATION_VALUES."` WHERE `variation_id`='$variation_id' ORDER BY `id` ASC"; $variation_values = $wpdb->get_results($variation_values_sql,ARRAY_A); $variation_value_count = count($variation_values); $output .= "
"; $num = 0; foreach($variation_values as $variation_value) { $output .= ""; $output .= ""; if($variation_value_count > 1) { $output .= " ".__("; } $output .= "
"; $output .= "
"; $num++; } $output .= "
"; $output .= "".__('Add', 'wpsc').""; $output .= "
\n\r"; $output .= " \n\r"; $output .= ""; $output .= ""; $output .= ""; $output .= "".__('Delete', 'wpsc').""; $output .= "
\n\r"; return $output; } function coupon_edit_form($coupon) { $conditions = unserialize($coupon['condition']); //exit('
'.print_r($coupon, true).'
'); $start_timestamp = strtotime($coupon['start']); $end_timestamp = strtotime($coupon['expiry']); $id = $coupon['id']; $output = ''; $output .= "
\n\r"; $output .= " \n\r"; $output .= "\n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; if($conditions != null){ $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= " \n\r"; $i=0; foreach ($conditions as $condition){ $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $i++; } $output .= wpsc_coupons_conditions( $id); }elseif($conditions == null){ $output .= wpsc_coupons_conditions( $id); } $output .= "
".__('Coupon Code', 'wpsc')."".__('Discount', 'wpsc')."".__('Start', 'wpsc')."".__('Expiry', 'wpsc')."".__('Use Once', 'wpsc')."".__('Active', 'wpsc')."".__('Apply On All Products', 'wpsc')."
\n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " "; $output .= " \n\r"; $output .= " \n\r"; $coupon_start = explode(" ",$coupon['start']); $output .= ""; $output .= " \n\r"; $coupon_expiry = explode(" ",$coupon['expiry']); $output .= ""; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= " \n\r"; $output .= "
"; $output .= "Conditions"; $output .= "
"; $output .= "Delete"; $output .= ""; $output .= "Property"; $output .= ""; $output .= "Logic"; $output .= ""; $output .= "Value"; $output .= "
"; $output .= ""; $output .= ""; $output .= "Delete"; $output .= ""; $output .= $condition['property']; $output .= ""; $output .= $condition['logic']; $output .= ""; $output .= $condition['value']; $output .= "
\n\r"; $output .= "
\n\r"; echo $output; return $output; } function wpsc_coupons_conditions($id){ ?> Add Conditions
'; return $output; } function setting_button(){ $next_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']."?page=wpsc-edit-products"; // $output.="
"; $output.="
| ".__('Settings', 'wpsc')." »"; $output.="  
"; return $output; } function wpsc_right_now($hidden = '') { global $wpdb,$nzshpcrt_imagesize_info; $year = date("Y"); $month = date("m"); $start_timestamp = mktime(0, 0, 0, $month, 1, $year); $end_timestamp = mktime(0, 0, 0, ($month+1), 0, $year); $replace_values[":productcount:"] = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PRODUCT_LIST."` WHERE `active` IN ('1')"); $product_count = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PRODUCT_LIST."` WHERE `active` IN ('1')"); $replace_values[":productcount:"] .= " ".(($replace_values[":productcount:"] == 1) ? __('product', 'wpsc') : __('products', 'wpsc')); $product_unit = (($replace_values[":productcount:"] == 1) ? __('product', 'wpsc') : __('products', 'wpsc')); $replace_values[":groupcount:"] = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `active` IN ('1')"); $group_count = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PRODUCT_CATEGORIES."` WHERE `active` IN ('1')"); $replace_values[":groupcount:"] .= " ".(($replace_values[":groupcount:"] == 1) ? __('group', 'wpsc') : __('groups', 'wpsc')); $group_unit = (($replace_values[":groupcount:"] == 1) ? __('group', 'wpsc') : __('groups', 'wpsc')); $replace_values[":salecount:"] = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `date` BETWEEN '".$start_timestamp."' AND '".$end_timestamp."'"); $sales_count = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `date` BETWEEN '".$start_timestamp."' AND '".$end_timestamp."'"); $replace_values[":salecount:"] .= " ".(($replace_values[":salecount:"] == 1) ? __('sale', 'wpsc') : __('sales', 'wpsc')); $sales_unit = (($replace_values[":salecount:"] == 1) ? __('sale', 'wpsc') : __('sales', 'wpsc')); $replace_values[":monthtotal:"] = nzshpcrt_currency_display(admin_display_total_price($start_timestamp, $end_timestamp),1); $replace_values[":overaltotal:"] = nzshpcrt_currency_display(admin_display_total_price(),1); $variation_count = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PRODUCT_VARIATIONS."`"); $variation_unit = (($variation_count == 1) ? __('variation', 'wpsc') : __('variations', 'wpsc')); $replace_values[":pendingcount:"] = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `processed` IN ('1')"); $pending_sales = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `processed` IN ('1')"); $replace_values[":pendingcount:"] .= " " . (($replace_values[":pendingcount:"] == 1) ? __('transaction', 'wpsc') : __('transactions', 'wpsc')); $pending_sales_unit = (($replace_values[":pendingcount:"] == 1) ? __('transaction', 'wpsc') : __('transactions', 'wpsc')); $accept_sales = $wpdb->get_var("SELECT COUNT(*) FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `processed` IN ('2' ,'3', '4')"); $accept_sales_unit = (($accept_sales == 1) ? __('transaction', 'wpsc') : __('transactions', 'wpsc')); $replace_values[":theme:"] = get_option('wpsc_selected_theme'); $replace_values[":versionnumber:"] = WPSC_PRESENTABLE_VERSION; if (function_exists('add_object_page')) { $output=""; $output.="
"; $output.="

"; $output.=" ".__('Current Month', 'wpsc').""; $output.="
"; $output.="

"; $output .= "
"; $output .= "
"; $output .= "

".__('At a Glance', 'wpsc')."

"; //$output.="

".__('You have :productcount:, contained within :groupcount:. This month you made :salecount: and generated a total of :monthtotal: and your total sales ever is :overaltotal:. You have :pendingcount: awaiting approval.', 'wpsc')."

"; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= ""; $output .= "
"; $output .= "".$product_count.""; $output .= ""; $output .= ucfirst($product_unit); $output .= ""; $output .= "".$sales_count.""; $output .= ""; $output .= ucfirst($sales_unit); $output .= "
"; $output .= "".$group_count.""; $output .= ""; $output .= ucfirst($group_unit); $output .= ""; $output .= "".$pending_sales.""; $output .= "".__('Pending', 'wpsc')." "; $output .= ucfirst($pending_sales_unit); $output .= "
"; $output .= "".$variation_count.""; $output .= ""; $output .= ucfirst($variation_unit); $output .= ""; $output .= "".$accept_sales.""; $output .= "".__('Closed', 'wpsc')." "; $output .= ucfirst($accept_sales_unit); $output .= "
"; $output .= "
"; $output .= "
"; $output .= "

".__('Add New Product', 'wpsc')."".__('Here you can add products, groups or variations', 'wpsc')."

"; $output .= "
"; $output .= "
"; $output.="
"; } else { $output=""; $output.="
\n\r"; $output.="

\n\r"; $output.=" ".__('Add New Product', 'wpsc')."\n\r"; $output.=" "._('Right Now')."\n\r"; //$output.="
\n\r"; $output.="

\n\r"; $output.="

".__('You have :productcount:, contained within :groupcount:. This month you made :salecount: and generated a total of :monthtotal: and your total sales ever is :overaltotal:. You have :pendingcount: awaiting approval.', 'wpsc')."

\n\r"; $output.="

\n\r"; $output.=" ".__('You are using the :theme: style. This is WP e-Commerce :versionnumber:.', 'wpsc')."\n\r"; //$output.=" Change Theme\n\r"; //$output.="This is WordPress version 2.6. Update to 2.6.1\n\r"; $output.="

\n\r"; $output.="
\n\r"; $output.="
\n\r"; $output = str_replace(array_keys($replace_values), array_values($replace_values),$output); } return $output; } function wpsc_packing_slip($purchase_id) { global $wpdb, $purchlogitem, $wpsc_cart,$purchlog; if(isset($_REQUEST['purchaselog_id'])){ $purchlogitem = new wpsc_purchaselogs_items((int)$_REQUEST['purchaselog_id']); } $purch_sql = "SELECT * FROM `".WPSC_TABLE_PURCHASE_LOGS."` WHERE `id`='".$purchase_id."'"; $purch_data = $wpdb->get_row($purch_sql,ARRAY_A) ; //echo "

".__('Date', 'wpsc').":".date("jS M Y", $purch_data['date'])."

"; $cartsql = "SELECT * FROM `".WPSC_TABLE_CART_CONTENTS."` WHERE `purchaseid`=".$purchase_id.""; $cart_log = $wpdb->get_results($cartsql,ARRAY_A) ; $j = 0; if($cart_log != null) { echo "
\n\r"; echo apply_filters( 'wpsc_packing_slip_header', '

' . __( 'Packing Slip', 'wpsc' ) . "

\n\r" ); echo "".__('Order', 'wpsc')." # ".$purchase_id."

\n\r"; echo "\n\r"; /* $form_sql = "SELECT * FROM `".WPSC_TABLE_SUBMITED_FORM_DATA."` WHERE `log_id` = '".(int)$purchase_id."'"; $input_data = $wpdb->get_results($form_sql,ARRAY_A); */ echo ""; foreach((array)$purchlogitem->userinfo as $userinfo){ if($userinfo['unique_name'] != 'billingcountry'){ echo ""; }else{ $userinfo['value'] = maybe_unserialize($userinfo['value']); if(is_array($userinfo['value'] )){ if(!empty($userinfo['value'][1]) && !is_numeric($userinfo['value'][1])){ echo ""; }elseif(is_numeric($userinfo['value'][1])){ echo ""; } if(!empty($userinfo['value'][0])){ echo ""; } }else{ echo ""; } } } echo ""; foreach((array)$purchlogitem->shippinginfo as $userinfo){ if($userinfo['unique_name'] != 'shippingcountry' && $userinfo['unique_name'] != 'shippingstate'){ echo ""; }elseif($userinfo['unique_name'] == 'shippingcountry'){ $userinfo['value'] = maybe_unserialize($userinfo['value']); if(is_array($userinfo['value'] )){ if(!empty($userinfo['value'][1]) && !is_numeric($userinfo['value'][1])){ echo ""; }elseif(is_numeric($userinfo['value'][1])){ echo ""; } if(!empty($userinfo['value'][0])){ echo ""; } }else{ echo ""; } }elseif($userinfo['unique_name'] == 'shippingstate'){ if(!empty($userinfo['value']) && !is_numeric($userinfo['value'])){ echo ""; }elseif(is_numeric($userinfo['value'])){ echo ""; } } } // echo('
'.print_r($purchlogitem,true).'
'); /* foreach($input_data as $input_row) { $rekeyed_input[$input_row['form_id']] = $input_row; } if($input_data != null) { $form_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_CHECKOUT_FORMS."` WHERE `active` = '1'",ARRAY_A); // exit('
'.print_r($purch_data, true).'
'); foreach($form_data as $form_field) { switch($form_field['type']) { case 'country': $delivery_region_count = $wpdb->get_var("SELECT COUNT(`regions`.`id`) FROM `".WPSC_TABLE_REGION_TAX."` AS `regions` INNER JOIN `".WPSC_TABLE_CURRENCY_LIST."` AS `country` ON `country`.`id` = `regions`.`country_id` WHERE `country`.`isocode` IN('".$wpdb->escape( $purch_data['billing_country'])."')"); if(is_numeric($purch_data['billing_region']) && ($delivery_region_count > 0)) { echo " \n\r"; } echo " \n\r"; break; case 'delivery_country': echo " \n\r"; break; case 'heading': echo " \n\r"; break; default: if($form_field['unique_name'] == 'shippingstate'){ echo " \n\r"; }else{ echo " \n\r"; } break; } } } else { echo " \n\r"; echo " \n\r"; echo " \n\r"; echo " \n\r"; } */ if(get_option('payment_method') == 2) { $gateway_name = ''; foreach($GLOBALS['nzshpcrt_gateways'] as $gateway) { if($purch_data['gateway'] != 'testmode') { if($gateway['internalname'] == $purch_data['gateway'] ) { $gateway_name = $gateway['name']; } } else { $gateway_name = "Manual Payment"; } } } // echo " \n\r"; // echo " \n\r"; // //echo " \n\r"; // echo " \n\r"; // $engrave_line = explode(",",$purch_data['engravetext']); // echo " \n\r"; // echo " \n\r"; // echo " \n\r"; // if($purch_data['transactid'] != '') { // echo " \n\r"; // } echo "
Billing Info
".$userinfo['name'].": ".$userinfo['value']."
State: ".$userinfo['value'][1]."
State: ".wpsc_get_state_by_id($userinfo['value'][1],'name')."
Country: ".$userinfo['value'][0]."
".$userinfo['name'].": ".$userinfo['value']."
Shipping Info
".$userinfo['name'].": ".$userinfo['value']."
State: ".$userinfo['value'][1]."
State: ".wpsc_get_state_by_id($userinfo['value'][1],'name')."
Country: ".$userinfo['value'][0]."
".$userinfo['name'].": ".$userinfo['value']."
".$userinfo['name'].": ".$userinfo['value']."
State: ".wpsc_get_state_by_id($userinfo['value'],'name')."
".__('State', 'wpsc').":".wpsc_get_region($purch_data['billing_region'])."
".wp_kses($form_field['name'], array() ).":".wpsc_get_country($purch_data['billing_country'])."
".$form_field['name'].":".wpsc_get_country($purch_data['shipping_country'])."
".wp_kses($form_field['name'], array()).":
".wp_kses($form_field['name'], array() ).":".wpsc_get_region($purch_data['shipping_region'])."
".wp_kses($form_field['name'], array() ).":".htmlentities(stripslashes($rekeyed_input[$form_field['id']]['value']), ENT_QUOTES,'UTF-8')."
".__('Name', 'wpsc').":".$purch_data['firstname']." ".$purch_data['lastname']."
".__('Address', 'wpsc').":".$purch_data['address']."
".__('Phone', 'wpsc').":".$purch_data['phone']."
".__('Email', 'wpsc').":".$purch_data['email']."
".__('Payment Method', 'wpsc').":".$gateway_name."
".__('Purchase No.', 'wpsc').":".$purch_data['id']."
".__('How The Customer Found Us', 'wpsc').":".$purch_data['find_us']."
".__('Engrave text', 'wpsc')."
".__('Line 1', 'wpsc').":".$engrave_line[0]."
".__('Line 2', 'wpsc').":".$engrave_line[1]."
".__('Transaction Id', 'wpsc').":".$purch_data['transactid']."
\n\r"; echo ""; echo ""; echo " "; echo " "; echo " "; echo " "; echo ""; echo ''; $endtotal = 0; $all_donations = true; $all_no_shipping = true; $file_link_list = array(); // exit('
'.print_r($cart_log,true).'
'); foreach($cart_log as $cart_row) { $purchlogitem->the_purch_item(); // exit('
'.print_r, true).'
'); $alternate = ""; $j++; if(($j % 2) != 0) { $alternate = "class='alt'"; } $productsql= "SELECT * FROM `".WPSC_TABLE_PRODUCT_LIST."` WHERE `id`=".$cart_row['prodid'].""; $product_data = $wpdb->get_results($productsql,ARRAY_A); $variation_sql = "SELECT * FROM `".WPSC_TABLE_CART_ITEM_VARIATIONS."` WHERE `cart_id`='".$cart_row['id']."'"; $variation_data = $wpdb->get_results($variation_sql,ARRAY_A); $variation_count = count($variation_data); if($variation_count > 1) { $variation_list = " ("; $i = 0; foreach($variation_data as $variation) { if($i > 0) { $variation_list .= ", "; } $value_id = $variation['value_id']; $value_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_VARIATION_VALUES."` WHERE `id`='".$value_id."' LIMIT 1",ARRAY_A); $variation_list .= $value_data[0]['name']; $i++; } $variation_list .= ")"; } else if($variation_count == 1) { $value_id = $variation_data[0]['value_id']; $value_data = $wpdb->get_results("SELECT * FROM `".WPSC_TABLE_VARIATION_VALUES."` WHERE `id`='".$value_id."' LIMIT 1",ARRAY_A); $variation_list = " (".$value_data[0]['name'].")"; } else { $variation_list = ''; } if($cart_row['donation'] != 1) { $all_donations = false; } if($cart_row['no_shipping'] != 1) { $shipping = $cart_row['pnp'] * $cart_row['quantity']; $total_shipping += $shipping; $all_no_shipping = false; } else { $shipping = 0; } $price = $cart_row['price'] * $cart_row['quantity']; $gst = $price - ($price / (1+($cart_row['gst'] / 100))); if($gst > 0) { $tax_per_item = $gst / $cart_row['quantity']; } echo ""; echo " "; echo " "; echo " "; echo " "; echo ''; } echo "
".__('Quantity', 'wpsc')." ".__('Name', 'wpsc')."".__('Price', 'wpsc')." ".__('Shipping', 'wpsc')." ".wpsc_display_tax_label(false)."
"; echo $cart_row['quantity']; echo " "; echo $product_data[0]['name']; echo stripslashes($variation_list); echo " "; echo nzshpcrt_currency_display( $price, 1); echo " "; echo nzshpcrt_currency_display($shipping, 1); echo " '; if(wpsc_tax_isincluded()){ echo (wpsc_purchaselog_details_tax()); }else{ echo nzshpcrt_currency_display($cart_row['tax_charged'],1); } echo ''; echo '
"; echo ''; echo ''; echo ''; echo ''; echo '
Base Shipping' . nzshpcrt_currency_display( $purch_data['base_shipping'], 1 ) . '
Total Shipping' . nzshpcrt_currency_display( $purch_data['base_shipping'] + $total_shipping, 1 ) . '
Total Price' . nzshpcrt_currency_display( $purch_data['totalprice'], 1 ) . '
'; echo "
\n\r"; } else { echo "
".__('This users cart was empty', 'wpsc'); } } function wpsc_product_item_row() { } ?>