Version Description
- Added a new action hook to allow affiliate plugin integration with the PayPal smart checkout option.
- The compact cart shortcode output can be translated fully.
- Completed testing on WP 5.5
Download this release
Release Info
Developer | mra13 |
Plugin | WordPress Simple PayPal Shopping Cart |
Version | 4.5.0 |
Comparing to | |
See all releases |
Code changes from version 4.4.0 to 4.5.0
- assets/wspsc-admin-styles.css +40 -1
- includes/admin/images/wp-affiliate-plugin-integration.png +0 -0
- includes/admin/images/wspsc-customer-input.png +0 -0
- includes/admin/images/wspsc-mailchimp-integration.png +0 -0
- includes/admin/wp_shopping_cart_admin_utils.php +23 -0
- includes/admin/wp_shopping_cart_menu_addons.php +79 -0
- includes/admin/wp_shopping_cart_menu_adv_settings.php +222 -0
- includes/admin/wp_shopping_cart_menu_discounts.php +3 -3
- includes/admin/wp_shopping_cart_menu_main.php +8 -1
- includes/admin/wp_shopping_cart_menu_tools.php +6 -0
- includes/admin/wp_shopping_cart_tinymce.php +214 -214
- includes/wspsc-cart-functions.php +406 -224
- languages/wordpress-simple-paypal-shopping-cart-br_FR.mo +0 -0
- languages/wordpress-simple-paypal-shopping-cart-br_FR.po +891 -0
- languages/wordpress-simple-paypal-shopping-cart.pot +712 -339
- lib/gallery-wp-cart.php +0 -9
- paypal.php +557 -476
- readme.txt +49 -3
- wp_shopping_cart.php +607 -552
- wp_shopping_cart_misc_functions.php +1 -18
- wp_shopping_cart_shortcodes.php +14 -14
- wp_shopping_cart_style.css +4 -0
- wp_shopping_cart_utility_functions.php +36 -0
assets/wspsc-admin-styles.css
CHANGED
@@ -13,4 +13,43 @@ i.mce-i-wp-cart-tinymce::before {
|
|
13 |
margin: 10px 0;
|
14 |
padding: 5px 5px 5px 10px;
|
15 |
text-shadow: 1px 1px #FFFFFF;
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
margin: 10px 0;
|
14 |
padding: 5px 5px 5px 10px;
|
15 |
text-shadow: 1px 1px #FFFFFF;
|
16 |
+
}
|
17 |
+
|
18 |
+
/*----- Addons Listing ----- */
|
19 |
+
.wspsc_addon_item_canvas{
|
20 |
+
background-color: white;
|
21 |
+
font-family:sans-serif,arial;
|
22 |
+
font-size:12px;
|
23 |
+
border:1px solid #ddd;
|
24 |
+
box-sizing: border-box;
|
25 |
+
display:block;
|
26 |
+
float:left;
|
27 |
+
margin:3px 12px 12px 0;
|
28 |
+
padding:15px;
|
29 |
+
position:relative;
|
30 |
+
width:300px;
|
31 |
+
height:400px;
|
32 |
+
}
|
33 |
+
.wspsc_addon_item_canvas:hover{border-color:#d6d6d6;}
|
34 |
+
.wspsc_addon_item_thumb {position: relative}
|
35 |
+
.wspsc_addon_item_thumb img {padding:5px; border: 1px solid #c7d2b4;}
|
36 |
+
.wspsc_addon_item_thumb a img {border: 1px solid #ccc;}
|
37 |
+
.wspsc_addon_item_body{line-height:22px;height:170px;overflow:hidden;}
|
38 |
+
.wspsc_addon_item_name{font-size:16px;font-weight:bold;text-align: center;margin:10px 10px 10px 0px;}
|
39 |
+
.wspsc_addon_item_description{margin:10px 10px 5px 0px;text-align:justify;overflow:hidden;height:70px;}
|
40 |
+
.wspsc_addon_clear{clear:both;}
|
41 |
+
.wspsc_addon_item_details_link{
|
42 |
+
text-align: center;
|
43 |
+
}
|
44 |
+
.wspsc_addon_item_details_link a{
|
45 |
+
border: 3px solid #2d3140;
|
46 |
+
color: #2d3140;
|
47 |
+
display: inline-block;
|
48 |
+
padding: 5px 15px;
|
49 |
+
text-decoration: none !important;
|
50 |
+
}
|
51 |
+
.wspsc_addon_item_details_link a:hover{
|
52 |
+
background-color: #2d3140;
|
53 |
+
color: #FFF;
|
54 |
+
}
|
55 |
+
/*----- END Addons Listing ----- */
|
includes/admin/images/wp-affiliate-plugin-integration.png
ADDED
Binary file
|
includes/admin/images/wspsc-customer-input.png
ADDED
Binary file
|
includes/admin/images/wspsc-mailchimp-integration.png
ADDED
Binary file
|
includes/admin/wp_shopping_cart_admin_utils.php
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class WPSPCAdminUtils {
|
4 |
+
|
5 |
+
static function e_checked( $a, $b = "1", $empty_means_checked = false ) {
|
6 |
+
if ( $a == $b || ($empty_means_checked && empty( $a )) ) {
|
7 |
+
echo ' checked';
|
8 |
+
} else {
|
9 |
+
echo '';
|
10 |
+
}
|
11 |
+
}
|
12 |
+
|
13 |
+
static function gen_options( $opts, $value = false ) {
|
14 |
+
$out = '';
|
15 |
+
$tpl = '<option value="%s"%s>%s</option>' . "\r\n";
|
16 |
+
foreach ( $opts as $opt ) {
|
17 |
+
$selected = ($value !== false && $value == $opt[ 0 ]) ? ' selected' : '';
|
18 |
+
$out .= sprintf( $tpl, $opt[ 0 ], $selected, $opt[ 1 ] );
|
19 |
+
}
|
20 |
+
return $out;
|
21 |
+
}
|
22 |
+
|
23 |
+
}
|
includes/admin/wp_shopping_cart_menu_addons.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function wspsc_show_addons_menu_page() {
|
4 |
+
if (!current_user_can('manage_options')) {
|
5 |
+
wp_die('You do not have permission to access this settings page.');
|
6 |
+
}
|
7 |
+
|
8 |
+
echo '<div class="wrap">';
|
9 |
+
echo '<h1>' . (__("Simple Cart Add-ons", "wordpress-simple-paypal-shopping-cart")) . '</h1>';
|
10 |
+
|
11 |
+
echo '<div id="poststuff"><div id="post-body">';
|
12 |
+
?>
|
13 |
+
|
14 |
+
<div class="wspsc_yellow_box">
|
15 |
+
<p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
|
16 |
+
<a href="https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768" target="_blank"><?php _e("WP Simple Cart Homepage", "wordpress-simple-paypal-shopping-cart"); ?></a></p>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<?php
|
20 |
+
$addons_data = array();
|
21 |
+
|
22 |
+
$addon_1 = array(
|
23 |
+
"name" => __( "Collect Customer Input", 'wordpress-simple-paypal-shopping-cart' ),
|
24 |
+
"thumbnail" => WP_CART_URL . "/includes/admin/images/wspsc-customer-input.png",
|
25 |
+
"description" => __( "This addon allows you to collect customer input in the shopping cart at the time of checkout.", 'wordpress-simple-paypal-shopping-cart' ),
|
26 |
+
"page_url" => "https://www.tipsandtricks-hq.com/ecommerce/wp-simple-cart-collect-customer-input-in-the-shopping-cart-4396",
|
27 |
+
);
|
28 |
+
array_push( $addons_data, $addon_1 );
|
29 |
+
|
30 |
+
$addon_2 = array(
|
31 |
+
"name" => __( "Mailchimp Integration", 'wordpress-simple-paypal-shopping-cart' ),
|
32 |
+
"thumbnail" => WP_CART_URL . "/includes/admin/images/wspsc-mailchimp-integration.png",
|
33 |
+
"description" => __( "This addon allows you to add users to your Mailchimp list after they purchase an item.", 'wordpress-simple-paypal-shopping-cart' ),
|
34 |
+
"page_url" => "https://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart-and-mailchimp-integration-3442",
|
35 |
+
);
|
36 |
+
array_push( $addons_data, $addon_2 );
|
37 |
+
|
38 |
+
$addon_3 = array(
|
39 |
+
"name" => __( "WP Affiliate Plugin", 'wordpress-simple-paypal-shopping-cart' ),
|
40 |
+
"thumbnail" => WP_CART_URL . "/includes/admin/images/wp-affiliate-plugin-integration.png",
|
41 |
+
"description" => __( "This plugin allows you to award commission to affiliates for referring customers to your site.", 'wordpress-simple-paypal-shopping-cart' ),
|
42 |
+
"page_url" => "https://www.tipsandtricks-hq.com/wordpress-affiliate-platform-plugin-simple-affiliate-program-for-wordpress-blogsite-1474",
|
43 |
+
);
|
44 |
+
array_push( $addons_data, $addon_3 );
|
45 |
+
|
46 |
+
/* Show the addons list */
|
47 |
+
foreach ( $addons_data as $addon ) {
|
48 |
+
$output .= '<div class="wspsc_addon_item_canvas">';
|
49 |
+
|
50 |
+
$output .= '<div class="wspsc_addon_item_thumb">';
|
51 |
+
|
52 |
+
$img_src = $addon[ 'thumbnail' ];
|
53 |
+
$output .= '<img src="' . $img_src . '" alt="' . $addon[ 'name' ] . '">';
|
54 |
+
$output .= '</div>'; //end thumbnail
|
55 |
+
|
56 |
+
$output .= '<div class="wspsc_addon_item_body">';
|
57 |
+
$output .= '<div class="wspsc_addon_item_name">';
|
58 |
+
$output .= '<a href="' . $addon[ 'page_url' ] . '" target="_blank">' . $addon[ 'name' ] . '</a>';
|
59 |
+
$output .= '</div>'; //end name
|
60 |
+
|
61 |
+
$output .= '<div class="wspsc_addon_item_description">';
|
62 |
+
$output .= $addon[ 'description' ];
|
63 |
+
$output .= '</div>'; //end description
|
64 |
+
|
65 |
+
$output .= '<div class="wspsc_addon_item_details_link">';
|
66 |
+
$output .= '<a href="' . $addon[ 'page_url' ] . '" class="wspsc_addon_view_details" target="_blank">' . __( 'View Details', 'wordpress-simple-paypal-shopping-cart' ) . '</a>';
|
67 |
+
|
68 |
+
$output .= '</div>'; //end detils link
|
69 |
+
$output .= '</div>'; //end body
|
70 |
+
|
71 |
+
$output .= '</div>'; //end canvas
|
72 |
+
}
|
73 |
+
|
74 |
+
echo $output;
|
75 |
+
|
76 |
+
echo '</div></div>';//End of poststuff and post-body
|
77 |
+
echo '</div>';//End of wrap
|
78 |
+
|
79 |
+
}
|
includes/admin/wp_shopping_cart_menu_adv_settings.php
ADDED
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
function show_wp_cart_adv_settings_page() {
|
4 |
+
|
5 |
+
require_once(WP_CART_PATH . 'includes/admin/wp_shopping_cart_admin_utils.php');
|
6 |
+
|
7 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
8 |
+
wp_die( 'You do not have permission to access the settings page.' );
|
9 |
+
}
|
10 |
+
|
11 |
+
if ( isset( $_POST[ 'wpspc_adv_settings_update' ] ) ) {
|
12 |
+
$nonce = $_REQUEST[ '_wpnonce' ];
|
13 |
+
if ( ! wp_verify_nonce( $nonce, 'wpspc_adv_settings_update' ) ) {
|
14 |
+
wp_die( 'Error! Nonce Security Check Failed! Go back to email settings menu and save the settings again.' );
|
15 |
+
}
|
16 |
+
|
17 |
+
$enable_pp_smart_checkout = filter_input( INPUT_POST, 'wpspc_enable_pp_smart_checkout', FILTER_SANITIZE_NUMBER_INT );
|
18 |
+
$live_client_id = filter_input( INPUT_POST, 'wpspc_pp_live_client_id', FILTER_SANITIZE_STRING );
|
19 |
+
$test_client_id = filter_input( INPUT_POST, 'wpspc_pp_test_client_id', FILTER_SANITIZE_STRING );
|
20 |
+
$live_secret = filter_input( INPUT_POST, 'wpspc_pp_live_secret', FILTER_SANITIZE_STRING );
|
21 |
+
$test_secret = filter_input( INPUT_POST, 'wpspc_pp_test_secret', FILTER_SANITIZE_STRING );
|
22 |
+
$disable_standard_checkout = filter_input( INPUT_POST, 'wpspc_disable_standard_checkout', FILTER_SANITIZE_NUMBER_INT );
|
23 |
+
$btn_size = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_btn_size', FILTER_SANITIZE_STRING );
|
24 |
+
$btn_color = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_btn_color', FILTER_SANITIZE_STRING );
|
25 |
+
$btn_shape = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_btn_shape', FILTER_SANITIZE_STRING );
|
26 |
+
$btn_layout = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_btn_layout', FILTER_SANITIZE_STRING );
|
27 |
+
$pm_credit = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_payment_method_credit', FILTER_SANITIZE_STRING );
|
28 |
+
$pm_elv = filter_input( INPUT_POST, 'wpspc_pp_smart_checkout_payment_method_elv', FILTER_SANITIZE_STRING );
|
29 |
+
|
30 |
+
update_option( 'wpspc_enable_pp_smart_checkout', $enable_pp_smart_checkout );
|
31 |
+
update_option( 'wpspc_pp_live_client_id', $live_client_id );
|
32 |
+
update_option( 'wpspc_pp_live_secret', $live_secret );
|
33 |
+
update_option( 'wpspc_pp_test_client_id', $test_client_id );
|
34 |
+
update_option( 'wpspc_pp_test_secret', $test_secret );
|
35 |
+
update_option( 'wpspc_disable_standard_checkout', $disable_standard_checkout );
|
36 |
+
update_option( 'wpspc_pp_smart_checkout_btn_size', $btn_size );
|
37 |
+
update_option( 'wpspc_pp_smart_checkout_btn_color', $btn_color );
|
38 |
+
update_option( 'wpspc_pp_smart_checkout_btn_shape', $btn_shape );
|
39 |
+
update_option( 'wpspc_pp_smart_checkout_btn_layout', $btn_layout );
|
40 |
+
update_option( 'wpspc_pp_smart_checkout_payment_method_credit', $pm_credit );
|
41 |
+
update_option( 'wpspc_pp_smart_checkout_payment_method_elv', $pm_elv );
|
42 |
+
|
43 |
+
echo '<div id="message" class="updated fade"><p><strong>';
|
44 |
+
echo 'Advanced Settings Updated!';
|
45 |
+
echo '</strong></p></div>';
|
46 |
+
}
|
47 |
+
$wpspc_send_buyer_email = '';
|
48 |
+
if ( get_option( 'wpspc_send_buyer_email' ) ) {
|
49 |
+
$wpspc_send_buyer_email = 'checked="checked"';
|
50 |
+
}
|
51 |
+
$wpspc_buyer_from_email = get_option( 'wpspc_buyer_from_email' );
|
52 |
+
$wpspc_buyer_email_subj = get_option( 'wpspc_buyer_email_subj' );
|
53 |
+
$wpspc_buyer_email_body = get_option( 'wpspc_buyer_email_body' );
|
54 |
+
$wpspc_send_seller_email = '';
|
55 |
+
if ( get_option( 'wpspc_send_seller_email' ) ) {
|
56 |
+
$wpspc_send_seller_email = 'checked="checked"';
|
57 |
+
}
|
58 |
+
$wpspc_notify_email_address = get_option( 'wpspc_notify_email_address' );
|
59 |
+
if ( empty( $wpspc_notify_email_address ) ) {
|
60 |
+
$wpspc_notify_email_address = get_bloginfo( 'admin_email' ); //default value
|
61 |
+
}
|
62 |
+
$wpspc_seller_email_subj = get_option( 'wpspc_seller_email_subj' );
|
63 |
+
if ( empty( $wpspc_seller_email_subj ) ) {
|
64 |
+
$wpspc_seller_email_subj = "Notification of product sale";
|
65 |
+
}
|
66 |
+
$wpspc_seller_email_body = get_option( 'wpspc_seller_email_body' );
|
67 |
+
if ( empty( $wpspc_seller_email_body ) ) {
|
68 |
+
$wpspc_seller_email_body = "Dear Seller\n" .
|
69 |
+
"\nThis mail is to notify you of a product sale.\n" .
|
70 |
+
"\n{product_details}" .
|
71 |
+
"\n\nThe sale was made to {first_name} {last_name} ({payer_email})" .
|
72 |
+
"\n\nThanks";
|
73 |
+
}
|
74 |
+
?>
|
75 |
+
|
76 |
+
<div class="wspsc_yellow_box">
|
77 |
+
<p><?php _e( "For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart" ); ?><br />
|
78 |
+
<a href="https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768" target="_blank"><?php _e( "WP Simple Cart Homepage", "wordpress-simple-paypal-shopping-cart" ); ?></a></p>
|
79 |
+
</div>
|
80 |
+
|
81 |
+
<form method="post" action="">
|
82 |
+
<?php wp_nonce_field( 'wpspc_adv_settings_update' ); ?>
|
83 |
+
<input type="hidden" name="info_update" id="info_update" value="true" />
|
84 |
+
|
85 |
+
<div class="postbox">
|
86 |
+
<h3 class="hndle">
|
87 |
+
<label for="title"><?php _e( "PayPal Smart Checkout Settings", "wordpress-simple-paypal-shopping-cart" ); ?></label>
|
88 |
+
</h3>
|
89 |
+
<div class="inside">
|
90 |
+
|
91 |
+
<table class="form-table">
|
92 |
+
|
93 |
+
<tr valign="top">
|
94 |
+
<th scope="row"><?php _e( "Enable PayPal Smart Checkout", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
95 |
+
<td><input type="checkbox" name="wpspc_enable_pp_smart_checkout" value="1"<?php echo get_option( 'wpspc_enable_pp_smart_checkout' ) ? ' checked' : ''; ?>/>
|
96 |
+
<span class="description">
|
97 |
+
<?php _e( "Enable PayPal Smart Checkout.", "wordpress-simple-paypal-shopping-cart" ); ?>
|
98 |
+
<?php echo '<a href="https://www.tipsandtricks-hq.com/ecommerce/enabling-smart-button-checkout-setup-and-configuration-4568" target="_blank">' . __( "View Documentation", "wordpress-simple-paypal-shopping-cart" ) . '</a>.'; ?>
|
99 |
+
</span>
|
100 |
+
|
101 |
+
</td>
|
102 |
+
</tr>
|
103 |
+
<tr valign="top">
|
104 |
+
<th scope="row"><?php _e( "Live Client ID", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
105 |
+
<td><input type="text" name="wpspc_pp_live_client_id" size="100" value="<?php echo get_option( 'wpspc_pp_live_client_id' ); ?>"/>
|
106 |
+
<span class="description"><?php _e( "Enter your live Client ID.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
107 |
+
</td>
|
108 |
+
</tr>
|
109 |
+
<tr valign="top">
|
110 |
+
<th scope="row"><?php _e( "Live Secret", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
111 |
+
<td><input type="text" name="wpspc_pp_live_secret" size="100" value="<?php echo get_option( 'wpspc_pp_live_secret' ); ?>"/>
|
112 |
+
<span class="description"><?php _e( "Enter your live Secret.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
<tr valign="top">
|
116 |
+
<th scope="row"><?php _e( "Sandbox Client ID", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
117 |
+
<td><input type="text" name="wpspc_pp_test_client_id" size="100" value="<?php echo get_option( 'wpspc_pp_test_client_id' ); ?>"/>
|
118 |
+
<span class="description"><?php _e( "Enter your sandbox Client ID.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
<tr valign="top">
|
122 |
+
<th scope="row"><?php _e( "Sandbox Secret", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
123 |
+
<td><input type="text" name="wpspc_pp_test_secret" size="100" value="<?php echo get_option( 'wpspc_pp_test_secret' ); ?>"/>
|
124 |
+
<span class="description"><?php _e( "Enter your sandbox Secret.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
|
128 |
+
</table>
|
129 |
+
|
130 |
+
<h4><?php _e( "Button Appearance Settings", "wordpress-simple-paypal-shopping-cart" ); ?></h4>
|
131 |
+
<hr />
|
132 |
+
|
133 |
+
<table class="form-table">
|
134 |
+
<tr valign="top">
|
135 |
+
<th scope="row"><?php _e( "Size", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
136 |
+
<td>
|
137 |
+
<select name="wpspc_pp_smart_checkout_btn_size">
|
138 |
+
<?php
|
139 |
+
$btn_size = get_option( 'wpspc_pp_smart_checkout_btn_size' );
|
140 |
+
echo WPSPCAdminUtils::gen_options( array(
|
141 |
+
array( 'medium', __( "Medium", "wordpress-simple-paypal-shopping-cart" ) ),
|
142 |
+
array( 'large', __( "Large", "wordpress-simple-paypal-shopping-cart" ) ),
|
143 |
+
array( 'responsive', __( "Repsonsive", "wordpress-simple-paypal-shopping-cart" ) ),
|
144 |
+
), $btn_size );
|
145 |
+
?>
|
146 |
+
</select>
|
147 |
+
<span class="description"><?php _e( "Select button size.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
148 |
+
</td>
|
149 |
+
</tr>
|
150 |
+
<tr valign="top">
|
151 |
+
<th scope="row"><?php _e( "Color", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
152 |
+
<td>
|
153 |
+
<select name="wpspc_pp_smart_checkout_btn_color">
|
154 |
+
<?php
|
155 |
+
$btn_color = get_option( 'wpspc_pp_smart_checkout_btn_color' );
|
156 |
+
echo WPSPCAdminUtils::gen_options( array(
|
157 |
+
array( 'gold', __( "Gold", "wordpress-simple-paypal-shopping-cart" ) ),
|
158 |
+
array( 'blue', __( "Blue", "wordpress-simple-paypal-shopping-cart" ) ),
|
159 |
+
array( 'silver', __( "Silver", "wordpress-simple-paypal-shopping-cart" ) ),
|
160 |
+
array( 'black', __( "Black", "wordpress-simple-paypal-shopping-cart" ) ),
|
161 |
+
), $btn_color );
|
162 |
+
?>
|
163 |
+
</select>
|
164 |
+
<span class="description"><?php _e( "Select button color.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
165 |
+
</td>
|
166 |
+
</tr>
|
167 |
+
<?php
|
168 |
+
$btn_layout = get_option( 'wpspc_pp_smart_checkout_btn_layout' );
|
169 |
+
$btn_shape = get_option( 'wpspc_pp_smart_checkout_btn_shape' );
|
170 |
+
?>
|
171 |
+
<tr valign="top">
|
172 |
+
<th scope="row"><?php _e( "Shape", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
173 |
+
<td>
|
174 |
+
<p><label><input type="radio" name="wpspc_pp_smart_checkout_btn_shape" value="rect"<?php WPSPCAdminUtils::e_checked( $btn_shape, 'rect', true ); ?>> <?php _e( "Rectangular ", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
175 |
+
<p><label><input type="radio" name="wpspc_pp_smart_checkout_btn_shape" value="pill"<?php WPSPCAdminUtils::e_checked( $btn_shape, 'pill' ); ?>> <?php _e( "Pill", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
176 |
+
<p class="description"><?php _e( "Select button shape.", "wordpress-simple-paypal-shopping-cart" ); ?></p>
|
177 |
+
</td>
|
178 |
+
</tr>
|
179 |
+
<tr valign="top">
|
180 |
+
<th scope="row"><?php _e( "Layout", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
181 |
+
<td>
|
182 |
+
<p><label><input type="radio" name="wpspc_pp_smart_checkout_btn_layout" value="vertical"<?php WPSPCAdminUtils::e_checked( $btn_layout, 'vertical', true ); ?>> <?php _e( "Vertical", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
183 |
+
<p><label><input type="radio" name="wpspc_pp_smart_checkout_btn_layout" value="horizontal"<?php WPSPCAdminUtils::e_checked( $btn_layout, 'horizontal' ); ?>> <?php _e( "Horizontal", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
184 |
+
<p class="description"><?php _e( "Select button layout.", "wordpress-simple-paypal-shopping-cart" ); ?></p>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
</table>
|
188 |
+
|
189 |
+
<h4><?php _e( "Additional Settings", "wordpress-simple-paypal-shopping-cart" ); ?></h4>
|
190 |
+
<hr />
|
191 |
+
<?php
|
192 |
+
$pm_credit = get_option( 'wpspc_pp_smart_checkout_payment_method_credit' );
|
193 |
+
$pm_elv = get_option( 'wpspc_pp_smart_checkout_payment_method_elv' );
|
194 |
+
?>
|
195 |
+
<table class="form-table">
|
196 |
+
<tr valign="top">
|
197 |
+
<th scope="row"><?php _e( "Payment Methods", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
198 |
+
<td>
|
199 |
+
<p><label><input type="checkbox" name="wpspc_pp_smart_checkout_payment_method_credit" value="1"<?php WPSPCAdminUtils::e_checked( $pm_credit ); ?>> <?php _e( "PayPal Credit", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
200 |
+
<p><label><input type="checkbox" name="wpspc_pp_smart_checkout_payment_method_elv" value="1"<?php WPSPCAdminUtils::e_checked( $pm_elv ); ?>> <?php _e( "ELV", "wordpress-simple-paypal-shopping-cart" ); ?></label></p>
|
201 |
+
<p class="description"><?php _e( "Select payment methods that could be used by customers. Note that payment with cards is always enabled.", "wordpress-simple-paypal-shopping-cart" ); ?></p>
|
202 |
+
</td>
|
203 |
+
</tr>
|
204 |
+
<tr valign="top">
|
205 |
+
<th scope="row"><?php _e( "Disable Standard PayPal Checkout", "wordpress-simple-paypal-shopping-cart" ); ?></th>
|
206 |
+
<td><input type="checkbox" name="wpspc_disable_standard_checkout" value="1"<?php echo get_option( 'wpspc_disable_standard_checkout' ) ? ' checked' : ''; ?>/>
|
207 |
+
<span class="description"><?php _e( "By default PayPal standard checkout is always enabled. If you only want to use the PayPal Smart Checkout instead then use this checkbox to disable the standard checkout option. This option will only have effect when Smart Checkout is enabled.", "wordpress-simple-paypal-shopping-cart" ); ?></span>
|
208 |
+
</td>
|
209 |
+
</tr>
|
210 |
+
</table>
|
211 |
+
|
212 |
+
</div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<div class="submit">
|
216 |
+
<input type="submit" class="button-primary" name="wpspc_adv_settings_update" value="<?php echo (__( "Update Options »", "wordpress-simple-paypal-shopping-cart" )) ?>" />
|
217 |
+
</div>
|
218 |
+
</form>
|
219 |
+
|
220 |
+
<?php
|
221 |
+
wpspsc_settings_menu_footer();
|
222 |
+
}
|
includes/admin/wp_shopping_cart_menu_discounts.php
CHANGED
@@ -109,17 +109,17 @@ function wspsc_show_coupon_discount_settings_page()
|
|
109 |
<tr valign="top">
|
110 |
|
111 |
<td width="25%" align="left">
|
112 |
-
Coupon Code
|
113 |
<input name="wpspsc_coupon_code" type="text" size="15" value=""/>
|
114 |
</td>
|
115 |
|
116 |
<td width="25%" align="left">
|
117 |
-
Discount Rate (%)
|
118 |
<input name="wpspsc_coupon_rate" type="text" size="7" value=""/>
|
119 |
</td>
|
120 |
|
121 |
<td width="25%" align="left">
|
122 |
-
Expiry Date
|
123 |
<input name="wpspsc_coupon_expiry_date" class="wpspsc_coupon_expiry" type="text" size="15" value=""/>
|
124 |
</td>
|
125 |
|
109 |
<tr valign="top">
|
110 |
|
111 |
<td width="25%" align="left">
|
112 |
+
<?php _e("Coupon Code", 'wordpress-simple-paypal-shopping-cart' ); ?><br />
|
113 |
<input name="wpspsc_coupon_code" type="text" size="15" value=""/>
|
114 |
</td>
|
115 |
|
116 |
<td width="25%" align="left">
|
117 |
+
<?php _e("Discount Rate (%)", 'wordpress-simple-paypal-shopping-cart' ); ?><br />
|
118 |
<input name="wpspsc_coupon_rate" type="text" size="7" value=""/>
|
119 |
</td>
|
120 |
|
121 |
<td width="25%" align="left">
|
122 |
+
<?php _e("Expiry Date", 'wordpress-simple-paypal-shopping-cart' ); ?><br />
|
123 |
<input name="wpspsc_coupon_expiry_date" class="wpspsc_coupon_expiry" type="text" size="15" value=""/>
|
124 |
</td>
|
125 |
|
includes/admin/wp_shopping_cart_menu_main.php
CHANGED
@@ -8,13 +8,15 @@ function wspsc_handle_admin_menu() {
|
|
8 |
|
9 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_discounts.php');
|
10 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_tools.php');
|
|
|
11 |
|
12 |
$menu_icon_url = 'dashicons-cart';
|
13 |
add_menu_page(__('Simple Cart', 'wordpress-simple-paypal-shopping-cart'), __('Simple Cart', 'wordpress-simple-paypal-shopping-cart'), WP_CART_MANAGEMENT_PERMISSION, WP_CART_MAIN_MENU_SLUG , 'wspsc_settings_interface', $menu_icon_url, 90);
|
14 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Settings', 'wordpress-simple-paypal-shopping-cart'), __('Settings', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, WP_CART_MAIN_MENU_SLUG, 'wspsc_settings_interface');
|
15 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Coupons', 'wordpress-simple-paypal-shopping-cart'), __('Coupons', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'wspsc-discounts', 'wspsc_show_coupon_discount_settings_page');
|
16 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Tools', 'wordpress-simple-paypal-shopping-cart'), __('Tools', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'wspsc-tools', 'wspsc_show_tools_menu_page');
|
17 |
-
|
|
|
18 |
//Can set the "show_in_menu" parameter in the cart orders registration to false then add the menu in here using the following code
|
19 |
//add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Orders', 'wordpress-simple-paypal-shopping-cart'), __('Orders', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'edit.php?post_type=wpsc_cart_orders');
|
20 |
//add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Add Order', 'wordpress-simple-paypal-shopping-cart'), __('Add Order', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'post-new.php?post_type=wpsc_cart_orders');
|
@@ -39,6 +41,7 @@ function wspsc_settings_interface() {
|
|
39 |
$wpspc_plugin_tabs = array(
|
40 |
'wspsc-menu-main' => __('General Settings', 'wordpress-simple-paypal-shopping-cart'),
|
41 |
'wspsc-menu-main&action=email-settings' => __('Email Settings', 'wordpress-simple-paypal-shopping-cart'),
|
|
|
42 |
);
|
43 |
echo '<div class="wrap">';
|
44 |
echo '<h1>' . (__("WP Paypal Shopping Cart Options", "wordpress-simple-paypal-shopping-cart")) . ' v'.WP_CART_VERSION . '</h1>';
|
@@ -69,6 +72,10 @@ function wspsc_settings_interface() {
|
|
69 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_email_settings.php');
|
70 |
show_wp_cart_email_settings_page();
|
71 |
break;
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
} else {
|
74 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_general_settings.php');
|
8 |
|
9 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_discounts.php');
|
10 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_tools.php');
|
11 |
+
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_addons.php');
|
12 |
|
13 |
$menu_icon_url = 'dashicons-cart';
|
14 |
add_menu_page(__('Simple Cart', 'wordpress-simple-paypal-shopping-cart'), __('Simple Cart', 'wordpress-simple-paypal-shopping-cart'), WP_CART_MANAGEMENT_PERMISSION, WP_CART_MAIN_MENU_SLUG , 'wspsc_settings_interface', $menu_icon_url, 90);
|
15 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Settings', 'wordpress-simple-paypal-shopping-cart'), __('Settings', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, WP_CART_MAIN_MENU_SLUG, 'wspsc_settings_interface');
|
16 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Coupons', 'wordpress-simple-paypal-shopping-cart'), __('Coupons', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'wspsc-discounts', 'wspsc_show_coupon_discount_settings_page');
|
17 |
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Tools', 'wordpress-simple-paypal-shopping-cart'), __('Tools', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'wspsc-tools', 'wspsc_show_tools_menu_page');
|
18 |
+
add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Add-ons', 'wordpress-simple-paypal-shopping-cart'), __('Add-ons', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'wspsc-addons', 'wspsc_show_addons_menu_page');
|
19 |
+
|
20 |
//Can set the "show_in_menu" parameter in the cart orders registration to false then add the menu in here using the following code
|
21 |
//add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Orders', 'wordpress-simple-paypal-shopping-cart'), __('Orders', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'edit.php?post_type=wpsc_cart_orders');
|
22 |
//add_submenu_page(WP_CART_MAIN_MENU_SLUG, __('Add Order', 'wordpress-simple-paypal-shopping-cart'), __('Add Order', 'wordpress-simple-paypal-shopping-cart') , WP_CART_MANAGEMENT_PERMISSION, 'post-new.php?post_type=wpsc_cart_orders');
|
41 |
$wpspc_plugin_tabs = array(
|
42 |
'wspsc-menu-main' => __('General Settings', 'wordpress-simple-paypal-shopping-cart'),
|
43 |
'wspsc-menu-main&action=email-settings' => __('Email Settings', 'wordpress-simple-paypal-shopping-cart'),
|
44 |
+
'wspsc-menu-main&action=adv-settings' => __('Advanced Settings', 'wordpress-simple-paypal-shopping-cart'),
|
45 |
);
|
46 |
echo '<div class="wrap">';
|
47 |
echo '<h1>' . (__("WP Paypal Shopping Cart Options", "wordpress-simple-paypal-shopping-cart")) . ' v'.WP_CART_VERSION . '</h1>';
|
72 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_email_settings.php');
|
73 |
show_wp_cart_email_settings_page();
|
74 |
break;
|
75 |
+
case 'adv-settings':
|
76 |
+
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_adv_settings.php');
|
77 |
+
show_wp_cart_adv_settings_page();
|
78 |
+
break;
|
79 |
}
|
80 |
} else {
|
81 |
include_once (WP_CART_PATH . 'includes/admin/wp_shopping_cart_menu_general_settings.php');
|
includes/admin/wp_shopping_cart_menu_tools.php
CHANGED
@@ -58,6 +58,9 @@ function wspsc_export_orders_data_to_csv(){
|
|
58 |
$fp = fopen($file_path, 'w');
|
59 |
|
60 |
$header_names = array("Order ID", "Transaction ID", "Date", "First Name", "Last Name", "Email", "IP Address", "Total", "Shipping", "Coupon Code", "Address", "Items Orders");
|
|
|
|
|
|
|
61 |
fputcsv($fp, $header_names);
|
62 |
|
63 |
$query_args = array(
|
@@ -86,6 +89,9 @@ function wspsc_export_orders_data_to_csv(){
|
|
86 |
$items_ordered = str_replace(array("\n", "\r", "\r\n", "\n\r"), ' ', $items_ordered);
|
87 |
|
88 |
$fields = array($order_id, $txn_id, $order_date, $first_name, $last_name, $email, $ip_address, $total_amount, $shipping_amount, $applied_coupon, $address, $items_ordered);
|
|
|
|
|
|
|
89 |
fputcsv($fp, $fields);
|
90 |
|
91 |
}
|
58 |
$fp = fopen($file_path, 'w');
|
59 |
|
60 |
$header_names = array("Order ID", "Transaction ID", "Date", "First Name", "Last Name", "Email", "IP Address", "Total", "Shipping", "Coupon Code", "Address", "Items Orders");
|
61 |
+
|
62 |
+
$header_names=apply_filters('wpspc_export_csv_header',$header_names);
|
63 |
+
|
64 |
fputcsv($fp, $header_names);
|
65 |
|
66 |
$query_args = array(
|
89 |
$items_ordered = str_replace(array("\n", "\r", "\r\n", "\n\r"), ' ', $items_ordered);
|
90 |
|
91 |
$fields = array($order_id, $txn_id, $order_date, $first_name, $last_name, $email, $ip_address, $total_amount, $shipping_amount, $applied_coupon, $address, $items_ordered);
|
92 |
+
|
93 |
+
$fields=apply_filters('wpspc_export_csv_data',$fields,$order_id);
|
94 |
+
|
95 |
fputcsv($fp, $fields);
|
96 |
|
97 |
}
|
includes/admin/wp_shopping_cart_tinymce.php
CHANGED
@@ -3,30 +3,30 @@
|
|
3 |
function wp_cart_add_tinymce_button() {
|
4 |
|
5 |
// Don't bother doing this stuff if the current user lacks permissions
|
6 |
-
if (!current_user_can('edit_posts') && !current_user_can('edit_pages')) {
|
7 |
-
|
8 |
}
|
9 |
|
10 |
// Add only in Rich Editor mode
|
11 |
-
if (get_user_option('rich_editing') == 'true') {
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
|
18 |
-
|
19 |
// add_action('wp_ajax_orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content', 'orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content');
|
20 |
// add_action('wp_ajax_orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content', 'orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content');
|
21 |
}
|
22 |
}
|
23 |
|
24 |
-
function wp_cart_add_tinymce_plugin($plugin_array) {
|
25 |
-
$plugin_array['wp_cart_shortcode'] = WP_CART_URL . '/assets/js/tinymce/wp_shopping_cart_plugin.js';
|
26 |
return $plugin_array;
|
27 |
}
|
28 |
|
29 |
-
function wp_cart_register_button($buttons) {
|
30 |
$buttons[] = 'wp_cart_shortcode';
|
31 |
return $buttons;
|
32 |
}
|
@@ -35,7 +35,7 @@ function wp_cart_print_admin_scripts() {
|
|
35 |
//The following is used by the TinyMCE button.
|
36 |
?>
|
37 |
<script type="text/javascript">
|
38 |
-
var wp_cart_admin_ajax_url = '<?php echo admin_url('admin-ajax.php?action=ajax'); ?>';
|
39 |
</script>
|
40 |
<?php
|
41 |
}
|
@@ -48,212 +48,212 @@ function wp_cart_tinymce_ajax_handler() {
|
|
48 |
</style>
|
49 |
<script>
|
50 |
function ui_for_ppsc_insert_content() {
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
}
|
142 |
</script>
|
143 |
<form name="wpsppsc_form" action="#">
|
144 |
<div class="panel_wrapper">
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
</div>
|
258 |
</form>
|
259 |
<?php
|
3 |
function wp_cart_add_tinymce_button() {
|
4 |
|
5 |
// Don't bother doing this stuff if the current user lacks permissions
|
6 |
+
if ( ! current_user_can( 'edit_posts' ) && ! current_user_can( 'edit_pages' ) ) {
|
7 |
+
return;
|
8 |
}
|
9 |
|
10 |
// Add only in Rich Editor mode
|
11 |
+
if ( get_user_option( 'rich_editing' ) == 'true' ) {
|
12 |
|
13 |
+
add_action( 'admin_print_scripts', 'wp_cart_print_admin_scripts' );
|
14 |
+
add_action( 'wp_ajax_wp_cart_get_tinymce_form', 'wp_cart_tinymce_ajax_handler' ); // Add ajax action handler for tinymce
|
15 |
+
add_filter( 'mce_external_plugins', "wp_cart_add_tinymce_plugin", 5 );
|
16 |
+
add_filter( 'mce_buttons', 'wp_cart_register_button', 5 );
|
17 |
|
18 |
+
// Required by TinyMCE button
|
19 |
// add_action('wp_ajax_orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content', 'orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content');
|
20 |
// add_action('wp_ajax_orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content', 'orbsius_ui_for_paypal_shopping_cart_ajax_render_popup_content');
|
21 |
}
|
22 |
}
|
23 |
|
24 |
+
function wp_cart_add_tinymce_plugin( $plugin_array ) {
|
25 |
+
$plugin_array[ 'wp_cart_shortcode' ] = WP_CART_URL . '/assets/js/tinymce/wp_shopping_cart_plugin.js';
|
26 |
return $plugin_array;
|
27 |
}
|
28 |
|
29 |
+
function wp_cart_register_button( $buttons ) {
|
30 |
$buttons[] = 'wp_cart_shortcode';
|
31 |
return $buttons;
|
32 |
}
|
35 |
//The following is used by the TinyMCE button.
|
36 |
?>
|
37 |
<script type="text/javascript">
|
38 |
+
var wp_cart_admin_ajax_url = '<?php echo admin_url( 'admin-ajax.php?action=ajax' ); ?>';
|
39 |
</script>
|
40 |
<?php
|
41 |
}
|
48 |
</style>
|
49 |
<script>
|
50 |
function ui_for_ppsc_insert_content() {
|
51 |
+
var extra = '';
|
52 |
+
var content;
|
53 |
+
var template = '<p>[wp_cart_button name="%%PRODUCT-NAME%%" price="%%PRODUCT-PRICE%%"%%EXTRA%%]</p>';
|
54 |
+
|
55 |
+
var wpsppsc = document.getElementById('wpsppsc_panel');
|
56 |
+
|
57 |
+
var product_name = document.getElementById('wpsppsc_product_name').value;
|
58 |
+
var product_price = document.getElementById('wpsppsc_product_price').value;
|
59 |
+
var shipping = document.getElementById('wpsppsc_shipping').value;
|
60 |
+
var file_url = document.getElementById('wpsppsc_file_url').value;
|
61 |
+
|
62 |
+
var custom1_id = document.getElementById('wpsppsc_custom1_id').value;
|
63 |
+
var custom1_vals = document.getElementById('wpsppsc_custom1_values').value;
|
64 |
+
|
65 |
+
var custom2_id = document.getElementById('wpsppsc_custom2_id').value;
|
66 |
+
var custom2_vals = document.getElementById('wpsppsc_custom2_values').value;
|
67 |
+
|
68 |
+
var custom3_id = document.getElementById('wpsppsc_custom3_id').value;
|
69 |
+
var custom3_vals = document.getElementById('wpsppsc_custom3_values').value;
|
70 |
+
|
71 |
+
var seq = 1; // Shopping cart needs VAR1, VAR2 etc.
|
72 |
+
|
73 |
+
// who is active ?
|
74 |
+
if (wpsppsc.className.indexOf('current') != -1) {
|
75 |
+
product_name = product_name.replace(/</g, '').replace(/\n/g, '').replace(/^\s*/g, '').replace(/\s*$/g, '').replace(/:+/g, '-');
|
76 |
+
product_price = product_price.replace(/[^\d-.]/g, '');
|
77 |
+
shipping = shipping.replace(/[^\d-.]/gi, '');
|
78 |
+
//file_url = file_url.replace(/[<>\r\n:]+/g, '').replace(/^\s*/g, '').replace(/\s*$/g, '');
|
79 |
+
|
80 |
+
custom1_id = custom1_id.replace(/[<>\r\n:]+/g, '').replace(/^\s*/g, '').replace(/\s*$/g, '');
|
81 |
+
custom1_vals = custom1_vals.replace(/[<>\r\n:]+/gi, '').replace(/^[\s,]*/g, '').replace(/[\s,]*$/g, '').replace(/\s*,+\s*/g, '|');
|
82 |
+
|
83 |
+
custom2_id = custom2_id.replace(/[<>\r\n:]+/g, '').replace(/^\s*/g, '').replace(/\s*$/g, '');
|
84 |
+
custom2_vals = custom2_vals.replace(/[<>\r\n:]+/gi, '').replace(/^[\s,]*/g, '').replace(/[\s,]*$/g, '').replace(/\s*,+\s*/g, '|');
|
85 |
+
|
86 |
+
custom3_id = custom3_id.replace(/[<>\r\n:]+/g, '').replace(/^\s*/g, '').replace(/\s*$/g, '');
|
87 |
+
custom3_vals = custom3_vals.replace(/[<>\r\n:]+/gi, '').replace(/^[\s,]*/g, '').replace(/[\s,]*$/g, '').replace(/\s*,+\s*/g, '|');
|
88 |
+
|
89 |
+
// Validations
|
90 |
+
if (product_name == '') {
|
91 |
+
alert('<?php _e( "Please enter product name", 'wordpress-simple-paypal-shopping-cart' ); ?>');
|
92 |
+
document.getElementById('wpsppsc_product_name').focus();
|
93 |
+
return false;
|
94 |
+
}
|
95 |
+
|
96 |
+
product_price = product_price || 0;
|
97 |
+
|
98 |
+
if (product_price == 0) {
|
99 |
+
alert('<?php _e( "Please enter product price", 'wordpress-simple-paypal-shopping-cart' ); ?>');
|
100 |
+
document.getElementById('wpsppsc_product_price').focus();
|
101 |
+
return false;
|
102 |
+
}
|
103 |
+
|
104 |
+
shipping = shipping || 0;
|
105 |
+
|
106 |
+
if (shipping) {
|
107 |
+
extra += ' shipping="' + shipping + '"';
|
108 |
+
}
|
109 |
+
|
110 |
+
//File URL
|
111 |
+
if (file_url) {
|
112 |
+
extra += ' file_url="' + file_url + '"';
|
113 |
+
}
|
114 |
+
|
115 |
+
//Product Variations. Example custom1_id: Format | custom1_vals: PAL, Secam
|
116 |
+
if (custom1_id) {
|
117 |
+
extra += ' var' + seq + '="' + custom1_id + '|' + custom1_vals + '"';
|
118 |
+
seq++;
|
119 |
+
}
|
120 |
+
|
121 |
+
if (custom2_id) {
|
122 |
+
extra += ' var' + seq + '="' + custom2_id + '|' + custom2_vals + '"';
|
123 |
+
seq++;
|
124 |
+
}
|
125 |
+
|
126 |
+
if (custom3_id) {
|
127 |
+
extra += ' var' + seq + '="' + custom3_id + '|' + custom3_vals + '"';
|
128 |
+
seq++;
|
129 |
+
}
|
130 |
+
|
131 |
+
content = template;
|
132 |
+
content = content.replace(/%%PRODUCT-NAME%%/ig, product_name).replace(/%%PRODUCT-PRICE%%/ig, product_price);
|
133 |
+
content = content.replace(/%%EXTRA%%/ig, extra);
|
134 |
+
}
|
135 |
+
|
136 |
+
parent.tinyMCE.execCommand('mceInsertContent', false, content);
|
137 |
+
|
138 |
+
tb_remove();
|
139 |
+
|
140 |
+
return false;
|
141 |
}
|
142 |
</script>
|
143 |
<form name="wpsppsc_form" action="#">
|
144 |
<div class="panel_wrapper">
|
145 |
+
<!-- panel -->
|
146 |
+
<div id="wpsppsc_panel" class="panel current">
|
147 |
+
|
148 |
+
<p><?php _e( sprintf( 'Visit the %s page to learn all the shortcode usage.', '<a href="https://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart" target="_blank">' . __( 'Simple Cart Documentation', 'wordpress-simple-paypal-shopping-cart' ) . '</a>' ), 'wordpress-simple-paypal-shopping-cart' ); ?></p>
|
149 |
+
<br />
|
150 |
+
|
151 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
152 |
+
<tr>
|
153 |
+
<td nowrap="nowrap">
|
154 |
+
<label for="wpsppsc_product_name"><?php _e( "Product Name", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
155 |
+
</td>
|
156 |
+
<td>
|
157 |
+
<input type="text" id="wpsppsc_product_name" name="wpsppsc_product_name" value="" />
|
158 |
+
</td>
|
159 |
+
<td>
|
160 |
+
<?php _e( "Example: My Great Product", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
161 |
+
</td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<td nowrap="nowrap">
|
165 |
+
<label for="wpsppsc_product_price"><?php _e( "Price", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
166 |
+
</td>
|
167 |
+
<td>
|
168 |
+
<input type="text" id="wpsppsc_product_price" name="wpsppsc_product_price" value="" />
|
169 |
+
</td>
|
170 |
+
<td>
|
171 |
+
<?php _e( "Example: 10 or 10.50", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
172 |
+
</td>
|
173 |
+
</tr>
|
174 |
+
<tr>
|
175 |
+
<td nowrap="nowrap">
|
176 |
+
<label for="wpsppsc_shipping"><?php _e( "Shipping (Optional)", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
177 |
+
</td>
|
178 |
+
<td>
|
179 |
+
<input type="text" id="wpsppsc_shipping" name="wpsppsc_shipping" value="" />
|
180 |
+
</td>
|
181 |
+
<td>
|
182 |
+
<?php _e( "Example: 10 or 10.50", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
183 |
+
</td>
|
184 |
+
</tr>
|
185 |
+
<tr>
|
186 |
+
<td nowrap="nowrap">
|
187 |
+
<label for="wpsppsc_file_url"><?php _e( "File URL (Optional)", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
188 |
+
</td>
|
189 |
+
<td>
|
190 |
+
<input type="text" id="wpsppsc_file_url" name="wpsppsc_shipping" value="" />
|
191 |
+
</td>
|
192 |
+
<td>
|
193 |
+
<?php _e( 'Example:' ); ?> http://www.your-site.com/wp-content/uploads/my-ebook.zip
|
194 |
+
</td>
|
195 |
+
</tr>
|
196 |
+
<tr>
|
197 |
+
<td nowrap="nowrap" colspan="3">
|
198 |
+
<br/>
|
199 |
+
<strong><?php _e( "Product Variations (Optional)", 'wordpress-simple-paypal-shopping-cart' ); ?></strong>
|
200 |
+
<p><?php _e( 'Example: For a T-Shirt product you may want to use a variation with name "Size" and values as "Small, Medium, Large"', 'wordpress-simple-paypal-shopping-cart' ); ?></p>
|
201 |
+
</td>
|
202 |
+
</tr>
|
203 |
+
<tr>
|
204 |
+
<td nowrap="nowrap">
|
205 |
+
<label for="wpsppsc_custom1_id"><?php _e( "Variation 1: Name", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
206 |
+
</td>
|
207 |
+
<td><input type="text" id="wpsppsc_custom1_id" name="wpsppsc_custom1_id" value="" />
|
208 |
+
</td>
|
209 |
+
<td>
|
210 |
+
<?php _e( "Values", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
211 |
+
<input type="text" id="wpsppsc_custom1_values" name="wpsppsc_custom1_values" value="" /><?php _e(" Example: Small, Medium, Large", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
<tr>
|
215 |
+
<td nowrap="nowrap">
|
216 |
+
<label for="wpsppsc_custom2_id"><?php _e( "Variation 2: Name", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
217 |
+
</td>
|
218 |
+
<td><input type="text" id="wpsppsc_custom2_id" name="wpsppsc_custom2_id" value="" />
|
219 |
+
</td>
|
220 |
+
<td>
|
221 |
+
<?php _e( "Values", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
222 |
+
<input type="text" id="wpsppsc_custom2_values" name="wpsppsc_custom2_values" value="" /><?php _e(" Example: Blue, Red, Black, White", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
223 |
+
</td>
|
224 |
+
</tr>
|
225 |
+
<tr>
|
226 |
+
<td nowrap="nowrap">
|
227 |
+
<label for="wpsppsc_custom3_id"><?php _e( "Variation 3: Name", 'wordpress-simple-paypal-shopping-cart' ); ?></label>
|
228 |
+
</td>
|
229 |
+
<td><input type="text" id="wpsppsc_custom3_id" name="wpsppsc_custom3_id" value="" />
|
230 |
+
</td>
|
231 |
+
<td>
|
232 |
+
<?php _e( "Values", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
233 |
+
<input type="text" id="wpsppsc_custom3_values" name="wpsppsc_custom3_values" value="" /><?php _e(" Example: Short, Full", 'wordpress-simple-paypal-shopping-cart' ); ?>
|
234 |
+
</td>
|
235 |
+
</tr>
|
236 |
+
</table>
|
237 |
+
</div>
|
238 |
+
<!-- end panel -->
|
239 |
+
|
240 |
+
<div class="mceActionPanel">
|
241 |
+
|
242 |
+
<div style="float: left">
|
243 |
+
<input type="submit" id="insert" name="insert" value="<?php _e( "Insert", 'wordpress-simple-paypal-shopping-cart' ); ?>"
|
244 |
+
class='app_positive_button mceButton button-primary'
|
245 |
+
onclick="ui_for_ppsc_insert_content();
|
246 |
+
return false;" />
|
247 |
+
</div>
|
248 |
+
|
249 |
+
<div style="float: right">
|
250 |
+
<input type="button" id="cancel" name="cancel" value="<?php _e( "Cancel", 'wordpress-simple-paypal-shopping-cart' ); ?>"
|
251 |
+
class='app_negative_button button'
|
252 |
+
onclick="tb_remove();" />
|
253 |
+
</div>
|
254 |
+
|
255 |
+
<br />
|
256 |
+
</div>
|
257 |
</div>
|
258 |
</form>
|
259 |
<?php
|
includes/wspsc-cart-functions.php
CHANGED
@@ -1,224 +1,406 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
<
|
175 |
-
</
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
global $carts_cnt;
|
3 |
+
$carts_cnt = 0;
|
4 |
+
|
5 |
+
function print_wp_shopping_cart( $args = array() ) {
|
6 |
+
$output = '';
|
7 |
+
global $carts_cnt;
|
8 |
+
$carts_cnt ++;
|
9 |
+
if ( ! cart_not_empty() ) {
|
10 |
+
$empty_cart_text = get_option( 'wp_cart_empty_text' );
|
11 |
+
if ( ! empty( $empty_cart_text ) ) {
|
12 |
+
$output .= '<div class="wp_cart_empty_cart_section">';
|
13 |
+
if ( preg_match( '/http/', $empty_cart_text ) ) {
|
14 |
+
$output .= '<img src="' . $empty_cart_text . '" alt="' . $empty_cart_text . '" class="wp_cart_empty_cart_image" />';
|
15 |
+
} else {
|
16 |
+
$output .= __( $empty_cart_text, 'wordpress-simple-paypal-shopping-cart' );
|
17 |
+
}
|
18 |
+
$output .= '</div>';
|
19 |
+
}
|
20 |
+
$cart_products_page_url = get_option( 'cart_products_page_url' );
|
21 |
+
if ( ! empty( $cart_products_page_url ) ) {
|
22 |
+
$output .= '<div class="wp_cart_visit_shop_link"><a rel="nofollow" href="' . esc_url( $cart_products_page_url ) . '">' . ( __( 'Visit The Shop', 'wordpress-simple-paypal-shopping-cart' ) ) . '</a></div>';
|
23 |
+
}
|
24 |
+
return $output;
|
25 |
+
}
|
26 |
+
$email = get_bloginfo( 'admin_email' );
|
27 |
+
$use_affiliate_platform = get_option( 'wp_use_aff_platform' );
|
28 |
+
$defaultCurrency = get_option( 'cart_payment_currency' );
|
29 |
+
$defaultSymbol = get_option( 'cart_currency_symbol' );
|
30 |
+
$defaultEmail = get_option( 'cart_paypal_email' );
|
31 |
+
if ( ! empty( $defaultCurrency ) ) {
|
32 |
+
$paypal_currency = $defaultCurrency;
|
33 |
+
} else {
|
34 |
+
$paypal_currency = __( 'USD', 'wordpress-simple-paypal-shopping-cart' );
|
35 |
+
}
|
36 |
+
if ( ! empty( $defaultSymbol ) ) {
|
37 |
+
$paypal_symbol = $defaultSymbol;
|
38 |
+
} else {
|
39 |
+
$paypal_symbol = __( '$', 'wordpress-simple-paypal-shopping-cart' );
|
40 |
+
}
|
41 |
+
|
42 |
+
if ( ! empty( $defaultEmail ) ) {
|
43 |
+
$email = $defaultEmail;
|
44 |
+
}
|
45 |
+
|
46 |
+
$decimal = '.';
|
47 |
+
$urls = '';
|
48 |
+
|
49 |
+
$return = get_option( 'cart_return_from_paypal_url' );
|
50 |
+
if ( empty( $return ) ) {
|
51 |
+
$return = WP_CART_SITE_URL . '/';
|
52 |
+
}
|
53 |
+
$return_url = add_query_arg( 'reset_wp_cart', '1', $return );
|
54 |
+
|
55 |
+
$urls .= '<input type="hidden" name="return" value="' . $return_url . '" />';
|
56 |
+
|
57 |
+
$cancel = get_option( 'cart_cancel_from_paypal_url' );
|
58 |
+
if ( isset( $cancel ) && ! empty( $cancel ) ) {
|
59 |
+
$urls .= '<input type="hidden" name="cancel_return" value="' . $cancel . '" />';
|
60 |
+
}
|
61 |
+
|
62 |
+
$notify = WP_CART_SITE_URL . '/?simple_cart_ipn=1';
|
63 |
+
$notify = apply_filters( 'wspsc_paypal_ipn_notify_url', $notify );
|
64 |
+
$urls .= '<input type="hidden" name="notify_url" value="' . $notify . '" />';
|
65 |
+
|
66 |
+
$title = get_option( 'wp_cart_title' );
|
67 |
+
//if (empty($title)) $title = __("Your Shopping Cart", "wordpress-simple-paypal-shopping-cart");
|
68 |
+
|
69 |
+
global $plugin_dir_name;
|
70 |
+
$output .= '<div class="shopping_cart">';
|
71 |
+
if ( ! get_option( 'wp_shopping_cart_image_hide' ) ) {
|
72 |
+
$cart_icon_img_src = WP_CART_URL . '/images/shopping_cart_icon.png';
|
73 |
+
$cart_icon_img_src = apply_filters( 'wspsc_cart_icon_image_src', $cart_icon_img_src );
|
74 |
+
$output .= "<img src='" . $cart_icon_img_src . "' class='wspsc_cart_header_image' value='" . ( __( 'Cart', 'wordpress-simple-paypal-shopping-cart' ) ) . "' alt='" . ( __( 'Cart', 'wordpress-simple-paypal-shopping-cart' ) ) . "' />";
|
75 |
+
}
|
76 |
+
if ( ! empty( $title ) ) {
|
77 |
+
$output .= '<h2>';
|
78 |
+
$output .= $title;
|
79 |
+
$output .= '</h2>';
|
80 |
+
}
|
81 |
+
|
82 |
+
$output .= '<span id="pinfo" style="display: none; font-weight: bold; color: red;">' . ( __( 'Hit enter to submit new Quantity.', 'wordpress-simple-paypal-shopping-cart' ) ) . '</span>';
|
83 |
+
$output .= '<table style="width: 100%;">';
|
84 |
+
|
85 |
+
$count = 1;
|
86 |
+
$total_items = 0;
|
87 |
+
$total = 0;
|
88 |
+
$form = '';
|
89 |
+
if ( $_SESSION['simpleCart'] && is_array( $_SESSION['simpleCart'] ) ) {
|
90 |
+
$output .= '
|
91 |
+
<tr class="wspsc_cart_item_row">
|
92 |
+
<th class="wspsc_cart_item_name_th">' . ( __( 'Item Name', 'wordpress-simple-paypal-shopping-cart' ) ) . '</th><th class="wspsc_cart_qty_th">' . ( __( 'Quantity', 'wordpress-simple-paypal-shopping-cart' ) ) . '</th><th class="wspsc_cart_price_th">' . ( __( 'Price', 'wordpress-simple-paypal-shopping-cart' ) ) . '</th><th class="wspsc_remove_item_th"></th>
|
93 |
+
</tr>';
|
94 |
+
$item_total_shipping = 0;
|
95 |
+
$postage_cost = 0;
|
96 |
+
foreach ( $_SESSION['simpleCart'] as $item ) {
|
97 |
+
$total += $item['price'] * $item['quantity'];
|
98 |
+
$item_total_shipping += $item['shipping'] * $item['quantity'];
|
99 |
+
$total_items += $item['quantity'];
|
100 |
+
}
|
101 |
+
if ( ! empty( $item_total_shipping ) ) {
|
102 |
+
$baseShipping = get_option( 'cart_base_shipping_cost' );
|
103 |
+
$postage_cost = $item_total_shipping + $baseShipping;
|
104 |
+
}
|
105 |
+
|
106 |
+
$cart_free_shipping_threshold = get_option( 'cart_free_shipping_threshold' );
|
107 |
+
if ( ! empty( $cart_free_shipping_threshold ) && $total > $cart_free_shipping_threshold ) {
|
108 |
+
$postage_cost = 0;
|
109 |
+
}
|
110 |
+
|
111 |
+
$item_tpl = "{name: '%s', quantity: '%d', price: '%s', currency: '" . $paypal_currency . "'}";
|
112 |
+
$items_list = '';
|
113 |
+
|
114 |
+
foreach ( $_SESSION['simpleCart'] as $item ) {
|
115 |
+
//Let's form JS array of items for Smart Checkout
|
116 |
+
$number_formatted_item_price = wpspsc_number_format_price($item['price']);
|
117 |
+
$items_list .= sprintf( $item_tpl, esc_js( $item['name'] ), esc_js( $item['quantity'] ), esc_js( $number_formatted_item_price ) ) . ',';
|
118 |
+
|
119 |
+
$output .= '<tr class="wspsc_cart_item_thumb"><td class="wspsc_cart_item_name_td" style="overflow: hidden;">';
|
120 |
+
$output .= '<div class="wp_cart_item_info">';
|
121 |
+
if ( isset( $args['show_thumbnail'] ) ) {
|
122 |
+
$output .= '<span class="wp_cart_item_thumbnail"><img src="' . esc_url( $item['thumbnail'] ) . '" class="wp_cart_thumb_image" alt="' . esc_attr( $item['name'] ) . '" ></span>';
|
123 |
+
}
|
124 |
+
$item_info = apply_filters( 'wspsc_cart_item_name', '<a href="' . esc_url( $item['cartLink'] ) . '">' . esc_attr( $item['name'] ) . '</a>', $item );
|
125 |
+
$output .= '<span class="wp_cart_item_name">' . $item_info . '</span>';
|
126 |
+
$output .= '<span class="wp_cart_clear_float"></span>';
|
127 |
+
$output .= '</div>';
|
128 |
+
$output .= '</td>';
|
129 |
+
|
130 |
+
$uniqid = uniqid();
|
131 |
+
|
132 |
+
$output .= "<td class='wspsc_cart_qty_td' style='text-align: center'><form method=\"post\" action=\"\" name='pcquantity_" . $uniqid . "' style='display: inline'>" . wp_nonce_field( 'wspsc_cquantity', '_wpnonce', true, false ) . '
|
133 |
+
<input type="hidden" name="wspsc_product" value="' . htmlspecialchars( $item['name'] ) . "\" />
|
134 |
+
<input type='hidden' name='cquantity' value='1' /><input type='number' class='wspsc_cart_item_qty' name='quantity' value='" . esc_attr( $item['quantity'] ) . "' min='0' step='1' size='3' onchange='document.pcquantity_" . $uniqid . ".submit();' onkeypress='document.getElementById(\"pinfo\").style.display = \"\";' /></form></td>
|
135 |
+
<td style='text-align: center'>" . print_payment_currency( ( $item['price'] * $item['quantity'] ), $paypal_symbol, $decimal ) . "</td>
|
136 |
+
<td class='wspsc_remove_item_td'><form method=\"post\" action=\"\" class=\"wp_cart_remove_item_form\">" . wp_nonce_field( 'wspsc_delcart', '_wpnonce', true, false ) . '
|
137 |
+
<input type="hidden" name="wspsc_product" value="' . esc_attr( $item['name'] ) . "\" />
|
138 |
+
<input type='hidden' name='delcart' value='1' />
|
139 |
+
<input type='image' src='" . WP_CART_URL . "/images/Shoppingcart_delete.png' value='" . ( __( 'Remove', 'wordpress-simple-paypal-shopping-cart' ) ) . "' title='" . ( __( 'Remove', 'wordpress-simple-paypal-shopping-cart' ) ) . "' /></form></td></tr>
|
140 |
+
";
|
141 |
+
|
142 |
+
$form .= "
|
143 |
+
<input type=\"hidden\" name=\"item_name_$count\" value=\"" . esc_attr( $item['name'] ) . "\" />
|
144 |
+
<input type=\"hidden\" name=\"amount_$count\" value='" . wpspsc_number_format_price( $item['price'] ) . "' />
|
145 |
+
<input type=\"hidden\" name=\"quantity_$count\" value=\"" . esc_attr( $item['quantity'] ) . "\" />
|
146 |
+
<input type='hidden' name='item_number_$count' value='" . esc_attr( $item['item_number'] ) . "' />
|
147 |
+
";
|
148 |
+
$count ++;
|
149 |
+
}
|
150 |
+
$items_list = rtrim( $items_list, ',' );
|
151 |
+
if ( ! get_option( 'wp_shopping_cart_use_profile_shipping' ) ) {
|
152 |
+
//Not using profile based shipping
|
153 |
+
$postage_cost = wpspsc_number_format_price( $postage_cost );
|
154 |
+
$form .= "<input type=\"hidden\" name=\"shipping_1\" value='" . esc_attr( $postage_cost ) . "' />"; //You can also use "handling_cart" variable to use shipping and handling here
|
155 |
+
}
|
156 |
+
|
157 |
+
//Tackle the "no_shipping" parameter
|
158 |
+
if ( get_option( 'wp_shopping_cart_collect_address' ) ) {//force address collection
|
159 |
+
$form .= '<input type="hidden" name="no_shipping" value="2" />';
|
160 |
+
} else {
|
161 |
+
//Not using the force address collection feature
|
162 |
+
if ( $postage_cost == 0 ) {
|
163 |
+
//No shipping amount present in the cart. Set flag for "no shipping address collection".
|
164 |
+
$form .= '<input type="hidden" name="no_shipping" value="1" />';
|
165 |
+
}
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
$count --;
|
170 |
+
|
171 |
+
if ( $count ) {
|
172 |
+
if ( $postage_cost != 0 ) {
|
173 |
+
$output .= "
|
174 |
+
<tr class='wspsc_cart_subtotal'><td colspan='2' style='font-weight: bold; text-align: right;'>" . ( __( 'Subtotal', 'wordpress-simple-paypal-shopping-cart' ) ) . ": </td><td style='text-align: center'>" . print_payment_currency( $total, $paypal_symbol, $decimal ) . "</td><td></td></tr>
|
175 |
+
<tr class='wspsc_cart_shipping'><td colspan='2' style='font-weight: bold; text-align: right;'>" . ( __( 'Shipping', 'wordpress-simple-paypal-shopping-cart' ) ) . ": </td><td style='text-align: center'>" . print_payment_currency( $postage_cost, $paypal_symbol, $decimal ) . '</td><td></td></tr>';
|
176 |
+
}
|
177 |
+
|
178 |
+
$output .= "<tr class='wspsc_cart_total'><td colspan='2' style='font-weight: bold; text-align: right;'>" . ( __( 'Total', 'wordpress-simple-paypal-shopping-cart' ) ) . ": </td><td style='text-align: center'>" . print_payment_currency( ( $total + $postage_cost ), $paypal_symbol, $decimal ) . '</td><td></td></tr>';
|
179 |
+
|
180 |
+
if ( isset( $_SESSION['wpspsc_cart_action_msg'] ) && ! empty( $_SESSION['wpspsc_cart_action_msg'] ) ) {
|
181 |
+
$output .= '<tr class="wspsc_cart_action_msg"><td colspan="4"><span class="wpspsc_cart_action_msg">' . $_SESSION['wpspsc_cart_action_msg'] . '</span></td></tr>';
|
182 |
+
}
|
183 |
+
|
184 |
+
if ( get_option( 'wpspsc_enable_coupon' ) == '1' ) {
|
185 |
+
$output .= '<tr class="wspsc_cart_coupon_row"><td colspan="4">
|
186 |
+
<div class="wpspsc_coupon_section">
|
187 |
+
<span class="wpspsc_coupon_label">' . ( __( 'Enter Coupon Code', 'wordpress-simple-paypal-shopping-cart' ) ) . '</span>
|
188 |
+
<form method="post" action="" >' . wp_nonce_field( 'wspsc_coupon', '_wpnonce', true, false ) . '
|
189 |
+
<input type="text" name="wpspsc_coupon_code" value="" size="10" />
|
190 |
+
<span class="wpspsc_coupon_apply_button"><input type="submit" name="wpspsc_apply_coupon" class="wpspsc_apply_coupon" value="' . ( __( 'Apply', 'wordpress-simple-paypal-shopping-cart' ) ) . '" /></span>
|
191 |
+
</form>
|
192 |
+
</div>
|
193 |
+
</td></tr>';
|
194 |
+
}
|
195 |
+
|
196 |
+
$paypal_checkout_url = WP_CART_LIVE_PAYPAL_URL;
|
197 |
+
if ( get_option( 'wp_shopping_cart_enable_sandbox' ) ) {
|
198 |
+
$paypal_checkout_url = WP_CART_SANDBOX_PAYPAL_URL;
|
199 |
+
}
|
200 |
+
|
201 |
+
$form_target_code = '';
|
202 |
+
if ( get_option( 'wspsc_open_pp_checkout_in_new_tab' ) ) {
|
203 |
+
$form_target_code = 'target="_blank"';
|
204 |
+
}
|
205 |
+
|
206 |
+
$output = apply_filters( 'wpspsc_before_checkout_form', $output );
|
207 |
+
|
208 |
+
$output .= "<tr class='wpspsc_checkout_form'><td colspan='4'>";
|
209 |
+
$output .= '<form action="' . $paypal_checkout_url . '" method="post" ' . $form_target_code . '>';
|
210 |
+
$output .= $form;
|
211 |
+
$style = get_option( 'wpspc_disable_standard_checkout' ) && get_option( 'wpspc_enable_pp_smart_checkout' ) ? 'display:none !important" data-wspsc-hidden="1' : '';
|
212 |
+
if ( $count ) {
|
213 |
+
$checkout_button_img_src = WP_CART_URL . '/images/' . ( __( 'paypal_checkout_EN.png', 'wordpress-simple-paypal-shopping-cart' ) );
|
214 |
+
$output .= '<input type="image" src="' . apply_filters( 'wspsc_cart_checkout_button_image_src', $checkout_button_img_src ) . '" name="submit" class="wp_cart_checkout_button wp_cart_checkout_button_' . $carts_cnt . '" style="' . $style . '" alt="' . ( __( "Make payments with PayPal - it\'s fast, free and secure!", 'wordpress-simple-paypal-shopping-cart' ) ) . '" />';
|
215 |
+
}
|
216 |
+
|
217 |
+
$output .= $urls . '
|
218 |
+
<input type="hidden" name="business" value="' . $email . '" />
|
219 |
+
<input type="hidden" name="currency_code" value="' . $paypal_currency . '" />
|
220 |
+
<input type="hidden" name="cmd" value="_cart" />
|
221 |
+
<input type="hidden" name="upload" value="1" />
|
222 |
+
<input type="hidden" name="rm" value="2" />
|
223 |
+
<input type="hidden" name="charset" value="utf-8" />
|
224 |
+
<input type="hidden" name="bn" value="TipsandTricks_SP" />';
|
225 |
+
|
226 |
+
$page_style_name = get_option( 'wp_cart_paypal_co_page_style' );
|
227 |
+
if ( ! empty( $page_style_name ) ) {
|
228 |
+
$output .= '<input type="hidden" name="image_url" value="' . $page_style_name . '" />';
|
229 |
+
}
|
230 |
+
$output .= wp_cart_add_custom_field();
|
231 |
+
|
232 |
+
$extra_pp_fields = apply_filters( 'wspsc_cart_extra_paypal_fields', '' ); //Can be used to add extra PayPal hidden input fields for the cart checkout
|
233 |
+
$output .= $extra_pp_fields;
|
234 |
+
|
235 |
+
$output .= '</form>';
|
236 |
+
if ( get_option( 'wpspc_enable_pp_smart_checkout' ) ) {
|
237 |
+
//Show PayPal Smart Payment Button
|
238 |
+
|
239 |
+
//Some number formatting (before it is used in JS code.
|
240 |
+
$formatted_total = wpspsc_number_format_price($total);
|
241 |
+
$formatted_postage_cost = wpspsc_number_format_price($postage_cost);
|
242 |
+
$totalpluspostage = ($total + $postage_cost);
|
243 |
+
$formatted_totalpluspostage = wpspsc_number_format_price($totalpluspostage);
|
244 |
+
|
245 |
+
//check mode and if client ID is set for it
|
246 |
+
$client_id = get_option( 'wp_shopping_cart_enable_sandbox' ) ? get_option( 'wpspc_pp_test_client_id' ) : get_option( 'wpspc_pp_live_client_id' );
|
247 |
+
if ( empty( $client_id ) ) {
|
248 |
+
//client ID is not set
|
249 |
+
$output .= '<div style="color: red;">' . sprintf( __( 'PayPal Smart Checkout error: %s client ID is not set. Please set it on the Advanced Settings tab.', 'wordpress-simple-paypal-shopping-cart' ), get_option( 'wp_shopping_cart_enable_sandbox' ) ? 'Sandbox' : 'Live' ) . '</div>';
|
250 |
+
} else {
|
251 |
+
//checkout script should be inserted only once, otherwise it would produce JS error
|
252 |
+
if ( $carts_cnt <= 1 ) {
|
253 |
+
$output .= '<script src="https://www.paypalobjects.com/api/checkout.js"></script>';
|
254 |
+
}
|
255 |
+
|
256 |
+
$btn_layout = get_option( 'wpspc_pp_smart_checkout_btn_layout' );
|
257 |
+
$btn_layout = empty( $btn_layout ) ? 'vertical' : $btn_layout;
|
258 |
+
$btn_size = get_option( 'wpspc_pp_smart_checkout_btn_size' );
|
259 |
+
$btn_size = empty( $btn_size ) ? 'medium' : $btn_size;
|
260 |
+
$btn_shape = get_option( 'wpspc_pp_smart_checkout_btn_shape' );
|
261 |
+
$btn_shape = empty( $btn_shape ) ? 'rect' : $btn_shape;
|
262 |
+
$btn_color = get_option( 'wpspc_pp_smart_checkout_btn_color' );
|
263 |
+
$btn_color = empty( $btn_color ) ? 'gold' : $btn_color;
|
264 |
+
|
265 |
+
$pm_str = '';
|
266 |
+
|
267 |
+
$pm_credit = get_option( 'wpspc_pp_smart_checkout_payment_method_credit' );
|
268 |
+
$pm_str .= empty( $pm_credit ) ? '' : ', paypal.FUNDING.CREDIT';
|
269 |
+
$pm_elv = get_option( 'wpspc_pp_smart_checkout_payment_method_elv' );
|
270 |
+
$pm_str .= empty( $pm_elv ) ? '' : ', paypal.FUNDING.ELV';
|
271 |
+
|
272 |
+
ob_start();
|
273 |
+
?>
|
274 |
+
|
275 |
+
<div class="wp-cart-paypal-button-container-<?php echo $carts_cnt; ?>"></div>
|
276 |
+
|
277 |
+
<script>
|
278 |
+
|
279 |
+
// var wpspsc_pp_proceed = false;
|
280 |
+
// var wpspsc_pp_actions;
|
281 |
+
var wpspsc_cci_do_submit = true;
|
282 |
+
|
283 |
+
|
284 |
+
paypal.Button.render({
|
285 |
+
|
286 |
+
env: '<?php echo get_option( 'wp_shopping_cart_enable_sandbox' ) ? 'sandbox' : 'production'; ?>',
|
287 |
+
style: {
|
288 |
+
layout: '<?php echo esc_js( $btn_layout ); ?>',
|
289 |
+
size: '<?php echo esc_js( $btn_size ); ?>',
|
290 |
+
shape: '<?php echo esc_js( $btn_shape ); ?>',
|
291 |
+
color: '<?php echo esc_js( $btn_color ); ?>'
|
292 |
+
},
|
293 |
+
funding: {
|
294 |
+
allowed: [paypal.FUNDING.CARD<?php echo $pm_str; ?>],
|
295 |
+
disallowed: []
|
296 |
+
},
|
297 |
+
client: {
|
298 |
+
sandbox: '<?php echo get_option( 'wpspc_pp_test_client_id' ); ?>',
|
299 |
+
production: '<?php echo get_option( 'wpspc_pp_live_client_id' ); ?>'
|
300 |
+
},
|
301 |
+
validate: function (actions) {
|
302 |
+
// wpspsc_pp_actions = actions;
|
303 |
+
// wpspsc_pp_actions.disable();
|
304 |
+
},
|
305 |
+
onClick: function () {
|
306 |
+
wpspsc_cci_do_submit = false;
|
307 |
+
var res = jQuery('.wp_cart_checkout_button_<?php echo $carts_cnt; ?>').triggerHandler('click');
|
308 |
+
if (typeof res === "undefined" || res) {
|
309 |
+
// wpspsc_pp_actions.enable();
|
310 |
+
} else {
|
311 |
+
// wpspsc_pp_actions.disable();
|
312 |
+
}
|
313 |
+
wpspsc_cci_do_submit = true;
|
314 |
+
},
|
315 |
+
payment: function (data, actions) {
|
316 |
+
return actions.payment.create({
|
317 |
+
payment: {
|
318 |
+
transactions: [{
|
319 |
+
amount: {total: '<?php echo $formatted_totalpluspostage; ?>', currency: '<?php echo $paypal_currency; ?>',
|
320 |
+
details: {subtotal: '<?php echo $formatted_total; ?>', shipping: '<?php echo $formatted_postage_cost; ?>'}
|
321 |
+
},
|
322 |
+
item_list: {
|
323 |
+
items: [<?php echo $items_list; ?>]
|
324 |
+
}
|
325 |
+
}]
|
326 |
+
},
|
327 |
+
meta: {partner_attribution_id: 'TipsandTricks_SP'}
|
328 |
+
});
|
329 |
+
},
|
330 |
+
onError: function (error) {
|
331 |
+
console.log(error);
|
332 |
+
alert('<?php echo esc_js( __( 'Error occured during PayPal Smart Checkout process.', 'wordpress-simple-paypal-shopping-cart' ) ); ?>\n\n' + error);
|
333 |
+
},
|
334 |
+
onAuthorize: function (data, actions) {
|
335 |
+
jQuery("[class^='wp-cart-paypal-button-container']").hide();
|
336 |
+
jQuery('.wp_cart_checkout_button').hide();
|
337 |
+
jQuery('.wpspsc-spinner-cont').css('display', 'inline-block');
|
338 |
+
return actions.payment.execute().then(function (data) {
|
339 |
+
jQuery.post('<?php echo get_admin_url(); ?>admin-ajax.php',
|
340 |
+
{'action': 'wpspsc_process_pp_smart_checkout', 'wpspsc_payment_data': data})
|
341 |
+
.done(function (result) {
|
342 |
+
if (result.success) {
|
343 |
+
window.location.href = '<?php echo esc_js( $return_url ); ?>';
|
344 |
+
} else {
|
345 |
+
console.log(result);
|
346 |
+
alert(result.errMsg)
|
347 |
+
jQuery("[class^='wp-cart-paypal-button-container']").show();
|
348 |
+
if (jQuery('.wp_cart_checkout_button').data('wspsc-hidden') !== "1") {
|
349 |
+
jQuery('.wp_cart_checkout_button').show();
|
350 |
+
}
|
351 |
+
jQuery('.wp_cart_checkout_button').show();
|
352 |
+
jQuery('.wpspsc-spinner-cont').hide();
|
353 |
+
}
|
354 |
+
})
|
355 |
+
.fail(function (result) {
|
356 |
+
console.log(result);
|
357 |
+
jQuery("[class^='wp-cart-paypal-button-container']").show();
|
358 |
+
if (jQuery('.wp_cart_checkout_button').data('wspsc-hidden') !== "1") {
|
359 |
+
jQuery('.wp_cart_checkout_button').show();
|
360 |
+
}
|
361 |
+
jQuery('.wpspsc-spinner-cont').hide();
|
362 |
+
alert('<?php echo esc_js( __( 'HTTP error occured during payment process:', 'wordpress-simple-paypal-shopping-cart' ) ); ?>' + ' ' + result.status + ' ' + result.statusText);
|
363 |
+
});
|
364 |
+
});
|
365 |
+
}
|
366 |
+
}, '.wp-cart-paypal-button-container-<?php echo $carts_cnt; ?>');
|
367 |
+
|
368 |
+
</script>
|
369 |
+
<style>
|
370 |
+
@keyframes wpspsc-spinner {
|
371 |
+
to {transform: rotate(360deg);}
|
372 |
+
}
|
373 |
+
|
374 |
+
.wpspsc-spinner {
|
375 |
+
margin: 0 auto;
|
376 |
+
text-indent: -9999px;
|
377 |
+
vertical-align: middle;
|
378 |
+
box-sizing: border-box;
|
379 |
+
position: relative;
|
380 |
+
width: 60px;
|
381 |
+
height: 60px;
|
382 |
+
border-radius: 50%;
|
383 |
+
border: 5px solid #ccc;
|
384 |
+
border-top-color: #0070ba;
|
385 |
+
animation: wpspsc-spinner .6s linear infinite;
|
386 |
+
}
|
387 |
+
.wpspsc-spinner-cont {
|
388 |
+
width: 100%;
|
389 |
+
text-align: center;
|
390 |
+
margin-top:10px;
|
391 |
+
display: none;
|
392 |
+
}
|
393 |
+
</style>
|
394 |
+
<div class="wpspsc-spinner-cont">
|
395 |
+
<div class="wpspsc-spinner"></div>
|
396 |
+
</div>
|
397 |
+
<?php
|
398 |
+
$output .= ob_get_clean();
|
399 |
+
}
|
400 |
+
}
|
401 |
+
$output .= '</td></tr>';
|
402 |
+
}
|
403 |
+
$output .= '</table></div>';
|
404 |
+
$output = apply_filters( 'wpspsc_after_cart_output', $output );
|
405 |
+
return $output;
|
406 |
+
}
|
languages/wordpress-simple-paypal-shopping-cart-br_FR.mo
ADDED
Binary file
|
languages/wordpress-simple-paypal-shopping-cart-br_FR.po
ADDED
@@ -0,0 +1,891 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: Simple Shopping Cart\n"
|
4 |
+
"POT-Creation-Date: 2016-01-06 13:33+1000\n"
|
5 |
+
"PO-Revision-Date: 2018-07-07 15:14+0200\n"
|
6 |
+
"Language-Team: \n"
|
7 |
+
"MIME-Version: 1.0\n"
|
8 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
+
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"X-Generator: Poedit 2.0.4\n"
|
11 |
+
"X-Poedit-KeywordsList: __;_e\n"
|
12 |
+
"X-Poedit-Basepath: .\n"
|
13 |
+
"Last-Translator: Florian LANNUZEL <florian@lannuzel.bzh>\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"Language: br_FR\n"
|
16 |
+
"X-Poedit-SearchPath-0: .\n"
|
17 |
+
|
18 |
+
#: class-coupon.php:19
|
19 |
+
msgid "Admin needs to configure some discount coupons before it can be used"
|
20 |
+
msgstr ""
|
21 |
+
"Ar merour a rank kefluniañ lod eus ar c’hodoù distaol a-raok ma vo arveret"
|
22 |
+
|
23 |
+
#: class-coupon.php:86
|
24 |
+
msgid "Coupon ID: "
|
25 |
+
msgstr "ID ar c’hod distaol: "
|
26 |
+
|
27 |
+
#: class-coupon.php:87
|
28 |
+
msgid "Coupon Code: "
|
29 |
+
msgstr "Kod distaol: "
|
30 |
+
|
31 |
+
#: class-coupon.php:88
|
32 |
+
msgid "Discount Amt: "
|
33 |
+
msgstr "Sammad an distaol: "
|
34 |
+
|
35 |
+
#: class-coupon.php:89
|
36 |
+
msgid "Expiry date: "
|
37 |
+
msgstr "Deiziad termen: "
|
38 |
+
|
39 |
+
#: class-coupon.php:98
|
40 |
+
msgid "Coupon code used does not exist!"
|
41 |
+
msgstr "N’eus ket eus ar c’hod distaol enanket."
|
42 |
+
|
43 |
+
#: class-coupon.php:105
|
44 |
+
msgid "Coupon code expired!"
|
45 |
+
msgstr "Diamzeret eo ar c’hod distaol."
|
46 |
+
|
47 |
+
#: class-coupon.php:110
|
48 |
+
msgid "Discount can only be applied once per checkout!"
|
49 |
+
msgstr "Gounit a vez tennet ganeoc’h war ho panerad endeo."
|
50 |
+
|
51 |
+
#: class-coupon.php:132
|
52 |
+
msgid "Discount applied successfully! Total Discount: "
|
53 |
+
msgstr "Distaol arloet gant berzh. Hollad an distaol: "
|
54 |
+
|
55 |
+
#: wp_shopping_cart.php:190
|
56 |
+
msgid "Error! Your session is out of sync. Please reset your session."
|
57 |
+
msgstr ""
|
58 |
+
"Fazi: n’haller ket goubredañ hoc’h estez ken. Adderaouekait hoc’h estez mar "
|
59 |
+
"plij."
|
60 |
+
|
61 |
+
#: wp_shopping_cart.php:198
|
62 |
+
msgid ""
|
63 |
+
"Shopping Cart Configuration Error! You must specify a value in the 'Checkout "
|
64 |
+
"Page URL' field for the automatic redirection feature to work!"
|
65 |
+
msgstr ""
|
66 |
+
"Fazi war gefluniañ ar baner(ad): enankañ ur werzh er vaezienn “Ere ar "
|
67 |
+
"c’hef” (URL) a ranker ober evit an heñchañ emgefreek."
|
68 |
+
|
69 |
+
#: wp_shopping_cart.php:290 wp_shopping_cart.php:365 wp_shopping_cart.php:431
|
70 |
+
#: wp_shopping_cart.php:473 wp_shopping_cart.php:477
|
71 |
+
#: wp_shopping_cart_settings.php:123
|
72 |
+
msgid "Add to Cart"
|
73 |
+
msgstr "Lakaat er baner(ad)"
|
74 |
+
|
75 |
+
#: wp_shopping_cart.php:568
|
76 |
+
msgid "WP Paypal Shopping Cart"
|
77 |
+
msgstr "WP PayPal Shopping Cart"
|
78 |
+
|
79 |
+
#: wp_shopping_cart.php:568
|
80 |
+
msgid "WP Shopping Cart"
|
81 |
+
msgstr "WP Shopping Cart"
|
82 |
+
|
83 |
+
#: wp_shopping_cart.php:602
|
84 |
+
msgid "Shopping Cart"
|
85 |
+
msgstr "Paner(ad)"
|
86 |
+
|
87 |
+
#: wp_shopping_cart.php:635
|
88 |
+
msgid "Settings"
|
89 |
+
msgstr "Arventennoù"
|
90 |
+
|
91 |
+
#: wp_shopping_cart_discounts_menu.php:52 wp_shopping_cart_settings.php:189
|
92 |
+
#: wp_shopping_cart_settings.php:430
|
93 |
+
msgid ""
|
94 |
+
"For more information, updates, detailed documentation and video tutorial, "
|
95 |
+
"please visit:"
|
96 |
+
msgstr ""
|
97 |
+
"Evit gouzout hiroc’h, evit profitañ eus an hizivadurioù, eus an teuliadurioù "
|
98 |
+
"hag eus un tutorialoù video, kit war:"
|
99 |
+
|
100 |
+
#: wp_shopping_cart_discounts_menu.php:53 wp_shopping_cart_settings.php:190
|
101 |
+
#: wp_shopping_cart_settings.php:431
|
102 |
+
msgid "WP Simple Cart Homepage"
|
103 |
+
msgstr "Pajenn degemer WP Simple Cart"
|
104 |
+
|
105 |
+
#: wp_shopping_cart_discounts_menu.php:61
|
106 |
+
msgid "Coupon/Discount Settings"
|
107 |
+
msgstr "Arventennoù ar c’hodoù distaol"
|
108 |
+
|
109 |
+
#: wp_shopping_cart_discounts_menu.php:68
|
110 |
+
msgid "Enable Discount Coupon Feature"
|
111 |
+
msgstr "Gweredekaat keweriusterioù evit ar c’hodoù distaol"
|
112 |
+
|
113 |
+
#: wp_shopping_cart_discounts_menu.php:71
|
114 |
+
msgid ""
|
115 |
+
"When checked your customers will be able to enter a coupon code in the "
|
116 |
+
"shopping cart before checkout."
|
117 |
+
msgstr ""
|
118 |
+
"Pa vez kevasket hoc’h arvalient a c’hello enankañ ur c’hod distaol er "
|
119 |
+
"banerad a-raok paeañ."
|
120 |
+
|
121 |
+
#: wp_shopping_cart_discounts_menu.php:78
|
122 |
+
msgid "Update »"
|
123 |
+
msgstr "Hizivaat »"
|
124 |
+
|
125 |
+
#: wp_shopping_cart_discounts_menu.php:94
|
126 |
+
msgid "Add Coupon/Discount"
|
127 |
+
msgstr "Ouzhpennañ ur c’hod distaol"
|
128 |
+
|
129 |
+
#: wp_shopping_cart_discounts_menu.php:119
|
130 |
+
msgid "Save Coupon »"
|
131 |
+
msgstr "Enrollañ ar c’hod distaol »"
|
132 |
+
|
133 |
+
#: wp_shopping_cart_discounts_menu.php:137
|
134 |
+
msgid "Coupon Code"
|
135 |
+
msgstr "Kod distaol"
|
136 |
+
|
137 |
+
#: wp_shopping_cart_discounts_menu.php:138
|
138 |
+
msgid "Discount Rate (%)"
|
139 |
+
msgstr "Distaol (%)"
|
140 |
+
|
141 |
+
#: wp_shopping_cart_discounts_menu.php:139
|
142 |
+
msgid "Expiry Date"
|
143 |
+
msgstr "Deiziad termen"
|
144 |
+
|
145 |
+
#: wp_shopping_cart_discounts_menu.php:158
|
146 |
+
msgid "No Expiry"
|
147 |
+
msgstr "Termen ebet"
|
148 |
+
|
149 |
+
#: wp_shopping_cart_discounts_menu.php:174
|
150 |
+
msgid "No Coupons Configured."
|
151 |
+
msgstr "Kod distaol ebet kefluniet."
|
152 |
+
|
153 |
+
#: wp_shopping_cart_discounts_menu.php:179
|
154 |
+
msgid "No Record found"
|
155 |
+
msgstr "Roud ebet bet kavet"
|
156 |
+
|
157 |
+
#: wp_shopping_cart_misc_functions.php:160
|
158 |
+
msgid "Your Shopping Cart"
|
159 |
+
msgstr "Ho paner(ad)"
|
160 |
+
|
161 |
+
#: wp_shopping_cart_misc_functions.php:161
|
162 |
+
msgid "Your cart is empty"
|
163 |
+
msgstr "Ho paner a zo goullo"
|
164 |
+
|
165 |
+
#: wp_shopping_cart_misc_functions.php:195
|
166 |
+
msgid ""
|
167 |
+
"Need a shopping cart plugin with a lot of features and good support? Check "
|
168 |
+
"out our "
|
169 |
+
msgstr ""
|
170 |
+
"Ezhomm ho peus eus un enlugellad evit ur baner binvidikoc’h hag ur skor a "
|
171 |
+
"galite? Sellit ouzh hor/hon"
|
172 |
+
|
173 |
+
#: wp_shopping_cart_misc_functions.php:196
|
174 |
+
msgid "WP eStore Plugin"
|
175 |
+
msgstr "Enlugellad WP eStore"
|
176 |
+
|
177 |
+
#: wp_shopping_cart_orders.php:10
|
178 |
+
msgid "Cart Orders"
|
179 |
+
msgstr "Paneradoù an urzhiadoù"
|
180 |
+
|
181 |
+
#: wp_shopping_cart_orders.php:11
|
182 |
+
msgid "Cart Order"
|
183 |
+
msgstr "Panerad an urzhiad"
|
184 |
+
|
185 |
+
#: wp_shopping_cart_orders.php:12
|
186 |
+
msgid "Add New"
|
187 |
+
msgstr "Ouzhpennañ"
|
188 |
+
|
189 |
+
#: wp_shopping_cart_orders.php:13
|
190 |
+
msgid "Add New Order"
|
191 |
+
msgstr "Ouzhpennañ un urzhiad"
|
192 |
+
|
193 |
+
#: wp_shopping_cart_orders.php:14
|
194 |
+
msgid "Edit"
|
195 |
+
msgstr "Kemmañ"
|
196 |
+
|
197 |
+
#: wp_shopping_cart_orders.php:15
|
198 |
+
msgid "Edit Order"
|
199 |
+
msgstr "Kemmañ an urzhiad"
|
200 |
+
|
201 |
+
#: wp_shopping_cart_orders.php:16
|
202 |
+
msgid "New Order"
|
203 |
+
msgstr "Urzhiad nevez"
|
204 |
+
|
205 |
+
#: wp_shopping_cart_orders.php:17
|
206 |
+
msgid "View"
|
207 |
+
msgstr "Gwelout"
|
208 |
+
|
209 |
+
#: wp_shopping_cart_orders.php:18
|
210 |
+
msgid "View Order"
|
211 |
+
msgstr "Gwelout an urzhiad"
|
212 |
+
|
213 |
+
#: wp_shopping_cart_orders.php:19
|
214 |
+
msgid "Search Order"
|
215 |
+
msgstr "Klask un urzhiad"
|
216 |
+
|
217 |
+
#: wp_shopping_cart_orders.php:20
|
218 |
+
msgid "No order found"
|
219 |
+
msgstr "Urzhiad ebet bet kavet"
|
220 |
+
|
221 |
+
#: wp_shopping_cart_orders.php:21
|
222 |
+
msgid "No order found in Trash"
|
223 |
+
msgstr "Urzhiad ebet bet kavet el lastez"
|
224 |
+
|
225 |
+
#: wp_shopping_cart_orders.php:22
|
226 |
+
msgid "Parent Order"
|
227 |
+
msgstr "Urzhiad kar"
|
228 |
+
|
229 |
+
#: wp_shopping_cart_orders.php:38
|
230 |
+
msgid "Order Review"
|
231 |
+
msgstr "Evezhiadenn war an urzhiad"
|
232 |
+
|
233 |
+
#: wp_shopping_cart_orders.php:70
|
234 |
+
msgid "Order ID: #"
|
235 |
+
msgstr "ID an urzhiad: #"
|
236 |
+
|
237 |
+
#: wp_shopping_cart_orders.php:72
|
238 |
+
msgid "Transaction ID: #"
|
239 |
+
msgstr "ID an treuzgread: #"
|
240 |
+
|
241 |
+
#: wp_shopping_cart_orders.php:75 wp_shopping_cart_orders.php:165
|
242 |
+
msgid "First Name"
|
243 |
+
msgstr "Anv-bihan"
|
244 |
+
|
245 |
+
#: wp_shopping_cart_orders.php:79 wp_shopping_cart_orders.php:166
|
246 |
+
msgid "Last Name"
|
247 |
+
msgstr "Anv-familh"
|
248 |
+
|
249 |
+
#: wp_shopping_cart_orders.php:83
|
250 |
+
msgid "Email Address"
|
251 |
+
msgstr "Chomlec’h postel"
|
252 |
+
|
253 |
+
#: wp_shopping_cart_orders.php:87
|
254 |
+
msgid "IP Address"
|
255 |
+
msgstr "Chomlec’h IP"
|
256 |
+
|
257 |
+
#: wp_shopping_cart_orders.php:91 wp_shopping_cart_orders.php:168
|
258 |
+
#: includes/wspsc-cart-functions.php:150
|
259 |
+
msgid "Total"
|
260 |
+
msgstr "Hollad"
|
261 |
+
|
262 |
+
#: wp_shopping_cart_orders.php:95 includes/wspsc-cart-functions.php:147
|
263 |
+
msgid "Shipping"
|
264 |
+
msgstr "Degas"
|
265 |
+
|
266 |
+
#: wp_shopping_cart_orders.php:99
|
267 |
+
msgid "Address"
|
268 |
+
msgstr "Chomlec’h post"
|
269 |
+
|
270 |
+
#: wp_shopping_cart_orders.php:103
|
271 |
+
msgid "Phone"
|
272 |
+
msgstr "Pgz."
|
273 |
+
|
274 |
+
#: wp_shopping_cart_orders.php:107
|
275 |
+
msgid "Buyer Email Sent?"
|
276 |
+
msgstr "Postel kaset d’an arval?"
|
277 |
+
|
278 |
+
#: wp_shopping_cart_orders.php:111
|
279 |
+
msgid "Item(s) Ordered:"
|
280 |
+
msgstr "Produ(ioù) urzhiadet:"
|
281 |
+
|
282 |
+
#: wp_shopping_cart_orders.php:115
|
283 |
+
msgid "Applied Coupon Code:"
|
284 |
+
msgstr "Kod distaol arloet:"
|
285 |
+
|
286 |
+
#: wp_shopping_cart_orders.php:164
|
287 |
+
msgid "Order ID"
|
288 |
+
msgstr "ID an uzhiad"
|
289 |
+
|
290 |
+
#: wp_shopping_cart_orders.php:167
|
291 |
+
msgid "Email"
|
292 |
+
msgstr "Chomlec’h postel"
|
293 |
+
|
294 |
+
#: wp_shopping_cart_orders.php:169
|
295 |
+
msgid "Status"
|
296 |
+
msgstr "Stad"
|
297 |
+
|
298 |
+
#: wp_shopping_cart_orders.php:170
|
299 |
+
msgid "Date"
|
300 |
+
msgstr "Deiziad"
|
301 |
+
|
302 |
+
#: wp_shopping_cart_settings.php:10
|
303 |
+
msgid "WP Paypal Shopping Cart Options"
|
304 |
+
msgstr "Dibarzhioù WP Paypal Shopping Cart"
|
305 |
+
|
306 |
+
#: wp_shopping_cart_settings.php:101
|
307 |
+
msgid "Options Updated!"
|
308 |
+
msgstr "Dibarzhioù hizivaet"
|
309 |
+
|
310 |
+
#: wp_shopping_cart_settings.php:105 includes/wspsc-cart-functions.php:30
|
311 |
+
msgid "USD"
|
312 |
+
msgstr "USD"
|
313 |
+
|
314 |
+
#: wp_shopping_cart_settings.php:108 includes/wspsc-cart-functions.php:34
|
315 |
+
msgid "$"
|
316 |
+
msgstr "$"
|
317 |
+
|
318 |
+
#: wp_shopping_cart_settings.php:186
|
319 |
+
msgid "Simple PayPal Shopping Cart Settings"
|
320 |
+
msgstr "Arventennoù Simple PayPal Shopping Cart"
|
321 |
+
|
322 |
+
#: wp_shopping_cart_settings.php:194
|
323 |
+
msgid "Quick Usage Guide"
|
324 |
+
msgstr "Sturlevr prim an arveriad"
|
325 |
+
|
326 |
+
#: wp_shopping_cart_settings.php:197
|
327 |
+
msgid "Step 1) "
|
328 |
+
msgstr "Pazenn 1) "
|
329 |
+
|
330 |
+
#: wp_shopping_cart_settings.php:197
|
331 |
+
msgid "To add an 'Add to Cart' button for a product simply add the shortcode"
|
332 |
+
msgstr ""
|
333 |
+
"Evit ouzhpennañ an afell “Lakaat er baner(ad)”, grit gant ar Shortcode-mañ"
|
334 |
+
|
335 |
+
#: wp_shopping_cart_settings.php:197
|
336 |
+
msgid "PRODUCT-NAME"
|
337 |
+
msgstr "ANV-AR-PRODU"
|
338 |
+
|
339 |
+
#: wp_shopping_cart_settings.php:197
|
340 |
+
msgid "PRODUCT-PRICE"
|
341 |
+
msgstr "PRIZ-AR-PRODU"
|
342 |
+
|
343 |
+
#: wp_shopping_cart_settings.php:197
|
344 |
+
msgid ""
|
345 |
+
"to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-"
|
346 |
+
"PRICE with the actual name and price of your product."
|
347 |
+
msgstr ""
|
348 |
+
"en ur post/bajenn a zalc’h ar produ. Amsaviñ ANV-AR-PRODU ha PRIZ-AR-PRODU "
|
349 |
+
"gant anv ha priz gwir ho produ."
|
350 |
+
|
351 |
+
#: wp_shopping_cart_settings.php:198
|
352 |
+
msgid "Example add to cart button shortcode usage:"
|
353 |
+
msgstr "Arver dre ar skouer evit “Lakaat er baner(ad)”:"
|
354 |
+
|
355 |
+
#: wp_shopping_cart_settings.php:199
|
356 |
+
msgid "Step 2) "
|
357 |
+
msgstr "Pazenn 2) "
|
358 |
+
|
359 |
+
#: wp_shopping_cart_settings.php:199
|
360 |
+
msgid ""
|
361 |
+
"To add the shopping cart to a post or page (example: a checkout page) simply "
|
362 |
+
"add the shortcode"
|
363 |
+
msgstr ""
|
364 |
+
"Evit ouzhpennañ ar baner war ur post/bajenn (d.s. pajenn Kef), grit gant ar "
|
365 |
+
"shortcode"
|
366 |
+
|
367 |
+
#: wp_shopping_cart_settings.php:199
|
368 |
+
msgid ""
|
369 |
+
"to a post or page or use the sidebar widget to add the shopping cart to the "
|
370 |
+
"sidebar."
|
371 |
+
msgstr ""
|
372 |
+
"en ur post/bajenn pe implijout ar widjed evit ouzhpennañ ar baner er varrenn "
|
373 |
+
"gostez."
|
374 |
+
|
375 |
+
#: wp_shopping_cart_settings.php:200
|
376 |
+
msgid "Example shopping cart shortcode usage:"
|
377 |
+
msgstr "Arver dre ar skouer evit ar baner(ad):"
|
378 |
+
|
379 |
+
#: wp_shopping_cart_settings.php:209
|
380 |
+
msgid "PayPal and Shopping Cart Settings"
|
381 |
+
msgstr "Arventennoù WP PayPal Shopping Cart"
|
382 |
+
|
383 |
+
#: wp_shopping_cart_settings.php:215
|
384 |
+
msgid "Paypal Email Address"
|
385 |
+
msgstr "Chomlec’h postel PayPal"
|
386 |
+
|
387 |
+
#: wp_shopping_cart_settings.php:219
|
388 |
+
msgid "Shopping Cart title"
|
389 |
+
msgstr "Titl ar baner"
|
390 |
+
|
391 |
+
#: wp_shopping_cart_settings.php:223
|
392 |
+
msgid "Text/Image to Show When Cart Empty"
|
393 |
+
msgstr "Testenn/Skeudenn da ziskouez pa vez goullo ar baner"
|
394 |
+
|
395 |
+
#: wp_shopping_cart_settings.php:224
|
396 |
+
msgid ""
|
397 |
+
"You can either enter plain text or the URL of an image that you want to show "
|
398 |
+
"when the shopping cart is empty"
|
399 |
+
msgstr ""
|
400 |
+
"Gallout a rit enankañ un destenn eeun pe ere ur skeudenn (URL) da ziskouez "
|
401 |
+
"pa vez goullo ar baner"
|
402 |
+
|
403 |
+
#: wp_shopping_cart_settings.php:227
|
404 |
+
msgid "Currency"
|
405 |
+
msgstr "Moneiz"
|
406 |
+
|
407 |
+
#: wp_shopping_cart_settings.php:228 wp_shopping_cart_settings.php:232
|
408 |
+
#: wp_shopping_cart_settings.php:259
|
409 |
+
msgid "e.g."
|
410 |
+
msgstr "d.s."
|
411 |
+
|
412 |
+
#: wp_shopping_cart_settings.php:231
|
413 |
+
msgid "Currency Symbol"
|
414 |
+
msgstr "Arouez ar moneiz"
|
415 |
+
|
416 |
+
#: wp_shopping_cart_settings.php:237
|
417 |
+
msgid "Base Shipping Cost"
|
418 |
+
msgstr "Mizoù kas diazez"
|
419 |
+
|
420 |
+
#: wp_shopping_cart_settings.php:238
|
421 |
+
msgid ""
|
422 |
+
"This is the base shipping cost that will be added to the total of individual "
|
423 |
+
"products shipping cost. Put 0 if you do not want to charge shipping cost or "
|
424 |
+
"use base shipping cost."
|
425 |
+
msgstr ""
|
426 |
+
"An dra-mañ a zo ar miz kas diazez da vezañ ouzhpennet da hollad ar mizoù kas "
|
427 |
+
"eus pep produ. Enankañ 0 evit ma ne vo ket ouzhpennet mizoù kas."
|
428 |
+
|
429 |
+
#: wp_shopping_cart_settings.php:238
|
430 |
+
msgid "Learn More on Shipping Calculation"
|
431 |
+
msgstr "Gouzout hiroc’h diwar-benn jediñ ar mizoù kas"
|
432 |
+
|
433 |
+
#: wp_shopping_cart_settings.php:242
|
434 |
+
msgid "Free Shipping for Orders Over"
|
435 |
+
msgstr "Mizoù profet evit urzhiadoù uheloc’h o friz evit"
|
436 |
+
|
437 |
+
#: wp_shopping_cart_settings.php:243
|
438 |
+
msgid ""
|
439 |
+
"When a customer orders more than this amount he/she will get free shipping. "
|
440 |
+
"Leave empty if you do not want to use it."
|
441 |
+
msgstr ""
|
442 |
+
"Pa vez uheloc’h hollad an urzhiad evit ar sammad-mañ e vez profet ar mizoù "
|
443 |
+
"kas. Leuskel goullo evit ma vo dioberiant an dibarzh-mañ."
|
444 |
+
|
445 |
+
#: wp_shopping_cart_settings.php:247
|
446 |
+
msgid "Must Collect Shipping Address on PayPal"
|
447 |
+
msgstr "Dastum ar chomlec’h post gant PayPal"
|
448 |
+
|
449 |
+
#: wp_shopping_cart_settings.php:248
|
450 |
+
msgid ""
|
451 |
+
"If checked the customer will be forced to enter a shipping address on PayPal "
|
452 |
+
"when checking out."
|
453 |
+
msgstr ""
|
454 |
+
"Mar kevasket, an arval a ranko enankañ e chomlec’h post war bajenn paeañ "
|
455 |
+
"PayPal."
|
456 |
+
|
457 |
+
#: wp_shopping_cart_settings.php:252
|
458 |
+
msgid "Use PayPal Profile Based Shipping"
|
459 |
+
msgstr "Jediñ ar mizoù kas gant PayPal"
|
460 |
+
|
461 |
+
#: wp_shopping_cart_settings.php:253
|
462 |
+
msgid "Check this if you want to use"
|
463 |
+
msgstr "Kevaskañ al log-mañ ma fell deoc’h"
|
464 |
+
|
465 |
+
#: wp_shopping_cart_settings.php:253
|
466 |
+
msgid "PayPal profile based shipping"
|
467 |
+
msgstr "jediñ ar mizoù kas gant PayPal"
|
468 |
+
|
469 |
+
#: wp_shopping_cart_settings.php:253
|
470 |
+
msgid ""
|
471 |
+
"Using this will ignore any other shipping options that you have specified in "
|
472 |
+
"this plugin."
|
473 |
+
msgstr ""
|
474 |
+
"Pa vez arveret an dibarzh-mañ e vez laosket a-gostez an holl zoareoù all da "
|
475 |
+
"jediñ ar mizoù kas spisaet ganeoc’h."
|
476 |
+
|
477 |
+
#: wp_shopping_cart_settings.php:257
|
478 |
+
msgid "Add to Cart button text or Image"
|
479 |
+
msgstr "Testenn pe skeudenn “Lakaat er baner(ad)”"
|
480 |
+
|
481 |
+
#: wp_shopping_cart_settings.php:259
|
482 |
+
msgid ""
|
483 |
+
"To use a customized image as the button simply enter the URL of the image "
|
484 |
+
"file."
|
485 |
+
msgstr "Enankañ ere ar skeudenn (URL) evit he fersonelaat."
|
486 |
+
|
487 |
+
#: wp_shopping_cart_settings.php:265
|
488 |
+
msgid "Return URL"
|
489 |
+
msgstr "Ere ar bajenn distreiñ (URL)"
|
490 |
+
|
491 |
+
#: wp_shopping_cart_settings.php:266
|
492 |
+
msgid ""
|
493 |
+
"This is the URL the customer will be redirected to after a successful payment"
|
494 |
+
msgstr ""
|
495 |
+
"Ere (URL) e-lec’h ma vo heñvet an arval war e du ur wech paeet an urzhiad "
|
496 |
+
"gant berzh"
|
497 |
+
|
498 |
+
#: wp_shopping_cart_settings.php:270
|
499 |
+
msgid "Cancel URL"
|
500 |
+
msgstr "Ere ar bajenn nullañ (URL)"
|
501 |
+
|
502 |
+
#: wp_shopping_cart_settings.php:271
|
503 |
+
msgid ""
|
504 |
+
"The customer will be redirected to the above page if the payment is "
|
505 |
+
"cancelled."
|
506 |
+
msgstr ""
|
507 |
+
"An arval a vo heñchet war-zu ar bajenn a-us ma vez nullet/c’hwitet ar "
|
508 |
+
"paeamant."
|
509 |
+
|
510 |
+
#: wp_shopping_cart_settings.php:275
|
511 |
+
msgid "Products Page URL"
|
512 |
+
msgstr "Ere pajenn ar produioù (URL)"
|
513 |
+
|
514 |
+
#: wp_shopping_cart_settings.php:276
|
515 |
+
msgid ""
|
516 |
+
"This is the URL of your products page if you have any. If used, the shopping "
|
517 |
+
"cart widget will display a link to this page when cart is empty"
|
518 |
+
msgstr ""
|
519 |
+
"Ere pajenn ar produioù (URL) m’ho peus unan. Mar implijet, ar widjed Paner a "
|
520 |
+
"ziskouezo ul liamm war-zu ar bajenn-mañ keit ha ma chomo ar baner goullo."
|
521 |
+
|
522 |
+
#: wp_shopping_cart_settings.php:280
|
523 |
+
msgid "Automatic redirection to checkout page"
|
524 |
+
msgstr "Heñchañ emgefreek war-zu ar c’hef"
|
525 |
+
|
526 |
+
#: wp_shopping_cart_settings.php:282
|
527 |
+
msgid "Checkout Page URL"
|
528 |
+
msgstr "Ere ar c’hef (URL)"
|
529 |
+
|
530 |
+
#: wp_shopping_cart_settings.php:283
|
531 |
+
msgid ""
|
532 |
+
"If checked the visitor will be redirected to the Checkout page after a "
|
533 |
+
"product is added to the cart. You must enter a URL in the Checkout Page URL "
|
534 |
+
"field for this to work."
|
535 |
+
msgstr ""
|
536 |
+
"Mar kevasket, an arval a vo heñchet war-zu ar c’hef ur wech lakaet ur produ "
|
537 |
+
"er baner(ad). Enankañ ere ar bajenn Kef (URL) er vaezienn."
|
538 |
+
|
539 |
+
#: wp_shopping_cart_settings.php:287
|
540 |
+
msgid "Open PayPal Checkout Page in a New Tab"
|
541 |
+
msgstr "Digeriñ pajenn PayPal Checkout en un ivinell nevez"
|
542 |
+
|
543 |
+
#: wp_shopping_cart_settings.php:289
|
544 |
+
msgid ""
|
545 |
+
"If checked the PayPal checkout page will be opened in a new tab/window when "
|
546 |
+
"the user clicks the checkout button."
|
547 |
+
msgstr ""
|
548 |
+
"Mar kevasket, ar bajenn PayPal Checkout a vo digoret en un ivinell/prenestr "
|
549 |
+
"nevez pa gliko an arval war an afell Checkout."
|
550 |
+
|
551 |
+
#: wp_shopping_cart_settings.php:293
|
552 |
+
msgid "Reset Cart After Redirection to Return Page"
|
553 |
+
msgstr ""
|
554 |
+
"Goullonderiñ ar banerad war-lerc’h bezañ heñchet war-zu ar bajenn distreiñ"
|
555 |
+
|
556 |
+
#: wp_shopping_cart_settings.php:295
|
557 |
+
msgid ""
|
558 |
+
"If checked the shopping cart will be reset when the customer lands on the "
|
559 |
+
"return URL (Thank You) page."
|
560 |
+
msgstr ""
|
561 |
+
"Mar kevasket, ar banerad a vo goullo pa zistroio an arval war al lec’hienn "
|
562 |
+
"(pajenn trugarekaat)."
|
563 |
+
|
564 |
+
#: wp_shopping_cart_settings.php:302
|
565 |
+
msgid "Hide Shopping Cart Image"
|
566 |
+
msgstr "Kuzhat skeudenn ar baner"
|
567 |
+
|
568 |
+
#: wp_shopping_cart_settings.php:303
|
569 |
+
msgid "If ticked the shopping cart image will not be shown."
|
570 |
+
msgstr "Mar kevasket, ne vo ket diskouezet skeudenn ar baner."
|
571 |
+
|
572 |
+
#: wp_shopping_cart_settings.php:309
|
573 |
+
msgid "Customize the Note to Seller Text"
|
574 |
+
msgstr "Personelaat testenn an notenn evit ar gwerzhour"
|
575 |
+
|
576 |
+
#: wp_shopping_cart_settings.php:311
|
577 |
+
msgid ""
|
578 |
+
"Specify the text that you want to use for the note field on PayPal checkout "
|
579 |
+
"page to collect special instruction (leave this field empty if you don't "
|
580 |
+
"need to customize it). The default label for the note field is \"Add special "
|
581 |
+
"instructions to merchant\"."
|
582 |
+
msgstr ""
|
583 |
+
"Spisaat an destenn da implijout er vaezienn Notenn war bajenn PayPal "
|
584 |
+
"Checkout evit dastum ditouroù resis (leuskel goullo ma ne vefe ket ezhomm). "
|
585 |
+
"Ar skritellig dre ziouer eviti: “Ouzhpennañ ditouroù resis evit ar "
|
586 |
+
"gwerzhour”."
|
587 |
+
|
588 |
+
#: wp_shopping_cart_settings.php:317
|
589 |
+
msgid "Custom Checkout Page Style Name"
|
590 |
+
msgstr "Anv stil ar bajenn Checkout bersonelaet"
|
591 |
+
|
592 |
+
#: wp_shopping_cart_settings.php:319
|
593 |
+
msgid ""
|
594 |
+
"Specify the page style name here if you want to customize the paypal "
|
595 |
+
"checkout page with custom page style otherwise leave this field empty."
|
596 |
+
msgstr ""
|
597 |
+
"Spisaat anv stil ar bajenn amañ evit personelaat ar bajenn PayPal Checkout "
|
598 |
+
"gant ur stil ispisial, mod all leuskel goullo."
|
599 |
+
|
600 |
+
#: wp_shopping_cart_settings.php:325
|
601 |
+
msgid "Use Strict PayPal Email Address Checking"
|
602 |
+
msgstr "Implijout gwiriañ strizh ar chomlec’h postel PayPal"
|
603 |
+
|
604 |
+
#: wp_shopping_cart_settings.php:326
|
605 |
+
msgid ""
|
606 |
+
"If checked the script will check to make sure that the PayPal email address "
|
607 |
+
"specified is the same as the account where the payment was deposited (Usage "
|
608 |
+
"of PayPal Email Alias will fail too)."
|
609 |
+
msgstr ""
|
610 |
+
"Mar kevasket, ar skript a wirio ez eo heñvel ar chomlec’h postel PayPal "
|
611 |
+
"spisaet ouzh ar gont e-lec’h m’eo bet kaset an arc’hant (n’haller ket ober "
|
612 |
+
"gant aliasoù postel PayPal)."
|
613 |
+
|
614 |
+
#: wp_shopping_cart_settings.php:332
|
615 |
+
msgid "Use WP Affiliate Platform"
|
616 |
+
msgstr "Implijout ar savenn emezelañ WP"
|
617 |
+
|
618 |
+
#: wp_shopping_cart_settings.php:334
|
619 |
+
msgid "Check this if using with the"
|
620 |
+
msgstr "Kevaskañ al log-mañ ma vez implijet gant"
|
621 |
+
|
622 |
+
#: wp_shopping_cart_settings.php:334
|
623 |
+
msgid ""
|
624 |
+
"This plugin lets you run your own affiliate campaign/program and allows you "
|
625 |
+
"to reward (pay commission) your affiliates for referred sales"
|
626 |
+
msgstr ""
|
627 |
+
"An enlugellad-mañ a ro tro deoc’h da implijout ho programm emezelañ personel "
|
628 |
+
"ha da gefridiañ hoc’h izili evit gwerzhioù a zo bet a-drugarez dezho"
|
629 |
+
|
630 |
+
#: wp_shopping_cart_settings.php:340
|
631 |
+
msgid "Testing and Debugging Settings"
|
632 |
+
msgstr "Arventennoù prouadiñ ha diveugañ"
|
633 |
+
|
634 |
+
#: wp_shopping_cart_settings.php:346
|
635 |
+
msgid "Enable Debug"
|
636 |
+
msgstr "Gweredekaat an diveugañ"
|
637 |
+
|
638 |
+
#: wp_shopping_cart_settings.php:348
|
639 |
+
msgid ""
|
640 |
+
"If checked, debug output will be written to the log file. This is useful for "
|
641 |
+
"troubleshooting post payment failures"
|
642 |
+
msgstr ""
|
643 |
+
"Mar kevasket, ec’hankad an diveugañ a vo skrivet e-barzh restr ar "
|
644 |
+
"c’herzhlevr. Talvoudus eo evit titouroù disac'hañ c’hwitadennoù paeañ."
|
645 |
+
|
646 |
+
#: wp_shopping_cart_settings.php:359
|
647 |
+
msgid "Enable Sandbox Testing"
|
648 |
+
msgstr "Gweredekaat prouadiñ Paypal Sandbox"
|
649 |
+
|
650 |
+
#: wp_shopping_cart_settings.php:361
|
651 |
+
msgid ""
|
652 |
+
"Check this option if you want to do PayPal sandbox testing. You will need to "
|
653 |
+
"create a PayPal sandbox account from PayPal Developer site"
|
654 |
+
msgstr ""
|
655 |
+
"Kevaskañ an dibarzh-mañ evit prouadiñ Paypal Sandbox. War lec’hienn "
|
656 |
+
"diorroerien PayPal ez eo ret deoc’h kefluniañ ur gont."
|
657 |
+
|
658 |
+
#: wp_shopping_cart_settings.php:370 wp_shopping_cart_settings.php:519
|
659 |
+
msgid "Update Options »"
|
660 |
+
msgstr "Hizivaat »"
|
661 |
+
|
662 |
+
#: wp_shopping_cart_settings.php:374
|
663 |
+
msgid "Like the Simple WordPress Shopping Cart Plugin?"
|
664 |
+
msgstr "Plijout a ra deoc’h an enlugellad Simple Wordpress Shopping Cart?"
|
665 |
+
|
666 |
+
#: wp_shopping_cart_settings.php:374
|
667 |
+
msgid "Give it a good rating"
|
668 |
+
msgstr "Priziañ an enlugellad"
|
669 |
+
|
670 |
+
#: wp_shopping_cart_settings.php:439
|
671 |
+
msgid "Purchase Confirmation Email Settings"
|
672 |
+
msgstr "Arventennoù evit kadarnaat an urzhiad dre bostel"
|
673 |
+
|
674 |
+
#: wp_shopping_cart_settings.php:442
|
675 |
+
msgid ""
|
676 |
+
"The following options affect the emails that gets sent to your buyers after "
|
677 |
+
"a purchase."
|
678 |
+
msgstr ""
|
679 |
+
"An dibarzhioù da heul o do efedoù war posteloù da vezañ kaset d’an arvalien "
|
680 |
+
"goude ar pren"
|
681 |
+
|
682 |
+
#: wp_shopping_cart_settings.php:447
|
683 |
+
msgid "Send Emails to Buyer After Purchase"
|
684 |
+
msgstr "Kas posteloù d’an arval pa vez kadarnaet an urzhiad"
|
685 |
+
|
686 |
+
#: wp_shopping_cart_settings.php:448
|
687 |
+
msgid ""
|
688 |
+
"If checked the plugin will send an email to the buyer with the sale details. "
|
689 |
+
"If digital goods are purchased then the email will contain the download "
|
690 |
+
"links for the purchased products."
|
691 |
+
msgstr ""
|
692 |
+
"Mar kevasket, an enlugellad a gaso ur postel d'an arval gant munudoù an "
|
693 |
+
"urzhiad. Ma vez prenet produioù niverel e vo endalc'het liammoù pellgargañ "
|
694 |
+
"evit ar produioù prenet er postel neuze."
|
695 |
+
|
696 |
+
#: wp_shopping_cart_settings.php:452
|
697 |
+
msgid "From Email Address"
|
698 |
+
msgstr "Eus ar chomlec’h postel"
|
699 |
+
|
700 |
+
#: wp_shopping_cart_settings.php:454
|
701 |
+
msgid ""
|
702 |
+
"Example: Your Name <sales@your-domain.com> This is the email address "
|
703 |
+
"that will be used to send the email to the buyer. This name and email "
|
704 |
+
"address will appear in the from field of the email."
|
705 |
+
msgstr ""
|
706 |
+
"Da skouer: Hoc’h anv <sales@your-domain.com> Hennezh eo ar chomlec’h "
|
707 |
+
"postel implijet evit kas ar postel d’an arval. An anv-mañ hag ar chomlec’h "
|
708 |
+
"postel-mañ a vo diskouezet el lodenn “a-berzh” eus ar postel."
|
709 |
+
|
710 |
+
#: wp_shopping_cart_settings.php:458
|
711 |
+
msgid "Buyer Email Subject"
|
712 |
+
msgstr "Danvez ar postel d’an arval"
|
713 |
+
|
714 |
+
#: wp_shopping_cart_settings.php:460
|
715 |
+
msgid "This is the subject of the email that will be sent to the buyer."
|
716 |
+
msgstr "Setu danvez ar postel a vo kaset d’an arval."
|
717 |
+
|
718 |
+
#: wp_shopping_cart_settings.php:464
|
719 |
+
msgid "Buyer Email Body"
|
720 |
+
msgstr "Kemennadenn d’an arval"
|
721 |
+
|
722 |
+
#: wp_shopping_cart_settings.php:467
|
723 |
+
msgid ""
|
724 |
+
"This is the body of the email that will be sent to the buyer. Do not change "
|
725 |
+
"the text within the braces {}. You can use the following email tags in this "
|
726 |
+
"email body field:"
|
727 |
+
msgstr ""
|
728 |
+
"Setu kemennadenn ar postel a vo kaset d’an arval. Na gemmit ket an destenn e-"
|
729 |
+
"kreiz ar briataennoù {}. Gallout a rit implijout ar gerioù alc’hwez (tags) "
|
730 |
+
"da heul er gemennadenn:"
|
731 |
+
|
732 |
+
#: wp_shopping_cart_settings.php:468 wp_shopping_cart_settings.php:502
|
733 |
+
msgid "First name of the buyer"
|
734 |
+
msgstr "Anv-bihan an arval"
|
735 |
+
|
736 |
+
#: wp_shopping_cart_settings.php:469 wp_shopping_cart_settings.php:503
|
737 |
+
msgid "Last name of the buyer"
|
738 |
+
msgstr "Anv-familh an arval"
|
739 |
+
|
740 |
+
#: wp_shopping_cart_settings.php:470 wp_shopping_cart_settings.php:504
|
741 |
+
msgid "Email Address of the buyer"
|
742 |
+
msgstr "Chomlec’h postel an arval"
|
743 |
+
|
744 |
+
#: wp_shopping_cart_settings.php:471 wp_shopping_cart_settings.php:505
|
745 |
+
msgid "Address of the buyer"
|
746 |
+
msgstr "Chomlec’h post an arval"
|
747 |
+
|
748 |
+
#: wp_shopping_cart_settings.php:472 wp_shopping_cart_settings.php:506
|
749 |
+
msgid ""
|
750 |
+
"The item details of the purchased product (this will include the download "
|
751 |
+
"link for digital items)."
|
752 |
+
msgstr ""
|
753 |
+
"Munudoù eus ar produ prenet (gant al liamm pellgargañ evit produioù niverel)."
|
754 |
+
|
755 |
+
#: wp_shopping_cart_settings.php:473 wp_shopping_cart_settings.php:507
|
756 |
+
msgid "The unique transaction ID of the purchase"
|
757 |
+
msgstr "ID unel treuzgread an urzhiad"
|
758 |
+
|
759 |
+
#: wp_shopping_cart_settings.php:474 wp_shopping_cart_settings.php:508
|
760 |
+
msgid "The amount paid for the current transaction"
|
761 |
+
msgstr "Sammad paeet evit an treuzgread bremanel"
|
762 |
+
|
763 |
+
#: wp_shopping_cart_settings.php:475 wp_shopping_cart_settings.php:509
|
764 |
+
msgid "The date of the purchase"
|
765 |
+
msgstr "Deiziad an urzhiad"
|
766 |
+
|
767 |
+
#: wp_shopping_cart_settings.php:476 wp_shopping_cart_settings.php:510
|
768 |
+
msgid "Coupon code applied to the purchase"
|
769 |
+
msgstr "Kod distaol arloet d’an urzhiad"
|
770 |
+
|
771 |
+
#: wp_shopping_cart_settings.php:481
|
772 |
+
msgid "Send Emails to Seller After Purchase"
|
773 |
+
msgstr "Kas posteloù d’ar gwerzhour pa vez kadarnaet an urzhiad"
|
774 |
+
|
775 |
+
#: wp_shopping_cart_settings.php:482
|
776 |
+
msgid ""
|
777 |
+
"If checked the plugin will send an email to the seller with the sale details"
|
778 |
+
msgstr ""
|
779 |
+
"Mar kevasket, an enlugellad a gaso ur postel d'ar gwerzhour gant munudoù an "
|
780 |
+
"urzhiad"
|
781 |
+
|
782 |
+
#: wp_shopping_cart_settings.php:486
|
783 |
+
msgid "Notification Email Address*"
|
784 |
+
msgstr "Chomlec’h postel da gelaouiñ*"
|
785 |
+
|
786 |
+
#: wp_shopping_cart_settings.php:488
|
787 |
+
msgid ""
|
788 |
+
"This is the email address where the seller will be notified of product "
|
789 |
+
"sales. You can put multiple email addresses separated by comma (,) in the "
|
790 |
+
"above field to send the notification to multiple email addresses."
|
791 |
+
msgstr ""
|
792 |
+
"Setu chomlec’h postel da gelaouiñ ar gwerzhour eus an urzhiadoù nevez. Meur "
|
793 |
+
"a chomlec’h postel disrannet gant ur skej (,) ez eus tu enankañ er vaezienn "
|
794 |
+
"a-us evit kelaouiñ darempredoù liesseurt."
|
795 |
+
|
796 |
+
#: wp_shopping_cart_settings.php:492
|
797 |
+
msgid "Seller Email Subject*"
|
798 |
+
msgstr "Danvez ar postel d’ar gwerzhour*"
|
799 |
+
|
800 |
+
#: wp_shopping_cart_settings.php:494
|
801 |
+
msgid ""
|
802 |
+
"This is the subject of the email that will be sent to the seller for record."
|
803 |
+
msgstr "Setu danvez ar postel a vo kaset d’ar gwerzhour evit an enrolladur."
|
804 |
+
|
805 |
+
#: wp_shopping_cart_settings.php:498
|
806 |
+
msgid "Seller Email Body*"
|
807 |
+
msgstr "Kemennadenn d’ar gwerzhour*"
|
808 |
+
|
809 |
+
#: wp_shopping_cart_settings.php:501
|
810 |
+
msgid ""
|
811 |
+
"This is the body of the email that will be sent to the seller for record. Do "
|
812 |
+
"not change the text within the braces {}. You can use the following email "
|
813 |
+
"tags in this email body field:"
|
814 |
+
msgstr ""
|
815 |
+
"Setu kemennadenn ar postel a vo kaset d’ar gwerzhour evit an enrolladur. Na "
|
816 |
+
"gemmit ket an destenn e-kreiz ar briataennoù {}. Gallout a rit implijout ar "
|
817 |
+
"gerioù alc’hwez (tags) da heul er gemennadenn:"
|
818 |
+
|
819 |
+
#: wp_shopping_cart_shortcodes.php:19 wp_shopping_cart_shortcodes.php:49
|
820 |
+
msgid "Error! You must specify a product name in the shortcode."
|
821 |
+
msgstr "Fazi: ret eo deoc’h erspizañ anv ar produ er shortcode."
|
822 |
+
|
823 |
+
#: wp_shopping_cart_shortcodes.php:22 wp_shopping_cart_shortcodes.php:52
|
824 |
+
msgid "Error! You must specify a price for your product in the shortcode."
|
825 |
+
msgstr "Fazi: ret eo deoc’h erspizañ priz ar produ er shortcode."
|
826 |
+
|
827 |
+
#: wp_shopping_cart_shortcodes.php:55
|
828 |
+
msgid ""
|
829 |
+
"Error! You must specify a thumbnail image for your product in the shortcode."
|
830 |
+
msgstr ""
|
831 |
+
"Fazi: ret eo deoc’h erspizañ ur velvenn skeudenn evit ho produ er shortcode."
|
832 |
+
|
833 |
+
#: wp_shopping_cart_shortcodes.php:107
|
834 |
+
msgid "View Cart"
|
835 |
+
msgstr "Gwelout ar banerad"
|
836 |
+
|
837 |
+
#: wp_shopping_cart_shortcodes.php:112
|
838 |
+
msgid "Cart is empty"
|
839 |
+
msgstr "Paner goullo"
|
840 |
+
|
841 |
+
#: includes/wspsc-cart-functions.php:18
|
842 |
+
msgid "Visit The Shop"
|
843 |
+
msgstr "Gweladenniñ ar stal"
|
844 |
+
|
845 |
+
#: includes/wspsc-cart-functions.php:64
|
846 |
+
msgid "Cart"
|
847 |
+
msgstr "Paner(ad)"
|
848 |
+
|
849 |
+
#: includes/wspsc-cart-functions.php:72
|
850 |
+
msgid "Hit enter to submit new Quantity."
|
851 |
+
msgstr "Pouez war “Enankañ” evit kas ar c’hementad nevez."
|
852 |
+
|
853 |
+
#: includes/wspsc-cart-functions.php:82
|
854 |
+
msgid "Item Name"
|
855 |
+
msgstr "Anv ar produ"
|
856 |
+
|
857 |
+
#: includes/wspsc-cart-functions.php:82
|
858 |
+
msgid "Quantity"
|
859 |
+
msgstr "Kementad"
|
860 |
+
|
861 |
+
#: includes/wspsc-cart-functions.php:82
|
862 |
+
msgid "Price"
|
863 |
+
msgstr "Priz"
|
864 |
+
|
865 |
+
#: includes/wspsc-cart-functions.php:121
|
866 |
+
msgid "Remove"
|
867 |
+
msgstr "Dilemel"
|
868 |
+
|
869 |
+
#: includes/wspsc-cart-functions.php:146
|
870 |
+
msgid "Subtotal"
|
871 |
+
msgstr "Is-hollad"
|
872 |
+
|
873 |
+
#: includes/wspsc-cart-functions.php:159
|
874 |
+
msgid "Enter Coupon Code"
|
875 |
+
msgstr "Enankañ ur c’hod distaol"
|
876 |
+
|
877 |
+
#: includes/wspsc-cart-functions.php:162
|
878 |
+
msgid "Apply"
|
879 |
+
msgstr "Arloañ"
|
880 |
+
|
881 |
+
#: includes/wspsc-cart-functions.php:182
|
882 |
+
msgid "paypal_checkout_EN.png"
|
883 |
+
msgstr "paypal_checkout_EN.png"
|
884 |
+
|
885 |
+
#: includes/wspsc-cart-functions.php:182
|
886 |
+
msgid "Make payments with PayPal - it\\'s fast, free and secure!"
|
887 |
+
msgstr "Paeañ gant PayPal: aes, prim ha suraet!"
|
888 |
+
|
889 |
+
#: lib/gallery-wp-cart.php:32
|
890 |
+
msgid "[View with PicLens]"
|
891 |
+
msgstr "[View with PicLens]"
|
languages/wordpress-simple-paypal-shopping-cart.pot
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Simple Shopping Cart\n"
|
4 |
-
"POT-Creation-Date:
|
5 |
-
"PO-Revision-Date:
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
-
"X-Generator: Poedit 1.5.
|
12 |
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
@@ -49,764 +49,1137 @@ msgstr ""
|
|
49 |
msgid "Discount applied successfully! Total Discount: "
|
50 |
msgstr ""
|
51 |
|
52 |
-
#:
|
53 |
-
msgid "
|
54 |
-
msgstr ""
|
55 |
-
|
56 |
-
#: wp_shopping_cart.php:198
|
57 |
-
msgid ""
|
58 |
-
"Shopping Cart Configuration Error! You must specify a value in the 'Checkout "
|
59 |
-
"Page URL' field for the automatic redirection feature to work!"
|
60 |
-
msgstr ""
|
61 |
-
|
62 |
-
#: wp_shopping_cart.php:290 wp_shopping_cart.php:365 wp_shopping_cart.php:431
|
63 |
-
#: wp_shopping_cart.php:473 wp_shopping_cart.php:477
|
64 |
-
#: wp_shopping_cart_settings.php:123
|
65 |
-
msgid "Add to Cart"
|
66 |
-
msgstr ""
|
67 |
-
|
68 |
-
#: wp_shopping_cart.php:568
|
69 |
-
msgid "WP Paypal Shopping Cart"
|
70 |
-
msgstr ""
|
71 |
-
|
72 |
-
#: wp_shopping_cart.php:568
|
73 |
-
msgid "WP Shopping Cart"
|
74 |
-
msgstr ""
|
75 |
-
|
76 |
-
#: wp_shopping_cart.php:602
|
77 |
-
msgid "Shopping Cart"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#:
|
81 |
-
|
|
|
82 |
msgstr ""
|
83 |
|
84 |
-
#:
|
85 |
-
|
86 |
msgid ""
|
87 |
-
"
|
88 |
-
"please visit:"
|
89 |
-
msgstr ""
|
90 |
-
|
91 |
-
#: wp_shopping_cart_discounts_menu.php:53 wp_shopping_cart_settings.php:190
|
92 |
-
#: wp_shopping_cart_settings.php:431
|
93 |
-
msgid "WP Simple Cart Homepage"
|
94 |
-
msgstr ""
|
95 |
-
|
96 |
-
#: wp_shopping_cart_discounts_menu.php:61
|
97 |
-
msgid "Coupon/Discount Settings"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#:
|
101 |
-
msgid "
|
102 |
msgstr ""
|
103 |
|
104 |
-
#:
|
105 |
msgid ""
|
106 |
-
"
|
107 |
-
"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#:
|
111 |
-
msgid "
|
112 |
-
msgstr ""
|
113 |
-
|
114 |
-
#: wp_shopping_cart_discounts_menu.php:94
|
115 |
-
msgid "Add Coupon/Discount"
|
116 |
-
msgstr ""
|
117 |
-
|
118 |
-
#: wp_shopping_cart_discounts_menu.php:119
|
119 |
-
msgid "Save Coupon »"
|
120 |
-
msgstr ""
|
121 |
-
|
122 |
-
#: wp_shopping_cart_discounts_menu.php:137
|
123 |
-
msgid "Coupon Code"
|
124 |
-
msgstr ""
|
125 |
-
|
126 |
-
#: wp_shopping_cart_discounts_menu.php:138
|
127 |
-
msgid "Discount Rate (%)"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#:
|
131 |
-
msgid "
|
|
|
|
|
132 |
msgstr ""
|
133 |
|
134 |
-
#:
|
135 |
-
|
|
|
|
|
136 |
msgstr ""
|
137 |
|
138 |
-
#:
|
139 |
-
msgid "
|
140 |
msgstr ""
|
141 |
|
142 |
-
#:
|
143 |
-
msgid "
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: wp_shopping_cart_misc_functions.php:
|
147 |
msgid "Your Shopping Cart"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: wp_shopping_cart_misc_functions.php:
|
151 |
msgid "Your cart is empty"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: wp_shopping_cart_misc_functions.php:
|
155 |
msgid ""
|
156 |
"Need a shopping cart plugin with a lot of features and good support? Check "
|
157 |
"out our "
|
158 |
msgstr ""
|
159 |
|
160 |
-
#: wp_shopping_cart_misc_functions.php:
|
161 |
msgid "WP eStore Plugin"
|
162 |
msgstr ""
|
163 |
|
164 |
-
#: wp_shopping_cart_orders.php:
|
165 |
msgid "Cart Orders"
|
166 |
msgstr ""
|
167 |
|
168 |
-
#: wp_shopping_cart_orders.php:
|
169 |
msgid "Cart Order"
|
170 |
msgstr ""
|
171 |
|
172 |
-
#: wp_shopping_cart_orders.php:
|
173 |
msgid "Add New"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: wp_shopping_cart_orders.php:
|
177 |
msgid "Add New Order"
|
178 |
msgstr ""
|
179 |
|
180 |
-
#: wp_shopping_cart_orders.php:
|
181 |
msgid "Edit"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: wp_shopping_cart_orders.php:
|
185 |
msgid "Edit Order"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: wp_shopping_cart_orders.php:
|
189 |
msgid "New Order"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: wp_shopping_cart_orders.php:
|
193 |
msgid "View"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: wp_shopping_cart_orders.php:
|
197 |
msgid "View Order"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: wp_shopping_cart_orders.php:
|
201 |
msgid "Search Order"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: wp_shopping_cart_orders.php:
|
205 |
msgid "No order found"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: wp_shopping_cart_orders.php:
|
209 |
msgid "No order found in Trash"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: wp_shopping_cart_orders.php:
|
213 |
msgid "Parent Order"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: wp_shopping_cart_orders.php:
|
217 |
msgid "Order Review"
|
218 |
msgstr ""
|
219 |
|
220 |
-
#: wp_shopping_cart_orders.php:
|
221 |
msgid "Order ID: #"
|
222 |
msgstr ""
|
223 |
|
224 |
-
#: wp_shopping_cart_orders.php:
|
225 |
msgid "Transaction ID: #"
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: wp_shopping_cart_orders.php:
|
229 |
msgid "First Name"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: wp_shopping_cart_orders.php:
|
233 |
msgid "Last Name"
|
234 |
msgstr ""
|
235 |
|
236 |
-
#: wp_shopping_cart_orders.php:
|
237 |
msgid "Email Address"
|
238 |
msgstr ""
|
239 |
|
240 |
-
#: wp_shopping_cart_orders.php:
|
241 |
msgid "IP Address"
|
242 |
msgstr ""
|
243 |
|
244 |
-
#: wp_shopping_cart_orders.php:
|
245 |
-
#: includes/wspsc-cart-functions.php:
|
246 |
msgid "Total"
|
247 |
msgstr ""
|
248 |
|
249 |
-
#: wp_shopping_cart_orders.php:
|
250 |
msgid "Shipping"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: wp_shopping_cart_orders.php:
|
254 |
msgid "Address"
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: wp_shopping_cart_orders.php:
|
258 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
msgstr ""
|
260 |
|
261 |
#: wp_shopping_cart_orders.php:107
|
262 |
-
msgid "
|
263 |
msgstr ""
|
264 |
|
265 |
#: wp_shopping_cart_orders.php:111
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
msgid "Item(s) Ordered:"
|
267 |
msgstr ""
|
268 |
|
269 |
-
#: wp_shopping_cart_orders.php:
|
270 |
msgid "Applied Coupon Code:"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: wp_shopping_cart_orders.php:
|
274 |
msgid "Order ID"
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: wp_shopping_cart_orders.php:
|
278 |
msgid "Email"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: wp_shopping_cart_orders.php:
|
282 |
msgid "Status"
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: wp_shopping_cart_orders.php:
|
286 |
msgid "Date"
|
287 |
msgstr ""
|
288 |
|
289 |
-
#:
|
290 |
-
msgid "
|
291 |
msgstr ""
|
292 |
|
293 |
-
#:
|
294 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
msgstr ""
|
296 |
|
297 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
msgid "USD"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#:
|
|
|
302 |
msgid "$"
|
303 |
msgstr ""
|
304 |
|
305 |
-
#:
|
306 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
msgstr ""
|
308 |
|
309 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
msgid "Quick Usage Guide"
|
311 |
msgstr ""
|
312 |
|
313 |
-
#:
|
314 |
msgid "Step 1) "
|
315 |
msgstr ""
|
316 |
|
317 |
-
#:
|
318 |
msgid "To add an 'Add to Cart' button for a product simply add the shortcode"
|
319 |
msgstr ""
|
320 |
|
321 |
-
#:
|
322 |
msgid "PRODUCT-NAME"
|
323 |
msgstr ""
|
324 |
|
325 |
-
#:
|
326 |
msgid "PRODUCT-PRICE"
|
327 |
msgstr ""
|
328 |
|
329 |
-
#:
|
330 |
msgid ""
|
331 |
"to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-"
|
332 |
"PRICE with the actual name and price of your product."
|
333 |
msgstr ""
|
334 |
|
335 |
-
#:
|
336 |
msgid "Example add to cart button shortcode usage:"
|
337 |
msgstr ""
|
338 |
|
339 |
-
#:
|
340 |
msgid "Step 2) "
|
341 |
msgstr ""
|
342 |
|
343 |
-
#:
|
344 |
msgid ""
|
345 |
"To add the shopping cart to a post or page (example: a checkout page) simply "
|
346 |
"add the shortcode"
|
347 |
msgstr ""
|
348 |
|
349 |
-
#:
|
350 |
msgid ""
|
351 |
"to a post or page or use the sidebar widget to add the shopping cart to the "
|
352 |
"sidebar."
|
353 |
msgstr ""
|
354 |
|
355 |
-
#:
|
356 |
msgid "Example shopping cart shortcode usage:"
|
357 |
msgstr ""
|
358 |
|
359 |
-
#:
|
360 |
msgid "PayPal and Shopping Cart Settings"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#:
|
364 |
msgid "Paypal Email Address"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#:
|
368 |
msgid "Shopping Cart title"
|
369 |
msgstr ""
|
370 |
|
371 |
-
#:
|
372 |
msgid "Text/Image to Show When Cart Empty"
|
373 |
msgstr ""
|
374 |
|
375 |
-
#:
|
376 |
msgid ""
|
377 |
"You can either enter plain text or the URL of an image that you want to show "
|
378 |
"when the shopping cart is empty"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#:
|
382 |
msgid "Currency"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#:
|
386 |
-
|
387 |
-
msgid "e.g."
|
388 |
msgstr ""
|
389 |
|
390 |
-
#:
|
391 |
-
|
|
|
392 |
msgstr ""
|
393 |
|
394 |
-
#:
|
395 |
msgid "Base Shipping Cost"
|
396 |
msgstr ""
|
397 |
|
398 |
-
#:
|
399 |
msgid ""
|
400 |
"This is the base shipping cost that will be added to the total of individual "
|
401 |
"products shipping cost. Put 0 if you do not want to charge shipping cost or "
|
402 |
"use base shipping cost."
|
403 |
msgstr ""
|
404 |
|
405 |
-
#:
|
406 |
msgid "Learn More on Shipping Calculation"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#:
|
410 |
msgid "Free Shipping for Orders Over"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#:
|
414 |
msgid ""
|
415 |
"When a customer orders more than this amount he/she will get free shipping. "
|
416 |
"Leave empty if you do not want to use it."
|
417 |
msgstr ""
|
418 |
|
419 |
-
#:
|
420 |
msgid "Must Collect Shipping Address on PayPal"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#:
|
424 |
msgid ""
|
425 |
"If checked the customer will be forced to enter a shipping address on PayPal "
|
426 |
"when checking out."
|
427 |
msgstr ""
|
428 |
|
429 |
-
#:
|
430 |
msgid "Use PayPal Profile Based Shipping"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#:
|
434 |
msgid "Check this if you want to use"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#:
|
438 |
msgid "PayPal profile based shipping"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#:
|
442 |
msgid ""
|
443 |
"Using this will ignore any other shipping options that you have specified in "
|
444 |
"this plugin."
|
445 |
msgstr ""
|
446 |
|
447 |
-
#:
|
448 |
msgid "Add to Cart button text or Image"
|
449 |
msgstr ""
|
450 |
|
451 |
-
#:
|
452 |
msgid ""
|
453 |
"To use a customized image as the button simply enter the URL of the image "
|
454 |
"file."
|
455 |
msgstr ""
|
456 |
|
457 |
-
#:
|
458 |
msgid "Return URL"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#:
|
462 |
msgid ""
|
463 |
"This is the URL the customer will be redirected to after a successful payment"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#:
|
467 |
msgid "Cancel URL"
|
468 |
msgstr ""
|
469 |
|
470 |
-
#:
|
471 |
msgid ""
|
472 |
-
"The customer will be
|
473 |
-
"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#:
|
477 |
msgid "Products Page URL"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#:
|
481 |
msgid ""
|
482 |
"This is the URL of your products page if you have any. If used, the shopping "
|
483 |
"cart widget will display a link to this page when cart is empty"
|
484 |
msgstr ""
|
485 |
|
486 |
-
#:
|
487 |
msgid "Automatic redirection to checkout page"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#:
|
491 |
msgid "Checkout Page URL"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#:
|
495 |
msgid ""
|
496 |
"If checked the visitor will be redirected to the Checkout page after a "
|
497 |
"product is added to the cart. You must enter a URL in the Checkout Page URL "
|
498 |
"field for this to work."
|
499 |
msgstr ""
|
500 |
|
501 |
-
#:
|
502 |
msgid "Open PayPal Checkout Page in a New Tab"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#:
|
506 |
msgid ""
|
507 |
"If checked the PayPal checkout page will be opened in a new tab/window when "
|
508 |
"the user clicks the checkout button."
|
509 |
msgstr ""
|
510 |
|
511 |
-
#:
|
512 |
msgid "Reset Cart After Redirection to Return Page"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#:
|
516 |
msgid ""
|
517 |
"If checked the shopping cart will be reset when the customer lands on the "
|
518 |
"return URL (Thank You) page."
|
519 |
msgstr ""
|
520 |
|
521 |
-
#:
|
522 |
msgid "Hide Shopping Cart Image"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#:
|
526 |
msgid "If ticked the shopping cart image will not be shown."
|
527 |
msgstr ""
|
528 |
|
529 |
-
#:
|
530 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
msgstr ""
|
532 |
|
533 |
-
#:
|
534 |
msgid ""
|
535 |
-
"
|
536 |
-
"
|
537 |
-
"
|
538 |
-
"instructions to merchant\"."
|
539 |
msgstr ""
|
540 |
|
541 |
-
#:
|
542 |
-
msgid "
|
543 |
msgstr ""
|
544 |
|
545 |
-
#:
|
546 |
msgid ""
|
547 |
-
"
|
548 |
-
"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#:
|
552 |
-
msgid "
|
553 |
msgstr ""
|
554 |
|
555 |
-
#:
|
556 |
msgid ""
|
557 |
-
"
|
558 |
-
"
|
559 |
-
|
|
|
|
|
|
|
560 |
msgstr ""
|
561 |
|
562 |
-
#:
|
563 |
msgid "Use WP Affiliate Platform"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#:
|
567 |
msgid "Check this if using with the"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#:
|
571 |
msgid ""
|
572 |
"This plugin lets you run your own affiliate campaign/program and allows you "
|
573 |
"to reward (pay commission) your affiliates for referred sales"
|
574 |
msgstr ""
|
575 |
|
576 |
-
#:
|
577 |
msgid "Testing and Debugging Settings"
|
578 |
msgstr ""
|
579 |
|
580 |
-
#:
|
581 |
msgid "Enable Debug"
|
582 |
msgstr ""
|
583 |
|
584 |
-
#:
|
585 |
msgid ""
|
586 |
"If checked, debug output will be written to the log file. This is useful for "
|
587 |
"troubleshooting post payment failures"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#:
|
591 |
msgid "Enable Sandbox Testing"
|
592 |
msgstr ""
|
593 |
|
594 |
-
#:
|
595 |
msgid ""
|
596 |
"Check this option if you want to do PayPal sandbox testing. You will need to "
|
597 |
"create a PayPal sandbox account from PayPal Developer site"
|
598 |
msgstr ""
|
599 |
|
600 |
-
#:
|
601 |
-
msgid "Update Options »"
|
602 |
-
msgstr ""
|
603 |
-
|
604 |
-
#: wp_shopping_cart_settings.php:374
|
605 |
msgid "Like the Simple WordPress Shopping Cart Plugin?"
|
606 |
msgstr ""
|
607 |
|
608 |
-
#:
|
609 |
msgid "Give it a good rating"
|
610 |
msgstr ""
|
611 |
|
612 |
-
#:
|
613 |
-
msgid "
|
614 |
msgstr ""
|
615 |
|
616 |
-
#:
|
617 |
-
msgid ""
|
618 |
-
"The following options affect the emails that gets sent to your buyers after "
|
619 |
-
"a purchase."
|
620 |
-
msgstr ""
|
621 |
-
|
622 |
-
#: wp_shopping_cart_settings.php:447
|
623 |
-
msgid "Send Emails to Buyer After Purchase"
|
624 |
-
msgstr ""
|
625 |
-
|
626 |
-
#: wp_shopping_cart_settings.php:448
|
627 |
-
msgid ""
|
628 |
-
"If checked the plugin will send an email to the buyer with the sale details. "
|
629 |
-
"If digital goods are purchased then the email will contain the download "
|
630 |
-
"links for the purchased products."
|
631 |
msgstr ""
|
632 |
|
633 |
-
#:
|
634 |
-
msgid "
|
635 |
msgstr ""
|
636 |
|
637 |
-
#:
|
638 |
-
msgid ""
|
639 |
-
"Example: Your Name <sales@your-domain.com> This is the email address "
|
640 |
-
"that will be used to send the email to the buyer. This name and email "
|
641 |
-
"address will appear in the from field of the email."
|
642 |
msgstr ""
|
643 |
|
644 |
-
#:
|
645 |
-
msgid "
|
646 |
msgstr ""
|
647 |
|
648 |
-
#:
|
649 |
-
msgid "
|
650 |
msgstr ""
|
651 |
|
652 |
-
#:
|
653 |
-
msgid "
|
654 |
msgstr ""
|
655 |
|
656 |
-
#:
|
657 |
-
msgid ""
|
658 |
-
"This is the body of the email that will be sent to the buyer. Do not change "
|
659 |
-
"the text within the braces {}. You can use the following email tags in this "
|
660 |
-
"email body field:"
|
661 |
msgstr ""
|
662 |
|
663 |
-
#:
|
664 |
-
msgid "
|
665 |
msgstr ""
|
666 |
|
667 |
-
#:
|
668 |
-
msgid "
|
669 |
msgstr ""
|
670 |
|
671 |
-
#:
|
672 |
-
msgid "
|
673 |
msgstr ""
|
674 |
|
675 |
-
#:
|
676 |
-
msgid "Address of the buyer"
|
677 |
-
msgstr ""
|
678 |
-
|
679 |
-
#: wp_shopping_cart_settings.php:472 wp_shopping_cart_settings.php:506
|
680 |
msgid ""
|
681 |
-
"
|
682 |
-
"link for digital items)."
|
683 |
msgstr ""
|
684 |
|
685 |
-
#:
|
686 |
-
msgid "
|
687 |
msgstr ""
|
688 |
|
689 |
-
#:
|
690 |
-
msgid "
|
691 |
msgstr ""
|
692 |
|
693 |
-
#:
|
694 |
-
msgid "
|
695 |
msgstr ""
|
696 |
|
697 |
-
#:
|
698 |
-
msgid "
|
699 |
msgstr ""
|
700 |
|
701 |
-
#:
|
702 |
-
msgid "
|
703 |
msgstr ""
|
704 |
|
705 |
-
#:
|
706 |
-
msgid ""
|
707 |
-
"If checked the plugin will send an email to the seller with the sale details"
|
708 |
msgstr ""
|
709 |
|
710 |
-
#:
|
711 |
-
|
|
|
712 |
msgstr ""
|
713 |
|
714 |
-
#:
|
715 |
-
msgid ""
|
716 |
-
"This is the email address where the seller will be notified of product "
|
717 |
-
"sales. You can put multiple email addresses separated by comma (,) in the "
|
718 |
-
"above field to send the notification to multiple email addresses."
|
719 |
msgstr ""
|
720 |
|
721 |
-
#:
|
722 |
-
msgid "
|
723 |
-
msgstr ""
|
724 |
-
|
725 |
-
#: wp_shopping_cart_settings.php:494
|
726 |
-
msgid ""
|
727 |
-
"This is the subject of the email that will be sent to the seller for record."
|
728 |
-
msgstr ""
|
729 |
-
|
730 |
-
#: wp_shopping_cart_settings.php:498
|
731 |
-
msgid "Seller Email Body*"
|
732 |
msgstr ""
|
733 |
|
734 |
-
#:
|
735 |
-
msgid ""
|
736 |
-
"This is the body of the email that will be sent to the seller for record. Do "
|
737 |
-
"not change the text within the braces {}. You can use the following email "
|
738 |
-
"tags in this email body field:"
|
739 |
-
msgstr ""
|
740 |
-
|
741 |
-
#: wp_shopping_cart_shortcodes.php:19 wp_shopping_cart_shortcodes.php:49
|
742 |
-
msgid "Error! You must specify a product name in the shortcode."
|
743 |
msgstr ""
|
744 |
|
745 |
-
#:
|
746 |
-
msgid "
|
747 |
msgstr ""
|
748 |
|
749 |
-
#:
|
750 |
msgid ""
|
751 |
-
"
|
752 |
-
|
753 |
-
|
754 |
-
#: wp_shopping_cart_shortcodes.php:107
|
755 |
-
msgid "View Cart"
|
756 |
-
msgstr ""
|
757 |
-
|
758 |
-
#: wp_shopping_cart_shortcodes.php:112
|
759 |
-
msgid "Cart is empty"
|
760 |
msgstr ""
|
761 |
|
762 |
-
#: includes/
|
763 |
-
msgid "
|
764 |
msgstr ""
|
765 |
|
766 |
-
#: includes/
|
767 |
-
|
|
|
|
|
768 |
msgstr ""
|
769 |
|
770 |
-
#: includes/
|
771 |
-
msgid "
|
772 |
msgstr ""
|
773 |
|
774 |
-
#: includes/
|
775 |
-
msgid "
|
776 |
msgstr ""
|
777 |
|
778 |
-
#: includes/
|
779 |
-
msgid "
|
780 |
msgstr ""
|
781 |
|
782 |
-
#: includes/
|
783 |
-
msgid "
|
784 |
msgstr ""
|
785 |
|
786 |
-
|
787 |
-
msgid "Remove"
|
788 |
msgstr ""
|
789 |
|
790 |
-
|
791 |
-
msgid "Subtotal"
|
792 |
-
msgstr ""
|
793 |
-
|
794 |
-
#: includes/wspsc-cart-functions.php:159
|
795 |
-
msgid "Enter Coupon Code"
|
796 |
-
msgstr ""
|
797 |
-
|
798 |
-
#: includes/wspsc-cart-functions.php:162
|
799 |
-
msgid "Apply"
|
800 |
-
msgstr ""
|
801 |
-
|
802 |
-
#: includes/wspsc-cart-functions.php:182
|
803 |
-
msgid "paypal_checkout_EN.png"
|
804 |
-
msgstr ""
|
805 |
-
|
806 |
-
#: includes/wspsc-cart-functions.php:182
|
807 |
-
msgid "Make payments with PayPal - it\\'s fast, free and secure!"
|
808 |
-
msgstr ""
|
809 |
-
|
810 |
-
#: lib/gallery-wp-cart.php:32
|
811 |
-
msgid "[View with PicLens]"
|
812 |
msgstr ""
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Simple Shopping Cart\n"
|
4 |
+
"POT-Creation-Date: 2018-09-24 09:58+0600\n"
|
5 |
+
"PO-Revision-Date: 2018-09-24 09:59+0600\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: \n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.7\n"
|
12 |
"X-Poedit-KeywordsList: __;_e\n"
|
13 |
"X-Poedit-Basepath: .\n"
|
14 |
"X-Poedit-SearchPath-0: .\n"
|
49 |
msgid "Discount applied successfully! Total Discount: "
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: gallery-wp-cart.php:32
|
53 |
+
msgid "[View with PicLens]"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: paypal.php:404 paypal.php:429
|
57 |
+
#, php-format
|
58 |
+
msgid "Error occured during payment verification. Error code: %d. Message: %s"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: paypal.php:442
|
62 |
+
#, php-format
|
63 |
msgid ""
|
64 |
+
"Payment check failed: invalid amount received. Expected %s %s, got %s %s."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
msgstr ""
|
66 |
|
67 |
+
#: wp_shopping_cart.php:106
|
68 |
+
msgid "Empty payment data received."
|
69 |
msgstr ""
|
70 |
|
71 |
+
#: wp_shopping_cart.php:141
|
72 |
msgid ""
|
73 |
+
"Error occured during payment processing. Check debug log for additional "
|
74 |
+
"details."
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: wp_shopping_cart.php:276
|
78 |
+
msgid "Error! Your session is out of sync. Please reset your session."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: wp_shopping_cart.php:284
|
82 |
+
msgid ""
|
83 |
+
"Shopping Cart Configuration Error! You must specify a value in the 'Checkout "
|
84 |
+
"Page URL' field for the automatic redirection feature to work!"
|
85 |
msgstr ""
|
86 |
|
87 |
+
#: wp_shopping_cart.php:395 wp_shopping_cart.php:471 wp_shopping_cart.php:548
|
88 |
+
#: wp_shopping_cart.php:592 wp_shopping_cart.php:600
|
89 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:80
|
90 |
+
msgid "Add to Cart"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: wp_shopping_cart.php:719
|
94 |
+
msgid "Shopping Cart"
|
95 |
msgstr ""
|
96 |
|
97 |
+
#: wp_shopping_cart.php:754 includes/admin/wp_shopping_cart_menu_main.php:14
|
98 |
+
msgid "Settings"
|
99 |
msgstr ""
|
100 |
|
101 |
+
#: wp_shopping_cart_misc_functions.php:171
|
102 |
msgid "Your Shopping Cart"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: wp_shopping_cart_misc_functions.php:172
|
106 |
msgid "Your cart is empty"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: wp_shopping_cart_misc_functions.php:206
|
110 |
msgid ""
|
111 |
"Need a shopping cart plugin with a lot of features and good support? Check "
|
112 |
"out our "
|
113 |
msgstr ""
|
114 |
|
115 |
+
#: wp_shopping_cart_misc_functions.php:207
|
116 |
msgid "WP eStore Plugin"
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: wp_shopping_cart_orders.php:11
|
120 |
msgid "Cart Orders"
|
121 |
msgstr ""
|
122 |
|
123 |
+
#: wp_shopping_cart_orders.php:12
|
124 |
msgid "Cart Order"
|
125 |
msgstr ""
|
126 |
|
127 |
+
#: wp_shopping_cart_orders.php:13
|
128 |
msgid "Add New"
|
129 |
msgstr ""
|
130 |
|
131 |
+
#: wp_shopping_cart_orders.php:14
|
132 |
msgid "Add New Order"
|
133 |
msgstr ""
|
134 |
|
135 |
+
#: wp_shopping_cart_orders.php:15
|
136 |
msgid "Edit"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: wp_shopping_cart_orders.php:16
|
140 |
msgid "Edit Order"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: wp_shopping_cart_orders.php:17
|
144 |
msgid "New Order"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: wp_shopping_cart_orders.php:18
|
148 |
msgid "View"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: wp_shopping_cart_orders.php:19
|
152 |
msgid "View Order"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: wp_shopping_cart_orders.php:20
|
156 |
msgid "Search Order"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: wp_shopping_cart_orders.php:21
|
160 |
msgid "No order found"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: wp_shopping_cart_orders.php:22
|
164 |
msgid "No order found in Trash"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: wp_shopping_cart_orders.php:23
|
168 |
msgid "Parent Order"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: wp_shopping_cart_orders.php:36
|
172 |
msgid "Order Review"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: wp_shopping_cart_orders.php:63
|
176 |
msgid "Order ID: #"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: wp_shopping_cart_orders.php:68
|
180 |
msgid "Transaction ID: #"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: wp_shopping_cart_orders.php:73 wp_shopping_cart_orders.php:195
|
184 |
msgid "First Name"
|
185 |
msgstr ""
|
186 |
|
187 |
+
#: wp_shopping_cart_orders.php:77 wp_shopping_cart_orders.php:196
|
188 |
msgid "Last Name"
|
189 |
msgstr ""
|
190 |
|
191 |
+
#: wp_shopping_cart_orders.php:81
|
192 |
msgid "Email Address"
|
193 |
msgstr ""
|
194 |
|
195 |
+
#: wp_shopping_cart_orders.php:85
|
196 |
msgid "IP Address"
|
197 |
msgstr ""
|
198 |
|
199 |
+
#: wp_shopping_cart_orders.php:89 wp_shopping_cart_orders.php:198
|
200 |
+
#: includes/wspsc-cart-functions.php:172
|
201 |
msgid "Total"
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: wp_shopping_cart_orders.php:93 includes/wspsc-cart-functions.php:169
|
205 |
msgid "Shipping"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: wp_shopping_cart_orders.php:97
|
209 |
msgid "Address"
|
210 |
msgstr ""
|
211 |
|
212 |
+
#: wp_shopping_cart_orders.php:101
|
213 |
+
msgid ""
|
214 |
+
"An address value will only be present if the order has physical item(s) with "
|
215 |
+
"shipping amount. "
|
216 |
+
msgstr ""
|
217 |
+
|
218 |
+
#: wp_shopping_cart_orders.php:102
|
219 |
+
msgid ""
|
220 |
+
"If you want to collect address for all orders then enable the 'Must Collect "
|
221 |
+
"Shipping Address on PayPal' option from the plugin settings."
|
222 |
msgstr ""
|
223 |
|
224 |
#: wp_shopping_cart_orders.php:107
|
225 |
+
msgid "Phone"
|
226 |
msgstr ""
|
227 |
|
228 |
#: wp_shopping_cart_orders.php:111
|
229 |
+
msgid ""
|
230 |
+
"A phone number will only be present if the customer entered one during the "
|
231 |
+
"checkout."
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: wp_shopping_cart_orders.php:116
|
235 |
+
msgid "Buyer Email Sent?"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: wp_shopping_cart_orders.php:120
|
239 |
msgid "Item(s) Ordered:"
|
240 |
msgstr ""
|
241 |
|
242 |
+
#: wp_shopping_cart_orders.php:124
|
243 |
msgid "Applied Coupon Code:"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: wp_shopping_cart_orders.php:194
|
247 |
msgid "Order ID"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: wp_shopping_cart_orders.php:197
|
251 |
msgid "Email"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: wp_shopping_cart_orders.php:199
|
255 |
msgid "Status"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: wp_shopping_cart_orders.php:200
|
259 |
msgid "Date"
|
260 |
msgstr ""
|
261 |
|
262 |
+
#: wp_shopping_cart_shortcodes.php:27 wp_shopping_cart_shortcodes.php:59
|
263 |
+
msgid "Error! You must specify a product name in the shortcode."
|
264 |
msgstr ""
|
265 |
|
266 |
+
#: wp_shopping_cart_shortcodes.php:30 wp_shopping_cart_shortcodes.php:62
|
267 |
+
msgid "Error! You must specify a price for your product in the shortcode."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: wp_shopping_cart_shortcodes.php:65
|
271 |
+
msgid ""
|
272 |
+
"Error! You must specify a thumbnail image for your product in the shortcode."
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: wp_shopping_cart_shortcodes.php:122
|
276 |
+
msgid "View Cart"
|
277 |
msgstr ""
|
278 |
|
279 |
+
#: wp_shopping_cart_shortcodes.php:127
|
280 |
+
msgid "Cart is empty"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: includes/wspsc-cart-functions.php:22
|
284 |
+
msgid "Visit The Shop"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: includes/wspsc-cart-functions.php:34
|
288 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:64
|
289 |
msgid "USD"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: includes/wspsc-cart-functions.php:38
|
293 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:67
|
294 |
msgid "$"
|
295 |
msgstr ""
|
296 |
|
297 |
+
#: includes/wspsc-cart-functions.php:71
|
298 |
+
msgid "Cart"
|
299 |
+
msgstr ""
|
300 |
+
|
301 |
+
#: includes/wspsc-cart-functions.php:79
|
302 |
+
msgid "Hit enter to submit new Quantity."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: includes/wspsc-cart-functions.php:89
|
306 |
+
msgid "Item Name"
|
307 |
+
msgstr ""
|
308 |
+
|
309 |
+
#: includes/wspsc-cart-functions.php:89
|
310 |
+
msgid "Quantity"
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: includes/wspsc-cart-functions.php:89
|
314 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:165
|
315 |
+
msgid "Price"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: includes/wspsc-cart-functions.php:133
|
319 |
+
msgid "Remove"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: includes/wspsc-cart-functions.php:168
|
323 |
+
msgid "Subtotal"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: includes/wspsc-cart-functions.php:181
|
327 |
+
msgid "Enter Coupon Code"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: includes/wspsc-cart-functions.php:184
|
331 |
+
msgid "Apply"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: includes/wspsc-cart-functions.php:207
|
335 |
+
msgid "paypal_checkout_EN.png"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: includes/wspsc-cart-functions.php:208
|
339 |
+
msgid "Make payments with PayPal - it\\'s fast, free and secure!"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: includes/wspsc-cart-functions.php:236
|
343 |
+
#, php-format
|
344 |
+
msgid ""
|
345 |
+
"PayPal Smart Checkout error: %s client ID is not set. Please set it on the "
|
346 |
+
"Advanced Settings tab."
|
347 |
+
msgstr ""
|
348 |
+
|
349 |
+
#: includes/wspsc-cart-functions.php:321
|
350 |
+
msgid "Error occured during PayPal Smart Checkout process."
|
351 |
+
msgstr ""
|
352 |
+
|
353 |
+
#: includes/wspsc-cart-functions.php:351
|
354 |
+
msgid "HTTP error occured during payment process:"
|
355 |
+
msgstr ""
|
356 |
+
|
357 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:77
|
358 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:61
|
359 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:59
|
360 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:153
|
361 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:28
|
362 |
+
msgid ""
|
363 |
+
"For more information, updates, detailed documentation and video tutorial, "
|
364 |
+
"please visit:"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:78
|
368 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:62
|
369 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:60
|
370 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:154
|
371 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:29
|
372 |
+
msgid "WP Simple Cart Homepage"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:87
|
376 |
+
msgid "PayPal Smart Checkout Settings"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:94
|
380 |
+
msgid "Enable PayPal Smart Checkout"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:96
|
384 |
+
msgid "Enable PayPal Smart Checkout."
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
msgid "View Documentation"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:100
|
391 |
+
msgid "Live Client ID"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:102
|
395 |
+
msgid "Enter your live Client ID."
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:106
|
399 |
+
msgid "Live Secret"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:108
|
403 |
+
msgid "Enter your live Secret."
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:112
|
407 |
+
msgid "Sandbox Client ID"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:114
|
411 |
+
msgid "Enter your sandbox Client ID."
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:118
|
415 |
+
msgid "Sandbox Secret"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:120
|
419 |
+
msgid "Enter your sandbox Secret."
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:126
|
423 |
+
msgid "Button Appearance Settings"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:131
|
427 |
+
msgid "Size"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:137
|
431 |
+
msgid "Medium"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:138
|
435 |
+
msgid "Large"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:139
|
439 |
+
msgid "Repsonsive"
|
440 |
msgstr ""
|
441 |
|
442 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:143
|
443 |
+
msgid "Select button size."
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:147
|
447 |
+
msgid "Color"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:153
|
451 |
+
msgid "Gold"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:154
|
455 |
+
msgid "Blue"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:155
|
459 |
+
msgid "Silver"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:156
|
463 |
+
msgid "Black"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:160
|
467 |
+
msgid "Select button color."
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:168
|
471 |
+
msgid "Shape"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:170
|
475 |
+
msgid "Rectangular "
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:171
|
479 |
+
msgid "Pill"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:172
|
483 |
+
msgid "Select button shape."
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:176
|
487 |
+
msgid "Layout"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:178
|
491 |
+
msgid "Vertical"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:179
|
495 |
+
msgid "Horizontal"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:180
|
499 |
+
msgid "Select button layout."
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:185
|
503 |
+
msgid "Additional Settings"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:193
|
507 |
+
msgid "Payment Methods"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:195
|
511 |
+
msgid "PayPal Credit"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:196
|
515 |
+
msgid "ELV"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:197
|
519 |
+
msgid ""
|
520 |
+
"Select payment methods that could be used by customers. Note that payment "
|
521 |
+
"with cards is always enabled."
|
522 |
+
msgstr ""
|
523 |
+
|
524 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:201
|
525 |
+
msgid "Disable Standard PayPal Checkout"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:203
|
529 |
+
msgid ""
|
530 |
+
"By default PayPal standard checkout is always enabled. If you only want to "
|
531 |
+
"use the PayPal Smart Checkout instead then use this checkbox to disable the "
|
532 |
+
"standard checkout option. This option will only have effect when Smart "
|
533 |
+
"Checkout is enabled."
|
534 |
+
msgstr ""
|
535 |
+
|
536 |
+
#: includes/admin/wp_shopping_cart_menu_adv_settings.php:212
|
537 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:150
|
538 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:380
|
539 |
+
msgid "Update Options »"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:10
|
543 |
+
msgid "Simple Cart Coupons/Discounts"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:70
|
547 |
+
msgid "Coupon/Discount Settings"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:77
|
551 |
+
msgid "Enable Discount Coupon Feature"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:80
|
555 |
+
msgid ""
|
556 |
+
"When checked your customers will be able to enter a coupon code in the "
|
557 |
+
"shopping cart before checkout."
|
558 |
+
msgstr ""
|
559 |
+
|
560 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:87
|
561 |
+
msgid "Update »"
|
562 |
+
msgstr ""
|
563 |
+
|
564 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:103
|
565 |
+
msgid "Add Coupon/Discount"
|
566 |
+
msgstr ""
|
567 |
+
|
568 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:128
|
569 |
+
msgid "Save Coupon »"
|
570 |
+
msgstr ""
|
571 |
+
|
572 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:146
|
573 |
+
msgid "Coupon Code"
|
574 |
+
msgstr ""
|
575 |
+
|
576 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:147
|
577 |
+
msgid "Discount Rate (%)"
|
578 |
+
msgstr ""
|
579 |
+
|
580 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:148
|
581 |
+
msgid "Expiry Date"
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:167
|
585 |
+
msgid "No Expiry"
|
586 |
+
msgstr ""
|
587 |
+
|
588 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:183
|
589 |
+
msgid "No Coupons Configured."
|
590 |
+
msgstr ""
|
591 |
+
|
592 |
+
#: includes/admin/wp_shopping_cart_menu_discounts.php:188
|
593 |
+
msgid "No Record found"
|
594 |
+
msgstr ""
|
595 |
+
|
596 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:68
|
597 |
+
msgid "Purchase Confirmation Email Settings"
|
598 |
+
msgstr ""
|
599 |
+
|
600 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:71
|
601 |
+
msgid ""
|
602 |
+
"The following options affect the emails that gets sent to your buyers after "
|
603 |
+
"a purchase."
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:76
|
607 |
+
msgid "Send Emails to Buyer After Purchase"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:77
|
611 |
+
msgid ""
|
612 |
+
"If checked the plugin will send an email to the buyer with the sale details. "
|
613 |
+
"If digital goods are purchased then the email will contain the download "
|
614 |
+
"links for the purchased products."
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:81
|
618 |
+
msgid "From Email Address"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:83
|
622 |
+
msgid ""
|
623 |
+
"Example: Your Name <sales@your-domain.com> This is the email address "
|
624 |
+
"that will be used to send the email to the buyer. This name and email "
|
625 |
+
"address will appear in the from field of the email."
|
626 |
+
msgstr ""
|
627 |
+
|
628 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:87
|
629 |
+
msgid "Buyer Email Subject"
|
630 |
+
msgstr ""
|
631 |
+
|
632 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:89
|
633 |
+
msgid "This is the subject of the email that will be sent to the buyer."
|
634 |
+
msgstr ""
|
635 |
+
|
636 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:93
|
637 |
+
msgid "Buyer Email Body"
|
638 |
+
msgstr ""
|
639 |
+
|
640 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:96
|
641 |
+
msgid ""
|
642 |
+
"This is the body of the email that will be sent to the buyer. Do not change "
|
643 |
+
"the text within the braces {}. You can use the following email tags in this "
|
644 |
+
"email body field:"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:97
|
648 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:132
|
649 |
+
msgid "First name of the buyer"
|
650 |
+
msgstr ""
|
651 |
+
|
652 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:98
|
653 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:133
|
654 |
+
msgid "Last name of the buyer"
|
655 |
+
msgstr ""
|
656 |
+
|
657 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:99
|
658 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:134
|
659 |
+
msgid "Email Address of the buyer"
|
660 |
+
msgstr ""
|
661 |
+
|
662 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:100
|
663 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:135
|
664 |
+
msgid "Address of the buyer"
|
665 |
+
msgstr ""
|
666 |
+
|
667 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:101
|
668 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:136
|
669 |
+
msgid ""
|
670 |
+
"The item details of the purchased product (this will include the download "
|
671 |
+
"link for digital items)."
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:102
|
675 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:137
|
676 |
+
msgid "The unique transaction ID of the purchase"
|
677 |
+
msgstr ""
|
678 |
+
|
679 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:103
|
680 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:138
|
681 |
+
msgid "The order ID reference of this transaction in the cart orders menu"
|
682 |
+
msgstr ""
|
683 |
+
|
684 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:104
|
685 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:139
|
686 |
+
msgid "The amount paid for the current transaction"
|
687 |
+
msgstr ""
|
688 |
+
|
689 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:105
|
690 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:140
|
691 |
+
msgid "The date of the purchase"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:106
|
695 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:141
|
696 |
+
msgid "Coupon code applied to the purchase"
|
697 |
+
msgstr ""
|
698 |
+
|
699 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:111
|
700 |
+
msgid "Send Emails to Seller After Purchase"
|
701 |
+
msgstr ""
|
702 |
+
|
703 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:112
|
704 |
+
msgid ""
|
705 |
+
"If checked the plugin will send an email to the seller with the sale details"
|
706 |
+
msgstr ""
|
707 |
+
|
708 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:116
|
709 |
+
msgid "Notification Email Address*"
|
710 |
+
msgstr ""
|
711 |
+
|
712 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:118
|
713 |
+
msgid ""
|
714 |
+
"This is the email address where the seller will be notified of product "
|
715 |
+
"sales. You can put multiple email addresses separated by comma (,) in the "
|
716 |
+
"above field to send the notification to multiple email addresses."
|
717 |
+
msgstr ""
|
718 |
+
|
719 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:122
|
720 |
+
msgid "Seller Email Subject*"
|
721 |
+
msgstr ""
|
722 |
+
|
723 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:124
|
724 |
+
msgid ""
|
725 |
+
"This is the subject of the email that will be sent to the seller for record."
|
726 |
+
msgstr ""
|
727 |
+
|
728 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:128
|
729 |
+
msgid "Seller Email Body*"
|
730 |
+
msgstr ""
|
731 |
+
|
732 |
+
#: includes/admin/wp_shopping_cart_menu_email_settings.php:131
|
733 |
+
msgid ""
|
734 |
+
"This is the body of the email that will be sent to the seller for record. Do "
|
735 |
+
"not change the text within the braces {}. You can use the following email "
|
736 |
+
"tags in this email body field:"
|
737 |
+
msgstr ""
|
738 |
+
|
739 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:60
|
740 |
+
msgid "Options Updated!"
|
741 |
+
msgstr ""
|
742 |
+
|
743 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:158
|
744 |
msgid "Quick Usage Guide"
|
745 |
msgstr ""
|
746 |
|
747 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:161
|
748 |
msgid "Step 1) "
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:161
|
752 |
msgid "To add an 'Add to Cart' button for a product simply add the shortcode"
|
753 |
msgstr ""
|
754 |
|
755 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:161
|
756 |
msgid "PRODUCT-NAME"
|
757 |
msgstr ""
|
758 |
|
759 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:161
|
760 |
msgid "PRODUCT-PRICE"
|
761 |
msgstr ""
|
762 |
|
763 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:161
|
764 |
msgid ""
|
765 |
"to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-"
|
766 |
"PRICE with the actual name and price of your product."
|
767 |
msgstr ""
|
768 |
|
769 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:162
|
770 |
msgid "Example add to cart button shortcode usage:"
|
771 |
msgstr ""
|
772 |
|
773 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:163
|
774 |
msgid "Step 2) "
|
775 |
msgstr ""
|
776 |
|
777 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:163
|
778 |
msgid ""
|
779 |
"To add the shopping cart to a post or page (example: a checkout page) simply "
|
780 |
"add the shortcode"
|
781 |
msgstr ""
|
782 |
|
783 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:163
|
784 |
msgid ""
|
785 |
"to a post or page or use the sidebar widget to add the shopping cart to the "
|
786 |
"sidebar."
|
787 |
msgstr ""
|
788 |
|
789 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:164
|
790 |
msgid "Example shopping cart shortcode usage:"
|
791 |
msgstr ""
|
792 |
|
793 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:173
|
794 |
msgid "PayPal and Shopping Cart Settings"
|
795 |
msgstr ""
|
796 |
|
797 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:179
|
798 |
msgid "Paypal Email Address"
|
799 |
msgstr ""
|
800 |
|
801 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:183
|
802 |
msgid "Shopping Cart title"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:187
|
806 |
msgid "Text/Image to Show When Cart Empty"
|
807 |
msgstr ""
|
808 |
|
809 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:188
|
810 |
msgid ""
|
811 |
"You can either enter plain text or the URL of an image that you want to show "
|
812 |
"when the shopping cart is empty"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:193
|
816 |
msgid "Currency"
|
817 |
msgstr ""
|
818 |
|
819 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:233
|
820 |
+
msgid "Currency Symbol"
|
|
|
821 |
msgstr ""
|
822 |
|
823 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:234
|
824 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:261
|
825 |
+
msgid "e.g."
|
826 |
msgstr ""
|
827 |
|
828 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:239
|
829 |
msgid "Base Shipping Cost"
|
830 |
msgstr ""
|
831 |
|
832 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:240
|
833 |
msgid ""
|
834 |
"This is the base shipping cost that will be added to the total of individual "
|
835 |
"products shipping cost. Put 0 if you do not want to charge shipping cost or "
|
836 |
"use base shipping cost."
|
837 |
msgstr ""
|
838 |
|
839 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:240
|
840 |
msgid "Learn More on Shipping Calculation"
|
841 |
msgstr ""
|
842 |
|
843 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:244
|
844 |
msgid "Free Shipping for Orders Over"
|
845 |
msgstr ""
|
846 |
|
847 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:245
|
848 |
msgid ""
|
849 |
"When a customer orders more than this amount he/she will get free shipping. "
|
850 |
"Leave empty if you do not want to use it."
|
851 |
msgstr ""
|
852 |
|
853 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:249
|
854 |
msgid "Must Collect Shipping Address on PayPal"
|
855 |
msgstr ""
|
856 |
|
857 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:250
|
858 |
msgid ""
|
859 |
"If checked the customer will be forced to enter a shipping address on PayPal "
|
860 |
"when checking out."
|
861 |
msgstr ""
|
862 |
|
863 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:254
|
864 |
msgid "Use PayPal Profile Based Shipping"
|
865 |
msgstr ""
|
866 |
|
867 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:255
|
868 |
msgid "Check this if you want to use"
|
869 |
msgstr ""
|
870 |
|
871 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:255
|
872 |
msgid "PayPal profile based shipping"
|
873 |
msgstr ""
|
874 |
|
875 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:255
|
876 |
msgid ""
|
877 |
"Using this will ignore any other shipping options that you have specified in "
|
878 |
"this plugin."
|
879 |
msgstr ""
|
880 |
|
881 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:259
|
882 |
msgid "Add to Cart button text or Image"
|
883 |
msgstr ""
|
884 |
|
885 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:261
|
886 |
msgid ""
|
887 |
"To use a customized image as the button simply enter the URL of the image "
|
888 |
"file."
|
889 |
msgstr ""
|
890 |
|
891 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:267
|
892 |
msgid "Return URL"
|
893 |
msgstr ""
|
894 |
|
895 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:268
|
896 |
msgid ""
|
897 |
"This is the URL the customer will be redirected to after a successful payment"
|
898 |
msgstr ""
|
899 |
|
900 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:272
|
901 |
msgid "Cancel URL"
|
902 |
msgstr ""
|
903 |
|
904 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:273
|
905 |
msgid ""
|
906 |
+
"The customer will be sent to the above page if the cancel link is clicked on "
|
907 |
+
"the PayPal checkout page."
|
908 |
msgstr ""
|
909 |
|
910 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:277
|
911 |
msgid "Products Page URL"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:278
|
915 |
msgid ""
|
916 |
"This is the URL of your products page if you have any. If used, the shopping "
|
917 |
"cart widget will display a link to this page when cart is empty"
|
918 |
msgstr ""
|
919 |
|
920 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:282
|
921 |
msgid "Automatic redirection to checkout page"
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:284
|
925 |
msgid "Checkout Page URL"
|
926 |
msgstr ""
|
927 |
|
928 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:285
|
929 |
msgid ""
|
930 |
"If checked the visitor will be redirected to the Checkout page after a "
|
931 |
"product is added to the cart. You must enter a URL in the Checkout Page URL "
|
932 |
"field for this to work."
|
933 |
msgstr ""
|
934 |
|
935 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:289
|
936 |
msgid "Open PayPal Checkout Page in a New Tab"
|
937 |
msgstr ""
|
938 |
|
939 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:291
|
940 |
msgid ""
|
941 |
"If checked the PayPal checkout page will be opened in a new tab/window when "
|
942 |
"the user clicks the checkout button."
|
943 |
msgstr ""
|
944 |
|
945 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:295
|
946 |
msgid "Reset Cart After Redirection to Return Page"
|
947 |
msgstr ""
|
948 |
|
949 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:297
|
950 |
msgid ""
|
951 |
"If checked the shopping cart will be reset when the customer lands on the "
|
952 |
"return URL (Thank You) page."
|
953 |
msgstr ""
|
954 |
|
955 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:304
|
956 |
msgid "Hide Shopping Cart Image"
|
957 |
msgstr ""
|
958 |
|
959 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:305
|
960 |
msgid "If ticked the shopping cart image will not be shown."
|
961 |
msgstr ""
|
962 |
|
963 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:311
|
964 |
+
msgid "Custom Checkout Page Logo Image"
|
965 |
+
msgstr ""
|
966 |
+
|
967 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:313
|
968 |
+
msgid ""
|
969 |
+
"Specify an image URL if you want to customize the paypal checkout page with "
|
970 |
+
"a custom logo/image. The image URL must be a 'https' URL otherwise PayPal "
|
971 |
+
"will ignore it."
|
972 |
+
msgstr ""
|
973 |
+
|
974 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:319
|
975 |
+
msgid "Use Strict PayPal Email Address Checking"
|
976 |
msgstr ""
|
977 |
|
978 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:320
|
979 |
msgid ""
|
980 |
+
"If checked the script will check to make sure that the PayPal email address "
|
981 |
+
"specified is the same as the account where the payment was deposited (Usage "
|
982 |
+
"of PayPal Email Alias will fail too)."
|
|
|
983 |
msgstr ""
|
984 |
|
985 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:326
|
986 |
+
msgid "Disable Nonce Check for Add to Cart"
|
987 |
msgstr ""
|
988 |
|
989 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:328
|
990 |
msgid ""
|
991 |
+
"Check this option if you are using a caching solution on your site. This "
|
992 |
+
"will bypass the nonce check on the add to cart buttons."
|
993 |
msgstr ""
|
994 |
|
995 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:334
|
996 |
+
msgid "Customize the Note to Seller Text"
|
997 |
msgstr ""
|
998 |
|
999 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:335
|
1000 |
msgid ""
|
1001 |
+
"PayPal has removed this feature. We have created an addon so you can still "
|
1002 |
+
"collect instructions from customers at the time of checking out. "
|
1003 |
+
msgstr ""
|
1004 |
+
|
1005 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:336
|
1006 |
+
msgid "View the addon details"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:342
|
1010 |
msgid "Use WP Affiliate Platform"
|
1011 |
msgstr ""
|
1012 |
|
1013 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:344
|
1014 |
msgid "Check this if using with the"
|
1015 |
msgstr ""
|
1016 |
|
1017 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:344
|
1018 |
msgid ""
|
1019 |
"This plugin lets you run your own affiliate campaign/program and allows you "
|
1020 |
"to reward (pay commission) your affiliates for referred sales"
|
1021 |
msgstr ""
|
1022 |
|
1023 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:350
|
1024 |
msgid "Testing and Debugging Settings"
|
1025 |
msgstr ""
|
1026 |
|
1027 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:356
|
1028 |
msgid "Enable Debug"
|
1029 |
msgstr ""
|
1030 |
|
1031 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:358
|
1032 |
msgid ""
|
1033 |
"If checked, debug output will be written to the log file. This is useful for "
|
1034 |
"troubleshooting post payment failures"
|
1035 |
msgstr ""
|
1036 |
|
1037 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:369
|
1038 |
msgid "Enable Sandbox Testing"
|
1039 |
msgstr ""
|
1040 |
|
1041 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:371
|
1042 |
msgid ""
|
1043 |
"Check this option if you want to do PayPal sandbox testing. You will need to "
|
1044 |
"create a PayPal sandbox account from PayPal Developer site"
|
1045 |
msgstr ""
|
1046 |
|
1047 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:384
|
|
|
|
|
|
|
|
|
1048 |
msgid "Like the Simple WordPress Shopping Cart Plugin?"
|
1049 |
msgstr ""
|
1050 |
|
1051 |
+
#: includes/admin/wp_shopping_cart_menu_general_settings.php:384
|
1052 |
msgid "Give it a good rating"
|
1053 |
msgstr ""
|
1054 |
|
1055 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:13
|
1056 |
+
msgid "Simple Cart"
|
1057 |
msgstr ""
|
1058 |
|
1059 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:15
|
1060 |
+
msgid "Coupons"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1061 |
msgstr ""
|
1062 |
|
1063 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:16
|
1064 |
+
msgid "Tools"
|
1065 |
msgstr ""
|
1066 |
|
1067 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:23
|
1068 |
+
msgid "WP Paypal Shopping Cart"
|
|
|
|
|
|
|
1069 |
msgstr ""
|
1070 |
|
1071 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:23
|
1072 |
+
msgid "WP Shopping Cart"
|
1073 |
msgstr ""
|
1074 |
|
1075 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:40
|
1076 |
+
msgid "General Settings"
|
1077 |
msgstr ""
|
1078 |
|
1079 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:41
|
1080 |
+
msgid "Email Settings"
|
1081 |
msgstr ""
|
1082 |
|
1083 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:42
|
1084 |
+
msgid "Advanced Settings"
|
|
|
|
|
|
|
1085 |
msgstr ""
|
1086 |
|
1087 |
+
#: includes/admin/wp_shopping_cart_menu_main.php:45
|
1088 |
+
msgid "WP Paypal Shopping Cart Options"
|
1089 |
msgstr ""
|
1090 |
|
1091 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:9
|
1092 |
+
msgid "Simple Cart Tools"
|
1093 |
msgstr ""
|
1094 |
|
1095 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:33
|
1096 |
+
msgid "Export Cart Orders Data"
|
1097 |
msgstr ""
|
1098 |
|
1099 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:38
|
|
|
|
|
|
|
|
|
1100 |
msgid ""
|
1101 |
+
"You can use this option to export all the orders data to a CSV/Excel file."
|
|
|
1102 |
msgstr ""
|
1103 |
|
1104 |
+
#: includes/admin/wp_shopping_cart_menu_tools.php:40
|
1105 |
+
msgid "Export Data"
|
1106 |
msgstr ""
|
1107 |
|
1108 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:91
|
1109 |
+
msgid "Please enter product name"
|
1110 |
msgstr ""
|
1111 |
|
1112 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:99
|
1113 |
+
msgid "Please enter product price"
|
1114 |
msgstr ""
|
1115 |
|
1116 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:148
|
1117 |
+
msgid "Simple Cart Documentation"
|
1118 |
msgstr ""
|
1119 |
|
1120 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:154
|
1121 |
+
msgid "Product Name"
|
1122 |
msgstr ""
|
1123 |
|
1124 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:160
|
1125 |
+
msgid "Example: My Great Product"
|
|
|
1126 |
msgstr ""
|
1127 |
|
1128 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:171
|
1129 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:182
|
1130 |
+
msgid "Example: 10 or 10.50"
|
1131 |
msgstr ""
|
1132 |
|
1133 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:176
|
1134 |
+
msgid "Shipping (Optional)"
|
|
|
|
|
|
|
1135 |
msgstr ""
|
1136 |
|
1137 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:187
|
1138 |
+
msgid "File URL (Optional)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1139 |
msgstr ""
|
1140 |
|
1141 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:193
|
1142 |
+
msgid "Example:"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1143 |
msgstr ""
|
1144 |
|
1145 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:199
|
1146 |
+
msgid "Product Variations (Optional)"
|
1147 |
msgstr ""
|
1148 |
|
1149 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:200
|
1150 |
msgid ""
|
1151 |
+
"Example: For a T-Shirt product you may want to use a variation with name "
|
1152 |
+
"\"Size\" and values as \"Small, Medium, Large\""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1153 |
msgstr ""
|
1154 |
|
1155 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:205
|
1156 |
+
msgid "Variation 1: Name"
|
1157 |
msgstr ""
|
1158 |
|
1159 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:210
|
1160 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:221
|
1161 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:232
|
1162 |
+
msgid "Values"
|
1163 |
msgstr ""
|
1164 |
|
1165 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:216
|
1166 |
+
msgid "Variation 2: Name"
|
1167 |
msgstr ""
|
1168 |
|
1169 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:227
|
1170 |
+
msgid "Variation 3: Name"
|
1171 |
msgstr ""
|
1172 |
|
1173 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:243
|
1174 |
+
msgid "Insert"
|
1175 |
msgstr ""
|
1176 |
|
1177 |
+
#: includes/admin/wp_shopping_cart_tinymce.php:250
|
1178 |
+
msgid "Cancel"
|
1179 |
msgstr ""
|
1180 |
|
1181 |
+
msgid "Item"
|
|
|
1182 |
msgstr ""
|
1183 |
|
1184 |
+
msgid "Items"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1185 |
msgstr ""
|
lib/gallery-wp-cart.php
CHANGED
@@ -25,15 +25,6 @@ Follow variables are useable :
|
|
25 |
</div>
|
26 |
<?php } ?>
|
27 |
|
28 |
-
<?php if ($gallery->show_piclens) { ?>
|
29 |
-
<!-- Piclense link -->
|
30 |
-
<div class="piclenselink">
|
31 |
-
<a class="piclenselink" href="<?php echo $gallery->piclens_link ?>">
|
32 |
-
<?php _e('[View with PicLens]','nggallery'); ?>
|
33 |
-
</a>
|
34 |
-
</div>
|
35 |
-
<?php } ?>
|
36 |
-
|
37 |
<!-- Thumbnails -->
|
38 |
<?php foreach ($images as $image) : ?>
|
39 |
|
25 |
</div>
|
26 |
<?php } ?>
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
<!-- Thumbnails -->
|
29 |
<?php foreach ($images as $image) : ?>
|
30 |
|
paypal.php
CHANGED
@@ -1,499 +1,580 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
status_header(200);
|
4 |
|
5 |
$debug_log = "ipn_handle_debug.txt"; // Debug log file name
|
6 |
|
7 |
class paypal_ipn_handler {
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
function __construct()
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
$this->ipn_response = '';
|
23 |
}
|
24 |
|
25 |
-
function validate_and_dispatch_product()
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
{
|
313 |
-
do_action('wp_affiliate_process_cart_commission', array("referrer" => $referrer, "sale_amt" => $sale_amount, "txn_id" => $txn_id, "buyer_email" => $buyer_email));
|
314 |
-
|
315 |
-
$message = 'The sale has been registered in the WP Affiliates Platform Database for referrer: '.$referrer.' for sale amount: '.$sale_amount;
|
316 |
-
$this->debug_log($message,true);
|
317 |
-
}
|
318 |
-
else
|
319 |
-
{
|
320 |
-
$this->debug_log('No Referrer Found. This is not an affiliate sale',true);
|
321 |
-
}
|
322 |
-
}
|
323 |
-
else
|
324 |
-
{
|
325 |
-
$this->debug_log('Not Using the WP Affiliate Platform Plugin.',true);
|
326 |
-
}
|
327 |
-
|
328 |
-
do_action('wpspc_paypal_ipn_processed',$this->ipn_data,$this);
|
329 |
-
|
330 |
-
//Empty any incomplete old cart orders.
|
331 |
-
wspsc_clean_incomplete_old_cart_orders();
|
332 |
-
|
333 |
-
return true;
|
334 |
}
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
}
|
396 |
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
// Write to log
|
418 |
-
$fp=fopen($this->ipn_log_file,'a');
|
419 |
-
fwrite($fp, $text . "\n\n");
|
420 |
-
|
421 |
-
fclose($fp); // close file
|
422 |
-
}
|
423 |
-
|
424 |
-
function debug_log($message,$success,$end=false)
|
425 |
-
{
|
426 |
-
|
427 |
-
if (!$this->ipn_log) return; // is logging turned off?
|
428 |
-
|
429 |
-
// Timestamp
|
430 |
-
$text = '['.date('m/d/Y g:i A').'] - '.(($success)?'SUCCESS :':'FAILURE :').$message. "\n";
|
431 |
-
|
432 |
-
if ($end) {
|
433 |
-
$text .= "\n------------------------------------------------------------------\n\n";
|
434 |
-
}
|
435 |
-
|
436 |
-
// Write to log
|
437 |
-
$fp=fopen($this->ipn_log_file,'a');
|
438 |
-
fwrite($fp, $text );
|
439 |
-
fclose($fp); // close file
|
440 |
-
}
|
441 |
-
|
442 |
-
function debug_log_array($array_to_write,$success,$end=false)
|
443 |
-
{
|
444 |
-
if (!$this->ipn_log) return; // is logging turned off?
|
445 |
-
$text = '['.date('m/d/Y g:i A').'] - '.(($success)?'SUCCESS :':'FAILURE :'). "\n";
|
446 |
-
ob_start();
|
447 |
-
print_r($array_to_write);
|
448 |
-
$var = ob_get_contents();
|
449 |
-
ob_end_clean();
|
450 |
-
$text .= $var;
|
451 |
-
|
452 |
-
if ($end)
|
453 |
-
{
|
454 |
-
$text .= "\n------------------------------------------------------------------\n\n";
|
455 |
-
}
|
456 |
-
// Write to log
|
457 |
-
$fp=fopen($this->ipn_log_file,'a');
|
458 |
-
fwrite($fp, $text );
|
459 |
-
fclose($fp); // close filee
|
460 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
}
|
462 |
|
463 |
// Start of IPN handling (script execution)
|
464 |
-
function wpc_handle_paypal_ipn()
|
465 |
-
|
466 |
-
$
|
467 |
-
|
468 |
-
|
469 |
-
$
|
470 |
-
$debug
|
471 |
-
|
472 |
-
$debug_enabled = true;
|
473 |
}
|
474 |
|
475 |
-
if ($debug_enabled)
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
//$ipn_handler_instance->ipn_log_file = realpath(dirname(__FILE__)).'/'.$debug_log;
|
480 |
}
|
481 |
-
$sandbox = get_option('wp_shopping_cart_enable_sandbox');
|
482 |
-
if ($sandbox) // Enable sandbox testing
|
483 |
-
|
484 |
-
|
485 |
-
$ipn_handler_instance->sandbox_mode = true;
|
486 |
}
|
487 |
-
$ipn_handler_instance->debug_log('Paypal Class Initiated by '
|
488 |
// Validate the IPN
|
489 |
-
if ($ipn_handler_instance->validate_ipn())
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
$ipn_handler_instance->debug_log('IPN product validation failed.',false);
|
495 |
-
}
|
496 |
}
|
497 |
-
$ipn_handler_instance->debug_log('Paypal class finished.',true,true);
|
498 |
}
|
499 |
-
|
1 |
<?php
|
2 |
|
3 |
+
status_header( 200 );
|
4 |
|
5 |
$debug_log = "ipn_handle_debug.txt"; // Debug log file name
|
6 |
|
7 |
class paypal_ipn_handler {
|
8 |
|
9 |
+
var $last_error; // holds the last error encountered
|
10 |
+
var $ipn_log; // bool: log IPN results to text file?
|
11 |
+
var $ipn_log_file; // filename of the IPN log
|
12 |
+
var $ipn_response; // holds the IPN response from paypal
|
13 |
+
var $ipn_data = array(); // array contains the POST values for IPN
|
14 |
+
var $fields = array(); // array holds the fields to submit to paypal
|
15 |
+
var $sandbox_mode = false;
|
16 |
+
|
17 |
+
function __construct() {
|
18 |
+
$this->paypal_url = 'https://www.paypal.com/cgi-bin/webscr';
|
19 |
+
$this->last_error = '';
|
20 |
+
$this->ipn_log_file = WP_CART_PATH . 'ipn_handle_debug.txt';
|
21 |
+
$this->ipn_response = '';
|
|
|
22 |
}
|
23 |
|
24 |
+
function validate_and_dispatch_product() {
|
25 |
+
//Check Product Name, Price, Currency, Receiver email
|
26 |
+
//Decode the custom field before sanitizing.
|
27 |
+
$custom_field_value = urldecode( $this->ipn_data[ 'custom' ] ); //urldecode is harmless
|
28 |
+
$this->ipn_data[ 'custom' ] = $custom_field_value;
|
29 |
+
|
30 |
+
//Sanitize and read data.
|
31 |
+
$array_temp = $this->ipn_data;
|
32 |
+
$this->ipn_data = array_map( 'sanitize_text_field', $array_temp );
|
33 |
+
$txn_id = $this->ipn_data[ 'txn_id' ];
|
34 |
+
$transaction_type = $this->ipn_data[ 'txn_type' ];
|
35 |
+
$payment_status = $this->ipn_data[ 'payment_status' ];
|
36 |
+
$transaction_subject = $this->ipn_data[ 'transaction_subject' ];
|
37 |
+
$first_name = $this->ipn_data[ 'first_name' ];
|
38 |
+
$last_name = $this->ipn_data[ 'last_name' ];
|
39 |
+
$buyer_email = $this->ipn_data[ 'payer_email' ];
|
40 |
+
$street_address = isset( $this->ipn_data[ 'address_street' ] ) ? $this->ipn_data[ 'address_street' ] : '';
|
41 |
+
$city = isset( $this->ipn_data[ 'address_city' ] ) ? $this->ipn_data[ 'address_city' ] : '';
|
42 |
+
$state = isset( $this->ipn_data[ 'address_state' ] ) ? $this->ipn_data[ 'address_state' ] : '';
|
43 |
+
$zip = isset( $this->ipn_data[ 'address_zip' ] ) ? $this->ipn_data[ 'address_zip' ] : '';
|
44 |
+
$country = isset( $this->ipn_data[ 'address_country' ] ) ? $this->ipn_data[ 'address_country' ] : '';
|
45 |
+
$phone = isset( $this->ipn_data[ 'contact_phone' ] ) ? $this->ipn_data[ 'contact_phone' ] : '';
|
46 |
+
|
47 |
+
if ( empty( $street_address ) && empty( $city ) ) {
|
48 |
+
//No address value present
|
49 |
+
$address = "";
|
50 |
+
} else {
|
51 |
+
//An address value is present
|
52 |
+
$address = $street_address . ", " . $city . ", " . $state . ", " . $zip . ", " . $country;
|
53 |
+
}
|
54 |
+
|
55 |
+
$custom_value_str = $this->ipn_data[ 'custom' ];
|
56 |
+
$this->debug_log( 'Custom field value in the IPN: ' . $custom_value_str, true );
|
57 |
+
$custom_values = wp_cart_get_custom_var_array( $custom_value_str );
|
58 |
+
|
59 |
+
$this->debug_log( 'Payment Status: ' . $payment_status, true );
|
60 |
+
if ( $payment_status == "Completed" || $payment_status == "Processed" ) {
|
61 |
+
//We will process this notification
|
62 |
+
} else {
|
63 |
+
$this->debug_log( 'This is not a payment complete notification. This IPN will not be processed.', true );
|
64 |
+
return true;
|
65 |
+
}
|
66 |
+
if ( $transaction_type == "cart" ) {
|
67 |
+
$this->debug_log( 'Transaction Type: Shopping Cart', true );
|
68 |
+
// Cart Items
|
69 |
+
$num_cart_items = $this->ipn_data[ 'num_cart_items' ];
|
70 |
+
$this->debug_log( 'Number of Cart Items: ' . $num_cart_items, true );
|
71 |
+
|
72 |
+
$i = 1;
|
73 |
+
$cart_items = array();
|
74 |
+
while ( $i < $num_cart_items + 1 ) {
|
75 |
+
$item_number = $this->ipn_data[ 'item_number' . $i ];
|
76 |
+
$item_name = urldecode( $this->ipn_data[ 'item_name' . $i ] );
|
77 |
+
$this->ipn_data[ 'item_name' . $i ] = $item_name;
|
78 |
+
$quantity = $this->ipn_data[ 'quantity' . $i ];
|
79 |
+
$mc_gross = $this->ipn_data[ 'mc_gross_' . $i ];
|
80 |
+
$mc_currency = $this->ipn_data[ 'mc_currency' ];
|
81 |
+
|
82 |
+
$current_item = array(
|
83 |
+
'item_number' => $item_number,
|
84 |
+
'item_name' => $item_name,
|
85 |
+
'quantity' => $quantity,
|
86 |
+
'mc_gross' => $mc_gross,
|
87 |
+
'mc_currency' => $mc_currency,
|
88 |
+
);
|
89 |
+
|
90 |
+
array_push( $cart_items, $current_item );
|
91 |
+
$i ++;
|
92 |
+
}
|
93 |
+
$this->debug_log( array( $cart_items ), true );
|
94 |
+
} else {
|
95 |
+
$cart_items = array();
|
96 |
+
$this->debug_log( 'Transaction Type: Buy Now', true );
|
97 |
+
$item_number = $this->ipn_data[ 'item_number' ];
|
98 |
+
$item_name = urldecode( $this->ipn_data[ 'item_name' ] );
|
99 |
+
$this->ipn_data[ 'item_name' ] = $item_name;
|
100 |
+
$quantity = $this->ipn_data[ 'quantity' ];
|
101 |
+
$mc_gross = $this->ipn_data[ 'mc_gross' ];
|
102 |
+
$mc_currency = $this->ipn_data[ 'mc_currency' ];
|
103 |
+
|
104 |
+
$current_item = array(
|
105 |
+
'item_number' => $item_number,
|
106 |
+
'item_name' => $item_name,
|
107 |
+
'quantity' => $quantity,
|
108 |
+
'mc_gross' => $mc_gross,
|
109 |
+
'mc_currency' => $mc_currency,
|
110 |
+
);
|
111 |
+
array_push( $cart_items, $current_item );
|
112 |
+
}
|
113 |
+
|
114 |
+
$payment_currency = get_option( 'cart_payment_currency' );
|
115 |
+
|
116 |
+
$individual_paid_item_total = 0;
|
117 |
+
foreach ( $cart_items as $current_cart_item ) {
|
118 |
+
$cart_item_data_num = $current_cart_item[ 'item_number' ];
|
119 |
+
$cart_item_data_name = $current_cart_item[ 'item_name' ];
|
120 |
+
$cart_item_data_quantity = $current_cart_item[ 'quantity' ];
|
121 |
+
$cart_item_data_total = $current_cart_item[ 'mc_gross' ];
|
122 |
+
$cart_item_data_currency = $current_cart_item[ 'mc_currency' ];
|
123 |
+
$individual_paid_item_total += $cart_item_data_total;
|
124 |
+
|
125 |
+
$this->debug_log( 'Item Number: ' . $cart_item_data_num, true );
|
126 |
+
$this->debug_log( 'Item Name: ' . $cart_item_data_name, true );
|
127 |
+
$this->debug_log( 'Item Quantity: ' . $cart_item_data_quantity, true );
|
128 |
+
$this->debug_log( 'Item Total: ' . $cart_item_data_total, true );
|
129 |
+
$this->debug_log( 'Item Currency: ' . $cart_item_data_currency, true );
|
130 |
+
|
131 |
+
// Compare the currency values to make sure it is correct.
|
132 |
+
if ( $payment_currency != $cart_item_data_currency ) {
|
133 |
+
$this->debug_log( 'Invalid Product Currency : ' . $payment_currency, false );
|
134 |
+
return false;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
|
138 |
+
$post_id = $custom_values[ 'wp_cart_id' ];
|
139 |
+
$orig_cart_items = get_post_meta( $post_id, 'wpsc_cart_items', true );
|
140 |
+
$ip_address = isset( $custom_values[ 'ip' ] ) ? $custom_values[ 'ip' ] : '';
|
141 |
+
$applied_coupon_code = isset( $custom_values[ 'coupon_code' ] ) ? $custom_values[ 'coupon_code' ] : '';
|
142 |
+
$currency_symbol = get_option( 'cart_currency_symbol' );
|
143 |
+
$this->debug_log( 'Custom values', true );
|
144 |
+
$this->debug_log_array( $custom_values, true );
|
145 |
+
$this->debug_log( 'Order post id: ' . $post_id, true );
|
146 |
+
|
147 |
+
//*** Do security checks ***
|
148 |
+
if ( empty( $post_id ) ) {
|
149 |
+
$this->debug_log( 'Order ID ' . $post_id . ' does not exist in the IPN notification. This request will not be processed.', false );
|
150 |
+
return;
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( ! get_post_status( $post_id ) ) {
|
154 |
+
$this->debug_log( 'Order ID ' . $post_id . ' does not exist in the database. This is not a Simple PayPal Shopping Cart order', false );
|
155 |
+
return;
|
156 |
+
}
|
157 |
+
|
158 |
+
if ( get_option( 'wp_shopping_cart_strict_email_check' ) != '' ) {
|
159 |
+
$seller_paypal_email = get_option( 'cart_paypal_email' );
|
160 |
+
if ( $seller_paypal_email != $this->ipn_data[ 'receiver_email' ] ) {
|
161 |
+
$error_msg .= 'Invalid Seller Paypal Email Address : ' . $this->ipn_data[ 'receiver_email' ];
|
162 |
+
$this->debug_log( $error_msg, false );
|
163 |
+
return;
|
164 |
+
} else {
|
165 |
+
$this->debug_log( 'Seller Paypal Email Address is Valid: ' . $this->ipn_data[ 'receiver_email' ], true );
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
$transaction_id = get_post_meta( $post_id, 'wpsc_txn_id', true );
|
170 |
+
if ( ! empty( $transaction_id ) ) {
|
171 |
+
if ( $transaction_id == $txn_id ) { //this transaction has been already processed once
|
172 |
+
$this->debug_log( 'This transaction has been already processed once. Transaction ID: ' . $transaction_id, false );
|
173 |
+
return;
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
//Validate prices
|
178 |
+
$orig_individual_item_total = 0;
|
179 |
+
foreach ( $orig_cart_items as $item ) {
|
180 |
+
$orig_individual_item_total += $item[ 'price' ] * $item[ 'quantity' ];
|
181 |
+
}
|
182 |
+
|
183 |
+
$orig_individual_item_total = round( $orig_individual_item_total, 2 );
|
184 |
+
$individual_paid_item_total = round( $individual_paid_item_total, 2 );
|
185 |
+
$this->debug_log( 'Checking price. Original price: ' . $orig_individual_item_total . '. Paid price: ' . $individual_paid_item_total, true );
|
186 |
+
if ( $individual_paid_item_total < $orig_individual_item_total ) { //Paid price is less so block this transaction.
|
187 |
+
$this->debug_log( 'Error! Post payment price validation failed. The price amount may have been altered. This transaction will not be processed.', false );
|
188 |
+
$this->debug_log( 'Original total price: ' . $orig_individual_item_total . '. Paid total price: ' . $individual_paid_item_total, false );
|
189 |
+
return;
|
190 |
+
}
|
191 |
+
//*** End of security check ***
|
192 |
+
|
193 |
+
$updated_wpsc_order = array(
|
194 |
+
'ID' => $post_id,
|
195 |
+
'post_status' => 'publish',
|
196 |
+
'post_type' => 'wpsc_cart_orders',
|
197 |
+
);
|
198 |
+
wp_update_post( $updated_wpsc_order );
|
199 |
+
|
200 |
+
update_post_meta( $post_id, 'wpsc_first_name', $first_name );
|
201 |
+
update_post_meta( $post_id, 'wpsc_last_name', $last_name );
|
202 |
+
update_post_meta( $post_id, 'wpsc_email_address', $buyer_email );
|
203 |
+
update_post_meta( $post_id, 'wpsc_txn_id', $txn_id );
|
204 |
+
$mc_gross = $this->ipn_data[ 'mc_gross' ];
|
205 |
+
update_post_meta( $post_id, 'wpsc_total_amount', $mc_gross );
|
206 |
+
update_post_meta( $post_id, 'wpsc_ipaddress', $ip_address );
|
207 |
+
update_post_meta( $post_id, 'wpsc_address', $address );
|
208 |
+
update_post_meta( $post_id, 'wpspsc_phone', $phone );
|
209 |
+
$status = "Paid";
|
210 |
+
update_post_meta( $post_id, 'wpsc_order_status', $status );
|
211 |
+
update_post_meta( $post_id, 'wpsc_applied_coupon', $applied_coupon_code );
|
212 |
+
$product_details = "";
|
213 |
+
$item_counter = 1;
|
214 |
+
$shipping = "";
|
215 |
+
if ( $orig_cart_items ) {
|
216 |
+
foreach ( $orig_cart_items as $item ) {
|
217 |
+
if ( $item_counter != 1 ) {
|
218 |
+
$product_details .= "\n";
|
219 |
+
}
|
220 |
+
$item_total = $item[ 'price' ] * $item[ 'quantity' ];
|
221 |
+
$product_details .= $item[ 'name' ] . " x " . $item[ 'quantity' ] . " - " . $currency_symbol . wpspsc_number_format_price( $item_total ) . "\n";
|
222 |
+
if ( isset($item[ 'file_url' ]) ) {
|
223 |
+
$file_url = base64_decode( $item[ 'file_url' ] );
|
224 |
+
$product_details .= "Download Link: " . $file_url . "\n";
|
225 |
+
}
|
226 |
+
if ( ! empty( $item[ 'shipping' ] ) ) {
|
227 |
+
$shipping += $item[ 'shipping' ] * $item[ 'quantity' ];
|
228 |
+
}
|
229 |
+
$item_counter ++;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
if ( empty( $shipping ) ) {
|
233 |
+
$shipping = "0.00";
|
234 |
+
} else {
|
235 |
+
$baseShipping = get_option( 'cart_base_shipping_cost' );
|
236 |
+
$shipping = $shipping + $baseShipping;
|
237 |
+
$shipping = wpspsc_number_format_price( $shipping );
|
238 |
+
}
|
239 |
+
update_post_meta( $post_id, 'wpsc_shipping_amount', $shipping );
|
240 |
+
update_post_meta( $post_id, 'wpspsc_items_ordered', $product_details );
|
241 |
+
|
242 |
+
$args = array();
|
243 |
+
$args[ 'product_details' ] = $product_details;
|
244 |
+
$args[ 'order_id' ] = $post_id;
|
245 |
+
$args[ 'coupon_code' ] = $applied_coupon_code;
|
246 |
+
$args[ 'address' ] = $address;
|
247 |
+
$args[ 'payer_email' ] = $buyer_email;
|
248 |
+
|
249 |
+
$from_email = get_option( 'wpspc_buyer_from_email' );
|
250 |
+
$subject = get_option( 'wpspc_buyer_email_subj' );
|
251 |
+
$subject = wpspc_apply_dynamic_tags_on_email( $subject, $this->ipn_data, $args );
|
252 |
+
|
253 |
+
$body = get_option( 'wpspc_buyer_email_body' );
|
254 |
+
$args[ 'email_body' ] = $body;
|
255 |
+
$body = wpspc_apply_dynamic_tags_on_email( $body, $this->ipn_data, $args );
|
256 |
+
|
257 |
+
$this->debug_log( 'Applying filter - wspsc_buyer_notification_email_body', true );
|
258 |
+
$body = apply_filters( 'wspsc_buyer_notification_email_body', $body, $this->ipn_data, $cart_items );
|
259 |
+
|
260 |
+
$headers = 'From: ' . $from_email . "\r\n";
|
261 |
+
if ( ! empty( $buyer_email ) ) {
|
262 |
+
if ( get_option( 'wpspc_send_buyer_email' ) ) {
|
263 |
+
wp_mail( $buyer_email, $subject, $body, $headers );
|
264 |
+
$this->debug_log( 'Product Email successfully sent to ' . $buyer_email, true );
|
265 |
+
update_post_meta( $post_id, 'wpsc_buyer_email_sent', 'Email sent to: ' . $buyer_email );
|
266 |
+
}
|
267 |
+
}
|
268 |
+
$notify_email = get_option( 'wpspc_notify_email_address' );
|
269 |
+
$seller_email_subject = get_option( 'wpspc_seller_email_subj' );
|
270 |
+
$seller_email_subject = wpspc_apply_dynamic_tags_on_email( $seller_email_subject, $this->ipn_data, $args );
|
271 |
+
|
272 |
+
$seller_email_body = get_option( 'wpspc_seller_email_body' );
|
273 |
+
$args[ 'email_body' ] = $seller_email_body;
|
274 |
+
$seller_email_body = wpspc_apply_dynamic_tags_on_email( $seller_email_body, $this->ipn_data, $args );
|
275 |
+
|
276 |
+
$this->debug_log( 'Applying filter - wspsc_seller_notification_email_body', true );
|
277 |
+
$seller_email_body = apply_filters( 'wspsc_seller_notification_email_body', $seller_email_body, $this->ipn_data, $cart_items );
|
278 |
+
|
279 |
+
if ( ! empty( $notify_email ) ) {
|
280 |
+
if ( get_option( 'wpspc_send_seller_email' ) ) {
|
281 |
+
wp_mail( $notify_email, $seller_email_subject, $seller_email_body, $headers );
|
282 |
+
$this->debug_log( 'Notify Email successfully sent to ' . $notify_email, true );
|
283 |
+
}
|
284 |
+
}
|
285 |
+
|
286 |
+
|
287 |
+
/* * ** Affiliate plugin integratin *** */
|
288 |
+
$this->debug_log( 'Updating Affiliate Database Table with Sales Data if Using the WP Affiliate Platform Plugin.', true );
|
289 |
+
if ( function_exists( 'wp_aff_platform_install' ) ) {
|
290 |
+
$this->debug_log( 'WP Affiliate Platform is installed, registering sale...', true );
|
291 |
+
$referrer = $custom_values[ 'ap_id' ];
|
292 |
+
$sale_amount = $this->ipn_data[ 'mc_gross' ];
|
293 |
+
if ( ! empty( $referrer ) ) {
|
294 |
+
do_action( 'wp_affiliate_process_cart_commission', array( "referrer" => $referrer, "sale_amt" => $sale_amount, "txn_id" => $txn_id, "buyer_email" => $buyer_email ) );
|
295 |
+
|
296 |
+
$message = 'The sale has been registered in the WP Affiliates Platform Database for referrer: ' . $referrer . ' for sale amount: ' . $sale_amount;
|
297 |
+
$this->debug_log( $message, true );
|
298 |
+
} else {
|
299 |
+
$this->debug_log( 'No Referrer Found. This is not an affiliate sale', true );
|
300 |
+
}
|
301 |
+
} else {
|
302 |
+
$this->debug_log( 'Not Using the WP Affiliate Platform Plugin.', true );
|
303 |
+
}
|
304 |
+
|
305 |
+
do_action( 'wpspc_paypal_ipn_processed', $this->ipn_data, $this );
|
306 |
+
|
307 |
+
//Empty any incomplete old cart orders.
|
308 |
+
wspsc_clean_incomplete_old_cart_orders();
|
309 |
+
|
310 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
312 |
+
|
313 |
+
function validate_ipn() {
|
314 |
+
//Generate the post string from the _POST vars aswell as load the _POST vars into an array
|
315 |
+
$post_string = '';
|
316 |
+
foreach ( $_POST as $field => $value ) {
|
317 |
+
$this->ipn_data[ "$field" ] = $value;
|
318 |
+
$post_string .= $field . '=' . urlencode( stripslashes( $value ) ) . '&';
|
319 |
+
}
|
320 |
+
|
321 |
+
$this->post_string = $post_string;
|
322 |
+
$this->debug_log( 'Post string : ' . $this->post_string, true );
|
323 |
+
|
324 |
+
//IPN validation check
|
325 |
+
if ( $this->validate_ipn_using_remote_post() ) {
|
326 |
+
//We can also use an alternative validation using the validate_ipn_using_curl() function
|
327 |
+
return true;
|
328 |
+
} else {
|
329 |
+
return false;
|
330 |
+
}
|
331 |
+
}
|
332 |
+
|
333 |
+
function validate_ipn_using_remote_post() {
|
334 |
+
$this->debug_log( 'Checking if PayPal IPN response is valid', true );
|
335 |
+
|
336 |
+
// Get received values from post data
|
337 |
+
$validate_ipn = array( 'cmd' => '_notify-validate' );
|
338 |
+
$validate_ipn += wp_unslash( $_POST );
|
339 |
+
|
340 |
+
// Send back post vars to paypal
|
341 |
+
$params = array(
|
342 |
+
'body' => $validate_ipn,
|
343 |
+
'timeout' => 60,
|
344 |
+
'httpversion' => '1.1',
|
345 |
+
'compress' => false,
|
346 |
+
'decompress' => false,
|
347 |
+
'user-agent' => 'Simple PayPal Shopping Cart/' . WP_CART_VERSION
|
348 |
+
);
|
349 |
+
|
350 |
+
// Post back to get a response.
|
351 |
+
$connection_url = $this->sandbox_mode ? 'https://www.sandbox.paypal.com/cgi-bin/webscr' : 'https://www.paypal.com/cgi-bin/webscr';
|
352 |
+
$this->debug_log( 'Connecting to: ' . $connection_url, true );
|
353 |
+
$response = wp_safe_remote_post( $connection_url, $params );
|
354 |
+
|
355 |
+
//The following two lines can be used for debugging
|
356 |
+
//$this->debug_log( 'IPN Request: ' . print_r( $params, true ) , true);
|
357 |
+
//$this->debug_log( 'IPN Response: ' . print_r( $response, true ), true);
|
358 |
+
// Check to see if the request was valid.
|
359 |
+
if ( ! is_wp_error( $response ) && strstr( $response[ 'body' ], 'VERIFIED' ) ) {
|
360 |
+
$this->debug_log( 'IPN successfully verified.', true );
|
361 |
+
return true;
|
362 |
+
}
|
363 |
+
|
364 |
+
// Invalid IPN transaction. Check the log for details.
|
365 |
+
$this->debug_log( 'IPN validation failed.', false );
|
366 |
+
if ( is_wp_error( $response ) ) {
|
367 |
+
$this->debug_log( 'Error response: ' . $response->get_error_message(), false );
|
368 |
+
}
|
369 |
+
return false;
|
370 |
+
}
|
371 |
+
|
372 |
+
function validate_ipn_smart_checkout() {
|
373 |
+
|
374 |
+
$is_sandbox = get_option( 'wp_shopping_cart_enable_sandbox' );
|
375 |
+
|
376 |
+
if ( $is_sandbox ) {
|
377 |
+
$client_id = get_option( 'wpspc_pp_test_client_id' );
|
378 |
+
$secret = get_option( 'wpspc_pp_test_secret' );
|
379 |
+
$api_base = 'https://api.sandbox.paypal.com';
|
380 |
+
} else {
|
381 |
+
$client_id = get_option( 'wpspc_pp_live_client_id' );
|
382 |
+
$secret = get_option( 'wpspc_pp_live_secret' );
|
383 |
+
$api_base = 'https://api.paypal.com';
|
384 |
+
}
|
385 |
+
|
386 |
+
$wp_request_headers = array(
|
387 |
+
'Accept' => 'application/json',
|
388 |
+
'Authorization' => 'Basic ' . base64_encode( $client_id . ':' . $secret ),
|
389 |
+
);
|
390 |
+
|
391 |
+
$res = wp_remote_request(
|
392 |
+
$api_base . '/v1/oauth2/token', array(
|
393 |
+
'method' => 'POST',
|
394 |
+
'headers' => $wp_request_headers,
|
395 |
+
'body' => 'grant_type=client_credentials',
|
396 |
+
)
|
397 |
+
);
|
398 |
+
|
399 |
+
$code = wp_remote_retrieve_response_code( $res );
|
400 |
+
|
401 |
+
if ( $code !== 200 ) {
|
402 |
+
//Some error occured.
|
403 |
+
$body = wp_remote_retrieve_body( $res );
|
404 |
+
return sprintf( __( 'Error occured during payment verification. Error code: %d. Message: %s', "wordpress-simple-paypal-shopping-cart" ), $code, $body );
|
405 |
+
}
|
406 |
+
|
407 |
+
$body = wp_remote_retrieve_body( $res );
|
408 |
+
$body = json_decode( $body );
|
409 |
+
|
410 |
+
$token = $body->access_token;
|
411 |
+
|
412 |
+
$wp_request_headers = array(
|
413 |
+
'Accept' => 'application/json',
|
414 |
+
'Authorization' => 'Bearer ' . $token,
|
415 |
+
);
|
416 |
+
|
417 |
+
$res = wp_remote_request(
|
418 |
+
$api_base . '/v1/payments/payment/' . $this->ipn_data[ 'pay_id' ], array(
|
419 |
+
'method' => 'GET',
|
420 |
+
'headers' => $wp_request_headers,
|
421 |
+
)
|
422 |
+
);
|
423 |
+
|
424 |
+
$code = wp_remote_retrieve_response_code( $res );
|
425 |
+
|
426 |
+
if ( $code !== 200 ) {
|
427 |
+
//Some error occured.
|
428 |
+
$body = wp_remote_retrieve_body( $res );
|
429 |
+
return sprintf( __( 'Error occured during payment verification. Error code: %d. Message: %s', "wordpress-simple-paypal-shopping-cart" ), $code, $body );
|
430 |
+
}
|
431 |
+
|
432 |
+
$body = wp_remote_retrieve_body( $res );
|
433 |
+
$body = json_decode( $body );
|
434 |
+
|
435 |
+
//check payment details
|
436 |
+
if ( $body->transactions[ 0 ]->amount->total === $this->ipn_data[ 'mc_gross' ] &&
|
437 |
+
$body->transactions[ 0 ]->amount->currency === $this->ipn_data[ 'mc_currency' ] ) {
|
438 |
+
//payment is valid
|
439 |
+
return true;
|
440 |
+
} else {
|
441 |
+
//payment is invalid
|
442 |
+
return sprintf( __( "Payment check failed: invalid amount received. Expected %s %s, got %s %s.", "wordpress-simple-paypal-shopping-cart" ), $this->ipn_data[ 'mc_gross' ], $this->ipn_data[ 'mc_currency' ], $body->transactions[ 0 ]->amount->total, $body->transactions[ 0 ]->amount->currency );
|
443 |
+
}
|
444 |
+
}
|
445 |
+
|
446 |
+
function create_ipn_from_smart_checkout( $data ) {
|
447 |
+
$ipn[ 'custom' ] = $_SESSION[ 'wp_cart_custom_values' ];
|
448 |
+
$ipn[ 'pay_id' ] = $data[ 'id' ];
|
449 |
+
$ipn[ 'create_time' ] = $data[ 'create_time' ];
|
450 |
+
$ipn[ 'txn_id' ] = $data[ 'transactions' ][ 0 ][ 'related_resources' ][ 0 ][ 'sale' ][ 'id' ];
|
451 |
+
$ipn[ 'txn_type' ] = 'cart';
|
452 |
+
$ipn[ 'payment_status' ] = ucfirst( $data[ 'transactions' ][ 0 ][ 'related_resources' ][ 0 ][ 'sale' ][ 'state' ] );
|
453 |
+
$ipn[ 'transaction_subject' ] = '';
|
454 |
+
$ipn[ 'mc_currency' ] = $data[ 'transactions' ][ 0 ][ 'amount' ][ 'currency' ];
|
455 |
+
$ipn[ 'mc_gross' ] = $data[ 'transactions' ][ 0 ][ 'amount' ][ 'total' ];
|
456 |
+
$ipn[ 'receiver_email' ] = get_option( 'cart_paypal_email' );
|
457 |
+
//customer info
|
458 |
+
$ipn[ 'first_name' ] = $data[ 'payer' ][ 'payer_info' ][ 'first_name' ];
|
459 |
+
$ipn[ 'last_name' ] = $data[ 'payer' ][ 'payer_info' ][ 'last_name' ];
|
460 |
+
$ipn[ 'payer_email' ] = $data[ 'payer' ][ 'payer_info' ][ 'email' ];
|
461 |
+
$ipn[ 'address_street' ] = $data[ 'payer' ][ 'payer_info' ][ 'shipping_address' ][ 'line1' ];
|
462 |
+
$ipn[ 'address_city' ] = $data[ 'payer' ][ 'payer_info' ][ 'shipping_address' ][ 'city' ];
|
463 |
+
$ipn[ 'address_state' ] = $data[ 'payer' ][ 'payer_info' ][ 'shipping_address' ][ 'state' ];
|
464 |
+
$ipn[ 'address_zip' ] = $data[ 'payer' ][ 'payer_info' ][ 'shipping_address' ][ 'postal_code' ];
|
465 |
+
$ipn[ 'address_country' ] = $data[ 'payer' ][ 'payer_info' ][ 'shipping_address' ][ 'country_code' ];
|
466 |
+
//items data
|
467 |
+
$i = 1;
|
468 |
+
foreach ( $data[ 'transactions' ][ 0 ][ 'item_list' ][ 'items' ] as $item ) {
|
469 |
+
$ipn[ 'item_number' . $i ] = '';
|
470 |
+
$ipn[ 'item_name' . $i ] = $item[ 'name' ];
|
471 |
+
$ipn[ 'quantity' . $i ] = $item[ 'quantity' ];
|
472 |
+
$ipn[ 'mc_gross_' . $i ] = $item[ 'price' ] * $item[ 'quantity' ];
|
473 |
+
$i ++;
|
474 |
+
}
|
475 |
+
$ipn[ 'num_cart_items' ] = $i - 1;
|
476 |
+
$this->ipn_data = $ipn;
|
477 |
+
return true;
|
478 |
+
}
|
479 |
+
|
480 |
+
function log_ipn_results( $success ) {
|
481 |
+
if ( ! $this->ipn_log )
|
482 |
+
return; // is logging turned off?
|
483 |
+
// Timestamp
|
484 |
+
$text = '[' . date( 'm/d/Y g:i A' ) . '] - ';
|
485 |
+
|
486 |
+
// Success or failure being logged?
|
487 |
+
if ( $success )
|
488 |
+
$text .= "SUCCESS!\n";
|
489 |
+
else
|
490 |
+
$text .= 'FAIL: ' . $this->last_error . "\n";
|
491 |
+
|
492 |
+
// Log the POST variables
|
493 |
+
$text .= "IPN POST Vars from Paypal:\n";
|
494 |
+
foreach ( $this->ipn_data as $key => $value ) {
|
495 |
+
$text .= "$key=$value, ";
|
496 |
+
}
|
497 |
+
|
498 |
+
// Log the response from the paypal server
|
499 |
+
$text .= "\nIPN Response from Paypal Server:\n " . $this->ipn_response;
|
500 |
+
|
501 |
+
// Write to log
|
502 |
+
$fp = fopen( $this->ipn_log_file, 'a' );
|
503 |
+
fwrite( $fp, $text . "\n\n" );
|
504 |
+
|
505 |
+
fclose( $fp ); // close file
|
506 |
}
|
507 |
|
508 |
+
function debug_log( $message, $success, $end = false ) {
|
509 |
+
|
510 |
+
if ( ! $this->ipn_log )
|
511 |
+
return; // is logging turned off?
|
512 |
+
// Timestamp
|
513 |
+
//check if need to convert array to string
|
514 |
+
if ( is_array( $message ) ) {
|
515 |
+
$message = json_encode( $message );
|
516 |
+
}
|
517 |
+
$text = '[' . date( 'm/d/Y g:i A' ) . '] - ' . (($success) ? 'SUCCESS :' : 'FAILURE :') . $message . "\n";
|
518 |
+
|
519 |
+
if ( $end ) {
|
520 |
+
$text .= "\n------------------------------------------------------------------\n\n";
|
521 |
+
}
|
522 |
+
|
523 |
+
// Write to log
|
524 |
+
$fp = fopen( $this->ipn_log_file, 'a' );
|
525 |
+
fwrite( $fp, $text );
|
526 |
+
fclose( $fp ); // close file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
}
|
528 |
+
|
529 |
+
function debug_log_array( $array_to_write, $success, $end = false ) {
|
530 |
+
if ( ! $this->ipn_log )
|
531 |
+
return; // is logging turned off?
|
532 |
+
$text = '[' . date( 'm/d/Y g:i A' ) . '] - ' . (($success) ? 'SUCCESS :' : 'FAILURE :') . "\n";
|
533 |
+
ob_start();
|
534 |
+
print_r( $array_to_write );
|
535 |
+
$var = ob_get_contents();
|
536 |
+
ob_end_clean();
|
537 |
+
$text .= $var;
|
538 |
+
|
539 |
+
if ( $end ) {
|
540 |
+
$text .= "\n------------------------------------------------------------------\n\n";
|
541 |
+
}
|
542 |
+
// Write to log
|
543 |
+
$fp = fopen( $this->ipn_log_file, 'a' );
|
544 |
+
fwrite( $fp, $text );
|
545 |
+
fclose( $fp ); // close filee
|
546 |
+
}
|
547 |
+
|
548 |
}
|
549 |
|
550 |
// Start of IPN handling (script execution)
|
551 |
+
function wpc_handle_paypal_ipn() {
|
552 |
+
$debug_log = "ipn_handle_debug.txt"; // Debug log file name
|
553 |
+
$ipn_handler_instance = new paypal_ipn_handler();
|
554 |
+
|
555 |
+
$debug_enabled = false;
|
556 |
+
$debug = get_option( 'wp_shopping_cart_enable_debug' );
|
557 |
+
if ( $debug ) {
|
558 |
+
$debug_enabled = true;
|
|
|
559 |
}
|
560 |
|
561 |
+
if ( $debug_enabled ) {
|
562 |
+
echo 'Debug is enabled. Check the ' . $debug_log . ' file for debug output.';
|
563 |
+
$ipn_handler_instance->ipn_log = true;
|
564 |
+
//$ipn_handler_instance->ipn_log_file = realpath(dirname(__FILE__)).'/'.$debug_log;
|
|
|
565 |
}
|
566 |
+
$sandbox = get_option( 'wp_shopping_cart_enable_sandbox' );
|
567 |
+
if ( $sandbox ) { // Enable sandbox testing
|
568 |
+
$ipn_handler_instance->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
|
569 |
+
$ipn_handler_instance->sandbox_mode = true;
|
|
|
570 |
}
|
571 |
+
$ipn_handler_instance->debug_log( 'Paypal Class Initiated by ' . $_SERVER[ 'REMOTE_ADDR' ], true );
|
572 |
// Validate the IPN
|
573 |
+
if ( $ipn_handler_instance->validate_ipn() ) {
|
574 |
+
$ipn_handler_instance->debug_log( 'Creating product Information to send.', true );
|
575 |
+
if ( ! $ipn_handler_instance->validate_and_dispatch_product() ) {
|
576 |
+
$ipn_handler_instance->debug_log( 'IPN product validation failed.', false );
|
577 |
+
}
|
|
|
|
|
578 |
}
|
579 |
+
$ipn_handler_instance->debug_log( 'Paypal class finished.', true, true );
|
580 |
}
|
|
readme.txt
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
Contributors: Tips and Tricks HQ, Ruhul Amin, wptipsntricks, mbrsolution, mra13
|
3 |
Donate link: https://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell, selling, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, sell service, digital downloads, paypal, paypal cart, e-shop, compact cart, coupon, discount
|
5 |
-
Requires at least:
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 4.
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Very easy to use Simple WordPress PayPal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
|
@@ -27,6 +27,10 @@ https://www.youtube.com/watch?v=gPvXac_j_lI
|
|
27 |
|
28 |
This plugin is a lightweight solution (with minimal number of lines of code and minimal options) so it doesn't slow down your site.
|
29 |
|
|
|
|
|
|
|
|
|
30 |
It can be integrated with the NextGen Photo Gallery plugin to accommodate the selling of photographs from your gallery.
|
31 |
|
32 |
WP simple PayPal Cart Plugin, interfaces with the PayPal sandbox to allow for testing.
|
@@ -47,6 +51,7 @@ or
|
|
47 |
* Your customers will automatically get an email with the media file that they paid for.
|
48 |
* Show a nicely formatted product display box on the fly using a simple shortcode.
|
49 |
* You can use PayPal sandbox to do testing if needed (before you go live).
|
|
|
50 |
* Collect special instructions from your customers on the PayPal checkout page.
|
51 |
* The orders menu will show you all the orders that you have received from your site.
|
52 |
* Ability to configure an email that will get sent to your buyers after they purchase your product.
|
@@ -82,6 +87,7 @@ The following language translations are already available:
|
|
82 |
* German
|
83 |
* Spanish
|
84 |
* French
|
|
|
85 |
* Italian
|
86 |
* Japanese
|
87 |
* Polish
|
@@ -197,6 +203,46 @@ None
|
|
197 |
|
198 |
== Changelog ==
|
199 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
= 4.4.0 =
|
201 |
- The order date is now included in the exported CSV file.
|
202 |
- Updated the German language file. Thanks to Oliver Juwig.
|
2 |
Contributors: Tips and Tricks HQ, Ruhul Amin, wptipsntricks, mbrsolution, mra13
|
3 |
Donate link: https://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell, selling, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, sell service, digital downloads, paypal, paypal cart, e-shop, compact cart, coupon, discount
|
5 |
+
Requires at least: 4.7
|
6 |
+
Tested up to: 5.5
|
7 |
+
Stable tag: 4.5.0
|
8 |
License: GPLv2 or later
|
9 |
|
10 |
Very easy to use Simple WordPress PayPal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
|
27 |
|
28 |
This plugin is a lightweight solution (with minimal number of lines of code and minimal options) so it doesn't slow down your site.
|
29 |
|
30 |
+
The plugin also has an option to use the smart PayPal payment buttons. You can enable the PayPal smart button option in the settings menu of the plugin. The following video shows a checkout demo using PayPal smart button.
|
31 |
+
|
32 |
+
https://www.youtube.com/watch?v=m0yDWDmtpKI
|
33 |
+
|
34 |
It can be integrated with the NextGen Photo Gallery plugin to accommodate the selling of photographs from your gallery.
|
35 |
|
36 |
WP simple PayPal Cart Plugin, interfaces with the PayPal sandbox to allow for testing.
|
51 |
* Your customers will automatically get an email with the media file that they paid for.
|
52 |
* Show a nicely formatted product display box on the fly using a simple shortcode.
|
53 |
* You can use PayPal sandbox to do testing if needed (before you go live).
|
54 |
+
* Option to use the smart payment buttons of PayPal. Allows the customers to checkout in a popup window (using a credit card, paypal or paypal credit).
|
55 |
* Collect special instructions from your customers on the PayPal checkout page.
|
56 |
* The orders menu will show you all the orders that you have received from your site.
|
57 |
* Ability to configure an email that will get sent to your buyers after they purchase your product.
|
87 |
* German
|
88 |
* Spanish
|
89 |
* French
|
90 |
+
* Breton
|
91 |
* Italian
|
92 |
* Japanese
|
93 |
* Polish
|
203 |
|
204 |
== Changelog ==
|
205 |
|
206 |
+
= 4.5.0 =
|
207 |
+
- Added a new action hook to allow affiliate plugin integration with the PayPal smart checkout option.
|
208 |
+
- The compact cart shortcode output can be translated fully.
|
209 |
+
- Completed testing on WP 5.5
|
210 |
+
|
211 |
+
= 4.4.9 =
|
212 |
+
- Smart Checkout fix with certain coupon code application (some discount amount was giving an invalid amount error).
|
213 |
+
- Added link to smart checkout setup documentation.
|
214 |
+
|
215 |
+
= 4.4.8 =
|
216 |
+
- Added CSS class to the remove item table data.
|
217 |
+
- Updated the code related to quantity change (using the up/down arrows) to work better.
|
218 |
+
- Fix: Undefined index notices.
|
219 |
+
- Added a new utility function to write to log file.
|
220 |
+
|
221 |
+
= 4.4.7 =
|
222 |
+
- Fixed the "Order ID does not exist in IPN Notification" issue with smart paypal checkout option for some sites.
|
223 |
+
|
224 |
+
= 4.4.6 =
|
225 |
+
- Changed the quantity input field to be a "number" type field. Customers will be able to change the number value easily.
|
226 |
+
- The session for the shopping cart is only started on the front-end.
|
227 |
+
|
228 |
+
= 4.4.5 =
|
229 |
+
- Fixed issues with custom fields when using Collect Customer Input addon.
|
230 |
+
|
231 |
+
= 4.4.4 =
|
232 |
+
- More texts are now translatable. POT file updated.
|
233 |
+
- Added more filter hooks so the customer Input addon fields are now exported to CSV as well.
|
234 |
+
|
235 |
+
= 4.4.3 =
|
236 |
+
- Added button customization options (in the advanced settings) for the smart paypal checkout button.
|
237 |
+
|
238 |
+
= 4.4.2 =
|
239 |
+
- Added PayPal smart button configuration documentation
|
240 |
+
https://www.tipsandtricks-hq.com/ecommerce/enabling-smart-button-checkout-setup-and-configuration-4568
|
241 |
+
|
242 |
+
= 4.4.1 =
|
243 |
+
- Added a new checkout option that uses the smart PayPal payment button. You can enable it from the advanced settings menu.
|
244 |
+
- Added Breton language files. Thanks to Florian for submitting the language files.
|
245 |
+
|
246 |
= 4.4.0 =
|
247 |
- The order date is now included in the exported CSV file.
|
248 |
- Updated the German language file. Thanks to Oliver Juwig.
|
wp_shopping_cart.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
/*
|
4 |
Plugin Name: WP Simple Paypal Shopping cart
|
5 |
-
Version: 4.
|
6 |
Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
|
7 |
Author: Tips and Tricks HQ, Ruhul Amin, mra13
|
8 |
Author URI: https://www.tipsandtricks-hq.com/
|
@@ -13,39 +13,42 @@
|
|
13 |
|
14 |
//Slug - wspsc
|
15 |
|
16 |
-
if (!defined('ABSPATH')) {//Exit if accessed directly
|
17 |
exit;
|
18 |
}
|
19 |
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
}
|
|
|
29 |
|
30 |
-
|
31 |
-
define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
|
32 |
-
define('WP_CART_PATH', plugin_dir_path(__FILE__));
|
33 |
-
define('WP_CART_URL', plugins_url('', __FILE__));
|
34 |
-
define('WP_CART_SITE_URL', site_url());
|
35 |
-
define('WP_CART_LIVE_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
|
36 |
-
define('WP_CART_SANDBOX_PAYPAL_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr');
|
37 |
-
define('WP_CART_CURRENCY_SYMBOL', get_option('cart_currency_symbol'));
|
38 |
-
if (!defined('WP_CART_MANAGEMENT_PERMISSION')) {//This will allow the user to define custom capability for this constant in wp-config file
|
39 |
-
define('WP_CART_MANAGEMENT_PERMISSION', 'manage_options');
|
40 |
-
}
|
41 |
-
define('WP_CART_MAIN_MENU_SLUG', 'wspsc-menu-main');
|
42 |
-
|
43 |
-
|
44 |
-
// loading language files
|
45 |
//Set up localisation. First loaded overrides strings present in later loaded file
|
46 |
-
$locale = apply_filters('plugin_locale', get_locale(), 'wordpress-simple-paypal-shopping-cart');
|
47 |
-
load_textdomain('wordpress-simple-paypal-shopping-cart', WP_LANG_DIR . "/wordpress-simple-paypal-shopping-cart-$locale.mo");
|
48 |
-
load_plugin_textdomain('wordpress-simple-paypal-shopping-cart', false, WP_CART_FOLDER . '/languages');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
include_once('wp_shopping_cart_utility_functions.php');
|
51 |
include_once('wp_shopping_cart_shortcodes.php');
|
@@ -56,404 +59,456 @@ include_once('includes/wspsc-cart-functions.php');
|
|
56 |
include_once('includes/admin/wp_shopping_cart_menu_main.php');
|
57 |
include_once('includes/admin/wp_shopping_cart_tinymce.php');
|
58 |
|
59 |
-
function always_show_cart_handler($atts) {
|
60 |
-
return print_wp_shopping_cart($atts);
|
61 |
}
|
62 |
|
63 |
-
function show_wp_shopping_cart_handler($atts) {
|
64 |
$output = "";
|
65 |
-
if (cart_not_empty()) {
|
66 |
-
|
67 |
}
|
68 |
return $output;
|
69 |
}
|
70 |
|
71 |
-
function shopping_cart_show($content) {
|
72 |
-
if (strpos($content, "<!--show-wp-shopping-cart-->") !== FALSE) {
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
}
|
80 |
return $content;
|
81 |
}
|
82 |
|
83 |
// Reset cart option
|
84 |
-
if (isset($_REQUEST["reset_wp_cart"]) && !empty($_REQUEST["reset_wp_cart"])) {
|
85 |
reset_wp_cart();
|
86 |
}
|
87 |
|
88 |
//Clear the cart if the customer landed on the thank you page (if this option is enabled)
|
89 |
-
if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page')) {
|
90 |
//TODO - remove this field altogether later. Cart will always be reset using query prameter on the thank you page.
|
91 |
-
if (get_option('cart_return_from_paypal_url') == cart_current_page_url()) {
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
}
|
95 |
|
96 |
function reset_wp_cart() {
|
97 |
-
if (!isset($_SESSION['simpleCart'])) {
|
98 |
-
|
99 |
}
|
100 |
-
$products = $_SESSION['simpleCart'];
|
101 |
-
if (!is_array($products)) {
|
102 |
-
|
103 |
}
|
104 |
-
foreach ($products as $key => $item) {
|
105 |
-
|
106 |
}
|
107 |
-
$_SESSION['simpleCart'] = $products;
|
108 |
-
unset($_SESSION['simple_cart_id']);
|
109 |
-
unset($_SESSION['wpspsc_cart_action_msg']);
|
110 |
-
unset($_SESSION['wpspsc_discount_applied_once']);
|
111 |
-
unset($_SESSION['wpspsc_applied_coupon_code']);
|
112 |
}
|
113 |
|
114 |
function wpspc_cart_actions_handler() {
|
115 |
-
unset($_SESSION['wpspsc_cart_action_msg']);
|
116 |
-
|
117 |
-
if (isset($_POST['addcart'])) {//Add to cart action
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
} else if (isset($_POST['cquantity'])) {
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
} else if (isset($_POST['delcart'])) {
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
} else if (isset($_POST['wpspsc_coupon_code'])) {
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
}
|
302 |
}
|
303 |
|
304 |
function wp_cart_add_custom_field() {
|
305 |
-
$_SESSION['wp_cart_custom_values']
|
306 |
-
$custom_field_val
|
307 |
-
$name
|
308 |
-
$value
|
309 |
-
$custom_field_val
|
310 |
-
|
311 |
-
$clientip = $_SERVER['REMOTE_ADDR'];
|
312 |
-
if (!empty($clientip)) {
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
}
|
317 |
-
|
318 |
-
if (function_exists('wp_aff_platform_install')) {
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
}
|
330 |
-
|
331 |
-
if (isset($_SESSION['wpspsc_applied_coupon_code'])) {
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
}
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
|
|
|
|
|
|
340 |
return $output;
|
341 |
}
|
342 |
|
343 |
-
function print_wp_cart_button_new($content) {
|
344 |
-
$addcart = get_option('addToCartButtonName');
|
345 |
-
if (
|
346 |
-
|
347 |
|
348 |
$pattern = '#\[wp_cart:.+:price:.+:end]#';
|
349 |
-
preg_match_all($pattern, $content, $matches);
|
350 |
-
|
351 |
-
foreach ($matches[0] as $match) {
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
}
|
458 |
return $content;
|
459 |
}
|
@@ -465,18 +520,18 @@ function wp_cart_add_read_form_javascript() {
|
|
465 |
<script type="text/javascript">
|
466 |
<!--
|
467 |
//
|
468 |
-
function ReadForm (obj1, tst)
|
469 |
-
{
|
470 |
// Read the user form
|
471 |
var i,j,pos;
|
472 |
-
val_total="";val_combo="";
|
473 |
-
|
474 |
-
for (i=0; i<obj1.length; i++)
|
475 |
-
{
|
476 |
// run entire form
|
477 |
obj = obj1.elements[i]; // a form element
|
478 |
-
|
479 |
-
if (obj.type == "select-one")
|
480 |
{ // just selects
|
481 |
if (obj.name == "quantity" ||
|
482 |
obj.name == "amount") continue;
|
@@ -493,236 +548,236 @@ function wp_cart_add_read_form_javascript() {
|
|
493 |
</script>';
|
494 |
}
|
495 |
|
496 |
-
function print_wp_cart_button_for_product($name, $price, $shipping = 0, $var1 = '', $var2 = '', $var3 = '', $atts = array()) {
|
497 |
-
$addcart = get_option('addToCartButtonName');
|
498 |
-
if (
|
499 |
-
|
500 |
}
|
501 |
|
502 |
$var_output = "";
|
503 |
-
if (!empty($var1)) {
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
}
|
513 |
-
if (!empty($var2)) {
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
}
|
523 |
-
if (!empty($var3)) {
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
}
|
533 |
-
|
534 |
-
$replacement
|
535 |
-
$replacement
|
536 |
-
$replacement
|
537 |
-
if (!empty($var_output)) {//Show variation
|
538 |
-
|
539 |
-
}
|
540 |
-
|
541 |
-
if (isset($atts['button_image']) && !empty($atts['button_image'])) {
|
542 |
-
|
543 |
-
|
544 |
-
} else if (isset($atts['button_text']) && !empty($atts['button_text'])) {
|
545 |
-
|
546 |
-
|
547 |
} else {
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
}
|
557 |
-
|
558 |
-
$replacement
|
559 |
-
$replacement
|
560 |
-
$replacement
|
561 |
-
$replacement
|
562 |
-
$replacement
|
563 |
-
$replacement
|
564 |
-
isset($atts['item_number']) ? $item_num
|
565 |
-
$replacement
|
566 |
-
|
567 |
-
if (isset($atts['file_url'])) {
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
}
|
572 |
-
if (isset($atts['thumbnail'])) {
|
573 |
-
|
574 |
-
}
|
575 |
-
if (isset($atts['stamp_pdf'])) {
|
576 |
-
|
577 |
-
}
|
578 |
-
|
579 |
-
$p_key = get_option('wspsc_private_key_one');
|
580 |
-
if (empty($p_key)) {
|
581 |
-
|
582 |
-
|
583 |
-
}
|
584 |
-
$hash_one
|
585 |
-
$replacement
|
586 |
-
|
587 |
-
$hash_two
|
588 |
-
$replacement
|
589 |
-
|
590 |
-
$replacement
|
591 |
-
$replacement
|
592 |
return $replacement;
|
593 |
}
|
594 |
|
595 |
function cart_not_empty() {
|
596 |
$count = 0;
|
597 |
-
if (isset($_SESSION['simpleCart']) && is_array($_SESSION['simpleCart'])) {
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
} else
|
602 |
-
|
603 |
}
|
604 |
|
605 |
-
function print_payment_currency($price, $symbol, $decimal = '.') {
|
606 |
$formatted_price = '';
|
607 |
-
$formatted_price = apply_filters('wspsc_print_formatted_price', $formatted_price, $price, $symbol);
|
608 |
-
if (!empty($formatted_price)) {
|
609 |
-
|
610 |
}
|
611 |
-
$formatted_price = $symbol . number_format($price, 2, $decimal, ',');
|
612 |
return $formatted_price;
|
613 |
}
|
614 |
|
615 |
function cart_current_page_url() {
|
616 |
$pageURL = 'http';
|
617 |
-
if (!isset($_SERVER["HTTPS"])) {
|
618 |
-
|
619 |
}
|
620 |
-
if (!isset($_SERVER["SERVER_PORT"])) {
|
621 |
-
|
622 |
}
|
623 |
|
624 |
-
if ($_SERVER["HTTPS"] == "on") {
|
625 |
-
|
626 |
}
|
627 |
$pageURL .= "://";
|
628 |
-
if ($_SERVER["SERVER_PORT"] != "80") {
|
629 |
-
|
630 |
} else {
|
631 |
-
|
632 |
}
|
633 |
return $pageURL;
|
634 |
}
|
635 |
|
636 |
function simple_cart_total() {
|
637 |
$grand_total = 0;
|
638 |
-
foreach ((array) $_SESSION['simpleCart'] as $item) {
|
639 |
-
|
640 |
-
|
641 |
}
|
642 |
$grand_total = $total + $item_total_shipping;
|
643 |
-
return wpspsc_number_format_price($grand_total);
|
644 |
}
|
645 |
|
646 |
function wp_paypal_shopping_cart_load_widgets() {
|
647 |
-
register_widget('WP_PayPal_Cart_Widget');
|
648 |
}
|
649 |
|
650 |
class WP_PayPal_Cart_Widget extends WP_Widget {
|
651 |
|
652 |
function __construct() {
|
653 |
-
|
654 |
}
|
655 |
|
656 |
-
function form($instance) {
|
657 |
-
|
658 |
}
|
659 |
|
660 |
-
function update($new_instance, $old_instance) {
|
661 |
-
|
662 |
}
|
663 |
|
664 |
-
function widget($args, $instance) {
|
665 |
-
|
666 |
-
|
667 |
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
}
|
677 |
|
678 |
}
|
679 |
|
680 |
function wspsc_admin_side_enqueue_scripts() {
|
681 |
-
if (isset($_GET['page']) && $_GET['page'] == 'wspsc-discounts') { //simple paypal shopping cart discount page
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
}
|
686 |
}
|
687 |
|
688 |
function wspsc_admin_side_styles() {
|
689 |
-
wp_enqueue_style('wspsc-admin-style', WP_CART_URL . '/assets/wspsc-admin-styles.css', array(), WP_CART_VERSION);
|
690 |
}
|
691 |
|
692 |
function wspsc_front_side_enqueue_scripts() {
|
693 |
-
wp_enqueue_style('wspsc-style', WP_CART_URL . '/wp_shopping_cart_style.css', array(), WP_CART_VERSION);
|
694 |
}
|
695 |
|
696 |
function wpspc_plugin_install() {
|
697 |
wpspc_run_activation();
|
698 |
}
|
699 |
|
700 |
-
register_activation_hook(__FILE__, 'wpspc_plugin_install');
|
701 |
|
702 |
// Add the settings link
|
703 |
-
function wp_simple_cart_add_settings_link($links, $file) {
|
704 |
-
if ($file == plugin_basename(__FILE__)) {
|
705 |
-
|
706 |
-
|
707 |
}
|
708 |
return $links;
|
709 |
}
|
710 |
|
711 |
-
add_filter('plugin_action_links', 'wp_simple_cart_add_settings_link', 10, 2);
|
712 |
|
713 |
-
add_action('widgets_init', 'wp_paypal_shopping_cart_load_widgets');
|
714 |
|
715 |
-
add_action('init', 'wp_cart_init_handler');
|
716 |
-
add_action('admin_init', 'wp_cart_admin_init_handler');
|
717 |
|
718 |
-
add_filter('the_content', 'print_wp_cart_button_new', 11);
|
719 |
-
add_filter('the_content', 'shopping_cart_show');
|
720 |
|
721 |
-
if (!is_admin()) {
|
722 |
-
add_filter('widget_text', 'do_shortcode');
|
723 |
}
|
724 |
|
725 |
-
add_action('wp_head', 'wp_cart_add_read_form_javascript');
|
726 |
-
add_action('wp_enqueue_scripts', 'wspsc_front_side_enqueue_scripts');
|
727 |
-
add_action('admin_enqueue_scripts', 'wspsc_admin_side_enqueue_scripts');
|
728 |
-
add_action('admin_print_styles', 'wspsc_admin_side_styles');
|
2 |
|
3 |
/*
|
4 |
Plugin Name: WP Simple Paypal Shopping cart
|
5 |
+
Version: 4.5.0
|
6 |
Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
|
7 |
Author: Tips and Tricks HQ, Ruhul Amin, mra13
|
8 |
Author URI: https://www.tipsandtricks-hq.com/
|
13 |
|
14 |
//Slug - wspsc
|
15 |
|
16 |
+
if ( ! defined( 'ABSPATH' ) ) {//Exit if accessed directly
|
17 |
exit;
|
18 |
}
|
19 |
|
20 |
+
define( 'WP_CART_VERSION', '4.5.0' );
|
21 |
+
define( 'WP_CART_FOLDER', dirname( plugin_basename( __FILE__ ) ) );
|
22 |
+
define( 'WP_CART_PATH', plugin_dir_path( __FILE__ ) );
|
23 |
+
define( 'WP_CART_URL', plugins_url( '', __FILE__ ) );
|
24 |
+
define( 'WP_CART_SITE_URL', site_url() );
|
25 |
+
define( 'WP_CART_LIVE_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr' );
|
26 |
+
define( 'WP_CART_SANDBOX_PAYPAL_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr' );
|
27 |
+
define( 'WP_CART_CURRENCY_SYMBOL', get_option( 'cart_currency_symbol' ) );
|
28 |
+
if ( ! defined( 'WP_CART_MANAGEMENT_PERMISSION' ) ) {//This will allow the user to define custom capability for this constant in wp-config file
|
29 |
+
define( 'WP_CART_MANAGEMENT_PERMISSION', 'manage_options' );
|
30 |
}
|
31 |
+
define( 'WP_CART_MAIN_MENU_SLUG', 'wspsc-menu-main' );
|
32 |
|
33 |
+
//Loading language files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
//Set up localisation. First loaded overrides strings present in later loaded file
|
35 |
+
$locale = apply_filters( 'plugin_locale', get_locale(), 'wordpress-simple-paypal-shopping-cart' );
|
36 |
+
load_textdomain( 'wordpress-simple-paypal-shopping-cart', WP_LANG_DIR . "/wordpress-simple-paypal-shopping-cart-$locale.mo" );
|
37 |
+
load_plugin_textdomain( 'wordpress-simple-paypal-shopping-cart', false, WP_CART_FOLDER . '/languages' );
|
38 |
+
|
39 |
+
//PHP session
|
40 |
+
if ( ! is_admin() || wp_doing_ajax() ) {
|
41 |
+
//Only use session for front-end and ajax.
|
42 |
+
if ( version_compare( PHP_VERSION, '5.4.0' ) >= 0 ) {
|
43 |
+
if ( session_status() == PHP_SESSION_NONE ) {
|
44 |
+
session_start();
|
45 |
+
}
|
46 |
+
} else {
|
47 |
+
if ( session_id() == '' ) {
|
48 |
+
session_start();
|
49 |
+
}
|
50 |
+
}
|
51 |
+
}
|
52 |
|
53 |
include_once('wp_shopping_cart_utility_functions.php');
|
54 |
include_once('wp_shopping_cart_shortcodes.php');
|
59 |
include_once('includes/admin/wp_shopping_cart_menu_main.php');
|
60 |
include_once('includes/admin/wp_shopping_cart_tinymce.php');
|
61 |
|
62 |
+
function always_show_cart_handler( $atts ) {
|
63 |
+
return print_wp_shopping_cart( $atts );
|
64 |
}
|
65 |
|
66 |
+
function show_wp_shopping_cart_handler( $atts ) {
|
67 |
$output = "";
|
68 |
+
if ( cart_not_empty() ) {
|
69 |
+
$output = print_wp_shopping_cart( $atts );
|
70 |
}
|
71 |
return $output;
|
72 |
}
|
73 |
|
74 |
+
function shopping_cart_show( $content ) {
|
75 |
+
if ( strpos( $content, "<!--show-wp-shopping-cart-->" ) !== FALSE ) {
|
76 |
+
if ( cart_not_empty() ) {
|
77 |
+
$content = preg_replace( '/<p>\s*<!--(.*)-->\s*<\/p>/i', "<!--$1-->", $content );
|
78 |
+
$matchingText = '<!--show-wp-shopping-cart-->';
|
79 |
+
$replacementText = print_wp_shopping_cart();
|
80 |
+
$content = str_replace( $matchingText, $replacementText, $content );
|
81 |
+
}
|
82 |
}
|
83 |
return $content;
|
84 |
}
|
85 |
|
86 |
// Reset cart option
|
87 |
+
if ( isset( $_REQUEST[ "reset_wp_cart" ] ) && ! empty( $_REQUEST[ "reset_wp_cart" ] ) ) {
|
88 |
reset_wp_cart();
|
89 |
}
|
90 |
|
91 |
//Clear the cart if the customer landed on the thank you page (if this option is enabled)
|
92 |
+
if ( get_option( 'wp_shopping_cart_reset_after_redirection_to_return_page' ) ) {
|
93 |
//TODO - remove this field altogether later. Cart will always be reset using query prameter on the thank you page.
|
94 |
+
if ( get_option( 'cart_return_from_paypal_url' ) == cart_current_page_url() ) {
|
95 |
+
reset_wp_cart();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
if ( wp_doing_ajax() ) {
|
100 |
+
add_action( 'wp_ajax_wpspsc_process_pp_smart_checkout', 'wpspsc_process_pp_smart_checkout' );
|
101 |
+
add_action( 'wp_ajax_nopriv_wpspsc_process_pp_smart_checkout', 'wpspsc_process_pp_smart_checkout' );
|
102 |
+
}
|
103 |
+
|
104 |
+
function wpspsc_process_pp_smart_checkout() {
|
105 |
+
if ( isset( $_POST[ 'wpspsc_payment_data' ] ) ) {
|
106 |
+
$data = $_POST[ 'wpspsc_payment_data' ];
|
107 |
+
}
|
108 |
+
if ( empty( $data ) ) {
|
109 |
+
wp_send_json( array( 'success' => false, 'errMsg' => __( 'Empty payment data received.', "wordpress-simple-paypal-shopping-cart" ) ) );
|
110 |
+
}
|
111 |
+
|
112 |
+
include_once('paypal.php');
|
113 |
+
|
114 |
+
$ipn_handler_instance = new paypal_ipn_handler();
|
115 |
+
|
116 |
+
$ipn_data_success = $ipn_handler_instance->create_ipn_from_smart_checkout( $data );
|
117 |
+
|
118 |
+
if ( $ipn_data_success !== true ) {
|
119 |
+
//error occured during IPN array creation
|
120 |
+
wp_send_json( array( 'success' => false, 'errMsg' => $ipn_data_success ) );
|
121 |
+
}
|
122 |
+
|
123 |
+
$debug_enabled = false;
|
124 |
+
$debug = get_option( 'wp_shopping_cart_enable_debug' );
|
125 |
+
if ( $debug ) {
|
126 |
+
$debug_enabled = true;
|
127 |
+
}
|
128 |
+
|
129 |
+
if ( $debug_enabled ) {
|
130 |
+
$ipn_handler_instance->ipn_log = true;
|
131 |
+
}
|
132 |
+
|
133 |
+
$res = $ipn_handler_instance->validate_ipn_smart_checkout();
|
134 |
+
|
135 |
+
if ( $res !== true ) {
|
136 |
+
wp_send_json( array( 'success' => false, 'errMsg' => $res ) );
|
137 |
+
}
|
138 |
+
|
139 |
+
$res = $ipn_handler_instance->validate_and_dispatch_product();
|
140 |
+
|
141 |
+
if ( $res === true ) {
|
142 |
+
wp_send_json( array( 'success' => true ) );
|
143 |
+
} else {
|
144 |
+
wp_send_json( array( 'success' => false, 'errMsg' => __( 'Error occured during payment processing. Check debug log for additional details.', "wordpress-simple-paypal-shopping-cart" ) ) );
|
145 |
}
|
146 |
}
|
147 |
|
148 |
function reset_wp_cart() {
|
149 |
+
if ( ! isset( $_SESSION[ 'simpleCart' ] ) ) {
|
150 |
+
return;
|
151 |
}
|
152 |
+
$products = $_SESSION[ 'simpleCart' ];
|
153 |
+
if ( ! is_array( $products ) ) {
|
154 |
+
return;
|
155 |
}
|
156 |
+
foreach ( $products as $key => $item ) {
|
157 |
+
unset( $products[ $key ] );
|
158 |
}
|
159 |
+
$_SESSION[ 'simpleCart' ] = $products;
|
160 |
+
unset( $_SESSION[ 'simple_cart_id' ] );
|
161 |
+
unset( $_SESSION[ 'wpspsc_cart_action_msg' ] );
|
162 |
+
unset( $_SESSION[ 'wpspsc_discount_applied_once' ] );
|
163 |
+
unset( $_SESSION[ 'wpspsc_applied_coupon_code' ] );
|
164 |
}
|
165 |
|
166 |
function wpspc_cart_actions_handler() {
|
167 |
+
unset( $_SESSION[ 'wpspsc_cart_action_msg' ] );
|
168 |
+
|
169 |
+
if ( isset( $_POST[ 'addcart' ] ) ) {//Add to cart action
|
170 |
+
//Some sites using caching need to be able to disable nonce on the add cart button. Otherwise 48 hour old cached pages will have stale nonce value and fail for valid users.
|
171 |
+
if ( get_option( 'wspsc_disable_nonce_add_cart' ) ) {
|
172 |
+
//This site has disabled the nonce check for add cart button.
|
173 |
+
//Do not check nonce for this site since the site admin has indicated that he does not want to check nonce for add cart button.
|
174 |
+
} else {
|
175 |
+
//Check nonce
|
176 |
+
$nonce = $_REQUEST[ '_wpnonce' ];
|
177 |
+
if ( ! wp_verify_nonce( $nonce, 'wspsc_addcart' ) ) {
|
178 |
+
wp_die( 'Error! Nonce Security Check Failed!' );
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
setcookie( "cart_in_use", "true", time() + 21600, "/", COOKIE_DOMAIN ); //useful to not serve cached page when using with a caching plugin
|
183 |
+
if ( function_exists( 'wp_cache_serve_cache_file' ) ) {//WP Super cache workaround
|
184 |
+
setcookie( "comment_author_", "wp_cart", time() + 21600, "/", COOKIE_DOMAIN );
|
185 |
+
}
|
186 |
+
|
187 |
+
//Sanitize post data
|
188 |
+
$post_wspsc_product = isset( $_POST[ 'wspsc_product' ] ) ? stripslashes( sanitize_text_field( $_POST[ 'wspsc_product' ] ) ) : '';
|
189 |
+
$post_item_number = isset( $_POST[ 'item_number' ] ) ? sanitize_text_field( $_POST[ 'item_number' ] ) : '';
|
190 |
+
$post_cart_link = isset( $_POST[ 'cartLink' ] ) ? esc_url_raw( sanitize_text_field( urldecode( $_POST[ 'cartLink' ] ) ) ) : '';
|
191 |
+
$post_stamp_pdf = isset( $_POST[ 'stamp_pdf' ] ) ? sanitize_text_field( $_POST[ 'stamp_pdf' ] ) : '';
|
192 |
+
$post_encoded_file_val = isset( $_POST[ 'file_url' ] ) ? sanitize_text_field( $_POST[ 'file_url' ] ) : '';
|
193 |
+
$post_thumbnail = isset( $_POST[ 'thumbnail' ] ) ? esc_url_raw( sanitize_text_field( $_POST[ 'thumbnail' ] ) ) : '';
|
194 |
+
//Sanitize and validate price
|
195 |
+
if ( isset( $_POST[ 'price' ] ) ) {
|
196 |
+
$price = sanitize_text_field( $_POST[ 'price' ] );
|
197 |
+
$hash_once_p = sanitize_text_field( $_POST[ 'hash_one' ] );
|
198 |
+
$p_key = get_option( 'wspsc_private_key_one' );
|
199 |
+
$hash_one_cm = md5( $p_key . '|' . $price );
|
200 |
+
if ( $hash_once_p != $hash_one_cm ) {//Security check failed. Price field has been tampered. Fail validation.
|
201 |
+
wp_die( 'Error! The price field may have been tampered. Security check failed.' );
|
202 |
+
}
|
203 |
+
$price = str_replace( WP_CART_CURRENCY_SYMBOL, "", $price ); //Remove any currency symbol from the price.
|
204 |
+
//Check that the price field is numeric.
|
205 |
+
if ( ! is_numeric( $price ) ) {//Price validation failed
|
206 |
+
wp_die( 'Error! The price validation failed. The value must be numeric.' );
|
207 |
+
}
|
208 |
+
//At this stage the price amt has already been sanitized and validated.
|
209 |
+
} else {
|
210 |
+
wp_die( 'Error! Missing price value. The price must be set.' );
|
211 |
+
}
|
212 |
+
|
213 |
+
//Sanitize and validate shipping price
|
214 |
+
if ( isset( $_POST[ 'shipping' ] ) ) {
|
215 |
+
$shipping = sanitize_text_field( $_POST[ 'shipping' ] );
|
216 |
+
$hash_two_val = sanitize_text_field( $_POST[ 'hash_two' ] );
|
217 |
+
$p_key = get_option( 'wspsc_private_key_one' );
|
218 |
+
$hash_two_cm = md5( $p_key . '|' . $shipping );
|
219 |
+
if ( $hash_two_val != $hash_two_cm ) {//Shipping validation failed
|
220 |
+
wp_die( 'Error! The shipping price validation failed.' );
|
221 |
+
}
|
222 |
+
|
223 |
+
$shipping = str_replace( WP_CART_CURRENCY_SYMBOL, "", $shipping ); //Remove any currency symbol from the price.
|
224 |
+
//Check that the shipping price field is numeric.
|
225 |
+
if ( ! is_numeric( $shipping ) ) {//Shipping price validation failed
|
226 |
+
wp_die( 'Error! The shipping price validation failed. The value must be numeric.' );
|
227 |
+
}
|
228 |
+
//At this stage the shipping price amt has already been sanitized and validated.
|
229 |
+
} else {
|
230 |
+
wp_die( 'Error! Missing shipping price value. The price must be set.' );
|
231 |
+
}
|
232 |
+
|
233 |
+
|
234 |
+
$count = 1;
|
235 |
+
$products = array();
|
236 |
+
if ( isset( $_SESSION[ 'simpleCart' ] ) ) {
|
237 |
+
$products = $_SESSION[ 'simpleCart' ];
|
238 |
+
if ( is_array( $products ) ) {
|
239 |
+
foreach ( $products as $key => $item ) {
|
240 |
+
if ( $item[ 'name' ] == $post_wspsc_product ) {
|
241 |
+
$count += $item[ 'quantity' ];
|
242 |
+
$item[ 'quantity' ] ++;
|
243 |
+
unset( $products[ $key ] );
|
244 |
+
array_push( $products, $item );
|
245 |
+
}
|
246 |
+
}
|
247 |
+
} else {
|
248 |
+
$products = array();
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
if ( $count == 1 ) {
|
253 |
+
//This is the first quantity of this item.
|
254 |
+
|
255 |
+
$product = array( 'name' => $post_wspsc_product, 'price' => $price, 'price_orig' => $price, 'quantity' => $count, 'shipping' => $shipping, 'cartLink' => $post_cart_link, 'item_number' => $post_item_number );
|
256 |
+
if ( ! empty( $post_encoded_file_val ) ) {
|
257 |
+
$product[ 'file_url' ] = $post_encoded_file_val;
|
258 |
+
}
|
259 |
+
if ( ! empty( $post_thumbnail ) ) {
|
260 |
+
$product[ 'thumbnail' ] = $post_thumbnail;
|
261 |
+
}
|
262 |
+
$product[ 'stamp_pdf' ] = $post_stamp_pdf;
|
263 |
+
|
264 |
+
array_push( $products, $product );
|
265 |
+
}
|
266 |
+
|
267 |
+
sort( $products );
|
268 |
+
$_SESSION[ 'simpleCart' ] = $products;
|
269 |
+
|
270 |
+
wpspsc_reapply_discount_coupon_if_needed(); //Re-apply coupon to the cart if necessary
|
271 |
+
|
272 |
+
if ( ! isset( $_SESSION[ 'simple_cart_id' ] ) && empty( $_SESSION[ 'simple_cart_id' ] ) ) {
|
273 |
+
wpspc_insert_new_record();
|
274 |
+
} else {
|
275 |
+
//cart updating
|
276 |
+
if ( isset( $_SESSION[ 'simple_cart_id' ] ) && ! empty( $_SESSION[ 'simple_cart_id' ] ) ) {
|
277 |
+
wpspc_update_cart_items_record();
|
278 |
+
} else {
|
279 |
+
echo "<p>" . (__( "Error! Your session is out of sync. Please reset your session.", "wordpress-simple-paypal-shopping-cart" )) . "</p>";
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
|
284 |
+
if ( get_option( 'wp_shopping_cart_auto_redirect_to_checkout_page' ) ) {
|
285 |
+
$checkout_url = get_option( 'cart_checkout_page_url' );
|
286 |
+
if ( empty( $checkout_url ) ) {
|
287 |
+
echo "<br /><strong>" . (__( "Shopping Cart Configuration Error! You must specify a value in the 'Checkout Page URL' field for the automatic redirection feature to work!", "wordpress-simple-paypal-shopping-cart" )) . "</strong><br />";
|
288 |
+
} else {
|
289 |
+
$redirection_parameter = 'Location: ' . $checkout_url;
|
290 |
+
header( $redirection_parameter );
|
291 |
+
exit;
|
292 |
+
}
|
293 |
+
}
|
294 |
+
} else if ( isset( $_POST[ 'cquantity' ] ) ) {
|
295 |
+
$nonce = $_REQUEST[ '_wpnonce' ];
|
296 |
+
if ( ! wp_verify_nonce( $nonce, 'wspsc_cquantity' ) ) {
|
297 |
+
wp_die( 'Error! Nonce Security Check Failed!' );
|
298 |
+
}
|
299 |
+
$post_wspsc_product = isset( $_POST[ 'wspsc_product' ] ) ? stripslashes( sanitize_text_field( $_POST[ 'wspsc_product' ] ) ) : '';
|
300 |
+
$post_quantity = isset( $_POST[ 'quantity' ] ) ? sanitize_text_field( $_POST[ 'quantity' ] ) : '';
|
301 |
+
if ( ! is_numeric( $post_quantity ) ) {
|
302 |
+
wp_die( 'Error! The quantity value must be numeric.' );
|
303 |
+
}
|
304 |
+
$products = $_SESSION[ 'simpleCart' ];
|
305 |
+
foreach ( $products as $key => $item ) {
|
306 |
+
if ( (stripslashes( $item[ 'name' ] ) == $post_wspsc_product) && $post_quantity ) {
|
307 |
+
$item[ 'quantity' ] = $post_quantity;
|
308 |
+
unset( $products[ $key ] );
|
309 |
+
array_push( $products, $item );
|
310 |
+
} else if ( ($item[ 'name' ] == $post_wspsc_product) && ! $post_quantity ) {
|
311 |
+
unset( $products[ $key ] );
|
312 |
+
}
|
313 |
+
}
|
314 |
+
sort( $products );
|
315 |
+
$_SESSION[ 'simpleCart' ] = $products;
|
316 |
+
|
317 |
+
wpspsc_reapply_discount_coupon_if_needed(); //Re-apply coupon to the cart if necessary
|
318 |
+
|
319 |
+
if ( isset( $_SESSION[ 'simple_cart_id' ] ) && ! empty( $_SESSION[ 'simple_cart_id' ] ) ) {
|
320 |
+
wpspc_update_cart_items_record();
|
321 |
+
}
|
322 |
+
} else if ( isset( $_POST[ 'delcart' ] ) ) {
|
323 |
+
$nonce = $_REQUEST[ '_wpnonce' ];
|
324 |
+
if ( ! wp_verify_nonce( $nonce, 'wspsc_delcart' ) ) {
|
325 |
+
wp_die( 'Error! Nonce Security Check Failed!' );
|
326 |
+
}
|
327 |
+
$post_wspsc_product = isset( $_POST[ 'wspsc_product' ] ) ? stripslashes( sanitize_text_field( $_POST[ 'wspsc_product' ] ) ) : '';
|
328 |
+
$products = $_SESSION[ 'simpleCart' ];
|
329 |
+
foreach ( $products as $key => $item ) {
|
330 |
+
if ( $item[ 'name' ] == $post_wspsc_product )
|
331 |
+
unset( $products[ $key ] );
|
332 |
+
}
|
333 |
+
$_SESSION[ 'simpleCart' ] = $products;
|
334 |
+
|
335 |
+
wpspsc_reapply_discount_coupon_if_needed(); //Re-apply coupon to the cart if necessary
|
336 |
+
|
337 |
+
if ( isset( $_SESSION[ 'simple_cart_id' ] ) && ! empty( $_SESSION[ 'simple_cart_id' ] ) ) {
|
338 |
+
wpspc_update_cart_items_record();
|
339 |
+
}
|
340 |
+
if ( count( $_SESSION[ 'simpleCart' ] ) < 1 ) {
|
341 |
+
reset_wp_cart();
|
342 |
+
}
|
343 |
+
} else if ( isset( $_POST[ 'wpspsc_coupon_code' ] ) ) {
|
344 |
+
$nonce = $_REQUEST[ '_wpnonce' ];
|
345 |
+
if ( ! wp_verify_nonce( $nonce, 'wspsc_coupon' ) ) {
|
346 |
+
wp_die( 'Error! Nonce Security Check Failed!' );
|
347 |
+
}
|
348 |
+
$coupon_code = isset( $_POST[ 'wpspsc_coupon_code' ] ) ? sanitize_text_field( $_POST[ 'wpspsc_coupon_code' ] ) : '';
|
349 |
+
wpspsc_apply_cart_discount( $coupon_code );
|
350 |
+
if ( isset( $_SESSION[ 'simple_cart_id' ] ) && ! empty( $_SESSION[ 'simple_cart_id' ] ) ) {
|
351 |
+
wpspc_update_cart_items_record();
|
352 |
+
}
|
353 |
}
|
354 |
}
|
355 |
|
356 |
function wp_cart_add_custom_field() {
|
357 |
+
$_SESSION[ 'wp_cart_custom_values' ] = "";
|
358 |
+
$custom_field_val = "";
|
359 |
+
$name = 'wp_cart_id';
|
360 |
+
$value = $_SESSION[ 'simple_cart_id' ];
|
361 |
+
$custom_field_val = wpc_append_values_to_custom_field( $name, $value );
|
362 |
+
|
363 |
+
$clientip = $_SERVER[ 'REMOTE_ADDR' ];
|
364 |
+
if ( ! empty( $clientip ) ) {
|
365 |
+
$name = 'ip';
|
366 |
+
$value = $clientip;
|
367 |
+
$custom_field_val = wpc_append_values_to_custom_field( $name, $value );
|
368 |
+
}
|
369 |
+
|
370 |
+
if ( function_exists( 'wp_aff_platform_install' ) ) {
|
371 |
+
$name = 'ap_id';
|
372 |
+
$value = '';
|
373 |
+
if ( isset( $_SESSION[ 'ap_id' ] ) ) {
|
374 |
+
$value = $_SESSION[ 'ap_id' ];
|
375 |
+
} else if ( isset( $_COOKIE[ 'ap_id' ] ) ) {
|
376 |
+
$value = $_COOKIE[ 'ap_id' ];
|
377 |
+
}
|
378 |
+
if ( ! empty( $value ) ) {
|
379 |
+
$custom_field_val = wpc_append_values_to_custom_field( $name, $value );
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
if ( isset( $_SESSION[ 'wpspsc_applied_coupon_code' ] ) ) {
|
384 |
+
$name = "coupon_code";
|
385 |
+
$value = $_SESSION[ 'wpspsc_applied_coupon_code' ];
|
386 |
+
$custom_field_val = wpc_append_values_to_custom_field( $name, $value );
|
387 |
+
}
|
388 |
+
|
389 |
+
//Trigger action hook that can be used to append more custom fields value that is saved to the session ($_SESSION[ 'wp_cart_custom_values' ])
|
390 |
+
do_action('wspsc_cart_custom_field_appended');
|
391 |
+
|
392 |
+
$custom_field_val = apply_filters( 'wpspc_cart_custom_field_value', $custom_field_val );
|
393 |
+
$custom_field_val = urlencode( $custom_field_val ); //URL encode the custom field value so nothing gets lost when it is passed around.
|
394 |
+
$output = '<input type="hidden" name="custom" value="' . $custom_field_val . '" />';
|
395 |
return $output;
|
396 |
}
|
397 |
|
398 |
+
function print_wp_cart_button_new( $content ) {
|
399 |
+
$addcart = get_option( 'addToCartButtonName' );
|
400 |
+
if ( ! $addcart || ($addcart == '') )
|
401 |
+
$addcart = __( "Add to Cart", "wordpress-simple-paypal-shopping-cart" );
|
402 |
|
403 |
$pattern = '#\[wp_cart:.+:price:.+:end]#';
|
404 |
+
preg_match_all( $pattern, $content, $matches );
|
405 |
+
|
406 |
+
foreach ( $matches[ 0 ] as $match ) {
|
407 |
+
$var_output = '';
|
408 |
+
$pos = strpos( $match, ":var1" );
|
409 |
+
if ( $pos ) {
|
410 |
+
$match_tmp = $match;
|
411 |
+
// Variation control is used
|
412 |
+
$pos2 = strpos( $match, ":var2" );
|
413 |
+
if ( $pos2 ) {
|
414 |
+
$pattern = '#var2\[.*]:#';
|
415 |
+
preg_match_all( $pattern, $match_tmp, $matches3 );
|
416 |
+
$match3 = $matches3[ 0 ][ 0 ];
|
417 |
+
$match_tmp = str_replace( $match3, '', $match_tmp );
|
418 |
+
|
419 |
+
$pattern = 'var2[';
|
420 |
+
$m3 = str_replace( $pattern, '', $match3 );
|
421 |
+
$pattern = ']:';
|
422 |
+
$m3 = str_replace( $pattern, '', $m3 );
|
423 |
+
$pieces3 = explode( '|', $m3 );
|
424 |
+
|
425 |
+
$variation2_name = $pieces3[ 0 ];
|
426 |
+
$var_output .= $variation2_name . " : ";
|
427 |
+
$var_output .= '<select name="variation2" onchange="ReadForm (this.form, false);">';
|
428 |
+
for ( $i = 1; $i < sizeof( $pieces3 ); $i ++ ) {
|
429 |
+
$var_output .= '<option value="' . $pieces3[ $i ] . '">' . $pieces3[ $i ] . '</option>';
|
430 |
+
}
|
431 |
+
$var_output .= '</select><br />';
|
432 |
+
}
|
433 |
+
|
434 |
+
$pattern = '#var1\[.*]:#';
|
435 |
+
preg_match_all( $pattern, $match_tmp, $matches2 );
|
436 |
+
$match2 = $matches2[ 0 ][ 0 ];
|
437 |
+
|
438 |
+
$match_tmp = str_replace( $match2, '', $match_tmp );
|
439 |
+
|
440 |
+
$pattern = 'var1[';
|
441 |
+
$m2 = str_replace( $pattern, '', $match2 );
|
442 |
+
$pattern = ']:';
|
443 |
+
$m2 = str_replace( $pattern, '', $m2 );
|
444 |
+
$pieces2 = explode( '|', $m2 );
|
445 |
+
|
446 |
+
$variation_name = $pieces2[ 0 ];
|
447 |
+
$var_output .= $variation_name . " : ";
|
448 |
+
$var_output .= '<select name="variation1" onchange="ReadForm (this.form, false);">';
|
449 |
+
for ( $i = 1; $i < sizeof( $pieces2 ); $i ++ ) {
|
450 |
+
$var_output .= '<option value="' . $pieces2[ $i ] . '">' . $pieces2[ $i ] . '</option>';
|
451 |
+
}
|
452 |
+
$var_output .= '</select><br />';
|
453 |
+
}
|
454 |
+
|
455 |
+
$pattern = '[wp_cart:';
|
456 |
+
$m = str_replace( $pattern, '', $match );
|
457 |
+
|
458 |
+
$pattern = 'price:';
|
459 |
+
$m = str_replace( $pattern, '', $m );
|
460 |
+
$pattern = 'shipping:';
|
461 |
+
$m = str_replace( $pattern, '', $m );
|
462 |
+
$pattern = ':end]';
|
463 |
+
$m = str_replace( $pattern, '', $m );
|
464 |
+
|
465 |
+
$pieces = explode( ':', $m );
|
466 |
+
|
467 |
+
$replacement = '<div class="wp_cart_button_wrapper">';
|
468 |
+
$replacement .= '<form method="post" class="wp-cart-button-form" action="" style="display:inline" onsubmit="return ReadForm(this, true);" ' . apply_filters( "wspsc_add_cart_button_form_attr", "" ) . '>';
|
469 |
+
$replacement .= wp_nonce_field( 'wspsc_addcart', '_wpnonce', true, false ); //nonce value
|
470 |
+
|
471 |
+
if ( ! empty( $var_output ) ) {
|
472 |
+
$replacement .= $var_output;
|
473 |
+
}
|
474 |
+
|
475 |
+
if ( preg_match( "/http/", $addcart ) ) {
|
476 |
+
//Use the image as the add to cart button
|
477 |
+
$replacement .= '<input type="image" src="' . $addcart . '" class="wp_cart_button" alt="' . (__( "Add to Cart", "wordpress-simple-paypal-shopping-cart" )) . '"/>';
|
478 |
+
} else {
|
479 |
+
//Plain text add to cart button
|
480 |
+
$replacement .= '<input type="submit" class="wspsc_add_cart_submit" name="wspsc_add_cart_submit" value="' . $addcart . '" />';
|
481 |
+
}
|
482 |
+
|
483 |
+
$replacement .= '<input type="hidden" name="wspsc_product" value="' . $pieces[ '0' ] . '" /><input type="hidden" name="price" value="' . $pieces[ '1' ] . '" />';
|
484 |
+
$replacement .= '<input type="hidden" name="product_tmp" value="' . $pieces[ '0' ] . '" />';
|
485 |
+
if ( sizeof( $pieces ) > 2 ) {
|
486 |
+
//We likely have shipping
|
487 |
+
if ( ! is_numeric( $pieces[ '2' ] ) ) {//Shipping parameter has non-numeric value. Discard it and set it to 0.
|
488 |
+
$pieces[ '2' ] = 0;
|
489 |
+
}
|
490 |
+
$replacement .= '<input type="hidden" name="shipping" value="' . $pieces[ '2' ] . '" />';
|
491 |
+
} else {
|
492 |
+
//Set shipping to 0 by default (when no shipping is specified in the shortcode)
|
493 |
+
$pieces[ '2' ] = 0;
|
494 |
+
$replacement .= '<input type="hidden" name="shipping" value="' . $pieces[ '2' ] . '" />';
|
495 |
+
}
|
496 |
+
|
497 |
+
$p_key = get_option( 'wspsc_private_key_one' );
|
498 |
+
if ( empty( $p_key ) ) {
|
499 |
+
$p_key = uniqid( '', true );
|
500 |
+
update_option( 'wspsc_private_key_one', $p_key );
|
501 |
+
}
|
502 |
+
$hash_one = md5( $p_key . '|' . $pieces[ '1' ] ); //Price hash
|
503 |
+
$replacement .= '<input type="hidden" name="hash_one" value="' . $hash_one . '" />';
|
504 |
+
|
505 |
+
$hash_two = md5( $p_key . '|' . $pieces[ '2' ] ); //Shipping hash
|
506 |
+
$replacement .= '<input type="hidden" name="hash_two" value="' . $hash_two . '" />';
|
507 |
+
|
508 |
+
$replacement .= '<input type="hidden" name="cartLink" value="' . esc_url( cart_current_page_url() ) . '" />';
|
509 |
+
$replacement .= '<input type="hidden" name="addcart" value="1" /></form>';
|
510 |
+
$replacement .= '</div>';
|
511 |
+
$content = str_replace( $match, $replacement, $content );
|
512 |
}
|
513 |
return $content;
|
514 |
}
|
520 |
<script type="text/javascript">
|
521 |
<!--
|
522 |
//
|
523 |
+
function ReadForm (obj1, tst)
|
524 |
+
{
|
525 |
// Read the user form
|
526 |
var i,j,pos;
|
527 |
+
val_total="";val_combo="";
|
528 |
+
|
529 |
+
for (i=0; i<obj1.length; i++)
|
530 |
+
{
|
531 |
// run entire form
|
532 |
obj = obj1.elements[i]; // a form element
|
533 |
+
|
534 |
+
if (obj.type == "select-one")
|
535 |
{ // just selects
|
536 |
if (obj.name == "quantity" ||
|
537 |
obj.name == "amount") continue;
|
548 |
</script>';
|
549 |
}
|
550 |
|
551 |
+
function print_wp_cart_button_for_product( $name, $price, $shipping = 0, $var1 = '', $var2 = '', $var3 = '', $atts = array() ) {
|
552 |
+
$addcart = get_option( 'addToCartButtonName' );
|
553 |
+
if ( ! $addcart || ($addcart == '') ) {
|
554 |
+
$addcart = __( "Add to Cart", "wordpress-simple-paypal-shopping-cart" );
|
555 |
}
|
556 |
|
557 |
$var_output = "";
|
558 |
+
if ( ! empty( $var1 ) ) {
|
559 |
+
$var1_pieces = explode( '|', $var1 );
|
560 |
+
$variation1_name = $var1_pieces[ 0 ];
|
561 |
+
$var_output .= '<span class="wp_cart_variation_name">' . $variation1_name . ' : </span>';
|
562 |
+
$var_output .= '<select name="variation1" class="wp_cart_variation1_select" onchange="ReadForm (this.form, false);">';
|
563 |
+
for ( $i = 1; $i < sizeof( $var1_pieces ); $i ++ ) {
|
564 |
+
$var_output .= '<option value="' . $var1_pieces[ $i ] . '">' . $var1_pieces[ $i ] . '</option>';
|
565 |
+
}
|
566 |
+
$var_output .= '</select><br />';
|
567 |
+
}
|
568 |
+
if ( ! empty( $var2 ) ) {
|
569 |
+
$var2_pieces = explode( '|', $var2 );
|
570 |
+
$variation2_name = $var2_pieces[ 0 ];
|
571 |
+
$var_output .= '<span class="wp_cart_variation_name">' . $variation2_name . ' : </span>';
|
572 |
+
$var_output .= '<select name="variation2" class="wp_cart_variation2_select" onchange="ReadForm (this.form, false);">';
|
573 |
+
for ( $i = 1; $i < sizeof( $var2_pieces ); $i ++ ) {
|
574 |
+
$var_output .= '<option value="' . $var2_pieces[ $i ] . '">' . $var2_pieces[ $i ] . '</option>';
|
575 |
+
}
|
576 |
+
$var_output .= '</select><br />';
|
577 |
+
}
|
578 |
+
if ( ! empty( $var3 ) ) {
|
579 |
+
$var3_pieces = explode( '|', $var3 );
|
580 |
+
$variation3_name = $var3_pieces[ 0 ];
|
581 |
+
$var_output .= '<span class="wp_cart_variation_name">' . $variation3_name . ' : </span>';
|
582 |
+
$var_output .= '<select name="variation3" class="wp_cart_variation3_select" onchange="ReadForm (this.form, false);">';
|
583 |
+
for ( $i = 1; $i < sizeof( $var3_pieces ); $i ++ ) {
|
584 |
+
$var_output .= '<option value="' . $var3_pieces[ $i ] . '">' . $var3_pieces[ $i ] . '</option>';
|
585 |
+
}
|
586 |
+
$var_output .= '</select><br />';
|
587 |
+
}
|
588 |
+
|
589 |
+
$replacement = '<div class="wp_cart_button_wrapper">';
|
590 |
+
$replacement .= '<form method="post" class="wp-cart-button-form" action="" style="display:inline" onsubmit="return ReadForm(this, true);" ' . apply_filters( "wspsc_add_cart_button_form_attr", "" ) . '>';
|
591 |
+
$replacement .= wp_nonce_field( 'wspsc_addcart', '_wpnonce', true, false );
|
592 |
+
if ( ! empty( $var_output ) ) {//Show variation
|
593 |
+
$replacement .= '<div class="wp_cart_variation_section">' . $var_output . '</div>';
|
594 |
+
}
|
595 |
+
|
596 |
+
if ( isset( $atts[ 'button_image' ] ) && ! empty( $atts[ 'button_image' ] ) ) {
|
597 |
+
//Use the custom button image specified in the shortcode
|
598 |
+
$replacement .= '<input type="image" src="' . $atts[ 'button_image' ] . '" class="wp_cart_button" alt="' . (__( "Add to Cart", "wordpress-simple-paypal-shopping-cart" )) . '"/>';
|
599 |
+
} else if ( isset( $atts[ 'button_text' ] ) && ! empty( $atts[ 'button_text' ] ) ) {
|
600 |
+
//Use the custom button text specified in the shortcode
|
601 |
+
$replacement .= '<input type="submit" class="wspsc_add_cart_submit" name="wspsc_add_cart_submit" value="' . apply_filters( 'wspsc_add_cart_submit_button_value', $atts[ 'button_text' ], $price ) . '" />';
|
602 |
} else {
|
603 |
+
//Use the button text or image value from the settings
|
604 |
+
if ( preg_match( "/http:/", $addcart ) || preg_match( "/https:/", $addcart ) ) {
|
605 |
+
//Use the image as the add to cart button
|
606 |
+
$replacement .= '<input type="image" src="' . $addcart . '" class="wp_cart_button" alt="' . (__( "Add to Cart", "wordpress-simple-paypal-shopping-cart" )) . '"/>';
|
607 |
+
} else {
|
608 |
+
//Use plain text add to cart button
|
609 |
+
$replacement .= '<input type="submit" class="wspsc_add_cart_submit" name="wspsc_add_cart_submit" value="' . apply_filters( 'wspsc_add_cart_submit_button_value', $addcart, $price ) . '" />';
|
610 |
+
}
|
611 |
+
}
|
612 |
+
|
613 |
+
$replacement .= '<input type="hidden" name="wspsc_product" value="' . $name . '" />';
|
614 |
+
$replacement .= '<input type="hidden" name="price" value="' . $price . '" />';
|
615 |
+
$replacement .= '<input type="hidden" name="shipping" value="' . $shipping . '" />';
|
616 |
+
$replacement .= '<input type="hidden" name="addcart" value="1" />';
|
617 |
+
$replacement .= '<input type="hidden" name="cartLink" value="' . esc_url( cart_current_page_url() ) . '" />';
|
618 |
+
$replacement .= '<input type="hidden" name="product_tmp" value="' . $name . '" />';
|
619 |
+
isset( $atts[ 'item_number' ] ) ? $item_num = $atts[ 'item_number' ] : $item_num = '';
|
620 |
+
$replacement .= '<input type="hidden" name="item_number" value="' . $item_num . '" />';
|
621 |
+
|
622 |
+
if ( isset( $atts[ 'file_url' ] ) ) {
|
623 |
+
$file_url = $atts[ 'file_url' ];
|
624 |
+
$file_url = base64_encode( $file_url );
|
625 |
+
$replacement .= '<input type="hidden" name="file_url" value="' . $file_url . '" />';
|
626 |
+
}
|
627 |
+
if ( isset( $atts[ 'thumbnail' ] ) ) {
|
628 |
+
$replacement .= '<input type="hidden" name="thumbnail" value="' . $atts[ 'thumbnail' ] . '" />';
|
629 |
+
}
|
630 |
+
if ( isset( $atts[ 'stamp_pdf' ] ) ) {
|
631 |
+
$replacement .= '<input type="hidden" name="stamp_pdf" value="' . $atts[ 'stamp_pdf' ] . '" />';
|
632 |
+
}
|
633 |
+
|
634 |
+
$p_key = get_option( 'wspsc_private_key_one' );
|
635 |
+
if ( empty( $p_key ) ) {
|
636 |
+
$p_key = uniqid( '', true );
|
637 |
+
update_option( 'wspsc_private_key_one', $p_key );
|
638 |
+
}
|
639 |
+
$hash_one = md5( $p_key . '|' . $price );
|
640 |
+
$replacement .= '<input type="hidden" name="hash_one" value="' . $hash_one . '" />';
|
641 |
+
|
642 |
+
$hash_two = md5( $p_key . '|' . $shipping );
|
643 |
+
$replacement .= '<input type="hidden" name="hash_two" value="' . $hash_two . '" />';
|
644 |
+
|
645 |
+
$replacement .= '</form>';
|
646 |
+
$replacement .= '</div>';
|
647 |
return $replacement;
|
648 |
}
|
649 |
|
650 |
function cart_not_empty() {
|
651 |
$count = 0;
|
652 |
+
if ( isset( $_SESSION[ 'simpleCart' ] ) && is_array( $_SESSION[ 'simpleCart' ] ) ) {
|
653 |
+
foreach ( $_SESSION[ 'simpleCart' ] as $item )
|
654 |
+
$count ++;
|
655 |
+
return $count;
|
656 |
} else
|
657 |
+
return 0;
|
658 |
}
|
659 |
|
660 |
+
function print_payment_currency( $price, $symbol, $decimal = '.' ) {
|
661 |
$formatted_price = '';
|
662 |
+
$formatted_price = apply_filters( 'wspsc_print_formatted_price', $formatted_price, $price, $symbol );
|
663 |
+
if ( ! empty( $formatted_price ) ) {
|
664 |
+
return $formatted_price;
|
665 |
}
|
666 |
+
$formatted_price = $symbol . number_format( $price, 2, $decimal, ',' );
|
667 |
return $formatted_price;
|
668 |
}
|
669 |
|
670 |
function cart_current_page_url() {
|
671 |
$pageURL = 'http';
|
672 |
+
if ( ! isset( $_SERVER[ "HTTPS" ] ) ) {
|
673 |
+
$_SERVER[ "HTTPS" ] = "";
|
674 |
}
|
675 |
+
if ( ! isset( $_SERVER[ "SERVER_PORT" ] ) ) {
|
676 |
+
$_SERVER[ "SERVER_PORT" ] = "";
|
677 |
}
|
678 |
|
679 |
+
if ( $_SERVER[ "HTTPS" ] == "on" ) {
|
680 |
+
$pageURL .= "s";
|
681 |
}
|
682 |
$pageURL .= "://";
|
683 |
+
if ( $_SERVER[ "SERVER_PORT" ] != "80" ) {
|
684 |
+
$pageURL .= $_SERVER[ "SERVER_NAME" ] . ":" . $_SERVER[ "SERVER_PORT" ] . $_SERVER[ "REQUEST_URI" ];
|
685 |
} else {
|
686 |
+
$pageURL .= $_SERVER[ "SERVER_NAME" ] . $_SERVER[ "REQUEST_URI" ];
|
687 |
}
|
688 |
return $pageURL;
|
689 |
}
|
690 |
|
691 |
function simple_cart_total() {
|
692 |
$grand_total = 0;
|
693 |
+
foreach ( (array) $_SESSION[ 'simpleCart' ] as $item ) {
|
694 |
+
$total += $item[ 'price' ] * $item[ 'quantity' ];
|
695 |
+
$item_total_shipping += $item[ 'shipping' ] * $item[ 'quantity' ];
|
696 |
}
|
697 |
$grand_total = $total + $item_total_shipping;
|
698 |
+
return wpspsc_number_format_price( $grand_total );
|
699 |
}
|
700 |
|
701 |
function wp_paypal_shopping_cart_load_widgets() {
|
702 |
+
register_widget( 'WP_PayPal_Cart_Widget' );
|
703 |
}
|
704 |
|
705 |
class WP_PayPal_Cart_Widget extends WP_Widget {
|
706 |
|
707 |
function __construct() {
|
708 |
+
parent::__construct( 'wp_paypal_shopping_cart_widgets', 'WP Paypal Shopping Cart', array( 'description' => 'WP Paypal Shopping Cart Widget' ) );
|
709 |
}
|
710 |
|
711 |
+
function form( $instance ) {
|
712 |
+
// outputs the options form on admin
|
713 |
}
|
714 |
|
715 |
+
function update( $new_instance, $old_instance ) {
|
716 |
+
// processes widget options to be saved
|
717 |
}
|
718 |
|
719 |
+
function widget( $args, $instance ) {
|
720 |
+
// outputs the content of the widget
|
721 |
+
extract( $args );
|
722 |
|
723 |
+
$cart_title = get_option( 'wp_cart_title' );
|
724 |
+
if ( empty( $cart_title ) )
|
725 |
+
$cart_title = __( "Shopping Cart", "wordpress-simple-paypal-shopping-cart" );
|
726 |
|
727 |
+
echo $before_widget;
|
728 |
+
echo $before_title . $cart_title . $after_title;
|
729 |
+
echo print_wp_shopping_cart();
|
730 |
+
echo $after_widget;
|
731 |
}
|
732 |
|
733 |
}
|
734 |
|
735 |
function wspsc_admin_side_enqueue_scripts() {
|
736 |
+
if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == 'wspsc-discounts' ) { //simple paypal shopping cart discount page
|
737 |
+
wp_enqueue_style( 'jquery-ui-style', '//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css' );
|
738 |
+
wp_register_script( 'wpspsc-admin', WP_CART_URL . '/lib/wpspsc_admin_side.js', array( 'jquery', 'jquery-ui-datepicker' ) );
|
739 |
+
wp_enqueue_script( 'wpspsc-admin' );
|
740 |
}
|
741 |
}
|
742 |
|
743 |
function wspsc_admin_side_styles() {
|
744 |
+
wp_enqueue_style( 'wspsc-admin-style', WP_CART_URL . '/assets/wspsc-admin-styles.css', array(), WP_CART_VERSION );
|
745 |
}
|
746 |
|
747 |
function wspsc_front_side_enqueue_scripts() {
|
748 |
+
wp_enqueue_style( 'wspsc-style', WP_CART_URL . '/wp_shopping_cart_style.css', array(), WP_CART_VERSION );
|
749 |
}
|
750 |
|
751 |
function wpspc_plugin_install() {
|
752 |
wpspc_run_activation();
|
753 |
}
|
754 |
|
755 |
+
register_activation_hook( __FILE__, 'wpspc_plugin_install' );
|
756 |
|
757 |
// Add the settings link
|
758 |
+
function wp_simple_cart_add_settings_link( $links, $file ) {
|
759 |
+
if ( $file == plugin_basename( __FILE__ ) ) {
|
760 |
+
$settings_link = '<a href="admin.php?page=wspsc-menu-main">' . (__( "Settings", "wordpress-simple-paypal-shopping-cart" )) . '</a>';
|
761 |
+
array_unshift( $links, $settings_link );
|
762 |
}
|
763 |
return $links;
|
764 |
}
|
765 |
|
766 |
+
add_filter( 'plugin_action_links', 'wp_simple_cart_add_settings_link', 10, 2 );
|
767 |
|
768 |
+
add_action( 'widgets_init', 'wp_paypal_shopping_cart_load_widgets' );
|
769 |
|
770 |
+
add_action( 'init', 'wp_cart_init_handler' );
|
771 |
+
add_action( 'admin_init', 'wp_cart_admin_init_handler' );
|
772 |
|
773 |
+
add_filter( 'the_content', 'print_wp_cart_button_new', 11 );
|
774 |
+
add_filter( 'the_content', 'shopping_cart_show' );
|
775 |
|
776 |
+
if ( ! is_admin() ) {
|
777 |
+
add_filter( 'widget_text', 'do_shortcode' );
|
778 |
}
|
779 |
|
780 |
+
add_action( 'wp_head', 'wp_cart_add_read_form_javascript' );
|
781 |
+
add_action( 'wp_enqueue_scripts', 'wspsc_front_side_enqueue_scripts' );
|
782 |
+
add_action( 'admin_enqueue_scripts', 'wspsc_admin_side_enqueue_scripts' );
|
783 |
+
add_action( 'admin_print_styles', 'wspsc_admin_side_styles' );
|
wp_shopping_cart_misc_functions.php
CHANGED
@@ -86,23 +86,6 @@ function wp_cart_get_custom_var_array($custom_val_string)
|
|
86 |
return $customvariables;
|
87 |
}
|
88 |
|
89 |
-
function wspsc_reset_logfile()
|
90 |
-
{
|
91 |
-
$log_reset = true;
|
92 |
-
$logfile = dirname(__FILE__).'/ipn_handle_debug.txt';
|
93 |
-
$text = '['.date('m/d/Y g:i A').'] - SUCCESS : Log file reset';
|
94 |
-
$text .= "\n------------------------------------------------------------------\n\n";
|
95 |
-
$fp = fopen($logfile, 'w');
|
96 |
-
if($fp != FALSE) {
|
97 |
-
@fwrite($fp, $text);
|
98 |
-
@fclose($fp);
|
99 |
-
}
|
100 |
-
else{
|
101 |
-
$log_reset = false;
|
102 |
-
}
|
103 |
-
return $log_reset;
|
104 |
-
}
|
105 |
-
|
106 |
function wp_cart_ngg_template_handler($arg1,$arg2)
|
107 |
{
|
108 |
if($arg2=="gallery-wp-cart"){
|
@@ -159,7 +142,7 @@ function wpspc_apply_dynamic_tags_on_email($text, $ipn_data, $args)
|
|
159 |
$purchase_amount = get_post_meta( $order_id, 'wpsc_total_amount', true );
|
160 |
$purchase_date = date("Y-m-d");
|
161 |
$tags = array("{first_name}","{last_name}","{product_details}","{payer_email}","{transaction_id}","{purchase_amt}","{purchase_date}","{coupon_code}","{address}","{phone}","{order_id}");
|
162 |
-
$vals = array($ipn_data['first_name'], $ipn_data['last_name'], $args['product_details'], $args['payer_email'], $ipn_data['txn_id'], $purchase_amount, $purchase_date, $args['coupon_code'], $args['address'], $ipn_data['contact_phone'], $order_id);
|
163 |
|
164 |
$body = stripslashes(str_replace($tags, $vals, $text));
|
165 |
return $body;
|
86 |
return $customvariables;
|
87 |
}
|
88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
function wp_cart_ngg_template_handler($arg1,$arg2)
|
90 |
{
|
91 |
if($arg2=="gallery-wp-cart"){
|
142 |
$purchase_amount = get_post_meta( $order_id, 'wpsc_total_amount', true );
|
143 |
$purchase_date = date("Y-m-d");
|
144 |
$tags = array("{first_name}","{last_name}","{product_details}","{payer_email}","{transaction_id}","{purchase_amt}","{purchase_date}","{coupon_code}","{address}","{phone}","{order_id}");
|
145 |
+
$vals = array($ipn_data['first_name'], $ipn_data['last_name'], $args['product_details'], $args['payer_email'], $ipn_data['txn_id'], $purchase_amount, $purchase_date, (isset($args['coupon_code']) ? $args['coupon_code'] : '') , $args['address'], (isset($ipn_data['contact_phone']) ? $ipn_data['contact_phone'] : ''), $order_id);
|
146 |
|
147 |
$body = stripslashes(str_replace($tags, $vals, $text));
|
148 |
return $body;
|
wp_shopping_cart_shortcodes.php
CHANGED
@@ -31,7 +31,7 @@ function wp_cart_button_handler($atts){
|
|
31 |
}
|
32 |
$price = wspsc_strip_char_from_price_amount($price);
|
33 |
$shipping = wspsc_strip_char_from_price_amount($shipping);
|
34 |
-
|
35 |
return print_wp_cart_button_for_product($name, $price, $shipping, $var1, $var2, $var3, $atts);
|
36 |
}
|
37 |
|
@@ -44,7 +44,7 @@ function wp_cart_display_product_handler($atts)
|
|
44 |
'shipping' => '0',
|
45 |
'var1' => '',
|
46 |
'var2' => '',
|
47 |
-
'var3' => '',
|
48 |
'thumbnail' => '',
|
49 |
'thumb_target' => '',
|
50 |
'thumb_alt' => '',
|
@@ -68,7 +68,7 @@ function wp_cart_display_product_handler($atts)
|
|
68 |
//Use the product name as alt if the thumb_alt is not defined.
|
69 |
$thumb_alt = $name;
|
70 |
}
|
71 |
-
|
72 |
$price = wspsc_strip_char_from_price_amount($price);
|
73 |
$shipping = wspsc_strip_char_from_price_amount($shipping);
|
74 |
$thumbnail_code = '<img src="'.$thumbnail.'" alt="'.$thumb_alt.'">';
|
@@ -79,7 +79,7 @@ function wp_cart_display_product_handler($atts)
|
|
79 |
$currency_symbol = WP_CART_CURRENCY_SYMBOL;
|
80 |
$formatted_price = print_payment_currency($price, $currency_symbol);
|
81 |
$button_code = print_wp_cart_button_for_product($name, $price, $shipping, $var1, $var2, $var3, $atts);
|
82 |
-
|
83 |
$display_code = <<<EOT
|
84 |
<div class="wp_cart_product_display_box">
|
85 |
<div class="wp_cart_product_thumbnail">
|
@@ -101,7 +101,7 @@ function wp_cart_display_product_handler($atts)
|
|
101 |
</div>
|
102 |
</div>
|
103 |
EOT;
|
104 |
-
return $display_code;
|
105 |
}
|
106 |
|
107 |
function wspsc_compact_cart_handler($args)
|
@@ -112,11 +112,11 @@ function wspsc_compact_cart_handler($args)
|
|
112 |
|
113 |
$output = "";
|
114 |
$output .= '<div class="wpsps_compact_cart wpsps-cart-wrapper">';
|
115 |
-
$output .= '<div class="wpsps_compact_cart_container">';
|
116 |
if($num_items>0){
|
117 |
$cart_total = wpspc_get_total_cart_sub_total();
|
118 |
-
$item_message = ($num_items
|
119 |
-
$output .= $num_items . " " . $item_message;
|
120 |
$output .= '<span class="wpsps_compact_cart_price"> '. print_payment_currency($cart_total,$curSymbol).'</span>';
|
121 |
if(!empty($checkout_url)){
|
122 |
$output .= '<a class="wpsps_compact_cart_co_btn" href="'.$checkout_url.'">'.__("View Cart", "wordpress-simple-paypal-shopping-cart").'</a>';
|
@@ -138,20 +138,20 @@ function wspsc_compact_cart2_handler($args)
|
|
138 |
$checkout_url = get_option('cart_checkout_page_url');
|
139 |
//$curSymbol = WP_CART_CURRENCY_SYMBOL;
|
140 |
//$cart_total = wpspc_get_total_cart_sub_total();
|
141 |
-
|
142 |
$output = "";
|
143 |
$output .= '<div class="wspsc_compact_cart2 wpsps-cart-wrapper">';
|
144 |
$output .= '<div class="wspsc_compact_cart2_container">';
|
145 |
-
|
146 |
-
$output .= '<div class="wspsc_compact_cart2_inside">';
|
147 |
-
$item_message = ($num_items
|
148 |
-
|
149 |
if(!empty($checkout_url)){
|
150 |
$output .= '<a class="wspsc_compact_cart2_view_cart_link" href="'.$checkout_url.'">'.$num_items . " " . $item_message . '</a>';
|
151 |
}else{
|
152 |
$output .= $num_items . " " . $item_message;
|
153 |
}
|
154 |
-
$output .= '</div>';//end of .wspsc_compact_cart2_inside
|
155 |
|
156 |
$output .= '</div>';//end of .wspsc_compact_cart2_container
|
157 |
$output .= '</div>';
|
31 |
}
|
32 |
$price = wspsc_strip_char_from_price_amount($price);
|
33 |
$shipping = wspsc_strip_char_from_price_amount($shipping);
|
34 |
+
|
35 |
return print_wp_cart_button_for_product($name, $price, $shipping, $var1, $var2, $var3, $atts);
|
36 |
}
|
37 |
|
44 |
'shipping' => '0',
|
45 |
'var1' => '',
|
46 |
'var2' => '',
|
47 |
+
'var3' => '',
|
48 |
'thumbnail' => '',
|
49 |
'thumb_target' => '',
|
50 |
'thumb_alt' => '',
|
68 |
//Use the product name as alt if the thumb_alt is not defined.
|
69 |
$thumb_alt = $name;
|
70 |
}
|
71 |
+
|
72 |
$price = wspsc_strip_char_from_price_amount($price);
|
73 |
$shipping = wspsc_strip_char_from_price_amount($shipping);
|
74 |
$thumbnail_code = '<img src="'.$thumbnail.'" alt="'.$thumb_alt.'">';
|
79 |
$currency_symbol = WP_CART_CURRENCY_SYMBOL;
|
80 |
$formatted_price = print_payment_currency($price, $currency_symbol);
|
81 |
$button_code = print_wp_cart_button_for_product($name, $price, $shipping, $var1, $var2, $var3, $atts);
|
82 |
+
|
83 |
$display_code = <<<EOT
|
84 |
<div class="wp_cart_product_display_box">
|
85 |
<div class="wp_cart_product_thumbnail">
|
101 |
</div>
|
102 |
</div>
|
103 |
EOT;
|
104 |
+
return $display_code;
|
105 |
}
|
106 |
|
107 |
function wspsc_compact_cart_handler($args)
|
112 |
|
113 |
$output = "";
|
114 |
$output .= '<div class="wpsps_compact_cart wpsps-cart-wrapper">';
|
115 |
+
$output .= '<div class="wpsps_compact_cart_container">';
|
116 |
if($num_items>0){
|
117 |
$cart_total = wpspc_get_total_cart_sub_total();
|
118 |
+
$item_message = ($num_items <= 1) ? __("Item", "wordpress-simple-paypal-shopping-cart") : __("Items", "wordpress-simple-paypal-shopping-cart");
|
119 |
+
$output .= $num_items . " " . $item_message;
|
120 |
$output .= '<span class="wpsps_compact_cart_price"> '. print_payment_currency($cart_total,$curSymbol).'</span>';
|
121 |
if(!empty($checkout_url)){
|
122 |
$output .= '<a class="wpsps_compact_cart_co_btn" href="'.$checkout_url.'">'.__("View Cart", "wordpress-simple-paypal-shopping-cart").'</a>';
|
138 |
$checkout_url = get_option('cart_checkout_page_url');
|
139 |
//$curSymbol = WP_CART_CURRENCY_SYMBOL;
|
140 |
//$cart_total = wpspc_get_total_cart_sub_total();
|
141 |
+
|
142 |
$output = "";
|
143 |
$output .= '<div class="wspsc_compact_cart2 wpsps-cart-wrapper">';
|
144 |
$output .= '<div class="wspsc_compact_cart2_container">';
|
145 |
+
|
146 |
+
$output .= '<div class="wspsc_compact_cart2_inside">';
|
147 |
+
$item_message = ($num_items <= 1) ? __("Item", "wordpress-simple-paypal-shopping-cart") : __("Items", "wordpress-simple-paypal-shopping-cart");
|
148 |
+
|
149 |
if(!empty($checkout_url)){
|
150 |
$output .= '<a class="wspsc_compact_cart2_view_cart_link" href="'.$checkout_url.'">'.$num_items . " " . $item_message . '</a>';
|
151 |
}else{
|
152 |
$output .= $num_items . " " . $item_message;
|
153 |
}
|
154 |
+
$output .= '</div>';//end of .wspsc_compact_cart2_inside
|
155 |
|
156 |
$output .= '</div>';//end of .wspsc_compact_cart2_container
|
157 |
$output .= '</div>';
|
wp_shopping_cart_style.css
CHANGED
@@ -13,6 +13,10 @@ box-shadow: none;
|
|
13 |
width:auto !important;
|
14 |
margin: 0;
|
15 |
}
|
|
|
|
|
|
|
|
|
16 |
div.shopping_cart table{
|
17 |
border: none;
|
18 |
}
|
13 |
width:auto !important;
|
14 |
margin: 0;
|
15 |
}
|
16 |
+
.shopping_cart input[type="number"]{
|
17 |
+
max-width:5em !important;
|
18 |
+
text-align:center;
|
19 |
+
}
|
20 |
div.shopping_cart table{
|
21 |
border: none;
|
22 |
}
|
wp_shopping_cart_utility_functions.php
CHANGED
@@ -1,5 +1,41 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
function wpspc_get_total_cart_qty() {
|
4 |
$total_items = 0;
|
5 |
if (!isset($_SESSION['simpleCart'])) {
|
1 |
<?php
|
2 |
|
3 |
+
function wspsc_log_payment_debug($message, $success, $end = false) {
|
4 |
+
$logfile = WP_CART_PATH . 'ipn_handle_debug.txt';
|
5 |
+
$debug = get_option( 'wp_shopping_cart_enable_debug' );
|
6 |
+
if ( !$debug ) {
|
7 |
+
//Debug is not enabled.
|
8 |
+
return;
|
9 |
+
}
|
10 |
+
|
11 |
+
// Timestamp
|
12 |
+
$text = '[' . date('m/d/Y g:i A') . '] - ' . (($success) ? 'SUCCESS :' : 'FAILURE :') . $message . "\n";
|
13 |
+
if ($end) {
|
14 |
+
$text .= "\n------------------------------------------------------------------\n\n";
|
15 |
+
}
|
16 |
+
// Write to log
|
17 |
+
$fp = fopen($logfile, 'a');
|
18 |
+
fwrite($fp, $text);
|
19 |
+
fclose($fp);
|
20 |
+
}
|
21 |
+
|
22 |
+
function wspsc_reset_logfile()
|
23 |
+
{
|
24 |
+
$log_reset = true;
|
25 |
+
$logfile = WP_CART_PATH . 'ipn_handle_debug.txt';
|
26 |
+
$text = '['.date('m/d/Y g:i A').'] - SUCCESS : Log file reset';
|
27 |
+
$text .= "\n------------------------------------------------------------------\n\n";
|
28 |
+
$fp = fopen($logfile, 'w');
|
29 |
+
if($fp != FALSE) {
|
30 |
+
@fwrite($fp, $text);
|
31 |
+
@fclose($fp);
|
32 |
+
}
|
33 |
+
else{
|
34 |
+
$log_reset = false;
|
35 |
+
}
|
36 |
+
return $log_reset;
|
37 |
+
}
|
38 |
+
|
39 |
function wpspc_get_total_cart_qty() {
|
40 |
$total_items = 0;
|
41 |
if (!isset($_SESSION['simpleCart'])) {
|