WordPress Simple PayPal Shopping Cart - Version 3.9.8

Version Description

  • Added Hebrew Language translation to the plugin. The Hebrew translation file was submitted by Sagi Cooper.
  • Added extra condition to address the "Invalid argument supplied" error that a few users were getting.
Download this release

Release Info

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

Code changes from version 3.9.6 to 3.9.8

images/Shoppingcart_delete.png CHANGED
Binary file
images/Shoppingcart_delete_icon_2.png ADDED
Binary file
images/shopping_cart_icon.png CHANGED
Binary file
languages/WSPSC-he_IL.mo ADDED
Binary file
languages/WSPSC-he_IL.po ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WSPSC v2.8.9\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-03-16 21:49+0100\n"
6
+ "PO-Revision-Date: 2014-06-12 10:00+0200\n"
7
+ "Language-Team: Ruhul Amin\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "X-Poedit-KeywordsList: _e;__\n"
12
+ "X-Poedit-Basepath: .\n"
13
+ "X-Poedit-Language: English\n"
14
+ "X-Poedit-Country: UNITED STATES\n"
15
+ "Last-Translator: sagi <sagi@spittoon.co.il>\n"
16
+ "X-Poedit-SearchPath-0: ..\n"
17
+
18
+ #: ../wp_shopping_cart.php:33
19
+ msgid "Your Shopping Cart"
20
+ msgstr "עגלת הקניות שלך"
21
+
22
+ #: ../wp_shopping_cart.php:34
23
+ msgid "Your cart is empty"
24
+ msgstr "עגלת הקניות ריקה"
25
+
26
+ #: ../wp_shopping_cart.php:140
27
+ msgid "Shopping Cart Configuration Error! You must specify a value in the 'Checkout Page URL' field for the automatic redirection feature to work!"
28
+ msgstr "Shopping Cart Configuration Error! You must specify a value in the 'Checkout Page URL' field for the automatic redirection feature to work!"
29
+
30
+ #: ../wp_shopping_cart.php:197
31
+ msgid "Visit The Shop"
32
+ msgstr "בקר בחנות"
33
+
34
+ #: ../wp_shopping_cart.php:209
35
+ #: ../wp_shopping_cart.php:606
36
+ msgid "USD"
37
+ msgstr "USD"
38
+
39
+ #: ../wp_shopping_cart.php:213
40
+ #: ../wp_shopping_cart.php:609
41
+ msgid "$"
42
+ msgstr "$"
43
+
44
+ #: ../wp_shopping_cart.php:242
45
+ msgid "Cart"
46
+ msgstr "עגלת קניות"
47
+
48
+ #: ../wp_shopping_cart.php:251
49
+ msgid "Hit enter to submit new Quantity."
50
+ msgstr "הקש אנטר כדי לשנות כמות"
51
+
52
+ #: ../wp_shopping_cart.php:262
53
+ msgid "Item Name"
54
+ msgstr "שם המוצר"
55
+
56
+ #: ../wp_shopping_cart.php:262
57
+ msgid "Quantity"
58
+ msgstr "כמות"
59
+
60
+ #: ../wp_shopping_cart.php:262
61
+ msgid "Price"
62
+ msgstr "מחיר"
63
+
64
+ #: ../wp_shopping_cart.php:299
65
+ msgid "Remove"
66
+ msgstr "הסר"
67
+
68
+ #: ../wp_shopping_cart.php:329
69
+ msgid "Subtotal"
70
+ msgstr "סיכום ביניים"
71
+
72
+ #: ../wp_shopping_cart.php:330
73
+ msgid "Shipping"
74
+ msgstr "דמי משלוח"
75
+
76
+ #: ../wp_shopping_cart.php:334
77
+ msgid "Total"
78
+ msgstr "סך הכל"
79
+
80
+ #: ../wp_shopping_cart.php:339
81
+ msgid "paypal_checkout_EN.png"
82
+ msgstr "paypal_checkout_EN.png"
83
+
84
+ #: ../wp_shopping_cart.php:339
85
+ msgid "Make payments with PayPal - it\\'s fast, free and secure!"
86
+ msgstr "שלם בעזרת פאיפאל - זה מהיר ובטוח!"
87
+
88
+ #: ../wp_shopping_cart.php:387
89
+ #: ../wp_shopping_cart.php:469
90
+ #: ../wp_shopping_cart.php:528
91
+ #: ../wp_shopping_cart.php:534
92
+ #: ../wp_shopping_cart.php:622
93
+ msgid "Add to Cart"
94
+ msgstr "הוסף לעגלה"
95
+
96
+ #: ../wp_shopping_cart.php:602
97
+ msgid "Options Updated!"
98
+ msgstr "האופציות עודכנו!"
99
+
100
+ #: ../wp_shopping_cart.php:662
101
+ msgid "Simple Paypal Shopping Cart Settings"
102
+ msgstr "הגדרות Simple Paypal Shopping Cart"
103
+
104
+ #: ../wp_shopping_cart.php:664
105
+ msgid "For information, updates and detailed documentation, please visit:"
106
+ msgstr "למידע, עדכונים ותיעוד מפורט אנא בקרו ב:"
107
+
108
+ #: ../wp_shopping_cart.php:668
109
+ msgid "Usage:"
110
+ msgstr "שימוש:"
111
+
112
+ #: ../wp_shopping_cart.php:670
113
+ msgid "1. To add the 'Add to Cart' button simply add the trigger text"
114
+ msgstr "1. To add the 'Add to Cart' button simply add the trigger text"
115
+
116
+ #: ../wp_shopping_cart.php:670
117
+ msgid "PRODUCT-NAME"
118
+ msgstr "PRODUCT-NAME"
119
+
120
+ #: ../wp_shopping_cart.php:670
121
+ msgid "PRODUCT-PRICE"
122
+ msgstr "PRODUCT-PRICE"
123
+
124
+ #: ../wp_shopping_cart.php:670
125
+ msgid "to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price. For example: [wp_cart:Test Product:price:15.00:end]"
126
+ msgstr "to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price. For example: [wp_cart:Test Product:price:15.00:end]"
127
+
128
+ #: ../wp_shopping_cart.php:671
129
+ msgid "2. To add the shopping cart to a post or page (eg. checkout page) simply add the shortcode"
130
+ msgstr "2. To add the shopping cart to a post or page (eg. checkout page) simply add the shortcode"
131
+
132
+ #: ../wp_shopping_cart.php:671
133
+ msgid "to a post or page or use the sidebar widget to add the shopping cart to the sidebar."
134
+ msgstr "to a post or page or use the sidebar widget to add the shopping cart to the sidebar."
135
+
136
+ #: ../wp_shopping_cart.php:679
137
+ msgid "PayPal and Shopping Cart Settings"
138
+ msgstr "PayPal and Shopping Cart Settings"
139
+
140
+ #: ../wp_shopping_cart.php:685
141
+ msgid "Paypal Email Address"
142
+ msgstr "Paypal Email Address"
143
+
144
+ #: ../wp_shopping_cart.php:689
145
+ msgid "Shopping Cart title"
146
+ msgstr "Shopping Cart title"
147
+
148
+ #: ../wp_shopping_cart.php:693
149
+ msgid "Text/Image to Show When Cart Empty"
150
+ msgstr "Text/Image to Show When Cart Empty"
151
+
152
+ #: ../wp_shopping_cart.php:694
153
+ msgid "You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty"
154
+ msgstr "You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty"
155
+
156
+ #: ../wp_shopping_cart.php:697
157
+ msgid "Currency"
158
+ msgstr "Currency"
159
+
160
+ #: ../wp_shopping_cart.php:698
161
+ #: ../wp_shopping_cart.php:702
162
+ #: ../wp_shopping_cart.php:728
163
+ msgid "e.g."
164
+ msgstr "e.g."
165
+
166
+ #: ../wp_shopping_cart.php:701
167
+ msgid "Currency Symbol"
168
+ msgstr "Currency Symbol"
169
+
170
+ #: ../wp_shopping_cart.php:707
171
+ msgid "Base Shipping Cost"
172
+ msgstr "Base Shipping Cost"
173
+
174
+ #: ../wp_shopping_cart.php:708
175
+ msgid "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."
176
+ msgstr "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."
177
+
178
+ #: ../wp_shopping_cart.php:708
179
+ msgid "Learn More on Shipping Calculation"
180
+ msgstr "Learn More on Shipping Calculation"
181
+
182
+ #: ../wp_shopping_cart.php:712
183
+ msgid "Free Shipping for Orders Over"
184
+ msgstr "משלוח חינם בקניה מעל"
185
+
186
+ #: ../wp_shopping_cart.php:713
187
+ msgid "When a customer orders more than this amount he/she will get free shipping. Leave empty if you do not want to use it."
188
+ msgstr "When a customer orders more than this amount he/she will get free shipping. Leave empty if you do not want to use it."
189
+
190
+ #: ../wp_shopping_cart.php:717
191
+ msgid "Must Collect Shipping Address on PayPal"
192
+ msgstr "Must Collect Shipping Address on PayPal"
193
+
194
+ #: ../wp_shopping_cart.php:718
195
+ msgid "If checked the customer will be forced to enter a shipping address on PayPal when checking out."
196
+ msgstr "If checked the customer will be forced to enter a shipping address on PayPal when checking out."
197
+
198
+ #: ../wp_shopping_cart.php:722
199
+ msgid "Use PayPal Profile Based Shipping"
200
+ msgstr "Use PayPal Profile Based Shipping"
201
+
202
+ #: ../wp_shopping_cart.php:723
203
+ msgid "Check this if you want to use"
204
+ msgstr "Check this if you want to use"
205
+
206
+ #: ../wp_shopping_cart.php:723
207
+ msgid "PayPal profile based shipping"
208
+ msgstr "PayPal profile based shipping"
209
+
210
+ #: ../wp_shopping_cart.php:723
211
+ msgid "Using this will ignore any other shipping options that you have specified in this plugin."
212
+ msgstr "Using this will ignore any other shipping options that you have specified in this plugin."
213
+
214
+ #: ../wp_shopping_cart.php:727
215
+ msgid "Add to Cart button text or Image"
216
+ msgstr "Add to Cart button text or Image"
217
+
218
+ #: ../wp_shopping_cart.php:728
219
+ msgid "To use a customized image as the button simply enter the URL of the image file."
220
+ msgstr "To use a customized image as the button simply enter the URL of the image file."
221
+
222
+ #: ../wp_shopping_cart.php:732
223
+ msgid "Return URL"
224
+ msgstr "Return URL"
225
+
226
+ #: ../wp_shopping_cart.php:733
227
+ msgid "This is the URL the customer will be redirected to after a successful payment"
228
+ msgstr "This is the URL the customer will be redirected to after a successful payment"
229
+
230
+ #: ../wp_shopping_cart.php:737
231
+ msgid "Products Page URL"
232
+ msgstr "Products Page URL"
233
+
234
+ #: ../wp_shopping_cart.php:738
235
+ msgid "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"
236
+ msgstr "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"
237
+
238
+ #: ../wp_shopping_cart.php:742
239
+ msgid "Automatic redirection to checkout page"
240
+ msgstr "Automatic redirection to checkout page"
241
+
242
+ #: ../wp_shopping_cart.php:744
243
+ msgid "Checkout Page URL"
244
+ msgstr "Checkout Page URL"
245
+
246
+ #: ../wp_shopping_cart.php:745
247
+ msgid "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."
248
+ msgstr "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."
249
+
250
+ #: ../wp_shopping_cart.php:749
251
+ msgid "Reset Cart After Redirection to Return Page"
252
+ msgstr "Reset Cart After Redirection to Return Page"
253
+
254
+ #: ../wp_shopping_cart.php:751
255
+ msgid "If checked the shopping cart will be reset when the customer lands on the return URL (Thank You) page."
256
+ msgstr "If checked the shopping cart will be reset when the customer lands on the return URL (Thank You) page."
257
+
258
+ #: ../wp_shopping_cart.php:758
259
+ msgid "Hide Shopping Cart Image"
260
+ msgstr "Hide Shopping Cart Image"
261
+
262
+ #: ../wp_shopping_cart.php:759
263
+ msgid "If ticked the shopping cart image will not be shown."
264
+ msgstr "If ticked the shopping cart image will not be shown."
265
+
266
+ #: ../wp_shopping_cart.php:765
267
+ msgid "Use WP Affiliate Platform"
268
+ msgstr "Use WP Affiliate Platform"
269
+
270
+ #: ../wp_shopping_cart.php:767
271
+ msgid "Check this if using with the"
272
+ msgstr "Check this if using with the"
273
+
274
+ #: ../wp_shopping_cart.php:767
275
+ msgid "This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales"
276
+ msgstr "This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales"
277
+
278
+ #: ../wp_shopping_cart.php:772
279
+ msgid "Update Options &raquo;"
280
+ msgstr "Update Options &raquo;"
281
+
282
+ #: ../wp_shopping_cart.php:776
283
+ msgid "Like the Simple WordPress Shopping Cart Plugin?"
284
+ msgstr "Like the Simple WordPress Shopping Cart Plugin?"
285
+
286
+ #: ../wp_shopping_cart.php:776
287
+ msgid "Give it a good rating"
288
+ msgstr "Give it a good rating"
289
+
290
+ #: ../wp_shopping_cart.php:781
291
+ msgid "WP Paypal Shopping Cart Options"
292
+ msgstr "WP Paypal Shopping Cart Options"
293
+
294
+ #: ../wp_shopping_cart.php:791
295
+ #: ../wp_shopping_cart.php:819
296
+ #: ../wp_shopping_cart.php:820
297
+ msgid "WP Paypal Shopping Cart"
298
+ msgstr "WP Paypal Shopping Cart"
299
+
300
+ #: ../wp_shopping_cart.php:791
301
+ msgid "WP Shopping Cart"
302
+ msgstr "WP Shopping Cart"
303
+
304
+ #: ../wp_shopping_cart.php:799
305
+ msgid "Shopping Cart"
306
+ msgstr "עגלת קניות"
307
+
308
+ #: ../wp_shopping_cart.php:811
309
+ msgid "Set the Plugin Settings from the Settings menu"
310
+ msgstr "Set the Plugin Settings from the Settings menu"
311
+
312
+ #: ../wp_shopping_cart.php:818
313
+ msgid "Display WP Paypal Shopping Cart."
314
+ msgstr "Display WP Paypal Shopping Cart."
315
+
316
+ #: ../wp_shopping_cart.php:832
317
+ msgid "Settings"
318
+ msgstr "Settings"
319
+
320
+ #~ msgid "show-wp-shopping-cart"
321
+ #~ msgstr "show-wp-shopping-cart"
322
+
323
+ #~ msgid ""
324
+ #~ "2. To add the shopping cart to a post or page (eg. checkout page) simply "
325
+ #~ "add the shortcode <strong>[show_wp_shopping_cart]</strong> to a post or "
326
+ #~ "page or use the sidebar widget to add the shopping cart to the sidebar."
327
+ #~ msgstr ""
328
+ #~ "2. To add the shopping cart to a post or page (eg. checkout page) simply "
329
+ #~ "add the shortcode <strong>[show_wp_shopping_cart]</strong> to a post or "
330
+ #~ "page or use the sidebar widget to add the shopping cart to the sidebar."
paypal.php CHANGED
@@ -240,6 +240,9 @@ class paypal_ipn_handler {
240
  {
241
  $this->debug_log('Not Using the WP Affiliate Platform Plugin.',true);
242
  }
 
 
 
243
  return true;
244
  }
245
 
240
  {
241
  $this->debug_log('Not Using the WP Affiliate Platform Plugin.',true);
242
  }
243
+
244
+ do_action('wpspc_paypal_ipn_processed',$this->ipn_data);
245
+
246
  return true;
247
  }
248
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: Tips and Tricks HQ, Ruhul Amin, wptipsntricks
3
  Donate link: http://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,
5
  Requires at least: 3.0
6
- Tested up to: 3.9
7
- Stable tag: 3.9.6
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.
@@ -17,6 +17,10 @@ It also allows you to add/display the shopping cart on any post or page or sideb
17
 
18
  http://www.youtube.com/watch?v=tEZWfTmZ2kk
19
 
 
 
 
 
20
  It can be easily integrated with the NextGen Photo Gallery plugin to accommodate the selling of photographs from your gallery.
21
 
22
  This plugin is a lightweight solution (with minimal number of lines of code and minimal options) so it doesn't slow down your site.
@@ -51,6 +55,8 @@ or
51
  * Track coupons with the order to see which customer used which coupon code.
52
  * Ability to add a compact shopping cart to your site using a shortcode.
53
  * Ability to use a custom checkout page style.
 
 
54
  * Can be translated into any language.
55
  * and more...
56
 
@@ -72,6 +78,7 @@ The following language translations are already available:
72
  * Japanese
73
  * Polish
74
  * Czech
 
75
 
76
  You can translate the plugin using [this documentation](http://www.tipsandtricks-hq.com/ecommerce/translating-the-wp-simple-shopping-cart-plugin-2627).
77
 
@@ -160,6 +167,18 @@ None
160
 
161
  == Changelog ==
162
 
 
 
 
 
 
 
 
 
 
 
 
 
163
  = 3.9.6 =
164
  - Added Czech Language translation to the plugin. The Czech translation file was submitted by Tomas Sykora.
165
  - Added a new option/feature to specify a custom paypal checkout page style name. The plugin will use the custom checkout page style if you specify one.
3
  Donate link: http://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,
5
  Requires at least: 3.0
6
+ Tested up to: 3.9.1
7
+ Stable tag: 3.9.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.
17
 
18
  http://www.youtube.com/watch?v=tEZWfTmZ2kk
19
 
20
+ You will be able to create products by using shortcodes dynamically.
21
+
22
+ The shopping cart output will be responsive if you are using it with a responsive theme.
23
+
24
  It can be easily integrated with the NextGen Photo Gallery plugin to accommodate the selling of photographs from your gallery.
25
 
26
  This plugin is a lightweight solution (with minimal number of lines of code and minimal options) so it doesn't slow down your site.
55
  * Track coupons with the order to see which customer used which coupon code.
56
  * Ability to add a compact shopping cart to your site using a shortcode.
57
  * Ability to use a custom checkout page style.
58
+ * Ability to open checkout page in a new browser tab/window.
59
+ * Works nicely with responsive WordPress themes.
60
  * Can be translated into any language.
61
  * and more...
62
 
78
  * Japanese
79
  * Polish
80
  * Czech
81
+ * Hebrew
82
 
83
  You can translate the plugin using [this documentation](http://www.tipsandtricks-hq.com/ecommerce/translating-the-wp-simple-shopping-cart-plugin-2627).
84
 
167
 
168
  == Changelog ==
169
 
170
+ = 3.9.8 =
171
+ - Added Hebrew Language translation to the plugin. The Hebrew translation file was submitted by Sagi Cooper.
172
+ - Added extra condition to address the "Invalid argument supplied" error that a few users were getting.
173
+
174
+ = 3.9.7 =
175
+ - Added a new feature to open the checkout page in a new tab/window when user clicks the checkout button.
176
+ - Updated the Cart Orders menu icon to use a slightly better looking dashicon.
177
+ - Added a new filter to allow modification of the custom field value. Filter name is wpspc_cart_custom_field_value
178
+ - Added a new action hook after the PayPal IPN is processed. This will allow you to do extra post payment processing task for your orders. Hook name wpspc_paypal_ipn_processed
179
+ - Made some improvements to some of the shopping cart icons (cart and delete item icons have been updated).
180
+ - Cart output will work with a responsive theme.
181
+
182
  = 3.9.6 =
183
  - Added Czech Language translation to the plugin. The Czech translation file was submitted by Tomas Sykora.
184
  - Added a new option/feature to specify a custom paypal checkout page style name. The plugin will use the custom checkout page style if you specify one.
wp_shopping_cart.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
- Version: v3.9.6
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=768
6
  Author: Tips and Tricks HQ, Ruhul Amin
7
  Author URI: http://www.tipsandtricks-hq.com/
@@ -12,7 +12,7 @@ if(!isset($_SESSION)){
12
  session_start();
13
  }
14
 
15
- define('WP_CART_VERSION', '3.9.6');
16
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
17
  define('WP_CART_PATH',plugin_dir_path( __FILE__ ));
18
  define('WP_CART_URL', plugins_url('',__FILE__));
@@ -68,8 +68,8 @@ if (isset($_REQUEST["reset_wp_cart"]) && !empty($_REQUEST["reset_wp_cart"]))
68
  //Clear the cart if the customer landed on the thank you page
69
  if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
70
  {
71
- if(get_option('cart_return_from_paypal_url') == cart_current_page_url())
72
- {
73
  reset_wp_cart();
74
  }
75
  }
@@ -77,6 +77,9 @@ if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
77
  function reset_wp_cart()
78
  {
79
  $products = $_SESSION['simpleCart'];
 
 
 
80
  foreach ($products as $key => $item)
81
  {
82
  unset($products[$key]);
@@ -321,7 +324,7 @@ function print_wp_shopping_cart()
321
  {
322
  $output .= '
323
  <tr>
324
- <th style="text-align: left">'.(__("Item Name", "WSPSC")).'</th><th>'.(__("Quantity", "WSPSC")).'</th><th>'.(__("Price", "WSPSC")).'</th><th></th>
325
  </tr>';
326
  $item_total_shipping = 0;
327
  $postage_cost = 0;
@@ -411,8 +414,14 @@ function print_wp_shopping_cart()
411
  $paypal_checkout_url = WP_CART_SANDBOX_PAYPAL_URL;
412
  }
413
 
 
 
 
 
 
414
  $output .= "<tr class='wpspsc_checkout_form'><td colspan='4'>";
415
- $output .= '<form action="'.$paypal_checkout_url.'" method="post">'.$form;
 
416
  if ($count)
417
  $output .= '<input type="image" src="'.WP_CART_URL.'/images/'.(__("paypal_checkout_EN.png", "WSPSC")).'" name="submit" class="wp_cart_checkout_button" alt="'.(__("Make payments with PayPal - it\'s fast, free and secure!", "WSPSC")).'" />';
418
 
@@ -468,8 +477,10 @@ function wp_cart_add_custom_field()
468
  $value = $_SESSION['wpspsc_applied_coupon_code'];
469
  $custom_field_val = wpc_append_values_to_custom_field($name,$value);
470
  }
 
 
471
  $output = '<input type="hidden" name="custom" value="'.$custom_field_val.'" />';
472
- return $output;
473
  }
474
 
475
  function print_wp_cart_button_new($content)
@@ -748,7 +759,7 @@ function simple_cart_total()
748
  function wp_cart_options_page ()
749
  {
750
  include_once('wp_shopping_cart_settings.php');
751
- add_options_page(__("WP Paypal Shopping Cart", "WSPSC"), __("WP Shopping Cart", "WSPSC"), 'manage_options', 'wordpress-paypal-shopping-cart', 'wp_cart_options');
752
  }
753
 
754
  function wp_paypal_shopping_cart_load_widgets()
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
+ Version: v3.9.8
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=768
6
  Author: Tips and Tricks HQ, Ruhul Amin
7
  Author URI: http://www.tipsandtricks-hq.com/
12
  session_start();
13
  }
14
 
15
+ define('WP_CART_VERSION', '3.9.8');
16
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
17
  define('WP_CART_PATH',plugin_dir_path( __FILE__ ));
18
  define('WP_CART_URL', plugins_url('',__FILE__));
68
  //Clear the cart if the customer landed on the thank you page
69
  if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
70
  {
71
+ //TODO - remove this field altogether later. Cart will always be reset using query prameter on the thank you page.
72
+ if(get_option('cart_return_from_paypal_url') == cart_current_page_url()){
73
  reset_wp_cart();
74
  }
75
  }
77
  function reset_wp_cart()
78
  {
79
  $products = $_SESSION['simpleCart'];
80
+ if(!is_array($products)){
81
+ return;
82
+ }
83
  foreach ($products as $key => $item)
84
  {
85
  unset($products[$key]);
324
  {
325
  $output .= '
326
  <tr>
327
+ <th class="wspsc_cart_item_name_th">'.(__("Item Name", "WSPSC")).'</th><th class="wspsc_cart_qty_th">'.(__("Quantity", "WSPSC")).'</th><th class="wspsc_cart_price_th">'.(__("Price", "WSPSC")).'</th><th></th>
328
  </tr>';
329
  $item_total_shipping = 0;
330
  $postage_cost = 0;
414
  $paypal_checkout_url = WP_CART_SANDBOX_PAYPAL_URL;
415
  }
416
 
417
+ $form_target_code = '';
418
+ if (get_option('wspsc_open_pp_checkout_in_new_tab')){
419
+ $form_target_code = 'target="_blank"';
420
+ }
421
+
422
  $output .= "<tr class='wpspsc_checkout_form'><td colspan='4'>";
423
+ $output .= '<form action="'.$paypal_checkout_url.'" method="post" '.$form_target_code.'>';
424
+ $output .= $form;
425
  if ($count)
426
  $output .= '<input type="image" src="'.WP_CART_URL.'/images/'.(__("paypal_checkout_EN.png", "WSPSC")).'" name="submit" class="wp_cart_checkout_button" alt="'.(__("Make payments with PayPal - it\'s fast, free and secure!", "WSPSC")).'" />';
427
 
477
  $value = $_SESSION['wpspsc_applied_coupon_code'];
478
  $custom_field_val = wpc_append_values_to_custom_field($name,$value);
479
  }
480
+
481
+ $custom_field_val = apply_filters('wpspc_cart_custom_field_value', $custom_field_val);
482
  $output = '<input type="hidden" name="custom" value="'.$custom_field_val.'" />';
483
+ return $output;
484
  }
485
 
486
  function print_wp_cart_button_new($content)
759
  function wp_cart_options_page ()
760
  {
761
  include_once('wp_shopping_cart_settings.php');
762
+ add_options_page(__("WP Paypal Shopping Cart", "WSPSC"), __("WP Shopping Cart", "WSPSC"), 'manage_options', 'wordpress-paypal-shopping-cart', 'wp_cart_options');
763
  }
764
 
765
  function wp_paypal_shopping_cart_load_widgets()
wp_shopping_cart_misc_functions.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
 
3
  /* TODO
4
- - Show the shipping and tax amount (if any) in the orders interface (it is already available in the object)
5
- - add a reset cart button
6
- - After processing an IPN, call a function to clear all trash orders that are older than 6 hours.
7
  - A new fancy cart shortcode (new icons and nice CSS styles)
 
 
 
8
  - Add more filters and hooks
9
  */
10
 
1
  <?php
2
 
3
  /* TODO
 
 
 
4
  - A new fancy cart shortcode (new icons and nice CSS styles)
5
+ - Add a reset cart button
6
+ - A stats addon or interface. Show graph using the orders data.
7
+ - After processing an IPN, call a function to clear all trash orders that are older than 6 hours.
8
  - Add more filters and hooks
9
  */
10
 
wp_shopping_cart_orders.php CHANGED
@@ -26,7 +26,7 @@ function wpspc_create_orders_page()
26
  'menu_position' => 80,
27
  'supports' => false,
28
  'taxonomies' => array( '' ),
29
- 'menu_icon' => WP_CART_URL.'/images/cart-orders-icon.png',
30
  'has_archive' => true
31
  )
32
  );
26
  'menu_position' => 80,
27
  'supports' => false,
28
  'taxonomies' => array( '' ),
29
+ 'menu_icon' => 'dashicons-cart',/*WP_CART_URL.'/images/cart-orders-icon.png'*/
30
  'has_archive' => true
31
  )
32
  );
wp_shopping_cart_settings.php CHANGED
@@ -84,6 +84,7 @@ function show_wp_cart_options_page ()
84
 
85
  update_option('wp_shopping_cart_auto_redirect_to_checkout_page', ($_POST['wp_shopping_cart_auto_redirect_to_checkout_page']!='') ? 'checked="checked"':'' );
86
  update_option('cart_checkout_page_url', (string)$_POST["cart_checkout_page_url"]);
 
87
  update_option('wp_shopping_cart_reset_after_redirection_to_return_page', ($_POST['wp_shopping_cart_reset_after_redirection_to_return_page']!='') ? 'checked="checked"':'' );
88
 
89
  update_option('wp_shopping_cart_image_hide', ($_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
@@ -129,6 +130,11 @@ function show_wp_cart_options_page ()
129
  else
130
  $wp_shopping_cart_auto_redirect_to_checkout_page = '';
131
 
 
 
 
 
 
132
  if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
133
  $wp_shopping_cart_reset_after_redirection_to_return_page = 'checked="checked"';
134
  else
@@ -263,6 +269,12 @@ echo '
263
  <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.", "WSPSC")).'</td>
264
  </tr>
265
 
 
 
 
 
 
 
266
  <tr valign="top">
267
  <th scope="row">'.(__("Reset Cart After Redirection to Return Page", "WSPSC")).'</th>
268
  <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.' />
@@ -318,7 +330,8 @@ echo '
318
  <li><a href="'.WP_CART_URL.'/ipn_handle_debug.log" target="_blank">ipn_handle_debug.log</a></li>
319
  </ul>
320
  </p>
321
- <input type="submit" name="wspsc_reset_logfile" style="font-weight:bold; color:red" value="Reset Debug Log file"/> Simple PayPal Shopping Cart debug log file is "reset" and timestamped with a log file reset message.
 
322
  </td></tr>
323
 
324
  <tr valign="top">
@@ -340,7 +353,7 @@ echo '
340
  echo (__("Like the Simple WordPress Shopping Cart Plugin?", "WSPSC")).' <a href="http://wordpress.org/extend/plugins/wordpress-simple-paypal-shopping-cart" target="_blank">'.(__("Give it a good rating", "WSPSC")).'</a>';
341
  ?>
342
  <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;">
343
- <p><?php _e("Need a shopping cart plugin with more features? Checkout my ", "WSPSC"); ?>
344
  <a href="http://www.tipsandtricks-hq.com/?p=1059" target="_blank"><?php _e("WP eStore Plugin", "WSPSC"); ?></a></p>
345
  </div>
346
  <?php
84
 
85
  update_option('wp_shopping_cart_auto_redirect_to_checkout_page', ($_POST['wp_shopping_cart_auto_redirect_to_checkout_page']!='') ? 'checked="checked"':'' );
86
  update_option('cart_checkout_page_url', (string)$_POST["cart_checkout_page_url"]);
87
+ update_option('wspsc_open_pp_checkout_in_new_tab', ($_POST['wspsc_open_pp_checkout_in_new_tab']!='') ? 'checked="checked"':'' );
88
  update_option('wp_shopping_cart_reset_after_redirection_to_return_page', ($_POST['wp_shopping_cart_reset_after_redirection_to_return_page']!='') ? 'checked="checked"':'' );
89
 
90
  update_option('wp_shopping_cart_image_hide', ($_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
130
  else
131
  $wp_shopping_cart_auto_redirect_to_checkout_page = '';
132
 
133
+ if (get_option('wspsc_open_pp_checkout_in_new_tab'))
134
+ $wspsc_open_pp_checkout_in_new_tab = 'checked="checked"';
135
+ else
136
+ $wspsc_open_pp_checkout_in_new_tab = '';
137
+
138
  if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
139
  $wp_shopping_cart_reset_after_redirection_to_return_page = 'checked="checked"';
140
  else
269
  <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.", "WSPSC")).'</td>
270
  </tr>
271
 
272
+ <tr valign="top">
273
+ <th scope="row">'.(__("Open PayPal Checkout Page in a New Tab", "WSPSC")).'</th>
274
+ <td><input type="checkbox" name="wspsc_open_pp_checkout_in_new_tab" value="1" '.$wspsc_open_pp_checkout_in_new_tab.' />
275
+ <br />'.(__("If checked the PayPal checkout page will be opened in a new tab/window when the user clicks the checkout button.", "WSPSC")).'</td>
276
+ </tr>
277
+
278
  <tr valign="top">
279
  <th scope="row">'.(__("Reset Cart After Redirection to Return Page", "WSPSC")).'</th>
280
  <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.' />
330
  <li><a href="'.WP_CART_URL.'/ipn_handle_debug.log" target="_blank">ipn_handle_debug.log</a></li>
331
  </ul>
332
  </p>
333
+ <input type="submit" name="wspsc_reset_logfile" class="button" style="font-weight:bold; color:red" value="Reset Debug Log file"/>
334
+ <p class="description">It will reset the debug log file and timestamp it with a log file reset message.</a>
335
  </td></tr>
336
 
337
  <tr valign="top">
353
  echo (__("Like the Simple WordPress Shopping Cart Plugin?", "WSPSC")).' <a href="http://wordpress.org/extend/plugins/wordpress-simple-paypal-shopping-cart" target="_blank">'.(__("Give it a good rating", "WSPSC")).'</a>';
354
  ?>
355
  <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;">
356
+ <p><?php _e("Need a shopping cart plugin with a lot of features and good support? Check out our ", "WSPSC"); ?>
357
  <a href="http://www.tipsandtricks-hq.com/?p=1059" target="_blank"><?php _e("WP eStore Plugin", "WSPSC"); ?></a></p>
358
  </div>
359
  <?php
wp_shopping_cart_style.css CHANGED
@@ -6,10 +6,19 @@ font-size:14px;
6
  }
7
  .shopping_cart img{
8
  border:none;
 
9
  }
10
  .shopping_cart input{
11
  width:auto !important;
12
  }
 
 
 
 
 
 
 
 
13
  .wp-cart-button-form input{
14
  width: auto !important;
15
  }
@@ -80,7 +89,6 @@ padding: 10px 7px;
80
  margin:5px 0;
81
  }
82
  .wpsps_compact_cart_container{
83
- background:url("images/shopping_basket_icon_small.png") no-repeat scroll 0 50% transparent;
84
  padding-left: 15px;
85
  font-size: 14px;
86
  }
6
  }
7
  .shopping_cart img{
8
  border:none;
9
+ box-shadow: none;
10
  }
11
  .shopping_cart input{
12
  width:auto !important;
13
  }
14
+
15
+ .shopping_cart .wspsc_cart_item_name_th{
16
+ text-align: left;
17
+ }
18
+ .shopping_cart .wspsc_cart_qty_th, .shopping_cart .wspsc_cart_price_th{
19
+ text-align: center;
20
+ }
21
+
22
  .wp-cart-button-form input{
23
  width: auto !important;
24
  }
89
  margin:5px 0;
90
  }
91
  .wpsps_compact_cart_container{
 
92
  padding-left: 15px;
93
  font-size: 14px;
94
  }