WordPress Simple PayPal Shopping Cart - Version 4.3.0

Version Description

  • Added Brazilian Portuguese Language translation to the plugin. The translation file was submitted by Fabio Goncalves.
  • If the total shipping cost in the cart is 0 then the plugin will send a flag to paypal to not prompt for shipping address during checkout.
Download this release

Release Info

Developer mra13
Plugin Icon 128x128 WordPress Simple PayPal Shopping Cart
Version 4.3.0
Comparing to
See all releases

Code changes from version 4.2.8 to 4.3.0

images/shopping_cart_icon_2.png ADDED
Binary file
includes/admin/exported_orders_data.csv ADDED
@@ -0,0 +1 @@
 
1
+
includes/admin/index.html ADDED
File without changes
wp_shopping_cart_discounts_menu.php → includes/admin/wp_shopping_cart_menu_discounts.php RENAMED
File without changes
includes/admin/wp_shopping_cart_menu_email_settings.php ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function show_wp_cart_email_settings_page()
4
+ {
5
+ if(!current_user_can('manage_options')){
6
+ wp_die('You do not have permission to access the settings page.');
7
+ }
8
+
9
+ if (isset($_POST['wpspc_email_settings_update']))
10
+ {
11
+ $nonce = $_REQUEST['_wpnonce'];
12
+ if ( !wp_verify_nonce($nonce, 'wpspc_email_settings_update')){
13
+ wp_die('Error! Nonce Security Check Failed! Go back to email settings menu and save the settings again.');
14
+ }
15
+ update_option('wpspc_send_buyer_email', (isset($_POST['wpspc_send_buyer_email']) && $_POST['wpspc_send_buyer_email']!='') ? 'checked="checked"':'' );
16
+ update_option('wpspc_buyer_from_email', stripslashes((string)$_POST["wpspc_buyer_from_email"]));
17
+ update_option('wpspc_buyer_email_subj', stripslashes((string)$_POST["wpspc_buyer_email_subj"]));
18
+ update_option('wpspc_buyer_email_body', stripslashes((string)$_POST["wpspc_buyer_email_body"]));;
19
+
20
+ update_option('wpspc_send_seller_email', (isset($_POST['wpspc_send_seller_email']) && $_POST['wpspc_send_seller_email']!='') ? 'checked="checked"':'' );
21
+ update_option('wpspc_notify_email_address', stripslashes((string)$_POST["wpspc_notify_email_address"]));
22
+ update_option('wpspc_seller_email_subj', stripslashes((string)$_POST["wpspc_seller_email_subj"]));
23
+ update_option('wpspc_seller_email_body', stripslashes((string)$_POST["wpspc_seller_email_body"]));;
24
+
25
+ echo '<div id="message" class="updated fade"><p><strong>';
26
+ echo 'Email Settings Updated!';
27
+ echo '</strong></p></div>';
28
+ }
29
+ $wpspc_send_buyer_email = '';
30
+ if (get_option('wpspc_send_buyer_email')){
31
+ $wpspc_send_buyer_email = 'checked="checked"';
32
+ }
33
+ $wpspc_buyer_from_email = get_option('wpspc_buyer_from_email');
34
+ $wpspc_buyer_email_subj = get_option('wpspc_buyer_email_subj');
35
+ $wpspc_buyer_email_body = get_option('wpspc_buyer_email_body');
36
+ $wpspc_send_seller_email = '';
37
+ if (get_option('wpspc_send_seller_email')){
38
+ $wpspc_send_seller_email = 'checked="checked"';
39
+ }
40
+ $wpspc_notify_email_address = get_option('wpspc_notify_email_address');
41
+ if(empty($wpspc_notify_email_address)){
42
+ $wpspc_notify_email_address = get_bloginfo('admin_email'); //default value
43
+ }
44
+ $wpspc_seller_email_subj = get_option('wpspc_seller_email_subj');
45
+ if(empty($wpspc_seller_email_subj)){
46
+ $wpspc_seller_email_subj = "Notification of product sale";
47
+ }
48
+ $wpspc_seller_email_body = get_option('wpspc_seller_email_body');
49
+ if(empty($wpspc_seller_email_body)){
50
+ $wpspc_seller_email_body = "Dear Seller\n".
51
+ "\nThis mail is to notify you of a product sale.\n".
52
+ "\n{product_details}".
53
+ "\n\nThe sale was made to {first_name} {last_name} ({payer_email})".
54
+ "\n\nThanks";
55
+ }
56
+ ?>
57
+
58
+ <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
59
+ <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
60
+ <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>
61
+ </div>
62
+
63
+ <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
64
+ <?php wp_nonce_field('wpspc_email_settings_update'); ?>
65
+ <input type="hidden" name="info_update" id="info_update" value="true" />
66
+
67
+ <div class="postbox">
68
+ <h3 class="hndle"><label for="title"><?php _e("Purchase Confirmation Email Settings", "wordpress-simple-paypal-shopping-cart");?></label></h3>
69
+ <div class="inside">
70
+
71
+ <p><i><?php _e("The following options affect the emails that gets sent to your buyers after a purchase.", "wordpress-simple-paypal-shopping-cart");?></i></p>
72
+
73
+ <table class="form-table">
74
+
75
+ <tr valign="top">
76
+ <th scope="row"><?php _e("Send Emails to Buyer After Purchase", "wordpress-simple-paypal-shopping-cart");?></th>
77
+ <td><input type="checkbox" name="wpspc_send_buyer_email" value="1" <?php echo $wpspc_send_buyer_email; ?> /><span class="description"><?php _e("If checked the plugin will send an email to the buyer with the sale details. If digital goods are purchased then the email will contain the download links for the purchased products.", "wordpress-simple-paypal-shopping-cart");?></a></span></td>
78
+ </tr>
79
+
80
+ <tr valign="top">
81
+ <th scope="row"><?php _e("From Email Address", "wordpress-simple-paypal-shopping-cart");?></th>
82
+ <td><input type="text" name="wpspc_buyer_from_email" value="<?php echo esc_attr($wpspc_buyer_from_email); ?>" size="50" />
83
+ <br /><p class="description"><?php _e("Example: Your Name &lt;sales@your-domain.com&gt; This is the email address that will be used to send the email to the buyer. This name and email address will appear in the from field of the email.", "wordpress-simple-paypal-shopping-cart");?></p></td>
84
+ </tr>
85
+
86
+ <tr valign="top">
87
+ <th scope="row"><?php _e("Buyer Email Subject", "wordpress-simple-paypal-shopping-cart");?></th>
88
+ <td><input type="text" name="wpspc_buyer_email_subj" value="<?php echo esc_attr($wpspc_buyer_email_subj); ?>" size="50" />
89
+ <br /><p class="description"><?php _e("This is the subject of the email that will be sent to the buyer.", "wordpress-simple-paypal-shopping-cart");?></p></td>
90
+ </tr>
91
+
92
+ <tr valign="top">
93
+ <th scope="row"><?php _e("Buyer Email Body", "wordpress-simple-paypal-shopping-cart");?></th>
94
+ <td>
95
+ <textarea name="wpspc_buyer_email_body" cols="90" rows="7"><?php echo esc_textarea($wpspc_buyer_email_body); ?></textarea>
96
+ <br /><p class="description"><?php _e("This is the body of the email that will be sent to the buyer. Do not change the text within the braces {}. You can use the following email tags in this email body field:", "wordpress-simple-paypal-shopping-cart");?>
97
+ <br />{first_name} – <?php _e("First name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
98
+ <br />{last_name} – <?php _e("Last name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
99
+ <br />{payer_email} – <?php _e("Email Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
100
+ <br />{address} – <?php _e("Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
101
+ <br />{product_details} – <?php _e("The item details of the purchased product (this will include the download link for digital items).", "wordpress-simple-paypal-shopping-cart");?>
102
+ <br />{transaction_id} – <?php _e("The unique transaction ID of the purchase", "wordpress-simple-paypal-shopping-cart");?>
103
+ <br />{purchase_amt} – <?php _e("The amount paid for the current transaction", "wordpress-simple-paypal-shopping-cart");?>
104
+ <br />{purchase_date} – <?php _e("The date of the purchase", "wordpress-simple-paypal-shopping-cart");?>
105
+ <br />{coupon_code} – <?php _e("Coupon code applied to the purchase", "wordpress-simple-paypal-shopping-cart");?>
106
+ </p></td>
107
+ </tr>
108
+
109
+ <tr valign="top">
110
+ <th scope="row"><?php _e("Send Emails to Seller After Purchase", "wordpress-simple-paypal-shopping-cart");?></th>
111
+ <td><input type="checkbox" name="wpspc_send_seller_email" value="1" <?php echo $wpspc_send_seller_email; ?> /><span class="description"><?php _e("If checked the plugin will send an email to the seller with the sale details", "wordpress-simple-paypal-shopping-cart");?></a></span></td>
112
+ </tr>
113
+
114
+ <tr valign="top">
115
+ <th scope="row"><?php _e("Notification Email Address*", "wordpress-simple-paypal-shopping-cart");?></th>
116
+ <td><input type="text" name="wpspc_notify_email_address" value="<?php echo esc_attr($wpspc_notify_email_address); ?>" size="50" />
117
+ <br /><p class="description"><?php _e("This is the email address where the seller will be notified of product sales. You can put multiple email addresses separated by comma (,) in the above field to send the notification to multiple email addresses.", "wordpress-simple-paypal-shopping-cart");?></p></td>
118
+ </tr>
119
+
120
+ <tr valign="top">
121
+ <th scope="row"><?php _e("Seller Email Subject*", "wordpress-simple-paypal-shopping-cart");?></th>
122
+ <td><input type="text" name="wpspc_seller_email_subj" value="<?php echo esc_attr($wpspc_seller_email_subj); ?>" size="50" />
123
+ <br /><p class="description"><?php _e("This is the subject of the email that will be sent to the seller for record.", "wordpress-simple-paypal-shopping-cart");?></p></td>
124
+ </tr>
125
+
126
+ <tr valign="top">
127
+ <th scope="row"><?php _e("Seller Email Body*", "wordpress-simple-paypal-shopping-cart");?></th>
128
+ <td>
129
+ <textarea name="wpspc_seller_email_body" cols="90" rows="7"><?php echo esc_textarea($wpspc_seller_email_body); ?></textarea>
130
+ <br /><p class="description"><?php _e("This is the body of the email that will be sent to the seller for record. Do not change the text within the braces {}. You can use the following email tags in this email body field:", "wordpress-simple-paypal-shopping-cart");?>
131
+ <br />{first_name} – <?php _e("First name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
132
+ <br />{last_name} – <?php _e("Last name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
133
+ <br />{payer_email} – <?php _e("Email Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
134
+ <br />{address} – <?php _e("Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
135
+ <br />{product_details} – <?php _e("The item details of the purchased product (this will include the download link for digital items).", "wordpress-simple-paypal-shopping-cart");?>
136
+ <br />{transaction_id} – <?php _e("The unique transaction ID of the purchase", "wordpress-simple-paypal-shopping-cart");?>
137
+ <br />{purchase_amt} – <?php _e("The amount paid for the current transaction", "wordpress-simple-paypal-shopping-cart");?>
138
+ <br />{purchase_date} – <?php _e("The date of the purchase", "wordpress-simple-paypal-shopping-cart");?>
139
+ <br />{coupon_code} – <?php _e("Coupon code applied to the purchase", "wordpress-simple-paypal-shopping-cart");?>
140
+ </p></td>
141
+ </tr>
142
+
143
+ </table>
144
+
145
+ </div></div>
146
+
147
+ <div class="submit">
148
+ <input type="submit" class="button-primary" name="wpspc_email_settings_update" value="<?php echo (__("Update Options &raquo;", "wordpress-simple-paypal-shopping-cart")) ?>" />
149
+ </div>
150
+ </form>
151
+
152
+ <?php
153
+ wpspsc_settings_menu_footer();
154
+ }
includes/admin/wp_shopping_cart_menu_general_settings.php ADDED
@@ -0,0 +1,345 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * General settings menu page
5
+ */
6
+ function show_wp_cart_options_page ()
7
+ {
8
+ if(!current_user_can('manage_options')){
9
+ wp_die('You do not have permission to access this settings page.');
10
+ }
11
+
12
+ if(isset($_POST['wspsc_reset_logfile'])) {
13
+ // Reset the debug log file
14
+ if(wspsc_reset_logfile()){
15
+ echo '<div id="message" class="updated fade"><p><strong>Debug log file has been reset!</strong></p></div>';
16
+ }
17
+ else{
18
+ echo '<div id="message" class="updated fade"><p><strong>Debug log file could not be reset!</strong></p></div>';
19
+ }
20
+ }
21
+ if (isset($_POST['info_update']))
22
+ {
23
+ $nonce = $_REQUEST['_wpnonce'];
24
+ if ( !wp_verify_nonce($nonce, 'wp_simple_cart_settings_update')){
25
+ wp_die('Error! Nonce Security Check Failed! Go back to settings menu and save the settings again.');
26
+ }
27
+
28
+ update_option('cart_payment_currency', sanitize_text_field($_POST["cart_payment_currency"]));
29
+ update_option('cart_currency_symbol', sanitize_text_field($_POST["cart_currency_symbol"]));
30
+ update_option('cart_base_shipping_cost', sanitize_text_field($_POST["cart_base_shipping_cost"]));
31
+ update_option('cart_free_shipping_threshold', sanitize_text_field($_POST["cart_free_shipping_threshold"]));
32
+ update_option('wp_shopping_cart_collect_address', (isset($_POST['wp_shopping_cart_collect_address']) && $_POST['wp_shopping_cart_collect_address']!='') ? 'checked="checked"':'' );
33
+ update_option('wp_shopping_cart_use_profile_shipping', (isset($_POST['wp_shopping_cart_use_profile_shipping']) && $_POST['wp_shopping_cart_use_profile_shipping']!='') ? 'checked="checked"':'' );
34
+
35
+ update_option('cart_paypal_email', sanitize_email($_POST["cart_paypal_email"]));
36
+ update_option('addToCartButtonName', sanitize_text_field($_POST["addToCartButtonName"]));
37
+ update_option('wp_cart_title', sanitize_text_field($_POST["wp_cart_title"]));
38
+ update_option('wp_cart_empty_text', sanitize_text_field($_POST["wp_cart_empty_text"]));
39
+ update_option('cart_return_from_paypal_url', sanitize_text_field($_POST["cart_return_from_paypal_url"]));
40
+ update_option('cart_cancel_from_paypal_url', sanitize_text_field($_POST["cart_cancel_from_paypal_url"]));
41
+ update_option('cart_products_page_url', sanitize_text_field($_POST["cart_products_page_url"]));
42
+
43
+ update_option('wp_shopping_cart_auto_redirect_to_checkout_page', (isset($_POST['wp_shopping_cart_auto_redirect_to_checkout_page']) && $_POST['wp_shopping_cart_auto_redirect_to_checkout_page']!='') ? 'checked="checked"':'' );
44
+ update_option('cart_checkout_page_url', sanitize_text_field($_POST["cart_checkout_page_url"]));
45
+ update_option('wspsc_open_pp_checkout_in_new_tab', (isset($_POST['wspsc_open_pp_checkout_in_new_tab']) && $_POST['wspsc_open_pp_checkout_in_new_tab']!='') ? 'checked="checked"':'' );
46
+ update_option('wp_shopping_cart_reset_after_redirection_to_return_page', (isset($_POST['wp_shopping_cart_reset_after_redirection_to_return_page']) && $_POST['wp_shopping_cart_reset_after_redirection_to_return_page']!='') ? 'checked="checked"':'' );
47
+
48
+ update_option('wp_shopping_cart_image_hide', (isset($_POST['wp_shopping_cart_image_hide']) && $_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
49
+ update_option('wp_cart_note_to_seller_text', sanitize_text_field($_POST["wp_cart_note_to_seller_text"]));
50
+ update_option('wp_cart_paypal_co_page_style', sanitize_text_field($_POST["wp_cart_paypal_co_page_style"]));
51
+ update_option('wp_shopping_cart_strict_email_check', (isset($_POST['wp_shopping_cart_strict_email_check']) && $_POST['wp_shopping_cart_strict_email_check']!='') ? 'checked="checked"':'' );
52
+ update_option('wspsc_disable_nonce_add_cart', (isset($_POST['wspsc_disable_nonce_add_cart']) && $_POST['wspsc_disable_nonce_add_cart']!='') ? 'checked="checked"':'' );
53
+ update_option('wp_use_aff_platform', (isset($_POST['wp_use_aff_platform']) && $_POST['wp_use_aff_platform']!='') ? 'checked="checked"':'' );
54
+
55
+ update_option('wp_shopping_cart_enable_sandbox', (isset($_POST['wp_shopping_cart_enable_sandbox']) && $_POST['wp_shopping_cart_enable_sandbox']!='') ? 'checked="checked"':'' );
56
+ update_option('wp_shopping_cart_enable_debug', (isset($_POST['wp_shopping_cart_enable_debug']) && $_POST['wp_shopping_cart_enable_debug']!='') ? 'checked="checked"':'' );
57
+
58
+ echo '<div id="message" class="updated fade">';
59
+ echo '<p><strong>'.(__("Options Updated!", "wordpress-simple-paypal-shopping-cart")).'</strong></p></div>';
60
+ }
61
+
62
+ $defaultCurrency = get_option('cart_payment_currency');
63
+ if (empty($defaultCurrency)) $defaultCurrency = __("USD", "wordpress-simple-paypal-shopping-cart");
64
+
65
+ $defaultSymbol = get_option('cart_currency_symbol');
66
+ if (empty($defaultSymbol)) $defaultSymbol = __("$", "wordpress-simple-paypal-shopping-cart");
67
+
68
+ $baseShipping = get_option('cart_base_shipping_cost');
69
+ if (empty($baseShipping)) $baseShipping = 0;
70
+
71
+ $cart_free_shipping_threshold = get_option('cart_free_shipping_threshold');
72
+
73
+ $defaultEmail = get_option('cart_paypal_email');
74
+ if (empty($defaultEmail)) $defaultEmail = get_bloginfo('admin_email');
75
+
76
+ $return_url = get_option('cart_return_from_paypal_url');
77
+ $cancel_url = get_option('cart_cancel_from_paypal_url');
78
+ $addcart = get_option('addToCartButtonName');
79
+ if (empty($addcart)) $addcart = __("Add to Cart", "wordpress-simple-paypal-shopping-cart");
80
+
81
+ $title = get_option('wp_cart_title');
82
+ $emptyCartText = get_option('wp_cart_empty_text');
83
+ $cart_products_page_url = get_option('cart_products_page_url');
84
+ $cart_checkout_page_url = get_option('cart_checkout_page_url');
85
+
86
+ if (get_option('wp_shopping_cart_auto_redirect_to_checkout_page'))
87
+ $wp_shopping_cart_auto_redirect_to_checkout_page = 'checked="checked"';
88
+ else
89
+ $wp_shopping_cart_auto_redirect_to_checkout_page = '';
90
+
91
+ if (get_option('wspsc_open_pp_checkout_in_new_tab'))
92
+ $wspsc_open_pp_checkout_in_new_tab = 'checked="checked"';
93
+ else
94
+ $wspsc_open_pp_checkout_in_new_tab = '';
95
+
96
+ if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
97
+ $wp_shopping_cart_reset_after_redirection_to_return_page = 'checked="checked"';
98
+ else
99
+ $wp_shopping_cart_reset_after_redirection_to_return_page = '';
100
+
101
+ if (get_option('wp_shopping_cart_collect_address'))
102
+ $wp_shopping_cart_collect_address = 'checked="checked"';
103
+ else
104
+ $wp_shopping_cart_collect_address = '';
105
+
106
+ if (get_option('wp_shopping_cart_use_profile_shipping'))
107
+ $wp_shopping_cart_use_profile_shipping = 'checked="checked"';
108
+ else
109
+ $wp_shopping_cart_use_profile_shipping = '';
110
+
111
+ if (get_option('wp_shopping_cart_image_hide'))
112
+ $wp_cart_image_hide = 'checked="checked"';
113
+ else
114
+ $wp_cart_image_hide = '';
115
+
116
+ $wp_cart_note_to_seller_text = get_option('wp_cart_note_to_seller_text');
117
+ $wp_cart_paypal_co_page_style = get_option('wp_cart_paypal_co_page_style');
118
+
119
+ $wp_shopping_cart_strict_email_check = '';
120
+ if (get_option('wp_shopping_cart_strict_email_check')){
121
+ $wp_shopping_cart_strict_email_check = 'checked="checked"';
122
+ }
123
+
124
+ $wspsc_disable_nonce_add_cart = '';
125
+ if (get_option('wspsc_disable_nonce_add_cart')){
126
+ $wspsc_disable_nonce_add_cart = 'checked="checked"';
127
+ }
128
+
129
+ if (get_option('wp_use_aff_platform')){
130
+ $wp_use_aff_platform = 'checked="checked"';
131
+ }
132
+ else{
133
+ $wp_use_aff_platform = '';
134
+ }
135
+
136
+ //$wp_shopping_cart_enable_sandbox = get_option('wp_shopping_cart_enable_sandbox');
137
+ if (get_option('wp_shopping_cart_enable_sandbox'))
138
+ $wp_shopping_cart_enable_sandbox = 'checked="checked"';
139
+ else
140
+ $wp_shopping_cart_enable_sandbox = '';
141
+
142
+ $wp_shopping_cart_enable_debug = '';
143
+ if (get_option('wp_shopping_cart_enable_debug')){
144
+ $wp_shopping_cart_enable_debug = 'checked="checked"';
145
+ }
146
+ ?>
147
+ <h2><?php _e("Simple PayPal Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart"); ?> v <?php echo WP_CART_VERSION; ?></h2>
148
+
149
+ <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
150
+ <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
151
+ <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>
152
+ </div>
153
+
154
+ <div class="postbox">
155
+ <h3 class="hndle"><label for="title"><?php _e("Quick Usage Guide", "wordpress-simple-paypal-shopping-cart"); ?></label></h3>
156
+ <div class="inside">
157
+
158
+ <p><strong><?php _e("Step 1) ","wordpress-simple-paypal-shopping-cart"); ?></strong><?php _e("To add an 'Add to Cart' button for a product simply add the shortcode", "wordpress-simple-paypal-shopping-cart"); ?> [wp_cart_button name="<?php _e("PRODUCT-NAME", "wordpress-simple-paypal-shopping-cart"); ?>" price="<?php _e("PRODUCT-PRICE", "wordpress-simple-paypal-shopping-cart"); ?>"] <?php _e("to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price of your product.", "wordpress-simple-paypal-shopping-cart"); ?></p>
159
+ <p><?php _e("Example add to cart button shortcode usage:", "wordpress-simple-paypal-shopping-cart");?> <p style="background-color: #DDDDDD; padding: 5px; display: inline;">[wp_cart_button name="Test Product" price="29.95"]</p></p>
160
+ <p><strong><?php _e("Step 2) ","wordpress-simple-paypal-shopping-cart"); ?></strong><?php _e("To add the shopping cart to a post or page (example: a checkout page) simply add the shortcode", "wordpress-simple-paypal-shopping-cart"); ?> [show_wp_shopping_cart] <?php _e("to a post or page or use the sidebar widget to add the shopping cart to the sidebar.", "wordpress-simple-paypal-shopping-cart"); ?></p>
161
+ <p><?php _e("Example shopping cart shortcode usage:", "wordpress-simple-paypal-shopping-cart");?> <p style="background-color: #DDDDDD; padding: 5px; display: inline;">[show_wp_shopping_cart]</p></p>
162
+ </div></div>
163
+
164
+ <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
165
+ <?php wp_nonce_field('wp_simple_cart_settings_update'); ?>
166
+ <input type="hidden" name="info_update" id="info_update" value="true" />
167
+ <?php
168
+ echo '
169
+ <div class="postbox">
170
+ <h3 class="hndle"><label for="title">'.(__("PayPal and Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart")).'</label></h3>
171
+ <div class="inside">';
172
+
173
+ echo '
174
+ <table class="form-table">
175
+ <tr valign="top">
176
+ <th scope="row">'.(__("Paypal Email Address", "wordpress-simple-paypal-shopping-cart")).'</th>
177
+ <td><input type="text" name="cart_paypal_email" value="'.esc_attr($defaultEmail).'" size="40" /></td>
178
+ </tr>
179
+ <tr valign="top">
180
+ <th scope="row">'.(__("Shopping Cart title", "wordpress-simple-paypal-shopping-cart")).'</th>
181
+ <td><input type="text" name="wp_cart_title" value="'.esc_attr($title).'" size="40" /></td>
182
+ </tr>
183
+ <tr valign="top">
184
+ <th scope="row">'.(__("Text/Image to Show When Cart Empty", "wordpress-simple-paypal-shopping-cart")).'</th>
185
+ <td><input type="text" name="wp_cart_empty_text" value="'.esc_attr($emptyCartText).'" size="60" /><br />'.(__("You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty", "wordpress-simple-paypal-shopping-cart")).'</td>
186
+ </tr>
187
+ <tr valign="top">
188
+ <th scope="row">'.(__("Currency", "wordpress-simple-paypal-shopping-cart")).'</th>
189
+ <td><input type="text" name="cart_payment_currency" value="'.esc_attr($defaultCurrency).'" size="6" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' USD, EUR, GBP, AUD)</td>
190
+ </tr>
191
+ <tr valign="top">
192
+ <th scope="row">'.(__("Currency Symbol", "wordpress-simple-paypal-shopping-cart")).'</th>
193
+ <td><input type="text" name="cart_currency_symbol" value="'.esc_attr($defaultSymbol).'" size="3" style="width: 2em;" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' $, &#163;, &#8364;)
194
+ </td>
195
+ </tr>
196
+
197
+ <tr valign="top">
198
+ <th scope="row">'.(__("Base Shipping Cost", "wordpress-simple-paypal-shopping-cart")).'</th>
199
+ <td><input type="text" name="cart_base_shipping_cost" value="'.esc_attr($baseShipping).'" size="5" /> <br />'.(__("This is the base shipping cost that will be added to the total of individual products shipping cost. Put 0 if you do not want to charge shipping cost or use base shipping cost.", "wordpress-simple-paypal-shopping-cart")).' <a href="http://www.tipsandtricks-hq.com/ecommerce/?p=297" target="_blank">'.(__("Learn More on Shipping Calculation", "wordpress-simple-paypal-shopping-cart")).'</a></td>
200
+ </tr>
201
+
202
+ <tr valign="top">
203
+ <th scope="row">'.(__("Free Shipping for Orders Over", "wordpress-simple-paypal-shopping-cart")).'</th>
204
+ <td><input type="text" name="cart_free_shipping_threshold" value="'.esc_attr($cart_free_shipping_threshold).'" size="5" /> <br />'.(__("When a customer orders more than this amount he/she will get free shipping. Leave empty if you do not want to use it.", "wordpress-simple-paypal-shopping-cart")).'</td>
205
+ </tr>
206
+
207
+ <tr valign="top">
208
+ <th scope="row">'.(__("Must Collect Shipping Address on PayPal", "wordpress-simple-paypal-shopping-cart")).'</th>
209
+ <td><input type="checkbox" name="wp_shopping_cart_collect_address" value="1" '.$wp_shopping_cart_collect_address.' /><br />'.(__("If checked the customer will be forced to enter a shipping address on PayPal when checking out.", "wordpress-simple-paypal-shopping-cart")).'</td>
210
+ </tr>
211
+
212
+ <tr valign="top">
213
+ <th scope="row">'.(__("Use PayPal Profile Based Shipping", "wordpress-simple-paypal-shopping-cart")).'</th>
214
+ <td><input type="checkbox" name="wp_shopping_cart_use_profile_shipping" value="1" '.$wp_shopping_cart_use_profile_shipping.' /><br />'.(__("Check this if you want to use", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com/setup-paypal-profile-based-shipping-5865" target="_blank">'.(__("PayPal profile based shipping", "wordpress-simple-paypal-shopping-cart")).'</a>. '.(__("Using this will ignore any other shipping options that you have specified in this plugin.", "wordpress-simple-paypal-shopping-cart")).'</td>
215
+ </tr>
216
+
217
+ <tr valign="top">
218
+ <th scope="row">'.(__("Add to Cart button text or Image", "wordpress-simple-paypal-shopping-cart")).'</th>
219
+ <td><input type="text" name="addToCartButtonName" value="'.esc_attr($addcart).'" size="100" />
220
+ <br />'.(__("To use a customized image as the button simply enter the URL of the image file.", "wordpress-simple-paypal-shopping-cart")).' '.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' http://www.your-domain.com/wp-content/plugins/wordpress-paypal-shopping-cart/images/buy_now_button.png
221
+ <br />You can download nice add to cart button images from <a href="http://www.tipsandtricks-hq.com/ecommerce/add-to-cart-button-images-for-shopping-cart-631" target="_blank">this page</a>.
222
+ </td>
223
+ </tr>
224
+
225
+ <tr valign="top">
226
+ <th scope="row">'.(__("Return URL", "wordpress-simple-paypal-shopping-cart")).'</th>
227
+ <td><input type="text" name="cart_return_from_paypal_url" value="'.esc_attr($return_url).'" size="100" /><br />'.(__("This is the URL the customer will be redirected to after a successful payment", "wordpress-simple-paypal-shopping-cart")).'</td>
228
+ </tr>
229
+
230
+ <tr valign="top">
231
+ <th scope="row">'.(__("Cancel URL", "wordpress-simple-paypal-shopping-cart")).'</th>
232
+ <td><input type="text" name="cart_cancel_from_paypal_url" value="'.esc_attr($cancel_url).'" size="100" /><br />'.(__("The customer will be sent to the above page if the cancel link is clicked on the PayPal checkout page.", "wordpress-simple-paypal-shopping-cart")).'</td>
233
+ </tr>
234
+
235
+ <tr valign="top">
236
+ <th scope="row">'.(__("Products Page URL", "wordpress-simple-paypal-shopping-cart")).'</th>
237
+ <td><input type="text" name="cart_products_page_url" value="'.esc_attr($cart_products_page_url).'" size="100" /><br />'.(__("This is the URL of your products page if you have any. If used, the shopping cart widget will display a link to this page when cart is empty", "wordpress-simple-paypal-shopping-cart")).'</td>
238
+ </tr>
239
+
240
+ <tr valign="top">
241
+ <th scope="row">'.(__("Automatic redirection to checkout page", "wordpress-simple-paypal-shopping-cart")).'</th>
242
+ <td><input type="checkbox" name="wp_shopping_cart_auto_redirect_to_checkout_page" value="1" '.$wp_shopping_cart_auto_redirect_to_checkout_page.' />
243
+ '.(__("Checkout Page URL", "wordpress-simple-paypal-shopping-cart")).': <input type="text" name="cart_checkout_page_url" value="'.$cart_checkout_page_url.'" size="60" />
244
+ <br />'.(__("If checked the visitor will be redirected to the Checkout page after a product is added to the cart. You must enter a URL in the Checkout Page URL field for this to work.", "wordpress-simple-paypal-shopping-cart")).'</td>
245
+ </tr>
246
+
247
+ <tr valign="top">
248
+ <th scope="row">'.(__("Open PayPal Checkout Page in a New Tab", "wordpress-simple-paypal-shopping-cart")).'</th>
249
+ <td><input type="checkbox" name="wspsc_open_pp_checkout_in_new_tab" value="1" '.$wspsc_open_pp_checkout_in_new_tab.' />
250
+ <br />'.(__("If checked the PayPal checkout page will be opened in a new tab/window when the user clicks the checkout button.", "wordpress-simple-paypal-shopping-cart")).'</td>
251
+ </tr>
252
+
253
+ <tr valign="top">
254
+ <th scope="row">'.(__("Reset Cart After Redirection to Return Page", "wordpress-simple-paypal-shopping-cart")).'</th>
255
+ <td><input type="checkbox" name="wp_shopping_cart_reset_after_redirection_to_return_page" value="1" '.$wp_shopping_cart_reset_after_redirection_to_return_page.' />
256
+ <br />'.(__("If checked the shopping cart will be reset when the customer lands on the return URL (Thank You) page.", "wordpress-simple-paypal-shopping-cart")).'</td>
257
+ </tr>
258
+ </table>
259
+
260
+
261
+ <table class="form-table">
262
+ <tr valign="top">
263
+ <th scope="row">'.(__("Hide Shopping Cart Image", "wordpress-simple-paypal-shopping-cart")).'</th>
264
+ <td><input type="checkbox" name="wp_shopping_cart_image_hide" value="1" '.$wp_cart_image_hide.' /><br />'.(__("If ticked the shopping cart image will not be shown.", "wordpress-simple-paypal-shopping-cart")).'</td>
265
+ </tr>
266
+ </table>
267
+
268
+ <table class="form-table">
269
+ <tr valign="top">
270
+ <th scope="row">'.(__("Customize the Note to Seller Text", "wordpress-simple-paypal-shopping-cart")).'</th>
271
+ <td><input type="text" name="wp_cart_note_to_seller_text" value="'.esc_attr($wp_cart_note_to_seller_text).'" size="100" />
272
+ <br />'.(__("Specify the text that you want to use for the note field on PayPal checkout page to collect special instruction (leave this field empty if you don't need to customize it). The default label for the note field is \"Add special instructions to merchant\".", "wordpress-simple-paypal-shopping-cart")).'</td>
273
+ </tr>
274
+ </table>
275
+
276
+ <table class="form-table">
277
+ <tr valign="top">
278
+ <th scope="row">'.(__("Custom Checkout Page Style Name", "wordpress-simple-paypal-shopping-cart")).'</th>
279
+ <td><input type="text" name="wp_cart_paypal_co_page_style" value="'.esc_attr($wp_cart_paypal_co_page_style).'" size="40" />
280
+ <br />'.(__("Specify the page style name here if you want to customize the paypal checkout page with custom page style otherwise leave this field empty.", "wordpress-simple-paypal-shopping-cart")).'</td>
281
+ </tr>
282
+ </table>
283
+
284
+ <table class="form-table">
285
+ <tr valign="top">
286
+ <th scope="row">'.(__("Use Strict PayPal Email Address Checking", "wordpress-simple-paypal-shopping-cart")).'</th>
287
+ <td><input type="checkbox" name="wp_shopping_cart_strict_email_check" value="1" '.$wp_shopping_cart_strict_email_check.' /><br />'.(__("If checked the script will check to make sure that the PayPal email address specified is the same as the account where the payment was deposited (Usage of PayPal Email Alias will fail too).", "wordpress-simple-paypal-shopping-cart")).'</td>
288
+ </tr>
289
+ </table>
290
+
291
+ <table class="form-table">
292
+ <tr valign="top">
293
+ <th scope="row">'.(__("Disable Nonce Check for Add to Cart", "wordpress-simple-paypal-shopping-cart")).'</th>
294
+ <td><input type="checkbox" name="wspsc_disable_nonce_add_cart" value="1" '.$wspsc_disable_nonce_add_cart.' />
295
+ <br />'.(__("Check this option if you are using a caching solution on your site. This will bypass the nonce check on the add to cart buttons.", "wordpress-simple-paypal-shopping-cart")).'</td>
296
+ </tr>
297
+ </table>
298
+
299
+ <table class="form-table">
300
+ <tr valign="top">
301
+ <th scope="row">'.(__("Use WP Affiliate Platform", "wordpress-simple-paypal-shopping-cart")).'</th>
302
+ <td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
303
+ <br />'.(__("Check this if using with the", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com/?p=1474" target="_blank">WP Affiliate Platform plugin</a>. '.(__("This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales", "wordpress-simple-paypal-shopping-cart")).'</td>
304
+ </tr>
305
+ </table>
306
+ </div></div>
307
+
308
+ <div class="postbox">
309
+ <h3 class="hndle"><label for="title">'.(__("Testing and Debugging Settings", "wordpress-simple-paypal-shopping-cart")).'</label></h3>
310
+ <div class="inside">
311
+
312
+ <table class="form-table">
313
+
314
+ <tr valign="top">
315
+ <th scope="row">'.(__("Enable Debug", "wordpress-simple-paypal-shopping-cart")).'</th>
316
+ <td><input type="checkbox" name="wp_shopping_cart_enable_debug" value="1" '.$wp_shopping_cart_enable_debug.' />
317
+ <br />'.(__("If checked, debug output will be written to the log file. This is useful for troubleshooting post payment failures", "wordpress-simple-paypal-shopping-cart")).'
318
+ <p><i>You can check the debug log file by clicking on the link below (The log file can be viewed using any text editor):</i>
319
+ <ul>
320
+ <li><a href="'.WP_CART_URL.'/ipn_handle_debug.txt" target="_blank">ipn_handle_debug.txt</a></li>
321
+ </ul>
322
+ </p>
323
+ <input type="submit" name="wspsc_reset_logfile" class="button" style="font-weight:bold; color:red" value="Reset Debug Log file"/>
324
+ <p class="description">It will reset the debug log file and timestamp it with a log file reset message.</a>
325
+ </td></tr>
326
+
327
+ <tr valign="top">
328
+ <th scope="row">'.(__("Enable Sandbox Testing", "wordpress-simple-paypal-shopping-cart")).'</th>
329
+ <td><input type="checkbox" name="wp_shopping_cart_enable_sandbox" value="1" '.$wp_shopping_cart_enable_sandbox.' />
330
+ <br />'.(__("Check this option if you want to do PayPal sandbox testing. You will need to create a PayPal sandbox account from PayPal Developer site", "wordpress-simple-paypal-shopping-cart")).'</td>
331
+ </tr>
332
+
333
+ </table>
334
+
335
+ </div>
336
+ </div>
337
+
338
+ <div class="submit">
339
+ <input type="submit" class="button-primary" name="info_update" value="'.(__("Update Options &raquo;", "wordpress-simple-paypal-shopping-cart")).'" />
340
+ </div>
341
+ </form>
342
+ ';
343
+ echo (__("Like the Simple WordPress Shopping Cart Plugin?", "wordpress-simple-paypal-shopping-cart")).' <a href="https://wordpress.org/support/plugin/wordpress-simple-paypal-shopping-cart/reviews/?filter=5" target="_blank">'.(__("Give it a good rating", "wordpress-simple-paypal-shopping-cart")).'</a>';
344
+ wpspsc_settings_menu_footer();
345
+ }
includes/admin/wp_shopping_cart_menu_tools.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function show_wp_cart_tools_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
+ if (isset($_POST['wspsc_export_orders_data'])) {
9
+ $nonce = $_REQUEST['_wpnonce'];
10
+ if (!wp_verify_nonce($nonce, 'wspsc_tools_export_orders_data')) {
11
+ wp_die('Error! Nonce Security Check Failed! Go back to Tools menu and try again.');
12
+ }
13
+
14
+ $file_url = wspsc_export_orders_data_to_csv();
15
+ $export_message = 'Data exported to <a href="' . $file_url . '" target="_blank">Orders Data File (Right click on this link and choose "Save As" to save the file to your computer)</a>';
16
+ echo '<div id="message" class="updated fade"><p><strong>';
17
+ echo $export_message;
18
+ echo '</strong></p></div>';
19
+ }
20
+ ?>
21
+
22
+ <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
23
+ <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
24
+ <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>
25
+ </div>
26
+
27
+ <div class="postbox">
28
+ <h3 class="hndle"><label for="title"><?php _e("Export Cart Orders Data", "wordpress-simple-paypal-shopping-cart"); ?></label></h3>
29
+ <div class="inside">
30
+ <form method="post" action="">
31
+ <?php wp_nonce_field('wspsc_tools_export_orders_data'); ?>
32
+
33
+ <p><?php _e("You can use this option to export all the orders data to a CSV/Excel file.", "wordpress-simple-paypal-shopping-cart"); ?></p>
34
+ <div class="submit">
35
+ <input type="submit" name="wspsc_export_orders_data" class="button-primary" value="<?php echo (__("Export Data", "wordpress-simple-paypal-shopping-cart")) ?>" />
36
+ </div>
37
+
38
+ </form>
39
+ </div>
40
+ </div>
41
+ <?php
42
+
43
+ wpspsc_settings_menu_footer();
44
+ }
45
+
46
+ function wspsc_export_orders_data_to_csv(){
47
+
48
+ $file_path = WP_CART_PATH . "includes/admin/exported_orders_data.csv";
49
+ $fp = fopen($file_path, 'w');
50
+
51
+ $header_names = array("Order ID", "Transaction ID", "First Name", "Last Name", "Email", "IP Address", "Total", "Shipping", "Coupon Code", "Address", "Items Orders");
52
+ fputcsv($fp, $header_names);
53
+
54
+ $query_args = array(
55
+ 'post_type' => 'wpsc_cart_orders',
56
+ 'numberposts' => -1, /* to retrieve all posts */
57
+ 'orderby' => 'date',
58
+ 'order' => 'DESC',
59
+ );
60
+ $posts_array = get_posts( $query_args );
61
+
62
+ foreach ($posts_array as $item) {
63
+ $order_id = $item->ID;
64
+ $txn_id = get_post_meta( $order_id, 'wpsc_txn_id', true );
65
+ $first_name = get_post_meta( $order_id, 'wpsc_first_name', true );
66
+ $last_name = get_post_meta( $order_id, 'wpsc_last_name', true );
67
+ $email = get_post_meta( $order_id, 'wpsc_email_address', true );
68
+ $ip_address = get_post_meta( $order_id, 'wpsc_ipaddress', true );
69
+ $total_amount = get_post_meta( $order_id, 'wpsc_total_amount', true );
70
+ $shipping_amount = get_post_meta( $order_id, 'wpsc_shipping_amount', true );
71
+ $address = get_post_meta( $order_id, 'wpsc_address', true );
72
+ $phone = get_post_meta( $order_id, 'wpspsc_phone', true );
73
+ $applied_coupon = get_post_meta( $order_id, 'wpsc_applied_coupon', true );
74
+
75
+ $items_ordered = get_post_meta( $order_id, 'wpspsc_items_ordered', true );
76
+ $items_ordered = str_replace(array("\n", "\r", "\r\n", "\n\r"), ' ', $items_ordered);
77
+
78
+ $fields = array($order_id, $txn_id, $first_name, $last_name, $email, $ip_address, $total_amount, $shipping_amount, $applied_coupon, $address, $items_ordered);
79
+ fputcsv($fp, $fields);
80
+
81
+ }
82
+
83
+ fclose($fp);
84
+
85
+ $file_url = WP_CART_URL . '/includes/admin/exported_orders_data.csv';
86
+ return $file_url;
87
+
88
+ }
includes/index.html ADDED
File without changes
includes/wspsc-cart-functions.php CHANGED
@@ -53,6 +53,7 @@ function print_wp_shopping_cart($args = array()) {
53
  }
54
 
55
  $notify = WP_CART_SITE_URL . '/?simple_cart_ipn=1';
 
56
  $urls .= '<input type="hidden" name="notify_url" value="' . $notify . '" />';
57
 
58
  $title = get_option('wp_cart_title');
@@ -132,11 +133,20 @@ function print_wp_shopping_cart($args = array()) {
132
  $count++;
133
  }
134
  if (!get_option('wp_shopping_cart_use_profile_shipping')) {
 
135
  $postage_cost = wpspsc_number_format_price($postage_cost);
136
  $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
137
  }
 
 
138
  if (get_option('wp_shopping_cart_collect_address')) {//force address collection
139
- $form .= "<input type=\"hidden\" name=\"no_shipping\" value=\"2\" />";
 
 
 
 
 
 
140
  }
141
  }
142
 
53
  }
54
 
55
  $notify = WP_CART_SITE_URL . '/?simple_cart_ipn=1';
56
+ $notify = apply_filters('wspsc_paypal_ipn_notify_url', $notify);
57
  $urls .= '<input type="hidden" name="notify_url" value="' . $notify . '" />';
58
 
59
  $title = get_option('wp_cart_title');
133
  $count++;
134
  }
135
  if (!get_option('wp_shopping_cart_use_profile_shipping')) {
136
+ //Not using profile based shipping
137
  $postage_cost = wpspsc_number_format_price($postage_cost);
138
  $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
139
  }
140
+
141
+ //Tackle the "no_shipping" parameter
142
  if (get_option('wp_shopping_cart_collect_address')) {//force address collection
143
+ $form .= '<input type="hidden" name="no_shipping" value="2" />';
144
+ } else {
145
+ //Not using the force address collection feature
146
+ if($postage_cost == 0){
147
+ //No shipping amount present in the cart. Set flag for "no shipping address collection".
148
+ $form .= '<input type="hidden" name="no_shipping" value="1" />';
149
+ }
150
  }
151
  }
152
 
languages/wordpress-simple-paypal-shopping-cart-pt_BR.mo ADDED
Binary file
languages/wordpress-simple-paypal-shopping-cart-pt_BR.po ADDED
@@ -0,0 +1,906 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Simple Shopping Cart\n"
4
+ "POT-Creation-Date: 2017-01-05 19:34-0200\n"
5
+ "PO-Revision-Date: 2017-01-05 22:19-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 1.8.11\n"
11
+ "X-Poedit-KeywordsList: __;_e\n"
12
+ "X-Poedit-Basepath: .\n"
13
+ "Last-Translator: \n"
14
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
+ "Language: pt_BR\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
+ "O administrador precisa configurar cupons de desconto para que possa ser "
22
+ "usado"
23
+
24
+ #: class-coupon.php:86
25
+ msgid "Coupon ID: "
26
+ msgstr "Identificador do cupom: "
27
+
28
+ #: class-coupon.php:87
29
+ msgid "Coupon Code: "
30
+ msgstr "Código do cupom: "
31
+
32
+ #: class-coupon.php:88
33
+ msgid "Discount Amt: "
34
+ msgstr "Valor do desconto: "
35
+
36
+ #: class-coupon.php:89
37
+ msgid "Expiry date: "
38
+ msgstr "Data de validade: "
39
+
40
+ #: class-coupon.php:98
41
+ msgid "Coupon code used does not exist!"
42
+ msgstr "O código de cupom usado não existe!"
43
+
44
+ #: class-coupon.php:105
45
+ msgid "Coupon code expired!"
46
+ msgstr "Código de cupom expirado!"
47
+
48
+ #: class-coupon.php:110
49
+ msgid "Discount can only be applied once per checkout!"
50
+ msgstr "O desconto só pode ser aplicado uma vez por compra!"
51
+
52
+ #: class-coupon.php:132
53
+ msgid "Discount applied successfully! Total Discount: "
54
+ msgstr "Desconto aplicado com sucesso! Desconto total: "
55
+
56
+ #: wp_shopping_cart.php:190
57
+ msgid "Error! Your session is out of sync. Please reset your session."
58
+ msgstr ""
59
+ "Erro! Sua sessão está fora de sincronia. Por favor reinicie sua sessão."
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
+ "Erro de configuração do carrinho de compras! Você precisa especificar um "
67
+ "valor no campo \"URL da Página de Pagamento\" para que o redirecionamento "
68
+ "automático funcione!"
69
+
70
+ #: wp_shopping_cart.php:290 wp_shopping_cart.php:365 wp_shopping_cart.php:431
71
+ #: wp_shopping_cart.php:473 wp_shopping_cart.php:477
72
+ #: wp_shopping_cart_settings.php:123
73
+ msgid "Add to Cart"
74
+ msgstr "Adicionar ao Carrinho"
75
+
76
+ # Is this the product name? Should it be translated or not?
77
+ #: wp_shopping_cart.php:568
78
+ msgid "WP Paypal Shopping Cart"
79
+ msgstr "Carrinho de Compras WP PayPal"
80
+
81
+ # Is this the product name? Should it be translated or not?
82
+ #: wp_shopping_cart.php:568
83
+ msgid "WP Shopping Cart"
84
+ msgstr "Carrinho de Compras WP"
85
+
86
+ #: wp_shopping_cart.php:602
87
+ msgid "Shopping Cart"
88
+ msgstr "Carrinho de Compras"
89
+
90
+ #: wp_shopping_cart.php:635
91
+ msgid "Settings"
92
+ msgstr "Configurações"
93
+
94
+ #: wp_shopping_cart_discounts_menu.php:52 wp_shopping_cart_settings.php:189
95
+ #: wp_shopping_cart_settings.php:430
96
+ msgid ""
97
+ "For more information, updates, detailed documentation and video tutorial, "
98
+ "please visit:"
99
+ msgstr ""
100
+ "Para mais informações, atualizações, documentação detalhada e tutorial em "
101
+ "vídeo, por favor visite:"
102
+
103
+ #: wp_shopping_cart_discounts_menu.php:53 wp_shopping_cart_settings.php:190
104
+ #: wp_shopping_cart_settings.php:431
105
+ msgid "WP Simple Cart Homepage"
106
+ msgstr "Página de WP Simple Cart"
107
+
108
+ #: wp_shopping_cart_discounts_menu.php:61
109
+ msgid "Coupon/Discount Settings"
110
+ msgstr "Configurações de Cupom/Desconto"
111
+
112
+ #: wp_shopping_cart_discounts_menu.php:68
113
+ msgid "Enable Discount Coupon Feature"
114
+ msgstr "Habilitar a funcionalidade de cupom de desconto"
115
+
116
+ #: wp_shopping_cart_discounts_menu.php:71
117
+ msgid ""
118
+ "When checked your customers will be able to enter a coupon code in the "
119
+ "shopping cart before checkout."
120
+ msgstr ""
121
+ "Quando habilitado, os clientes poderão digitar um código de cupom no "
122
+ "carrinho de compras antes do pagamento."
123
+
124
+ #: wp_shopping_cart_discounts_menu.php:78
125
+ msgid "Update &raquo;"
126
+ msgstr "Atualizar &raquo;"
127
+
128
+ #: wp_shopping_cart_discounts_menu.php:94
129
+ msgid "Add Coupon/Discount"
130
+ msgstr "Adicionar Cupom/Desconto"
131
+
132
+ #: wp_shopping_cart_discounts_menu.php:119
133
+ msgid "Save Coupon &raquo;"
134
+ msgstr "Salvar Cupom &raquo;"
135
+
136
+ #: wp_shopping_cart_discounts_menu.php:137
137
+ msgid "Coupon Code"
138
+ msgstr "Código de Cupom"
139
+
140
+ #: wp_shopping_cart_discounts_menu.php:138
141
+ msgid "Discount Rate (%)"
142
+ msgstr "Taxa de desconto (%)"
143
+
144
+ #: wp_shopping_cart_discounts_menu.php:139
145
+ msgid "Expiry Date"
146
+ msgstr "Data de validade"
147
+
148
+ #: wp_shopping_cart_discounts_menu.php:158
149
+ msgid "No Expiry"
150
+ msgstr "Nunca expira"
151
+
152
+ #: wp_shopping_cart_discounts_menu.php:174
153
+ msgid "No Coupons Configured."
154
+ msgstr "Nenhum cupom configurado."
155
+
156
+ #: wp_shopping_cart_discounts_menu.php:179
157
+ msgid "No Record found"
158
+ msgstr "Nenhum registro encontrado"
159
+
160
+ #: wp_shopping_cart_misc_functions.php:160
161
+ msgid "Your Shopping Cart"
162
+ msgstr "Seu carrinho de compras"
163
+
164
+ #: wp_shopping_cart_misc_functions.php:161
165
+ msgid "Your cart is empty"
166
+ msgstr "Se carrinho está vazio"
167
+
168
+ #: wp_shopping_cart_misc_functions.php:195
169
+ msgid ""
170
+ "Need a shopping cart plugin with a lot of features and good support? Check "
171
+ "out our "
172
+ msgstr ""
173
+ "Precisa de um plugin de carrinho de compras com muito mais funcionalidades e "
174
+ "bom suporte? Confira o nosso "
175
+
176
+ #: wp_shopping_cart_misc_functions.php:196
177
+ msgid "WP eStore Plugin"
178
+ msgstr "Plugin WP eStore"
179
+
180
+ #: wp_shopping_cart_orders.php:10
181
+ msgid "Cart Orders"
182
+ msgstr "Pedidos"
183
+
184
+ #: wp_shopping_cart_orders.php:11
185
+ msgid "Cart Order"
186
+ msgstr "Pedido"
187
+
188
+ #: wp_shopping_cart_orders.php:12
189
+ msgid "Add New"
190
+ msgstr "Adicionar Novo"
191
+
192
+ #: wp_shopping_cart_orders.php:13
193
+ msgid "Add New Order"
194
+ msgstr "Adicionar Novo Pedido"
195
+
196
+ #: wp_shopping_cart_orders.php:14
197
+ msgid "Edit"
198
+ msgstr "Editar"
199
+
200
+ #: wp_shopping_cart_orders.php:15
201
+ msgid "Edit Order"
202
+ msgstr "Editar Pedido"
203
+
204
+ #: wp_shopping_cart_orders.php:16
205
+ msgid "New Order"
206
+ msgstr "Novo Pedido"
207
+
208
+ #: wp_shopping_cart_orders.php:17
209
+ msgid "View"
210
+ msgstr "Ver"
211
+
212
+ #: wp_shopping_cart_orders.php:18
213
+ msgid "View Order"
214
+ msgstr "Ver Pedido"
215
+
216
+ #: wp_shopping_cart_orders.php:19
217
+ msgid "Search Order"
218
+ msgstr "Pesquisar Pedido"
219
+
220
+ #: wp_shopping_cart_orders.php:20
221
+ msgid "No order found"
222
+ msgstr "Nenhum pedido encontrado"
223
+
224
+ #: wp_shopping_cart_orders.php:21
225
+ msgid "No order found in Trash"
226
+ msgstr "Nenhum pedido encontrado na Lixeira"
227
+
228
+ #: wp_shopping_cart_orders.php:22
229
+ msgid "Parent Order"
230
+ msgstr "Pedido Pai"
231
+
232
+ #: wp_shopping_cart_orders.php:38
233
+ msgid "Order Review"
234
+ msgstr "Revisar Pedido"
235
+
236
+ #: wp_shopping_cart_orders.php:70
237
+ msgid "Order ID: #"
238
+ msgstr "Identificador de pedido: #"
239
+
240
+ #: wp_shopping_cart_orders.php:72
241
+ msgid "Transaction ID: #"
242
+ msgstr "Identificador de transação: #"
243
+
244
+ #: wp_shopping_cart_orders.php:75 wp_shopping_cart_orders.php:165
245
+ msgid "First Name"
246
+ msgstr "Primeiro Nome"
247
+
248
+ #: wp_shopping_cart_orders.php:79 wp_shopping_cart_orders.php:166
249
+ msgid "Last Name"
250
+ msgstr "Último nome:"
251
+
252
+ #: wp_shopping_cart_orders.php:83
253
+ msgid "Email Address"
254
+ msgstr "E-mail"
255
+
256
+ #: wp_shopping_cart_orders.php:87
257
+ msgid "IP Address"
258
+ msgstr "Endereço IP"
259
+
260
+ #: wp_shopping_cart_orders.php:91 wp_shopping_cart_orders.php:168
261
+ #: includes/wspsc-cart-functions.php:150
262
+ msgid "Total"
263
+ msgstr "Total"
264
+
265
+ #: wp_shopping_cart_orders.php:95 includes/wspsc-cart-functions.php:147
266
+ msgid "Shipping"
267
+ msgstr "Frete"
268
+
269
+ #: wp_shopping_cart_orders.php:99
270
+ msgid "Address"
271
+ msgstr "Endereço"
272
+
273
+ #: wp_shopping_cart_orders.php:103
274
+ msgid "Phone"
275
+ msgstr "Telefone"
276
+
277
+ #: wp_shopping_cart_orders.php:107
278
+ msgid "Buyer Email Sent?"
279
+ msgstr "E-mail enviado para o comprador?"
280
+
281
+ #: wp_shopping_cart_orders.php:111
282
+ msgid "Item(s) Ordered:"
283
+ msgstr "Itens pedidos:"
284
+
285
+ #: wp_shopping_cart_orders.php:115
286
+ msgid "Applied Coupon Code:"
287
+ msgstr "Código de cupom aplicado:"
288
+
289
+ #: wp_shopping_cart_orders.php:164
290
+ msgid "Order ID"
291
+ msgstr "Identificador de pedido:"
292
+
293
+ #: wp_shopping_cart_orders.php:167
294
+ msgid "Email"
295
+ msgstr "E-mail"
296
+
297
+ #: wp_shopping_cart_orders.php:169
298
+ msgid "Status"
299
+ msgstr "Estado"
300
+
301
+ #: wp_shopping_cart_orders.php:170
302
+ msgid "Date"
303
+ msgstr "Data"
304
+
305
+ #: wp_shopping_cart_settings.php:10
306
+ msgid "WP Paypal Shopping Cart Options"
307
+ msgstr "Opões do WP PayPal Shopping Cart"
308
+
309
+ #: wp_shopping_cart_settings.php:101
310
+ msgid "Options Updated!"
311
+ msgstr "Opções Atualizadas!"
312
+
313
+ #: wp_shopping_cart_settings.php:105 includes/wspsc-cart-functions.php:30
314
+ msgid "USD"
315
+ msgstr "USD"
316
+
317
+ #: wp_shopping_cart_settings.php:108 includes/wspsc-cart-functions.php:34
318
+ msgid "$"
319
+ msgstr "$"
320
+
321
+ #: wp_shopping_cart_settings.php:186
322
+ msgid "Simple PayPal Shopping Cart Settings"
323
+ msgstr "Configurações do Simple PayPal Shopping Cart"
324
+
325
+ #: wp_shopping_cart_settings.php:194
326
+ msgid "Quick Usage Guide"
327
+ msgstr "Guia Rápido de Uso"
328
+
329
+ #: wp_shopping_cart_settings.php:197
330
+ msgid "Step 1) "
331
+ msgstr "Passo 1) "
332
+
333
+ #: wp_shopping_cart_settings.php:197
334
+ msgid "To add an 'Add to Cart' button for a product simply add the shortcode"
335
+ msgstr ""
336
+ "Para adicionar um botão \"Adicionar ao Carrinho\" para um produto, "
337
+ "simplesmente adicione o shortcode"
338
+
339
+ #: wp_shopping_cart_settings.php:197
340
+ msgid "PRODUCT-NAME"
341
+ msgstr "NOME-PRODUTO"
342
+
343
+ #: wp_shopping_cart_settings.php:197
344
+ msgid "PRODUCT-PRICE"
345
+ msgstr "PREÇO-PRODUTO"
346
+
347
+ #: wp_shopping_cart_settings.php:197
348
+ msgid ""
349
+ "to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-"
350
+ "PRICE with the actual name and price of your product."
351
+ msgstr ""
352
+ "para um post ou página próximo ao produto. Substitua NOME-PRODUTO e PREÇO-"
353
+ "PRODUTO pelo nome e preço reais do seu produto."
354
+
355
+ #: wp_shopping_cart_settings.php:198
356
+ msgid "Example add to cart button shortcode usage:"
357
+ msgstr "Exemplo de uso de shortcode para botão adicionar ao carrinho:"
358
+
359
+ #: wp_shopping_cart_settings.php:199
360
+ msgid "Step 2) "
361
+ msgstr "Passo 2) "
362
+
363
+ #: wp_shopping_cart_settings.php:199
364
+ msgid ""
365
+ "To add the shopping cart to a post or page (example: a checkout page) simply "
366
+ "add the shortcode"
367
+ msgstr ""
368
+ "Para adicionar o carrinho de compras a um post ou página (por exemplo: uma "
369
+ "página de pagamento) simplesmente adicione o shortcode"
370
+
371
+ #: wp_shopping_cart_settings.php:199
372
+ msgid ""
373
+ "to a post or page or use the sidebar widget to add the shopping cart to the "
374
+ "sidebar."
375
+ msgstr ""
376
+ "a um post ou página ou use o widget de barra lateral para adicionar o "
377
+ "carrinho de compras à barra lateral."
378
+
379
+ #: wp_shopping_cart_settings.php:200
380
+ msgid "Example shopping cart shortcode usage:"
381
+ msgstr "Exemplo de uso de shortcode para carrinho de compras:"
382
+
383
+ #: wp_shopping_cart_settings.php:209
384
+ msgid "PayPal and Shopping Cart Settings"
385
+ msgstr "Configurações do PayPal e do Carrinho de Compras"
386
+
387
+ #: wp_shopping_cart_settings.php:215
388
+ msgid "Paypal Email Address"
389
+ msgstr "E-mail do PayPal"
390
+
391
+ #: wp_shopping_cart_settings.php:219
392
+ msgid "Shopping Cart title"
393
+ msgstr "Título do Carrinho de Compras"
394
+
395
+ #: wp_shopping_cart_settings.php:223
396
+ msgid "Text/Image to Show When Cart Empty"
397
+ msgstr "Texto/imagem para exibir quando o carrinho estiver vazio"
398
+
399
+ #: wp_shopping_cart_settings.php:224
400
+ msgid ""
401
+ "You can either enter plain text or the URL of an image that you want to show "
402
+ "when the shopping cart is empty"
403
+ msgstr ""
404
+ "Você pode digitar ou um texto puro ou a URL de uma imagem que você queira "
405
+ "exibir quando o carrinho de compras estiver vazio"
406
+
407
+ #: wp_shopping_cart_settings.php:227
408
+ msgid "Currency"
409
+ msgstr "Moeda"
410
+
411
+ #: wp_shopping_cart_settings.php:228 wp_shopping_cart_settings.php:232
412
+ #: wp_shopping_cart_settings.php:259
413
+ msgid "e.g."
414
+ msgstr "exemplo"
415
+
416
+ #: wp_shopping_cart_settings.php:231
417
+ msgid "Currency Symbol"
418
+ msgstr "Símbolo da Moeda"
419
+
420
+ #: wp_shopping_cart_settings.php:237
421
+ msgid "Base Shipping Cost"
422
+ msgstr "Custo básico de frete"
423
+
424
+ #: wp_shopping_cart_settings.php:238
425
+ msgid ""
426
+ "This is the base shipping cost that will be added to the total of individual "
427
+ "products shipping cost. Put 0 if you do not want to charge shipping cost or "
428
+ "use base shipping cost."
429
+ msgstr ""
430
+ "Este é o custo básico de frete que será adicionado ao total do custo de "
431
+ "frete dos produtos individuais. Coloque 0 se você não quiser cobrar frete ou "
432
+ "não quiser usar custo básico de frete."
433
+
434
+ #: wp_shopping_cart_settings.php:238
435
+ msgid "Learn More on Shipping Calculation"
436
+ msgstr "Aprenda Mais Sobre Cálculo de Frete"
437
+
438
+ #: wp_shopping_cart_settings.php:242
439
+ msgid "Free Shipping for Orders Over"
440
+ msgstr "Frete grátis para pedidos acima de"
441
+
442
+ #: wp_shopping_cart_settings.php:243
443
+ msgid ""
444
+ "When a customer orders more than this amount he/she will get free shipping. "
445
+ "Leave empty if you do not want to use it."
446
+ msgstr ""
447
+ "Quando um cliente pedir mais do que este valor, ele/ela receberá frete "
448
+ "grátis. Deixe vazio se não quiser usar."
449
+
450
+ #: wp_shopping_cart_settings.php:247
451
+ msgid "Must Collect Shipping Address on PayPal"
452
+ msgstr "Obrigatório cadastrar o endereço de entrega no PayPal"
453
+
454
+ #: wp_shopping_cart_settings.php:248
455
+ msgid ""
456
+ "If checked the customer will be forced to enter a shipping address on PayPal "
457
+ "when checking out."
458
+ msgstr ""
459
+ "Se habilitado, o cliente será forçado a entrar o endereço de entrega no "
460
+ "PayPal ao pagar."
461
+
462
+ #: wp_shopping_cart_settings.php:252
463
+ msgid "Use PayPal Profile Based Shipping"
464
+ msgstr "Usar entrega baseada no perfil do PayPal"
465
+
466
+ #: wp_shopping_cart_settings.php:253
467
+ msgid "Check this if you want to use"
468
+ msgstr "Habilite se quiser usar"
469
+
470
+ #: wp_shopping_cart_settings.php:253
471
+ msgid "PayPal profile based shipping"
472
+ msgstr "Entrega baseada no perfil do PayPal"
473
+
474
+ #: wp_shopping_cart_settings.php:253
475
+ msgid ""
476
+ "Using this will ignore any other shipping options that you have specified in "
477
+ "this plugin."
478
+ msgstr ""
479
+ "Ao habilitar isto, serão ignoradas quaisquer outras opções de entrega que "
480
+ "você tenha especificado neste plugin."
481
+
482
+ #: wp_shopping_cart_settings.php:257
483
+ msgid "Add to Cart button text or Image"
484
+ msgstr "Texto ou imagem do botão Adicionar ao Carrinho"
485
+
486
+ #: wp_shopping_cart_settings.php:259
487
+ msgid ""
488
+ "To use a customized image as the button simply enter the URL of the image "
489
+ "file."
490
+ msgstr ""
491
+ "Para usar uma imagem personalizada como botão, simplesmente digite a URL do "
492
+ "arquivo de imagem."
493
+
494
+ #: wp_shopping_cart_settings.php:265
495
+ msgid "Return URL"
496
+ msgstr "URL de Retorno"
497
+
498
+ #: wp_shopping_cart_settings.php:266
499
+ msgid ""
500
+ "This is the URL the customer will be redirected to after a successful payment"
501
+ msgstr ""
502
+ "Esta é a URL para a qual o cliente será redirecionado depois de um pagamento "
503
+ "bem sucedido."
504
+
505
+ #: wp_shopping_cart_settings.php:270
506
+ msgid "Cancel URL"
507
+ msgstr "URL de Cancelamento"
508
+
509
+ #: wp_shopping_cart_settings.php:271
510
+ msgid ""
511
+ "The customer will be redirected to the above page if the payment is "
512
+ "cancelled."
513
+ msgstr ""
514
+ "O cliente será redirecionado para a página acima se o pagamento for "
515
+ "cancelado."
516
+
517
+ #: wp_shopping_cart_settings.php:275
518
+ msgid "Products Page URL"
519
+ msgstr "URL da Página de Produtos"
520
+
521
+ #: wp_shopping_cart_settings.php:276
522
+ msgid ""
523
+ "This is the URL of your products page if you have any. If used, the shopping "
524
+ "cart widget will display a link to this page when cart is empty"
525
+ msgstr ""
526
+ "Esta é a URL da sua página de produtos, se houver. Se usado, o widget do "
527
+ "carrinho de compras irá exibir um link para esta página quando o carrinho "
528
+ "estiver vazio."
529
+
530
+ #: wp_shopping_cart_settings.php:280
531
+ msgid "Automatic redirection to checkout page"
532
+ msgstr "Redirecionamento automático para a página de pagamento"
533
+
534
+ #: wp_shopping_cart_settings.php:282
535
+ msgid "Checkout Page URL"
536
+ msgstr "URL da Página de Pagamento"
537
+
538
+ #: wp_shopping_cart_settings.php:283
539
+ msgid ""
540
+ "If checked the visitor will be redirected to the Checkout page after a "
541
+ "product is added to the cart. You must enter a URL in the Checkout Page URL "
542
+ "field for this to work."
543
+ msgstr ""
544
+ "Se habilitado, o visitante será redirecionado para a página de pagamento "
545
+ "logo que o produto for adicionado ao carrinho. Para isto funcionar, você "
546
+ "precisa adicionar uma URL no campo URL da Página de Pagamento."
547
+
548
+ #: wp_shopping_cart_settings.php:287
549
+ msgid "Open PayPal Checkout Page in a New Tab"
550
+ msgstr "Abrir a página de pagamento do PayPal em uma nova guia"
551
+
552
+ #: wp_shopping_cart_settings.php:289
553
+ msgid ""
554
+ "If checked the PayPal checkout page will be opened in a new tab/window when "
555
+ "the user clicks the checkout button."
556
+ msgstr ""
557
+ "Se habilitado, a página de pagamento do PayPal será aberta em uma nova guia/"
558
+ "janela quando o usuário clicar no botão de pagamento."
559
+
560
+ #: wp_shopping_cart_settings.php:293
561
+ msgid "Reset Cart After Redirection to Return Page"
562
+ msgstr "Limpar o carrinho ao redirecionar para a Página de Retorno"
563
+
564
+ #: wp_shopping_cart_settings.php:295
565
+ msgid ""
566
+ "If checked the shopping cart will be reset when the customer lands on the "
567
+ "return URL (Thank You) page."
568
+ msgstr ""
569
+ "Se habilitado, o carrinho de compras será reiniciado quando o cliente voltar "
570
+ "para a URL da Página de Retorno (Obrigado)."
571
+
572
+ #: wp_shopping_cart_settings.php:302
573
+ msgid "Hide Shopping Cart Image"
574
+ msgstr "Ocultar a imagem de carrinho de compras"
575
+
576
+ #: wp_shopping_cart_settings.php:303
577
+ msgid "If ticked the shopping cart image will not be shown."
578
+ msgstr "Se habilitado, a imagem de carrinho de compras não será exibida."
579
+
580
+ #: wp_shopping_cart_settings.php:309
581
+ msgid "Customize the Note to Seller Text"
582
+ msgstr "Personalizar o texto Nota para o Vendedor"
583
+
584
+ #: wp_shopping_cart_settings.php:311
585
+ msgid ""
586
+ "Specify the text that you want to use for the note field on PayPal checkout "
587
+ "page to collect special instruction (leave this field empty if you don't "
588
+ "need to customize it). The default label for the note field is \"Add special "
589
+ "instructions to merchant\"."
590
+ msgstr ""
591
+ "Especifique o texto que você quer usar para o campo de notas da página de "
592
+ "pagamento do PayPal para obter instruções especiais (deixe em branco se não "
593
+ "precisar personalizar). O texto padrão para este campo é \"Adicione "
594
+ "instruções especiais para o vendedor\"."
595
+
596
+ #: wp_shopping_cart_settings.php:317
597
+ msgid "Custom Checkout Page Style Name"
598
+ msgstr "Nome da página de estilo personalizada"
599
+
600
+ #: wp_shopping_cart_settings.php:319
601
+ msgid ""
602
+ "Specify the page style name here if you want to customize the paypal "
603
+ "checkout page with custom page style otherwise leave this field empty."
604
+ msgstr ""
605
+ "Especifique o nome da página de estilo aqui se quiser personalizar a página "
606
+ "de pagamento do PayPal com uma página de estilo, caso contrário deixe em "
607
+ "branco."
608
+
609
+ #: wp_shopping_cart_settings.php:325
610
+ msgid "Use Strict PayPal Email Address Checking"
611
+ msgstr "Usar verificação estrita de e-mail do PayPal"
612
+
613
+ #: wp_shopping_cart_settings.php:326
614
+ msgid ""
615
+ "If checked the script will check to make sure that the PayPal email address "
616
+ "specified is the same as the account where the payment was deposited (Usage "
617
+ "of PayPal Email Alias will fail too)."
618
+ msgstr ""
619
+ "Se habilitado, o script vai verificar para ter certeza de que o e-mail do "
620
+ "PayPal especificado é o mesmo que o da conta onde o pagamento foi depositado "
621
+ "(uso de alias de e-mail do PayPal também irá falhar)."
622
+
623
+ #: wp_shopping_cart_settings.php:332
624
+ msgid "Use WP Affiliate Platform"
625
+ msgstr "Usar WP Affiliate Platform"
626
+
627
+ #: wp_shopping_cart_settings.php:334
628
+ msgid "Check this if using with the"
629
+ msgstr "Habilite se estiver usando com"
630
+
631
+ #: wp_shopping_cart_settings.php:334
632
+ msgid ""
633
+ "This plugin lets you run your own affiliate campaign/program and allows you "
634
+ "to reward (pay commission) your affiliates for referred sales"
635
+ msgstr ""
636
+ "Este plugin permite que você faça sua própria campanha/programa de afiliação "
637
+ "e permite que você recompense (pague comissão) aos seus afiliados para "
638
+ "vendas referidas."
639
+
640
+ #: wp_shopping_cart_settings.php:340
641
+ msgid "Testing and Debugging Settings"
642
+ msgstr "Configurações de teste e debug"
643
+
644
+ #: wp_shopping_cart_settings.php:346
645
+ msgid "Enable Debug"
646
+ msgstr "Habilitar Debug"
647
+
648
+ #: wp_shopping_cart_settings.php:348
649
+ msgid ""
650
+ "If checked, debug output will be written to the log file. This is useful for "
651
+ "troubleshooting post payment failures"
652
+ msgstr ""
653
+ "Se habilitado, informações de debug serão gravadas no arquivo de log. Isto é "
654
+ "útil para resolver falhas após pagamentos."
655
+
656
+ #: wp_shopping_cart_settings.php:359
657
+ msgid "Enable Sandbox Testing"
658
+ msgstr "Habilitar teste com Sandbox"
659
+
660
+ #: wp_shopping_cart_settings.php:361
661
+ msgid ""
662
+ "Check this option if you want to do PayPal sandbox testing. You will need to "
663
+ "create a PayPal sandbox account from PayPal Developer site"
664
+ msgstr ""
665
+ "Habilitar esta opções se você quiser testar com a Sandbox do PayPal. Você "
666
+ "vai precisar criar uma conta Sandbox do PayPal através do site PayPal "
667
+ "Developer."
668
+
669
+ #: wp_shopping_cart_settings.php:370 wp_shopping_cart_settings.php:519
670
+ msgid "Update Options &raquo;"
671
+ msgstr "Atualizar Opções &raquo;"
672
+
673
+ #: wp_shopping_cart_settings.php:374
674
+ msgid "Like the Simple WordPress Shopping Cart Plugin?"
675
+ msgstr "Curtiu o plugin Simple WordPress Shopping Card?"
676
+
677
+ #: wp_shopping_cart_settings.php:374
678
+ msgid "Give it a good rating"
679
+ msgstr "Dê uma boa nota"
680
+
681
+ #: wp_shopping_cart_settings.php:439
682
+ msgid "Purchase Confirmation Email Settings"
683
+ msgstr "Configurações de e-mail para confirmação de compra"
684
+
685
+ #: wp_shopping_cart_settings.php:442
686
+ msgid ""
687
+ "The following options affect the emails that gets sent to your buyers after "
688
+ "a purchase."
689
+ msgstr ""
690
+ "As opções a seguir afetam os e-mails que são enviados para os seus clientes "
691
+ "após a compra."
692
+
693
+ #: wp_shopping_cart_settings.php:447
694
+ msgid "Send Emails to Buyer After Purchase"
695
+ msgstr "Enviar E-mails para o Cliente após Compra"
696
+
697
+ #: wp_shopping_cart_settings.php:448
698
+ msgid ""
699
+ "If checked the plugin will send an email to the buyer with the sale details. "
700
+ "If digital goods are purchased then the email will contain the download "
701
+ "links for the purchased products."
702
+ msgstr ""
703
+ "Se habilitado, o plugin enviará um e-mail para o cliente com os detalhes da "
704
+ "compra. Se foram comprados produtos digitais, então os links para baixar os "
705
+ "produtos comprados estarão neste e-mail."
706
+
707
+ #: wp_shopping_cart_settings.php:452
708
+ msgid "From Email Address"
709
+ msgstr "E-mail remetente:"
710
+
711
+ #: wp_shopping_cart_settings.php:454
712
+ msgid ""
713
+ "Example: Your Name &lt;sales@your-domain.com&gt; This is the email address "
714
+ "that will be used to send the email to the buyer. This name and email "
715
+ "address will appear in the from field of the email."
716
+ msgstr ""
717
+ "Exemplo: Seu Nome &lt;vendas@seu-dominio.com&gt; Este é o endereço de e-mail "
718
+ "que será usado para enviar e-mail para o comprador. Este nome e e-mail "
719
+ "aparecerão no campo \"de:\" do e-mail."
720
+
721
+ #: wp_shopping_cart_settings.php:458
722
+ msgid "Buyer Email Subject"
723
+ msgstr "Assunto do e-mail para o comprador"
724
+
725
+ #: wp_shopping_cart_settings.php:460
726
+ msgid "This is the subject of the email that will be sent to the buyer."
727
+ msgstr "Este é o título do e-mail que será enviado ao comprador."
728
+
729
+ #: wp_shopping_cart_settings.php:464
730
+ msgid "Buyer Email Body"
731
+ msgstr "Corpo do e-mail para o comprador"
732
+
733
+ #: wp_shopping_cart_settings.php:467
734
+ msgid ""
735
+ "This is the body of the email that will be sent to the buyer. Do not change "
736
+ "the text within the braces {}. You can use the following email tags in this "
737
+ "email body field:"
738
+ msgstr ""
739
+ "Este é o corpo do e-mail que será enviado ao comprador. Não altere o texto "
740
+ "dentro das chaves {}. Você pode usar as seguintes tags no corpo do e-mail:"
741
+
742
+ #: wp_shopping_cart_settings.php:468 wp_shopping_cart_settings.php:502
743
+ msgid "First name of the buyer"
744
+ msgstr "Primeiro nome do comprador"
745
+
746
+ #: wp_shopping_cart_settings.php:469 wp_shopping_cart_settings.php:503
747
+ msgid "Last name of the buyer"
748
+ msgstr "Último nome do comprador"
749
+
750
+ #: wp_shopping_cart_settings.php:470 wp_shopping_cart_settings.php:504
751
+ msgid "Email Address of the buyer"
752
+ msgstr "E-mail do comprador"
753
+
754
+ #: wp_shopping_cart_settings.php:471 wp_shopping_cart_settings.php:505
755
+ msgid "Address of the buyer"
756
+ msgstr "Endereço do comprador"
757
+
758
+ #: wp_shopping_cart_settings.php:472 wp_shopping_cart_settings.php:506
759
+ msgid ""
760
+ "The item details of the purchased product (this will include the download "
761
+ "link for digital items)."
762
+ msgstr ""
763
+ "Detalhes do produtos comprados (isto inclui o link para baixar produtos "
764
+ "digitais)."
765
+
766
+ #: wp_shopping_cart_settings.php:473 wp_shopping_cart_settings.php:507
767
+ msgid "The unique transaction ID of the purchase"
768
+ msgstr "Identificador único da transação de compra"
769
+
770
+ #: wp_shopping_cart_settings.php:474 wp_shopping_cart_settings.php:508
771
+ msgid "The amount paid for the current transaction"
772
+ msgstr "O total pago pela presente transação"
773
+
774
+ #: wp_shopping_cart_settings.php:475 wp_shopping_cart_settings.php:509
775
+ msgid "The date of the purchase"
776
+ msgstr "A data da compra"
777
+
778
+ #: wp_shopping_cart_settings.php:476 wp_shopping_cart_settings.php:510
779
+ msgid "Coupon code applied to the purchase"
780
+ msgstr "O código de cupom aplicado na compra"
781
+
782
+ #: wp_shopping_cart_settings.php:481
783
+ msgid "Send Emails to Seller After Purchase"
784
+ msgstr "Enviar E-mail para o Vendedor após Compra"
785
+
786
+ #: wp_shopping_cart_settings.php:482
787
+ msgid ""
788
+ "If checked the plugin will send an email to the seller with the sale details"
789
+ msgstr ""
790
+ "Se habilitado, o plugin vai enviar um e-mail para o vendedor com os detalhes "
791
+ "da venda"
792
+
793
+ #: wp_shopping_cart_settings.php:486
794
+ msgid "Notification Email Address*"
795
+ msgstr "E-mail de notificação*"
796
+
797
+ #: wp_shopping_cart_settings.php:488
798
+ msgid ""
799
+ "This is the email address where the seller will be notified of product "
800
+ "sales. You can put multiple email addresses separated by comma (,) in the "
801
+ "above field to send the notification to multiple email addresses."
802
+ msgstr ""
803
+ "Este é o e-mail pelo qual o vendedor será notificado sobre os produtos "
804
+ "vendidos. Você pode cadastrar vários endereços de e-mails separados por "
805
+ "vírgula (,) no campo acima para enviar notificações para múltiplos e-mails."
806
+
807
+ #: wp_shopping_cart_settings.php:492
808
+ msgid "Seller Email Subject*"
809
+ msgstr "Assunto do e-mail para o vendedor*"
810
+
811
+ #: wp_shopping_cart_settings.php:494
812
+ msgid ""
813
+ "This is the subject of the email that will be sent to the seller for record."
814
+ msgstr ""
815
+ "Este é o título do e-mail que será enviado para o vendedor para registro."
816
+
817
+ #: wp_shopping_cart_settings.php:498
818
+ msgid "Seller Email Body*"
819
+ msgstr "Corpo do e-mail para o vendedor*"
820
+
821
+ #: wp_shopping_cart_settings.php:501
822
+ msgid ""
823
+ "This is the body of the email that will be sent to the seller for record. Do "
824
+ "not change the text within the braces {}. You can use the following email "
825
+ "tags in this email body field:"
826
+ msgstr ""
827
+ "Este é o corpo do e-mail que será enviado para o vendedor para registro. Não "
828
+ "altere o texto dentro das chaves {}. Você pode usar as seguintes tags no "
829
+ "corpo do e-mail:"
830
+
831
+ #: wp_shopping_cart_shortcodes.php:19 wp_shopping_cart_shortcodes.php:49
832
+ msgid "Error! You must specify a product name in the shortcode."
833
+ msgstr "Erro! Você precisa especificar um nome de produto no shortcode."
834
+
835
+ #: wp_shopping_cart_shortcodes.php:22 wp_shopping_cart_shortcodes.php:52
836
+ msgid "Error! You must specify a price for your product in the shortcode."
837
+ msgstr ""
838
+ "Erro! Você precisa especificar um preço para o seu produto no shortcode."
839
+
840
+ #: wp_shopping_cart_shortcodes.php:55
841
+ msgid ""
842
+ "Error! You must specify a thumbnail image for your product in the shortcode."
843
+ msgstr ""
844
+ "Erro! Você precisa especificar uma miniatura de imagem para o seu produto no "
845
+ "shortcode."
846
+
847
+ #: wp_shopping_cart_shortcodes.php:107
848
+ msgid "View Cart"
849
+ msgstr "Ver Carrinho"
850
+
851
+ #: wp_shopping_cart_shortcodes.php:112
852
+ msgid "Cart is empty"
853
+ msgstr "O carrinho está vazio."
854
+
855
+ #: includes/wspsc-cart-functions.php:18
856
+ msgid "Visit The Shop"
857
+ msgstr "Visitar a Loja"
858
+
859
+ #: includes/wspsc-cart-functions.php:64
860
+ msgid "Cart"
861
+ msgstr "Carrinho"
862
+
863
+ #: includes/wspsc-cart-functions.php:72
864
+ msgid "Hit enter to submit new Quantity."
865
+ msgstr "Pressione Enter para confirmar a nova quantidade."
866
+
867
+ #: includes/wspsc-cart-functions.php:82
868
+ msgid "Item Name"
869
+ msgstr "Nome do item"
870
+
871
+ #: includes/wspsc-cart-functions.php:82
872
+ msgid "Quantity"
873
+ msgstr "Quantidade"
874
+
875
+ #: includes/wspsc-cart-functions.php:82
876
+ msgid "Price"
877
+ msgstr "Preço"
878
+
879
+ #: includes/wspsc-cart-functions.php:121
880
+ msgid "Remove"
881
+ msgstr "Remover"
882
+
883
+ #: includes/wspsc-cart-functions.php:146
884
+ msgid "Subtotal"
885
+ msgstr "Subtotal"
886
+
887
+ #: includes/wspsc-cart-functions.php:159
888
+ msgid "Enter Coupon Code"
889
+ msgstr "Digite o código do cupom"
890
+
891
+ #: includes/wspsc-cart-functions.php:162
892
+ msgid "Apply"
893
+ msgstr "Aplicar"
894
+
895
+ # Should it be paypal_checkout_PT.png for Portuguese?
896
+ #: includes/wspsc-cart-functions.php:182
897
+ msgid "paypal_checkout_EN.png"
898
+ msgstr "paypal_checkout_EN.png"
899
+
900
+ #: includes/wspsc-cart-functions.php:182
901
+ msgid "Make payments with PayPal - it\\'s fast, free and secure!"
902
+ msgstr "Pague com PayPal - é rápido, grátis e seguro!"
903
+
904
+ #: lib/gallery-wp-cart.php:32
905
+ msgid "[View with PicLens]"
906
+ msgstr "[Ver com PicLens]"
readme.txt CHANGED
@@ -3,8 +3,8 @@ 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: 3.0
6
- Tested up to: 4.6
7
- Stable tag: 4.2.8
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.
@@ -86,6 +86,7 @@ The following language translations are already available:
86
  * Danish
87
  * Turkish
88
  * Dutch
 
89
 
90
  You can translate the plugin using [this documentation](https://www.tipsandtricks-hq.com/ecommerce/translating-the-wp-simple-shopping-cart-plugin-2627).
91
 
@@ -180,6 +181,16 @@ None
180
 
181
  == Changelog ==
182
 
 
 
 
 
 
 
 
 
 
 
183
  = 4.2.8 =
184
  - Fixed an issue with the {payer_email} tag not working in the buyer notification email.
185
 
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: 3.0
6
+ Tested up to: 4.7
7
+ Stable tag: 4.3.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.
86
  * Danish
87
  * Turkish
88
  * Dutch
89
+ * Brazilian Portuguese
90
 
91
  You can translate the plugin using [this documentation](https://www.tipsandtricks-hq.com/ecommerce/translating-the-wp-simple-shopping-cart-plugin-2627).
92
 
181
 
182
  == Changelog ==
183
 
184
+ = 4.3.0 =
185
+ - Added Brazilian Portuguese Language translation to the plugin. The translation file was submitted by Fabio Goncalves.
186
+ - If the total shipping cost in the cart is 0 then the plugin will send a flag to paypal to not prompt for shipping address during checkout.
187
+
188
+ = 4.2.9 =
189
+ - Added a new option to export all the orders data to a CSV file. This new option can be found under the Simple Cart Settings -> Tools menu.
190
+ - Added a new filter (wspsc_paypal_ipn_notify_url) to allow overriding of the PayPal IPN notify URL.
191
+ - Added a new compact cart shortcode that uses a different style. Read the following page to find out how it works:
192
+ https://www.tipsandtricks-hq.com/ecommerce/simple-cart-showing-a-compact-shopping-cart-2925
193
+
194
  = 4.2.8 =
195
  - Fixed an issue with the {payer_email} tag not working in the buyer notification email.
196
 
wp_shopping_cart.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
- Version: 4.2.8
5
  Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
6
  Author: Tips and Tricks HQ, Ruhul Amin, mra13
7
  Author URI: https://www.tipsandtricks-hq.com/
@@ -26,7 +26,7 @@ if (version_compare(PHP_VERSION, '5.4.0') >= 0) {
26
  }
27
  }
28
 
29
- define('WP_CART_VERSION', '4.2.8');
30
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
31
  define('WP_CART_PATH', plugin_dir_path(__FILE__));
32
  define('WP_CART_URL', plugins_url('', __FILE__));
@@ -731,12 +731,6 @@ if (!is_admin()) {
731
  add_filter('widget_text', 'do_shortcode');
732
  }
733
 
734
- add_shortcode('show_wp_shopping_cart', 'show_wp_shopping_cart_handler');
735
- add_shortcode('always_show_wp_shopping_cart', 'always_show_cart_handler');
736
- add_shortcode('wp_cart_button', 'wp_cart_button_handler');
737
- add_shortcode('wp_cart_display_product', 'wp_cart_display_product_handler');
738
- add_shortcode('wp_compact_cart', 'wspsc_compact_cart_handler');
739
-
740
  add_action('wp_head', 'wp_cart_add_read_form_javascript');
741
  add_action('wp_enqueue_scripts', 'wspsc_front_side_enqueue_scripts');
742
  add_action('admin_enqueue_scripts', 'wspsc_admin_side_enqueue_scripts' );
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
+ Version: 4.3.0
5
  Plugin URI: https://www.tipsandtricks-hq.com/wordpress-simple-paypal-shopping-cart-plugin-768
6
  Author: Tips and Tricks HQ, Ruhul Amin, mra13
7
  Author URI: https://www.tipsandtricks-hq.com/
26
  }
27
  }
28
 
29
+ define('WP_CART_VERSION', '4.3.0');
30
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
31
  define('WP_CART_PATH', plugin_dir_path(__FILE__));
32
  define('WP_CART_URL', plugins_url('', __FILE__));
731
  add_filter('widget_text', 'do_shortcode');
732
  }
733
 
 
 
 
 
 
 
734
  add_action('wp_head', 'wp_cart_add_read_form_javascript');
735
  add_action('wp_enqueue_scripts', 'wspsc_front_side_enqueue_scripts');
736
  add_action('admin_enqueue_scripts', 'wspsc_admin_side_enqueue_scripts' );
wp_shopping_cart_settings.php CHANGED
@@ -1,557 +1,63 @@
1
  <?php
2
 
3
  /*
4
- * Main settings menu. Only admin user with "manage_options" permission can access this menu page.
 
5
  */
6
- function wp_cart_options()
7
- {
8
- if(!current_user_can('manage_options')){
9
  wp_die('You do not have permission to access this settings page.');
10
  }
11
-
12
  $wpspc_plugin_tabs = array(
13
  'wordpress-paypal-shopping-cart' => 'General Settings',
14
  'wordpress-paypal-shopping-cart&action=email-settings' => 'Email Settings',
15
- 'wordpress-paypal-shopping-cart&action=discount-settings' => 'Coupon/Discount'
 
16
  );
17
  echo '<div class="wrap">';
18
- echo '<h1>'.(__("WP Paypal Shopping Cart Options", "wordpress-simple-paypal-shopping-cart")).'</h1>';
19
-
20
  $current = "";
21
- if(isset($_GET['page'])){
22
  $current = sanitize_text_field($_GET['page']);
23
- if(isset($_GET['action'])){
24
  $current .= "&action=" . sanitize_text_field($_GET['action']);
25
  }
26
  }
27
  $content = '';
28
  $content .= '<h2 class="nav-tab-wrapper">';
29
- foreach($wpspc_plugin_tabs as $location => $tabname)
30
- {
31
- if($current == $location){
32
  $class = ' nav-tab-active';
33
- } else{
34
- $class = '';
35
  }
36
- $content .= '<a class="nav-tab'.$class.'" href="?page='.$location.'">'.$tabname.'</a>';
37
  }
38
  $content .= '</h2>';
39
- echo $content;
40
  echo '<div id="poststuff"><div id="post-body">';
41
- if(isset($_GET['action']))
42
- {
43
- switch ($_GET['action'])
44
- {
45
  case 'email-settings':
 
46
  show_wp_cart_email_settings_page();
47
  break;
48
  case 'discount-settings':
49
- include_once ('wp_shopping_cart_discounts_menu.php');
50
  show_wp_cart_coupon_discount_settings_page();
51
  break;
 
 
 
 
52
  }
53
- }
54
- else
55
- {
56
- show_wp_cart_options_page();
57
- }
58
  echo '</div></div>';
59
  echo '</div>';
60
  }
61
-
62
- /*
63
- * General settings menu page
64
- */
65
- function show_wp_cart_options_page ()
66
- {
67
- if(!current_user_can('manage_options')){
68
- wp_die('You do not have permission to access this settings page.');
69
- }
70
-
71
- if(isset($_POST['wspsc_reset_logfile'])) {
72
- // Reset the debug log file
73
- if(wspsc_reset_logfile()){
74
- echo '<div id="message" class="updated fade"><p><strong>Debug log file has been reset!</strong></p></div>';
75
- }
76
- else{
77
- echo '<div id="message" class="updated fade"><p><strong>Debug log file could not be reset!</strong></p></div>';
78
- }
79
- }
80
- if (isset($_POST['info_update']))
81
- {
82
- $nonce = $_REQUEST['_wpnonce'];
83
- if ( !wp_verify_nonce($nonce, 'wp_simple_cart_settings_update')){
84
- wp_die('Error! Nonce Security Check Failed! Go back to settings menu and save the settings again.');
85
- }
86
-
87
- update_option('cart_payment_currency', sanitize_text_field($_POST["cart_payment_currency"]));
88
- update_option('cart_currency_symbol', sanitize_text_field($_POST["cart_currency_symbol"]));
89
- update_option('cart_base_shipping_cost', sanitize_text_field($_POST["cart_base_shipping_cost"]));
90
- update_option('cart_free_shipping_threshold', sanitize_text_field($_POST["cart_free_shipping_threshold"]));
91
- update_option('wp_shopping_cart_collect_address', (isset($_POST['wp_shopping_cart_collect_address']) && $_POST['wp_shopping_cart_collect_address']!='') ? 'checked="checked"':'' );
92
- update_option('wp_shopping_cart_use_profile_shipping', (isset($_POST['wp_shopping_cart_use_profile_shipping']) && $_POST['wp_shopping_cart_use_profile_shipping']!='') ? 'checked="checked"':'' );
93
-
94
- update_option('cart_paypal_email', sanitize_email($_POST["cart_paypal_email"]));
95
- update_option('addToCartButtonName', sanitize_text_field($_POST["addToCartButtonName"]));
96
- update_option('wp_cart_title', sanitize_text_field($_POST["wp_cart_title"]));
97
- update_option('wp_cart_empty_text', sanitize_text_field($_POST["wp_cart_empty_text"]));
98
- update_option('cart_return_from_paypal_url', sanitize_text_field($_POST["cart_return_from_paypal_url"]));
99
- update_option('cart_cancel_from_paypal_url', sanitize_text_field($_POST["cart_cancel_from_paypal_url"]));
100
- update_option('cart_products_page_url', sanitize_text_field($_POST["cart_products_page_url"]));
101
-
102
- update_option('wp_shopping_cart_auto_redirect_to_checkout_page', (isset($_POST['wp_shopping_cart_auto_redirect_to_checkout_page']) && $_POST['wp_shopping_cart_auto_redirect_to_checkout_page']!='') ? 'checked="checked"':'' );
103
- update_option('cart_checkout_page_url', sanitize_text_field($_POST["cart_checkout_page_url"]));
104
- update_option('wspsc_open_pp_checkout_in_new_tab', (isset($_POST['wspsc_open_pp_checkout_in_new_tab']) && $_POST['wspsc_open_pp_checkout_in_new_tab']!='') ? 'checked="checked"':'' );
105
- update_option('wp_shopping_cart_reset_after_redirection_to_return_page', (isset($_POST['wp_shopping_cart_reset_after_redirection_to_return_page']) && $_POST['wp_shopping_cart_reset_after_redirection_to_return_page']!='') ? 'checked="checked"':'' );
106
-
107
- update_option('wp_shopping_cart_image_hide', (isset($_POST['wp_shopping_cart_image_hide']) && $_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
108
- update_option('wp_cart_note_to_seller_text', sanitize_text_field($_POST["wp_cart_note_to_seller_text"]));
109
- update_option('wp_cart_paypal_co_page_style', sanitize_text_field($_POST["wp_cart_paypal_co_page_style"]));
110
- update_option('wp_shopping_cart_strict_email_check', (isset($_POST['wp_shopping_cart_strict_email_check']) && $_POST['wp_shopping_cart_strict_email_check']!='') ? 'checked="checked"':'' );
111
- update_option('wspsc_disable_nonce_add_cart', (isset($_POST['wspsc_disable_nonce_add_cart']) && $_POST['wspsc_disable_nonce_add_cart']!='') ? 'checked="checked"':'' );
112
- update_option('wp_use_aff_platform', (isset($_POST['wp_use_aff_platform']) && $_POST['wp_use_aff_platform']!='') ? 'checked="checked"':'' );
113
-
114
- update_option('wp_shopping_cart_enable_sandbox', (isset($_POST['wp_shopping_cart_enable_sandbox']) && $_POST['wp_shopping_cart_enable_sandbox']!='') ? 'checked="checked"':'' );
115
- update_option('wp_shopping_cart_enable_debug', (isset($_POST['wp_shopping_cart_enable_debug']) && $_POST['wp_shopping_cart_enable_debug']!='') ? 'checked="checked"':'' );
116
-
117
- echo '<div id="message" class="updated fade">';
118
- echo '<p><strong>'.(__("Options Updated!", "wordpress-simple-paypal-shopping-cart")).'</strong></p></div>';
119
- }
120
-
121
- $defaultCurrency = get_option('cart_payment_currency');
122
- if (empty($defaultCurrency)) $defaultCurrency = __("USD", "wordpress-simple-paypal-shopping-cart");
123
-
124
- $defaultSymbol = get_option('cart_currency_symbol');
125
- if (empty($defaultSymbol)) $defaultSymbol = __("$", "wordpress-simple-paypal-shopping-cart");
126
-
127
- $baseShipping = get_option('cart_base_shipping_cost');
128
- if (empty($baseShipping)) $baseShipping = 0;
129
-
130
- $cart_free_shipping_threshold = get_option('cart_free_shipping_threshold');
131
-
132
- $defaultEmail = get_option('cart_paypal_email');
133
- if (empty($defaultEmail)) $defaultEmail = get_bloginfo('admin_email');
134
-
135
- $return_url = get_option('cart_return_from_paypal_url');
136
- $cancel_url = get_option('cart_cancel_from_paypal_url');
137
- $addcart = get_option('addToCartButtonName');
138
- if (empty($addcart)) $addcart = __("Add to Cart", "wordpress-simple-paypal-shopping-cart");
139
-
140
- $title = get_option('wp_cart_title');
141
- $emptyCartText = get_option('wp_cart_empty_text');
142
- $cart_products_page_url = get_option('cart_products_page_url');
143
- $cart_checkout_page_url = get_option('cart_checkout_page_url');
144
-
145
- if (get_option('wp_shopping_cart_auto_redirect_to_checkout_page'))
146
- $wp_shopping_cart_auto_redirect_to_checkout_page = 'checked="checked"';
147
- else
148
- $wp_shopping_cart_auto_redirect_to_checkout_page = '';
149
-
150
- if (get_option('wspsc_open_pp_checkout_in_new_tab'))
151
- $wspsc_open_pp_checkout_in_new_tab = 'checked="checked"';
152
- else
153
- $wspsc_open_pp_checkout_in_new_tab = '';
154
-
155
- if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
156
- $wp_shopping_cart_reset_after_redirection_to_return_page = 'checked="checked"';
157
- else
158
- $wp_shopping_cart_reset_after_redirection_to_return_page = '';
159
-
160
- if (get_option('wp_shopping_cart_collect_address'))
161
- $wp_shopping_cart_collect_address = 'checked="checked"';
162
- else
163
- $wp_shopping_cart_collect_address = '';
164
-
165
- if (get_option('wp_shopping_cart_use_profile_shipping'))
166
- $wp_shopping_cart_use_profile_shipping = 'checked="checked"';
167
- else
168
- $wp_shopping_cart_use_profile_shipping = '';
169
-
170
- if (get_option('wp_shopping_cart_image_hide'))
171
- $wp_cart_image_hide = 'checked="checked"';
172
- else
173
- $wp_cart_image_hide = '';
174
-
175
- $wp_cart_note_to_seller_text = get_option('wp_cart_note_to_seller_text');
176
- $wp_cart_paypal_co_page_style = get_option('wp_cart_paypal_co_page_style');
177
-
178
- $wp_shopping_cart_strict_email_check = '';
179
- if (get_option('wp_shopping_cart_strict_email_check')){
180
- $wp_shopping_cart_strict_email_check = 'checked="checked"';
181
- }
182
-
183
- $wspsc_disable_nonce_add_cart = '';
184
- if (get_option('wspsc_disable_nonce_add_cart')){
185
- $wspsc_disable_nonce_add_cart = 'checked="checked"';
186
- }
187
-
188
- if (get_option('wp_use_aff_platform')){
189
- $wp_use_aff_platform = 'checked="checked"';
190
- }
191
- else{
192
- $wp_use_aff_platform = '';
193
- }
194
-
195
- //$wp_shopping_cart_enable_sandbox = get_option('wp_shopping_cart_enable_sandbox');
196
- if (get_option('wp_shopping_cart_enable_sandbox'))
197
- $wp_shopping_cart_enable_sandbox = 'checked="checked"';
198
- else
199
- $wp_shopping_cart_enable_sandbox = '';
200
-
201
- $wp_shopping_cart_enable_debug = '';
202
- if (get_option('wp_shopping_cart_enable_debug')){
203
- $wp_shopping_cart_enable_debug = 'checked="checked"';
204
- }
205
- ?>
206
- <h2><?php _e("Simple PayPal Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart"); ?> v <?php echo WP_CART_VERSION; ?></h2>
207
-
208
- <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
209
- <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
210
- <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>
211
- </div>
212
-
213
- <div class="postbox">
214
- <h3 class="hndle"><label for="title"><?php _e("Quick Usage Guide", "wordpress-simple-paypal-shopping-cart"); ?></label></h3>
215
- <div class="inside">
216
-
217
- <p><strong><?php _e("Step 1) ","wordpress-simple-paypal-shopping-cart"); ?></strong><?php _e("To add an 'Add to Cart' button for a product simply add the shortcode", "wordpress-simple-paypal-shopping-cart"); ?> [wp_cart_button name="<?php _e("PRODUCT-NAME", "wordpress-simple-paypal-shopping-cart"); ?>" price="<?php _e("PRODUCT-PRICE", "wordpress-simple-paypal-shopping-cart"); ?>"] <?php _e("to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price of your product.", "wordpress-simple-paypal-shopping-cart"); ?></p>
218
- <p><?php _e("Example add to cart button shortcode usage:", "wordpress-simple-paypal-shopping-cart");?> <p style="background-color: #DDDDDD; padding: 5px; display: inline;">[wp_cart_button name="Test Product" price="29.95"]</p></p>
219
- <p><strong><?php _e("Step 2) ","wordpress-simple-paypal-shopping-cart"); ?></strong><?php _e("To add the shopping cart to a post or page (example: a checkout page) simply add the shortcode", "wordpress-simple-paypal-shopping-cart"); ?> [show_wp_shopping_cart] <?php _e("to a post or page or use the sidebar widget to add the shopping cart to the sidebar.", "wordpress-simple-paypal-shopping-cart"); ?></p>
220
- <p><?php _e("Example shopping cart shortcode usage:", "wordpress-simple-paypal-shopping-cart");?> <p style="background-color: #DDDDDD; padding: 5px; display: inline;">[show_wp_shopping_cart]</p></p>
221
- </div></div>
222
-
223
- <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
224
- <?php wp_nonce_field('wp_simple_cart_settings_update'); ?>
225
- <input type="hidden" name="info_update" id="info_update" value="true" />
226
- <?php
227
- echo '
228
- <div class="postbox">
229
- <h3 class="hndle"><label for="title">'.(__("PayPal and Shopping Cart Settings", "wordpress-simple-paypal-shopping-cart")).'</label></h3>
230
- <div class="inside">';
231
-
232
- echo '
233
- <table class="form-table">
234
- <tr valign="top">
235
- <th scope="row">'.(__("Paypal Email Address", "wordpress-simple-paypal-shopping-cart")).'</th>
236
- <td><input type="text" name="cart_paypal_email" value="'.esc_attr($defaultEmail).'" size="40" /></td>
237
- </tr>
238
- <tr valign="top">
239
- <th scope="row">'.(__("Shopping Cart title", "wordpress-simple-paypal-shopping-cart")).'</th>
240
- <td><input type="text" name="wp_cart_title" value="'.esc_attr($title).'" size="40" /></td>
241
- </tr>
242
- <tr valign="top">
243
- <th scope="row">'.(__("Text/Image to Show When Cart Empty", "wordpress-simple-paypal-shopping-cart")).'</th>
244
- <td><input type="text" name="wp_cart_empty_text" value="'.esc_attr($emptyCartText).'" size="60" /><br />'.(__("You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty", "wordpress-simple-paypal-shopping-cart")).'</td>
245
- </tr>
246
- <tr valign="top">
247
- <th scope="row">'.(__("Currency", "wordpress-simple-paypal-shopping-cart")).'</th>
248
- <td><input type="text" name="cart_payment_currency" value="'.esc_attr($defaultCurrency).'" size="6" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' USD, EUR, GBP, AUD)</td>
249
- </tr>
250
- <tr valign="top">
251
- <th scope="row">'.(__("Currency Symbol", "wordpress-simple-paypal-shopping-cart")).'</th>
252
- <td><input type="text" name="cart_currency_symbol" value="'.esc_attr($defaultSymbol).'" size="3" style="width: 2em;" /> ('.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' $, &#163;, &#8364;)
253
- </td>
254
- </tr>
255
-
256
- <tr valign="top">
257
- <th scope="row">'.(__("Base Shipping Cost", "wordpress-simple-paypal-shopping-cart")).'</th>
258
- <td><input type="text" name="cart_base_shipping_cost" value="'.esc_attr($baseShipping).'" size="5" /> <br />'.(__("This is the base shipping cost that will be added to the total of individual products shipping cost. Put 0 if you do not want to charge shipping cost or use base shipping cost.", "wordpress-simple-paypal-shopping-cart")).' <a href="http://www.tipsandtricks-hq.com/ecommerce/?p=297" target="_blank">'.(__("Learn More on Shipping Calculation", "wordpress-simple-paypal-shopping-cart")).'</a></td>
259
- </tr>
260
-
261
- <tr valign="top">
262
- <th scope="row">'.(__("Free Shipping for Orders Over", "wordpress-simple-paypal-shopping-cart")).'</th>
263
- <td><input type="text" name="cart_free_shipping_threshold" value="'.esc_attr($cart_free_shipping_threshold).'" size="5" /> <br />'.(__("When a customer orders more than this amount he/she will get free shipping. Leave empty if you do not want to use it.", "wordpress-simple-paypal-shopping-cart")).'</td>
264
- </tr>
265
-
266
- <tr valign="top">
267
- <th scope="row">'.(__("Must Collect Shipping Address on PayPal", "wordpress-simple-paypal-shopping-cart")).'</th>
268
- <td><input type="checkbox" name="wp_shopping_cart_collect_address" value="1" '.$wp_shopping_cart_collect_address.' /><br />'.(__("If checked the customer will be forced to enter a shipping address on PayPal when checking out.", "wordpress-simple-paypal-shopping-cart")).'</td>
269
- </tr>
270
-
271
- <tr valign="top">
272
- <th scope="row">'.(__("Use PayPal Profile Based Shipping", "wordpress-simple-paypal-shopping-cart")).'</th>
273
- <td><input type="checkbox" name="wp_shopping_cart_use_profile_shipping" value="1" '.$wp_shopping_cart_use_profile_shipping.' /><br />'.(__("Check this if you want to use", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com/setup-paypal-profile-based-shipping-5865" target="_blank">'.(__("PayPal profile based shipping", "wordpress-simple-paypal-shopping-cart")).'</a>. '.(__("Using this will ignore any other shipping options that you have specified in this plugin.", "wordpress-simple-paypal-shopping-cart")).'</td>
274
- </tr>
275
-
276
- <tr valign="top">
277
- <th scope="row">'.(__("Add to Cart button text or Image", "wordpress-simple-paypal-shopping-cart")).'</th>
278
- <td><input type="text" name="addToCartButtonName" value="'.esc_attr($addcart).'" size="100" />
279
- <br />'.(__("To use a customized image as the button simply enter the URL of the image file.", "wordpress-simple-paypal-shopping-cart")).' '.(__("e.g.", "wordpress-simple-paypal-shopping-cart")).' http://www.your-domain.com/wp-content/plugins/wordpress-paypal-shopping-cart/images/buy_now_button.png
280
- <br />You can download nice add to cart button images from <a href="http://www.tipsandtricks-hq.com/ecommerce/add-to-cart-button-images-for-shopping-cart-631" target="_blank">this page</a>.
281
- </td>
282
- </tr>
283
-
284
- <tr valign="top">
285
- <th scope="row">'.(__("Return URL", "wordpress-simple-paypal-shopping-cart")).'</th>
286
- <td><input type="text" name="cart_return_from_paypal_url" value="'.esc_attr($return_url).'" size="100" /><br />'.(__("This is the URL the customer will be redirected to after a successful payment", "wordpress-simple-paypal-shopping-cart")).'</td>
287
- </tr>
288
-
289
- <tr valign="top">
290
- <th scope="row">'.(__("Cancel URL", "wordpress-simple-paypal-shopping-cart")).'</th>
291
- <td><input type="text" name="cart_cancel_from_paypal_url" value="'.esc_attr($cancel_url).'" size="100" /><br />'.(__("The customer will be sent to the above page if the cancel link is clicked on the PayPal checkout page.", "wordpress-simple-paypal-shopping-cart")).'</td>
292
- </tr>
293
-
294
- <tr valign="top">
295
- <th scope="row">'.(__("Products Page URL", "wordpress-simple-paypal-shopping-cart")).'</th>
296
- <td><input type="text" name="cart_products_page_url" value="'.esc_attr($cart_products_page_url).'" size="100" /><br />'.(__("This is the URL of your products page if you have any. If used, the shopping cart widget will display a link to this page when cart is empty", "wordpress-simple-paypal-shopping-cart")).'</td>
297
- </tr>
298
-
299
- <tr valign="top">
300
- <th scope="row">'.(__("Automatic redirection to checkout page", "wordpress-simple-paypal-shopping-cart")).'</th>
301
- <td><input type="checkbox" name="wp_shopping_cart_auto_redirect_to_checkout_page" value="1" '.$wp_shopping_cart_auto_redirect_to_checkout_page.' />
302
- '.(__("Checkout Page URL", "wordpress-simple-paypal-shopping-cart")).': <input type="text" name="cart_checkout_page_url" value="'.$cart_checkout_page_url.'" size="60" />
303
- <br />'.(__("If checked the visitor will be redirected to the Checkout page after a product is added to the cart. You must enter a URL in the Checkout Page URL field for this to work.", "wordpress-simple-paypal-shopping-cart")).'</td>
304
- </tr>
305
-
306
- <tr valign="top">
307
- <th scope="row">'.(__("Open PayPal Checkout Page in a New Tab", "wordpress-simple-paypal-shopping-cart")).'</th>
308
- <td><input type="checkbox" name="wspsc_open_pp_checkout_in_new_tab" value="1" '.$wspsc_open_pp_checkout_in_new_tab.' />
309
- <br />'.(__("If checked the PayPal checkout page will be opened in a new tab/window when the user clicks the checkout button.", "wordpress-simple-paypal-shopping-cart")).'</td>
310
- </tr>
311
-
312
- <tr valign="top">
313
- <th scope="row">'.(__("Reset Cart After Redirection to Return Page", "wordpress-simple-paypal-shopping-cart")).'</th>
314
- <td><input type="checkbox" name="wp_shopping_cart_reset_after_redirection_to_return_page" value="1" '.$wp_shopping_cart_reset_after_redirection_to_return_page.' />
315
- <br />'.(__("If checked the shopping cart will be reset when the customer lands on the return URL (Thank You) page.", "wordpress-simple-paypal-shopping-cart")).'</td>
316
- </tr>
317
- </table>
318
-
319
-
320
- <table class="form-table">
321
- <tr valign="top">
322
- <th scope="row">'.(__("Hide Shopping Cart Image", "wordpress-simple-paypal-shopping-cart")).'</th>
323
- <td><input type="checkbox" name="wp_shopping_cart_image_hide" value="1" '.$wp_cart_image_hide.' /><br />'.(__("If ticked the shopping cart image will not be shown.", "wordpress-simple-paypal-shopping-cart")).'</td>
324
- </tr>
325
- </table>
326
-
327
- <table class="form-table">
328
- <tr valign="top">
329
- <th scope="row">'.(__("Customize the Note to Seller Text", "wordpress-simple-paypal-shopping-cart")).'</th>
330
- <td><input type="text" name="wp_cart_note_to_seller_text" value="'.esc_attr($wp_cart_note_to_seller_text).'" size="100" />
331
- <br />'.(__("Specify the text that you want to use for the note field on PayPal checkout page to collect special instruction (leave this field empty if you don't need to customize it). The default label for the note field is \"Add special instructions to merchant\".", "wordpress-simple-paypal-shopping-cart")).'</td>
332
- </tr>
333
- </table>
334
-
335
- <table class="form-table">
336
- <tr valign="top">
337
- <th scope="row">'.(__("Custom Checkout Page Style Name", "wordpress-simple-paypal-shopping-cart")).'</th>
338
- <td><input type="text" name="wp_cart_paypal_co_page_style" value="'.esc_attr($wp_cart_paypal_co_page_style).'" size="40" />
339
- <br />'.(__("Specify the page style name here if you want to customize the paypal checkout page with custom page style otherwise leave this field empty.", "wordpress-simple-paypal-shopping-cart")).'</td>
340
- </tr>
341
- </table>
342
-
343
- <table class="form-table">
344
- <tr valign="top">
345
- <th scope="row">'.(__("Use Strict PayPal Email Address Checking", "wordpress-simple-paypal-shopping-cart")).'</th>
346
- <td><input type="checkbox" name="wp_shopping_cart_strict_email_check" value="1" '.$wp_shopping_cart_strict_email_check.' /><br />'.(__("If checked the script will check to make sure that the PayPal email address specified is the same as the account where the payment was deposited (Usage of PayPal Email Alias will fail too).", "wordpress-simple-paypal-shopping-cart")).'</td>
347
- </tr>
348
- </table>
349
-
350
- <table class="form-table">
351
- <tr valign="top">
352
- <th scope="row">'.(__("Disable Nonce Check for Add to Cart", "wordpress-simple-paypal-shopping-cart")).'</th>
353
- <td><input type="checkbox" name="wspsc_disable_nonce_add_cart" value="1" '.$wspsc_disable_nonce_add_cart.' />
354
- <br />'.(__("Check this option if you are using a caching solution on your site. This will bypass the nonce check on the add to cart buttons.", "wordpress-simple-paypal-shopping-cart")).'</td>
355
- </tr>
356
- </table>
357
-
358
- <table class="form-table">
359
- <tr valign="top">
360
- <th scope="row">'.(__("Use WP Affiliate Platform", "wordpress-simple-paypal-shopping-cart")).'</th>
361
- <td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
362
- <br />'.(__("Check this if using with the", "wordpress-simple-paypal-shopping-cart")).' <a href="https://www.tipsandtricks-hq.com/?p=1474" target="_blank">WP Affiliate Platform plugin</a>. '.(__("This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales", "wordpress-simple-paypal-shopping-cart")).'</td>
363
- </tr>
364
- </table>
365
- </div></div>
366
-
367
- <div class="postbox">
368
- <h3 class="hndle"><label for="title">'.(__("Testing and Debugging Settings", "wordpress-simple-paypal-shopping-cart")).'</label></h3>
369
- <div class="inside">
370
-
371
- <table class="form-table">
372
-
373
- <tr valign="top">
374
- <th scope="row">'.(__("Enable Debug", "wordpress-simple-paypal-shopping-cart")).'</th>
375
- <td><input type="checkbox" name="wp_shopping_cart_enable_debug" value="1" '.$wp_shopping_cart_enable_debug.' />
376
- <br />'.(__("If checked, debug output will be written to the log file. This is useful for troubleshooting post payment failures", "wordpress-simple-paypal-shopping-cart")).'
377
- <p><i>You can check the debug log file by clicking on the link below (The log file can be viewed using any text editor):</i>
378
- <ul>
379
- <li><a href="'.WP_CART_URL.'/ipn_handle_debug.txt" target="_blank">ipn_handle_debug.txt</a></li>
380
- </ul>
381
- </p>
382
- <input type="submit" name="wspsc_reset_logfile" class="button" style="font-weight:bold; color:red" value="Reset Debug Log file"/>
383
- <p class="description">It will reset the debug log file and timestamp it with a log file reset message.</a>
384
- </td></tr>
385
-
386
- <tr valign="top">
387
- <th scope="row">'.(__("Enable Sandbox Testing", "wordpress-simple-paypal-shopping-cart")).'</th>
388
- <td><input type="checkbox" name="wp_shopping_cart_enable_sandbox" value="1" '.$wp_shopping_cart_enable_sandbox.' />
389
- <br />'.(__("Check this option if you want to do PayPal sandbox testing. You will need to create a PayPal sandbox account from PayPal Developer site", "wordpress-simple-paypal-shopping-cart")).'</td>
390
- </tr>
391
-
392
- </table>
393
-
394
- </div>
395
- </div>
396
-
397
- <div class="submit">
398
- <input type="submit" class="button-primary" name="info_update" value="'.(__("Update Options &raquo;", "wordpress-simple-paypal-shopping-cart")).'" />
399
- </div>
400
- </form>
401
- ';
402
- echo (__("Like the Simple WordPress Shopping Cart Plugin?", "wordpress-simple-paypal-shopping-cart")).' <a href="http://wordpress.org/extend/plugins/wordpress-simple-paypal-shopping-cart" target="_blank">'.(__("Give it a good rating", "wordpress-simple-paypal-shopping-cart")).'</a>';
403
- wpspsc_settings_menu_footer();
404
- }
405
-
406
- function show_wp_cart_email_settings_page()
407
- {
408
- if(!current_user_can('manage_options')){
409
- wp_die('You do not have permission to access the settings page.');
410
- }
411
-
412
- if (isset($_POST['wpspc_email_settings_update']))
413
- {
414
- $nonce = $_REQUEST['_wpnonce'];
415
- if ( !wp_verify_nonce($nonce, 'wpspc_email_settings_update')){
416
- wp_die('Error! Nonce Security Check Failed! Go back to email settings menu and save the settings again.');
417
- }
418
- update_option('wpspc_send_buyer_email', (isset($_POST['wpspc_send_buyer_email']) && $_POST['wpspc_send_buyer_email']!='') ? 'checked="checked"':'' );
419
- update_option('wpspc_buyer_from_email', stripslashes((string)$_POST["wpspc_buyer_from_email"]));
420
- update_option('wpspc_buyer_email_subj', stripslashes((string)$_POST["wpspc_buyer_email_subj"]));
421
- update_option('wpspc_buyer_email_body', stripslashes((string)$_POST["wpspc_buyer_email_body"]));;
422
-
423
- update_option('wpspc_send_seller_email', (isset($_POST['wpspc_send_seller_email']) && $_POST['wpspc_send_seller_email']!='') ? 'checked="checked"':'' );
424
- update_option('wpspc_notify_email_address', stripslashes((string)$_POST["wpspc_notify_email_address"]));
425
- update_option('wpspc_seller_email_subj', stripslashes((string)$_POST["wpspc_seller_email_subj"]));
426
- update_option('wpspc_seller_email_body', stripslashes((string)$_POST["wpspc_seller_email_body"]));;
427
-
428
- echo '<div id="message" class="updated fade"><p><strong>';
429
- echo 'Email Settings Updated!';
430
- echo '</strong></p></div>';
431
- }
432
- $wpspc_send_buyer_email = '';
433
- if (get_option('wpspc_send_buyer_email')){
434
- $wpspc_send_buyer_email = 'checked="checked"';
435
- }
436
- $wpspc_buyer_from_email = get_option('wpspc_buyer_from_email');
437
- $wpspc_buyer_email_subj = get_option('wpspc_buyer_email_subj');
438
- $wpspc_buyer_email_body = get_option('wpspc_buyer_email_body');
439
- $wpspc_send_seller_email = '';
440
- if (get_option('wpspc_send_seller_email')){
441
- $wpspc_send_seller_email = 'checked="checked"';
442
- }
443
- $wpspc_notify_email_address = get_option('wpspc_notify_email_address');
444
- if(empty($wpspc_notify_email_address)){
445
- $wpspc_notify_email_address = get_bloginfo('admin_email'); //default value
446
- }
447
- $wpspc_seller_email_subj = get_option('wpspc_seller_email_subj');
448
- if(empty($wpspc_seller_email_subj)){
449
- $wpspc_seller_email_subj = "Notification of product sale";
450
- }
451
- $wpspc_seller_email_body = get_option('wpspc_seller_email_body');
452
- if(empty($wpspc_seller_email_body)){
453
- $wpspc_seller_email_body = "Dear Seller\n".
454
- "\nThis mail is to notify you of a product sale.\n".
455
- "\n{product_details}".
456
- "\n\nThe sale was made to {first_name} {last_name} ({payer_email})".
457
- "\n\nThanks";
458
- }
459
- ?>
460
-
461
- <div style="background: none repeat scroll 0 0 #FFF6D5;border: 1px solid #D1B655;color: #3F2502;margin: 10px 0;padding: 5px 5px 5px 10px;text-shadow: 1px 1px #FFFFFF;">
462
- <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "wordpress-simple-paypal-shopping-cart"); ?><br />
463
- <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>
464
- </div>
465
-
466
- <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
467
- <?php wp_nonce_field('wpspc_email_settings_update'); ?>
468
- <input type="hidden" name="info_update" id="info_update" value="true" />
469
-
470
- <div class="postbox">
471
- <h3 class="hndle"><label for="title"><?php _e("Purchase Confirmation Email Settings", "wordpress-simple-paypal-shopping-cart");?></label></h3>
472
- <div class="inside">
473
-
474
- <p><i><?php _e("The following options affect the emails that gets sent to your buyers after a purchase.", "wordpress-simple-paypal-shopping-cart");?></i></p>
475
-
476
- <table class="form-table">
477
-
478
- <tr valign="top">
479
- <th scope="row"><?php _e("Send Emails to Buyer After Purchase", "wordpress-simple-paypal-shopping-cart");?></th>
480
- <td><input type="checkbox" name="wpspc_send_buyer_email" value="1" <?php echo $wpspc_send_buyer_email; ?> /><span class="description"><?php _e("If checked the plugin will send an email to the buyer with the sale details. If digital goods are purchased then the email will contain the download links for the purchased products.", "wordpress-simple-paypal-shopping-cart");?></a></span></td>
481
- </tr>
482
-
483
- <tr valign="top">
484
- <th scope="row"><?php _e("From Email Address", "wordpress-simple-paypal-shopping-cart");?></th>
485
- <td><input type="text" name="wpspc_buyer_from_email" value="<?php echo esc_attr($wpspc_buyer_from_email); ?>" size="50" />
486
- <br /><p class="description"><?php _e("Example: Your Name &lt;sales@your-domain.com&gt; This is the email address that will be used to send the email to the buyer. This name and email address will appear in the from field of the email.", "wordpress-simple-paypal-shopping-cart");?></p></td>
487
- </tr>
488
-
489
- <tr valign="top">
490
- <th scope="row"><?php _e("Buyer Email Subject", "wordpress-simple-paypal-shopping-cart");?></th>
491
- <td><input type="text" name="wpspc_buyer_email_subj" value="<?php echo esc_attr($wpspc_buyer_email_subj); ?>" size="50" />
492
- <br /><p class="description"><?php _e("This is the subject of the email that will be sent to the buyer.", "wordpress-simple-paypal-shopping-cart");?></p></td>
493
- </tr>
494
-
495
- <tr valign="top">
496
- <th scope="row"><?php _e("Buyer Email Body", "wordpress-simple-paypal-shopping-cart");?></th>
497
- <td>
498
- <textarea name="wpspc_buyer_email_body" cols="90" rows="7"><?php echo esc_textarea($wpspc_buyer_email_body); ?></textarea>
499
- <br /><p class="description"><?php _e("This is the body of the email that will be sent to the buyer. Do not change the text within the braces {}. You can use the following email tags in this email body field:", "wordpress-simple-paypal-shopping-cart");?>
500
- <br />{first_name} – <?php _e("First name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
501
- <br />{last_name} – <?php _e("Last name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
502
- <br />{payer_email} – <?php _e("Email Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
503
- <br />{address} – <?php _e("Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
504
- <br />{product_details} – <?php _e("The item details of the purchased product (this will include the download link for digital items).", "wordpress-simple-paypal-shopping-cart");?>
505
- <br />{transaction_id} – <?php _e("The unique transaction ID of the purchase", "wordpress-simple-paypal-shopping-cart");?>
506
- <br />{purchase_amt} – <?php _e("The amount paid for the current transaction", "wordpress-simple-paypal-shopping-cart");?>
507
- <br />{purchase_date} – <?php _e("The date of the purchase", "wordpress-simple-paypal-shopping-cart");?>
508
- <br />{coupon_code} – <?php _e("Coupon code applied to the purchase", "wordpress-simple-paypal-shopping-cart");?>
509
- </p></td>
510
- </tr>
511
-
512
- <tr valign="top">
513
- <th scope="row"><?php _e("Send Emails to Seller After Purchase", "wordpress-simple-paypal-shopping-cart");?></th>
514
- <td><input type="checkbox" name="wpspc_send_seller_email" value="1" <?php echo $wpspc_send_seller_email; ?> /><span class="description"><?php _e("If checked the plugin will send an email to the seller with the sale details", "wordpress-simple-paypal-shopping-cart");?></a></span></td>
515
- </tr>
516
-
517
- <tr valign="top">
518
- <th scope="row"><?php _e("Notification Email Address*", "wordpress-simple-paypal-shopping-cart");?></th>
519
- <td><input type="text" name="wpspc_notify_email_address" value="<?php echo esc_attr($wpspc_notify_email_address); ?>" size="50" />
520
- <br /><p class="description"><?php _e("This is the email address where the seller will be notified of product sales. You can put multiple email addresses separated by comma (,) in the above field to send the notification to multiple email addresses.", "wordpress-simple-paypal-shopping-cart");?></p></td>
521
- </tr>
522
-
523
- <tr valign="top">
524
- <th scope="row"><?php _e("Seller Email Subject*", "wordpress-simple-paypal-shopping-cart");?></th>
525
- <td><input type="text" name="wpspc_seller_email_subj" value="<?php echo esc_attr($wpspc_seller_email_subj); ?>" size="50" />
526
- <br /><p class="description"><?php _e("This is the subject of the email that will be sent to the seller for record.", "wordpress-simple-paypal-shopping-cart");?></p></td>
527
- </tr>
528
-
529
- <tr valign="top">
530
- <th scope="row"><?php _e("Seller Email Body*", "wordpress-simple-paypal-shopping-cart");?></th>
531
- <td>
532
- <textarea name="wpspc_seller_email_body" cols="90" rows="7"><?php echo esc_textarea($wpspc_seller_email_body); ?></textarea>
533
- <br /><p class="description"><?php _e("This is the body of the email that will be sent to the seller for record. Do not change the text within the braces {}. You can use the following email tags in this email body field:", "wordpress-simple-paypal-shopping-cart");?>
534
- <br />{first_name} – <?php _e("First name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
535
- <br />{last_name} – <?php _e("Last name of the buyer", "wordpress-simple-paypal-shopping-cart");?>
536
- <br />{payer_email} – <?php _e("Email Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
537
- <br />{address} – <?php _e("Address of the buyer", "wordpress-simple-paypal-shopping-cart");?>
538
- <br />{product_details} – <?php _e("The item details of the purchased product (this will include the download link for digital items).", "wordpress-simple-paypal-shopping-cart");?>
539
- <br />{transaction_id} – <?php _e("The unique transaction ID of the purchase", "wordpress-simple-paypal-shopping-cart");?>
540
- <br />{purchase_amt} – <?php _e("The amount paid for the current transaction", "wordpress-simple-paypal-shopping-cart");?>
541
- <br />{purchase_date} – <?php _e("The date of the purchase", "wordpress-simple-paypal-shopping-cart");?>
542
- <br />{coupon_code} – <?php _e("Coupon code applied to the purchase", "wordpress-simple-paypal-shopping-cart");?>
543
- </p></td>
544
- </tr>
545
-
546
- </table>
547
-
548
- </div></div>
549
-
550
- <div class="submit">
551
- <input type="submit" class="button-primary" name="wpspc_email_settings_update" value="<?php echo (__("Update Options &raquo;", "wordpress-simple-paypal-shopping-cart")) ?>" />
552
- </div>
553
- </form>
554
-
555
- <?php
556
- wpspsc_settings_menu_footer();
557
- }
1
  <?php
2
 
3
  /*
4
+ * Main settings menu (it links to all other settings menu tabs).
5
+ * Only admin user with "manage_options" permission can access this menu page.
6
  */
7
+
8
+ function wp_cart_options() {
9
+ if (!current_user_can('manage_options')) {
10
  wp_die('You do not have permission to access this settings page.');
11
  }
12
+
13
  $wpspc_plugin_tabs = array(
14
  'wordpress-paypal-shopping-cart' => 'General Settings',
15
  'wordpress-paypal-shopping-cart&action=email-settings' => 'Email Settings',
16
+ 'wordpress-paypal-shopping-cart&action=discount-settings' => 'Coupon/Discount',
17
+ 'wordpress-paypal-shopping-cart&action=tools' => 'Tools'
18
  );
19
  echo '<div class="wrap">';
20
+ echo '<h1>' . (__("WP Paypal Shopping Cart Options", "wordpress-simple-paypal-shopping-cart")) . '</h1>';
21
+
22
  $current = "";
23
+ if (isset($_GET['page'])) {
24
  $current = sanitize_text_field($_GET['page']);
25
+ if (isset($_GET['action'])) {
26
  $current .= "&action=" . sanitize_text_field($_GET['action']);
27
  }
28
  }
29
  $content = '';
30
  $content .= '<h2 class="nav-tab-wrapper">';
31
+ foreach ($wpspc_plugin_tabs as $location => $tabname) {
32
+ if ($current == $location) {
 
33
  $class = ' nav-tab-active';
34
+ } else {
35
+ $class = '';
36
  }
37
+ $content .= '<a class="nav-tab' . $class . '" href="?page=' . $location . '">' . $tabname . '</a>';
38
  }
39
  $content .= '</h2>';
40
+ echo $content;
41
  echo '<div id="poststuff"><div id="post-body">';
42
+ if (isset($_GET['action'])) {
43
+ switch ($_GET['action']) {
 
 
44
  case 'email-settings':
45
+ include_once ('includes/admin/wp_shopping_cart_menu_email_settings.php');
46
  show_wp_cart_email_settings_page();
47
  break;
48
  case 'discount-settings':
49
+ include_once ('includes/admin/wp_shopping_cart_menu_discounts.php');
50
  show_wp_cart_coupon_discount_settings_page();
51
  break;
52
+ case 'tools':
53
+ include_once ('includes/admin/wp_shopping_cart_menu_tools.php');
54
+ show_wp_cart_tools_menu_page();
55
+ break;
56
  }
57
+ } else {
58
+ include_once ('includes/admin/wp_shopping_cart_menu_general_settings.php');
59
+ show_wp_cart_options_page();
60
+ }
 
61
  echo '</div></div>';
62
  echo '</div>';
63
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wp_shopping_cart_shortcodes.php CHANGED
@@ -1,5 +1,12 @@
1
  <?php
2
 
 
 
 
 
 
 
 
3
  function wp_cart_button_handler($atts){
4
  extract(shortcode_atts(array(
5
  'name' => '',
@@ -122,3 +129,29 @@ function wspsc_compact_cart_handler($args)
122
  $output .= '</div>';
123
  return $output;
124
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
+ add_shortcode('show_wp_shopping_cart', 'show_wp_shopping_cart_handler');
4
+ add_shortcode('always_show_wp_shopping_cart', 'always_show_cart_handler');
5
+ add_shortcode('wp_cart_button', 'wp_cart_button_handler');
6
+ add_shortcode('wp_cart_display_product', 'wp_cart_display_product_handler');
7
+ add_shortcode('wp_compact_cart', 'wspsc_compact_cart_handler');
8
+ add_shortcode('wp_compact_cart2', 'wspsc_compact_cart2_handler');
9
+
10
  function wp_cart_button_handler($atts){
11
  extract(shortcode_atts(array(
12
  'name' => '',
129
  $output .= '</div>';
130
  return $output;
131
  }
132
+
133
+ function wspsc_compact_cart2_handler($args)
134
+ {
135
+ $num_items = wpspc_get_total_cart_qty();
136
+ $checkout_url = get_option('cart_checkout_page_url');
137
+ //$curSymbol = WP_CART_CURRENCY_SYMBOL;
138
+ //$cart_total = wpspc_get_total_cart_sub_total();
139
+
140
+ $output = "";
141
+ $output .= '<div class="wspsc_compact_cart2 wpsps-cart-wrapper">';
142
+ $output .= '<div class="wspsc_compact_cart2_container">';
143
+
144
+ $output .= '<div class="wspsc_compact_cart2_inside">';
145
+ $item_message = ($num_items == 1)? "Item" : "Items";
146
+
147
+ if(!empty($checkout_url)){
148
+ $output .= '<a class="wspsc_compact_cart2_view_cart_link" href="'.$checkout_url.'">'.$num_items . " " . $item_message . '</a>';
149
+ }else{
150
+ $output .= $num_items . " " . $item_message;
151
+ }
152
+ $output .= '</div>';//end of .wspsc_compact_cart2_inside
153
+
154
+ $output .= '</div>';//end of .wspsc_compact_cart2_container
155
+ $output .= '</div>';
156
+ return $output;
157
+ }
wp_shopping_cart_style.css CHANGED
@@ -122,4 +122,35 @@ text-decoration: none !important;
122
  width:auto !important;
123
  height:auto !important;
124
  }
125
- /* End of compact cart css */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  width:auto !important;
123
  height:auto !important;
124
  }
125
+ /* End of compact cart css */
126
+ /* Compact cart 2 css */
127
+ .wspsc_compact_cart2{
128
+ background-color:#b4d613;
129
+ border:1px solid #92B002;
130
+ max-width: 140px;
131
+ min-width: 140px;
132
+ padding: 2px 2px;
133
+ margin:10px 0;
134
+ }
135
+ .wspsc_compact_cart2_container{
136
+ background: url('images/shopping_cart_icon_2.png') 6px 6px no-repeat;
137
+ padding-left: 40px;
138
+ }
139
+ .wspsc_compact_cart2_inside{
140
+ background: #262626;
141
+ display: block;
142
+ color: #FFFFFF;
143
+ font-size: 14px;
144
+ text-align: center;
145
+ cursor: pointer;
146
+ padding: 3px 0;
147
+ }
148
+ .wspsc_compact_cart2_view_cart_link {
149
+ color: #FFFFFF !important;
150
+ text-decoration: none;
151
+ }
152
+ .wspsc_compact_cart2_view_cart_link:hover {
153
+ color: #FFFFFF !important;
154
+ text-decoration: none;
155
+ }
156
+ /* End of compact cart 2 css */