WordPress Simple PayPal Shopping Cart - Version 3.2.7

Version Description

Download this release

Release Info

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

Code changes from version 3.2.3 to 3.2.7

Files changed (4) hide show
  1. languages/WSPSC-ja.mo +0 -0
  2. languages/WSPSC-ja.po +318 -0
  3. readme.txt +101 -3
  4. wp_shopping_cart.php +103 -55
languages/WSPSC-ja.mo ADDED
Binary file
languages/WSPSC-ja.po ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WPSC v2.8.9\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2011-03-16 21:48+0100\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Tsukasa Takao <tsukasa.takao@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "Language: \n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=UTF-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Poedit-Language: Japanese\n"
14
+ "X-Poedit-Country: JAPAN\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: ../wp_shopping_cart.php:33
18
+ msgid "Your Shopping Cart"
19
+ msgstr "あなたのカート"
20
+
21
+ #: ../wp_shopping_cart.php:34
22
+ msgid "Your cart is empty"
23
+ msgstr "カートは空です"
24
+
25
+ #: ../wp_shopping_cart.php:140
26
+ msgid "Shopping Cart Configuration Error! You must specify a value in the 'Checkout Page URL' field for the automatic redirection feature to work!"
27
+ msgstr "ショッピングカートの構成エラーです! 'Checkout Page URL'フィールドの値を設定し自動的に戻る機能が動くようにする必要があります。"
28
+
29
+ #: ../wp_shopping_cart.php:197
30
+ msgid "Visit The Shop"
31
+ msgstr "お店を訪問"
32
+
33
+ #: ../wp_shopping_cart.php:209
34
+ #: ../wp_shopping_cart.php:606
35
+ msgid "USD"
36
+ msgstr "円"
37
+
38
+ #: ../wp_shopping_cart.php:213
39
+ #: ../wp_shopping_cart.php:609
40
+ msgid "$"
41
+ msgstr "¥"
42
+
43
+ #: ../wp_shopping_cart.php:242
44
+ msgid "Cart"
45
+ msgstr "カート"
46
+
47
+ #: ../wp_shopping_cart.php:251
48
+ msgid "Hit enter to submit new Quantity."
49
+ msgstr "新しい数量を入れたらエンターキーを押す"
50
+
51
+ #: ../wp_shopping_cart.php:262
52
+ msgid "Item Name"
53
+ msgstr "品名"
54
+
55
+ #: ../wp_shopping_cart.php:262
56
+ msgid "Quantity"
57
+ msgstr "数量"
58
+
59
+ #: ../wp_shopping_cart.php:262
60
+ msgid "Price"
61
+ msgstr "価格"
62
+
63
+ #: ../wp_shopping_cart.php:299
64
+ msgid "Remove"
65
+ msgstr "削除"
66
+
67
+ #: ../wp_shopping_cart.php:329
68
+ msgid "Subtotal"
69
+ msgstr "小計"
70
+
71
+ #: ../wp_shopping_cart.php:330
72
+ msgid "Shipping"
73
+ msgstr "送料"
74
+
75
+ #: ../wp_shopping_cart.php:334
76
+ msgid "Total"
77
+ msgstr "合計"
78
+
79
+ #: ../wp_shopping_cart.php:339
80
+ msgid "paypal_checkout_EN.png"
81
+ msgstr ""
82
+
83
+ #: ../wp_shopping_cart.php:339
84
+ msgid "Make payments with PayPal - it\\'s fast, free and secure!"
85
+ msgstr "PayPalで払おうー 早い、安い、安全"
86
+
87
+ #: ../wp_shopping_cart.php:387
88
+ #: ../wp_shopping_cart.php:469
89
+ #: ../wp_shopping_cart.php:528
90
+ #: ../wp_shopping_cart.php:534
91
+ #: ../wp_shopping_cart.php:622
92
+ msgid "Add to Cart"
93
+ msgstr "カートに追加"
94
+
95
+ #: ../wp_shopping_cart.php:602
96
+ msgid "Options Updated!"
97
+ msgstr "オプションを更新しました"
98
+
99
+ #: ../wp_shopping_cart.php:662
100
+ msgid "Simple Paypal Shopping Cart Settings"
101
+ msgstr "Simple Paypal Shopping Cart 設定"
102
+
103
+ #: ../wp_shopping_cart.php:664
104
+ msgid "For information, updates and detailed documentation, please visit:"
105
+ msgstr "情報やドキュメントの詳細は、こちらを訪れてください:"
106
+
107
+ #: ../wp_shopping_cart.php:668
108
+ msgid "Usage:"
109
+ msgstr "使い方"
110
+
111
+ #: ../wp_shopping_cart.php:670
112
+ msgid "1. To add the 'Add to Cart' button simply add the trigger text"
113
+ msgstr "1. ' カートに追加' ボタンを追加するには、トリガーとなるテキストを追加するだけです"
114
+
115
+ #: ../wp_shopping_cart.php:670
116
+ msgid "PRODUCT-NAME"
117
+ msgstr ""
118
+
119
+ #: ../wp_shopping_cart.php:670
120
+ msgid "PRODUCT-PRICE"
121
+ msgstr ""
122
+
123
+ #: ../wp_shopping_cart.php:670
124
+ 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]"
125
+ msgstr "投稿や固定ページの製品の横にPRODUCT-NAMEとPRODUCT-PRICEを実際の名前と価格に入れ替えて置くだけです。例えば[wp_cart:試行品:price:100:end]"
126
+
127
+ #: ../wp_shopping_cart.php:671
128
+ msgid "2. To add the shopping cart to a post or page (eg. checkout page) simply add the shortcode"
129
+ msgstr "2. ショッピングカートを投稿や固定ページに加えるには(例えば:チェックアウトページ)単純に短いコードを加えます"
130
+
131
+ #: ../wp_shopping_cart.php:671
132
+ msgid "to a post or page or use the sidebar widget to add the shopping cart to the sidebar."
133
+ msgstr "投稿や固定ページや、ショッピングカートをサイドバーウィジェットに入れ、サイドバーに表示します"
134
+
135
+ #: ../wp_shopping_cart.php:679
136
+ msgid "PayPal and Shopping Cart Settings"
137
+ msgstr "PayPalとショッピングカートの設定"
138
+
139
+ #: ../wp_shopping_cart.php:685
140
+ msgid "Paypal Email Address"
141
+ msgstr "Paypalメールアドレス"
142
+
143
+ #: ../wp_shopping_cart.php:689
144
+ msgid "Shopping Cart title"
145
+ msgstr "ショッピングカートのタイトル"
146
+
147
+ #: ../wp_shopping_cart.php:693
148
+ msgid "Text/Image to Show When Cart Empty"
149
+ msgstr "カートが空であることを示す文字か、イメージ"
150
+
151
+ #: ../wp_shopping_cart.php:694
152
+ msgid "You can either enter plain text or the URL of an image that you want to show when the shopping cart is empty"
153
+ msgstr "ショッピングカートが空であることを示すために、単純なテキストか、イメージを示すURLを入力できます"
154
+
155
+ #: ../wp_shopping_cart.php:697
156
+ msgid "Currency"
157
+ msgstr "通貨"
158
+
159
+ #: ../wp_shopping_cart.php:698
160
+ #: ../wp_shopping_cart.php:702
161
+ #: ../wp_shopping_cart.php:728
162
+ msgid "e.g."
163
+ msgstr "例えば"
164
+
165
+ #: ../wp_shopping_cart.php:701
166
+ msgid "Currency Symbol"
167
+ msgstr "通貨のシンボル"
168
+
169
+ #: ../wp_shopping_cart.php:707
170
+ msgid "Base Shipping Cost"
171
+ msgstr "基本送料"
172
+
173
+ #: ../wp_shopping_cart.php:708
174
+ 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."
175
+ msgstr "これは個々の製品の合計に加えられる送料です。0とすると、基本送料は課金されません"
176
+
177
+ #: ../wp_shopping_cart.php:708
178
+ msgid "Learn More on Shipping Calculation"
179
+ msgstr "送料のさらなるオプション"
180
+
181
+ #: ../wp_shopping_cart.php:712
182
+ msgid "Free Shipping for Orders Over"
183
+ msgstr "注文の送料無料"
184
+
185
+ #: ../wp_shopping_cart.php:713
186
+ 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."
187
+ msgstr "お客さんの注文がこの金額を越えると、送料は無料になります。この機能を使いたくない場合は、なにも指定しないでください。"
188
+
189
+ #: ../wp_shopping_cart.php:717
190
+ msgid "Must Collect Shipping Address on PayPal"
191
+ msgstr "Paypalからの送り先アドレスを正しいものとする"
192
+
193
+ #: ../wp_shopping_cart.php:718
194
+ msgid "If checked the customer will be forced to enter a shipping address on PayPal when checking out."
195
+ msgstr "もし、これをチェックするとチェックアウト時に、Paypalに登録された送り先住所を強制されます。"
196
+
197
+ #: ../wp_shopping_cart.php:722
198
+ msgid "Use PayPal Profile Based Shipping"
199
+ msgstr "Paypalプロファイルを基本とした送り先にする"
200
+
201
+ #: ../wp_shopping_cart.php:723
202
+ msgid "Check this if you want to use"
203
+ msgstr "これをチェックすると、"
204
+
205
+ #: ../wp_shopping_cart.php:723
206
+ msgid "PayPal profile based shipping"
207
+ msgstr "Paypalのプロファイルにある送り先を基本とします"
208
+
209
+ #: ../wp_shopping_cart.php:723
210
+ msgid "Using this will ignore any other shipping options that you have specified in this plugin."
211
+ msgstr "このプラグインで設定している他の送り先オプションはすべて無視されます。"
212
+
213
+ #: ../wp_shopping_cart.php:727
214
+ msgid "Add to Cart button text or Image"
215
+ msgstr "カートに加える ボタンの文字かイメージ"
216
+
217
+ #: ../wp_shopping_cart.php:728
218
+ msgid "To use a customized image as the button simply enter the URL of the image file."
219
+ msgstr "自分で作ったボタンのイメージを使いたい場合、ここでイメージファイルのURLを入力"
220
+
221
+ #: ../wp_shopping_cart.php:732
222
+ msgid "Return URL"
223
+ msgstr "戻り先URL"
224
+
225
+ #: ../wp_shopping_cart.php:733
226
+ msgid "This is the URL the customer will be redirected to after a successful payment"
227
+ msgstr "ここには支払いがうまくいったお客さんが転送される先のURLをいれる"
228
+
229
+ #: ../wp_shopping_cart.php:737
230
+ msgid "Products Page URL"
231
+ msgstr "製品ページのURL"
232
+
233
+ #: ../wp_shopping_cart.php:738
234
+ 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"
235
+ msgstr "製品紹介ページのURLをいれる。もし、設定するとショッピングカートが空の場合、このページへのリンクが表示される。"
236
+
237
+ #: ../wp_shopping_cart.php:742
238
+ msgid "Automatic redirection to checkout page"
239
+ msgstr "チェックアウト後に自動的に転送される先のURL"
240
+
241
+ #: ../wp_shopping_cart.php:744
242
+ msgid "Checkout Page URL"
243
+ msgstr "チェックアウトページのURL"
244
+
245
+ #: ../wp_shopping_cart.php:745
246
+ 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."
247
+ msgstr "ここをチェックした場合、訪問者はカートに製品を追加したのちチェックアウトページへ転送される。チェックアウトページのURLを入れる必要がある"
248
+
249
+ #: ../wp_shopping_cart.php:749
250
+ msgid "Reset Cart After Redirection to Return Page"
251
+ msgstr "戻り先のページから転送されてきた場合、カートをリセットする"
252
+
253
+ #: ../wp_shopping_cart.php:751
254
+ msgid "If checked the shopping cart will be reset when the customer lands on the return URL (Thank You) page."
255
+ msgstr "もしチェックした場合、ショッピングカートは、お客さんが戻り先URL(ありがとうございます)ページにつくとリセットされる。"
256
+
257
+ #: ../wp_shopping_cart.php:758
258
+ msgid "Hide Shopping Cart Image"
259
+ msgstr "ショッピングカートのイメージを隠す"
260
+
261
+ #: ../wp_shopping_cart.php:759
262
+ msgid "If ticked the shopping cart image will not be shown."
263
+ msgstr "もしチェックしたら、ショッピングカートのイメージは表示されない"
264
+
265
+ #: ../wp_shopping_cart.php:765
266
+ msgid "Use WP Affiliate Platform"
267
+ msgstr "WP Affiliate Platformを使う"
268
+
269
+ #: ../wp_shopping_cart.php:767
270
+ msgid "Check this if using with the"
271
+ msgstr "使うならチェックする"
272
+
273
+ #: ../wp_shopping_cart.php:767
274
+ msgid "This plugin lets you run your own affiliate campaign/program and allows you to reward (pay commission) your affiliates for referred sales"
275
+ msgstr "このプラグインはあなた自身がアフィリエイト・キャンペーンプログラムを行ったりコミッションをアフィリエイトに支払ったりできます"
276
+
277
+ #: ../wp_shopping_cart.php:772
278
+ msgid "Update Options &raquo;"
279
+ msgstr "&raquo 更新オプション"
280
+
281
+ #: ../wp_shopping_cart.php:776
282
+ msgid "Like the Simple WordPress Shopping Cart Plugin?"
283
+ msgstr "Simple WordPress Shopping Cart プラグインは気に入りましたか?"
284
+
285
+ #: ../wp_shopping_cart.php:776
286
+ msgid "Give it a good rating"
287
+ msgstr "よいレートをあたえる"
288
+
289
+ #: ../wp_shopping_cart.php:781
290
+ msgid "WP Paypal Shopping Cart Options"
291
+ msgstr "WP Paypal shopping Cart オプション"
292
+
293
+ #: ../wp_shopping_cart.php:791
294
+ #: ../wp_shopping_cart.php:819
295
+ #: ../wp_shopping_cart.php:820
296
+ msgid "WP Paypal Shopping Cart"
297
+ msgstr ""
298
+
299
+ #: ../wp_shopping_cart.php:791
300
+ msgid "WP Shopping Cart"
301
+ msgstr ""
302
+
303
+ #: ../wp_shopping_cart.php:799
304
+ msgid "Shopping Cart"
305
+ msgstr "買い物かご"
306
+
307
+ #: ../wp_shopping_cart.php:811
308
+ msgid "Set the Plugin Settings from the Settings menu"
309
+ msgstr "設定メニューからプラグインの設定をする"
310
+
311
+ #: ../wp_shopping_cart.php:818
312
+ msgid "Display WP Paypal Shopping Cart."
313
+ msgstr "WP Paypal shopping Cartの表示"
314
+
315
+ #: ../wp_shopping_cart.php:832
316
+ msgid "Settings"
317
+ msgstr "設定"
318
+
readme.txt CHANGED
@@ -1,10 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  === WordPress Simple Paypal Shopping Cart ===
2
  Contributors: Ruhul Amin
3
  Donate link: http://www.tipsandtricks-hq.com
4
  Tags: WordPress shopping cart, Paypal shopping cart, online shop, shopping cart, wordperss ecommerce, sell digital products
5
  Requires at least: 2.6
6
- Tested up to: 3.2.1
7
- Stable tag:3.2.3
8
 
9
  Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
10
 
@@ -12,7 +109,7 @@ Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling
12
 
13
  WordPress Simple Paypal Shopping Cart allows you to add an 'Add to Cart' button on any posts or pages. It also allows you to add/display the shopping cart on any post or page or sidebar easily. The shopping cart shows the user what they currently have in the cart and allows them to remove the items. It can be easily integrated with the NextGen Photo Gallery plugin too.
14
 
15
- For screenshots, detailed documentation, support and updates, please visit:
16
  http://www.tipsandtricks-hq.com/?p=768
17
  or
18
  http://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart
@@ -71,3 +168,4 @@ Changelog can be found at the following URL
71
  http://www.tipsandtricks-hq.com/ecommerce/?p=319
72
 
73
 
 
1
+ <<<<<<< .mine
2
+ === WordPress Simple Paypal Shopping Cart ===
3
+ Contributors: Ruhul Amin, Tips and Tricks HQ
4
+ Donate link: http://www.tipsandtricks-hq.com
5
+ Tags: shopping cart, WordPress shopping cart, Paypal shopping cart, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, PayPal cart widget, sell digital products
6
+ Requires at least: 2.8
7
+ Tested up to: 3.4.1
8
+ Stable tag: 3.3.0
9
+ License: GPLv2 or later
10
+
11
+ Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site. Use a simple shortcode on any post or page to add a shopping cart to your WordPress site.
12
+
13
+ == Description ==
14
+
15
+ WordPress Simple Paypal Shopping Cart allows you to add an 'Add to Cart' button for your product on any posts or pages.
16
+
17
+ It also allows you to add/display the shopping cart on any post or page or sidebar easily. The shopping cart shows the user what they currently have in the cart and allows them to remove the items.
18
+
19
+ It can be easily integrated with the NextGen Photo Gallery plugin to acomodate the selling of photographs from your gallery.
20
+
21
+ WP simple Paypal Cart Plugin, interfaces with the Paypal sandbox to allow for testing.
22
+
23
+ This plugin is a lightweight solution (with minimal number of lines of code and minimal options) so it doesn't slow down your site.
24
+
25
+ For video tutorial, screenshots, detailed documentation, support and updates, please visit:
26
+ [WP Simple Cart Details Page](http://www.tipsandtricks-hq.com/?p=768)
27
+ or
28
+ [WP Simple Cart Documentation](http://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart)
29
+
30
+ = Features =
31
+
32
+ * Easily create "add to cart" button with options if needed (price, shipping, options variations). The cart's shortcode can be displayed on posts or pages.
33
+ * Use a function to add dynamic "add to cart" button directly in your theme.
34
+ * Minimal number of configuration items to keep the plugin lightweight.
35
+ * You can use Paypal sandbox to do testing if needed.
36
+ * and more...
37
+
38
+ = Note =
39
+ There are a few exact duplicate copies of this plugin that other people made. We have a few users who are getting confused as to which one is the original simple shopping cart plugin. This is the original simple PayPal shopping cart and you can verify it with the following information:
40
+ * Check the stats tab of the plugin and you will be able to see a history of when this plugin was first added to WordPress.
41
+ * Check the number of downloads on the sidebar. The original plugin always gets more downloads than the copycats.
42
+ * Check the number of ratings. The original plugin should have more votes.
43
+ * Check the developer's site.
44
+
45
+ == Usage ==
46
+ 1. To add the 'Add to Cart' button simply add the trigger text [wp_cart:PRODUCT-NAME:price:PRODUCT-PRICE:end] to a post or page next to the product. Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price.
47
+ 2. To add the 'Add to Cart' button on the sidebar or from other template files use the following function:
48
+ <?php echo print_wp_cart_button_for_product('PRODUCT-NAME', PRODUCT-PRICE); ?>
49
+ Replace PRODUCT-NAME and PRODUCT-PRICE with the actual name and price.
50
+ 3. To add the shopping cart to a post or page (eg. checkout page) simply add the shortcode [show_wp_shopping_cart] to a post or page or use the sidebar widget to add the shopping cart to the sidebar. The shopping cart will only be visible in a post or page when a customer adds a product.
51
+
52
+ Using Shipping
53
+ 1. To use shipping cost use the following trigger text
54
+ [wp_cart:PRODUCT-NAME:price:PRODUCT-PRICE:shipping:SHIPPING-COST:end]
55
+
56
+ or use the following php function from your wordpress template files
57
+ <?php echo print_wp_cart_button_for_product('product name',price,shipping cost); ?>
58
+
59
+ Using Variation Control
60
+ 1. To use variation control use the following trigger text
61
+ [wp_cart:PRODUCT-NAME:price:PRODUCT-PRICE:var1[VARIATION-NAME|VARIATION1|VARIATION2|VARIATION3]:end]
62
+
63
+ example, [wp_cart:Demo Product 1:price:15:var1[Size|Small|Medium|Large]:end]
64
+
65
+ 2. To use variation control with shipping use the following trigger text:
66
+ [wp_cart:PRODUCT-NAME:price:PRODUCT-PRICE:shipping:SHIPPING-COST:var1[VARIATION-NAME|VARIATION1|VARIATION2|VARIATION3]:end]
67
+
68
+ example, [wp_cart:Demo Product 1:price:15:shipping:2:var1[Size|Small|Medium|Large]:end]
69
+
70
+ 3. To use multiple variation option use the following trigger text:
71
+ [wp_cart:PRODUCT-NAME:price:PRODUCT-PRICE:var1[VARIATION-NAME|VARIATION1|VARIATION2|VARIATION3]:var2[VARIATION-NAME|VARIATION1|VARIATION2]:end]
72
+
73
+ example, [wp_cart:Demo Product 1:price:15:shipping:2:var1[Size|Small|Medium|Large]:var2[Color|Red|Green]:end]
74
+
75
+ == Installation ==
76
+
77
+ 1. Unzip and Upload the folder 'wordpress-paypal-shopping-cart' to the '/wp-content/plugins/' directory
78
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
79
+ 3. Go to Settings and configure the options eg. your email, Shopping Cart name, Return URL etc.
80
+ 4. Use the trigger text to add a product to a post or page where u want it to appear.
81
+
82
+ == Frequently Asked Questions ==
83
+ 1. Can this plugin be used to accept paypal payment for a service or a product? Yes
84
+ 2. Does this plugin have shopping cart? Yes.
85
+ 3. Can the shopping cart be added to a checkout page? Yes.
86
+ 4. Does this plugin has multiple currency support? Yes.
87
+ 5. Is the 'Add to Cart' button customizable? Yes.
88
+ 6. Does this plugin use a return URL to redirect customers to a specified page after Paypal has processed the payment? Yes.
89
+
90
+
91
+ == Screenshots ==
92
+ Visit the plugin site at http://www.tipsandtricks-hq.com/?p=768 for screenshots.
93
+
94
+ == Changelog ==
95
+ Changelog can be found at the following URL
96
+ http://www.tipsandtricks-hq.com/ecommerce/?p=319
97
+ =======
98
  === WordPress Simple Paypal Shopping Cart ===
99
  Contributors: Ruhul Amin
100
  Donate link: http://www.tipsandtricks-hq.com
101
  Tags: WordPress shopping cart, Paypal shopping cart, online shop, shopping cart, wordperss ecommerce, sell digital products
102
  Requires at least: 2.6
103
+ Tested up to: 3.3
104
+ Stable tag:3.2.7
105
 
106
  Very easy to use Simple WordPress Paypal Shopping Cart Plugin. Great for selling products online in one click from your WordPress site.
107
 
109
 
110
  WordPress Simple Paypal Shopping Cart allows you to add an 'Add to Cart' button on any posts or pages. It also allows you to add/display the shopping cart on any post or page or sidebar easily. The shopping cart shows the user what they currently have in the cart and allows them to remove the items. It can be easily integrated with the NextGen Photo Gallery plugin too.
111
 
112
+ For video tutorial, screenshots, detailed documentation, support and updates, please visit:
113
  http://www.tipsandtricks-hq.com/?p=768
114
  or
115
  http://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart
168
  http://www.tipsandtricks-hq.com/ecommerce/?p=319
169
 
170
 
171
+ >>>>>>> .r565913
wp_shopping_cart.php CHANGED
@@ -1,7 +1,11 @@
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
- Version: v3.2.3
 
 
 
 
5
  Plugin URI: http://www.tipsandtricks-hq.com/?p=768
6
  Author: Ruhul Amin
7
  Author URI: http://www.tipsandtricks-hq.com/
@@ -18,14 +22,16 @@ Description: Simple WordPress Shopping Cart Plugin, very easy to use and great f
18
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
  GNU General Public License for more details.
20
  */
21
- if(!isset($_SESSION))
22
- {
23
  session_start();
24
  }
25
 
26
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
27
  define('WP_CART_URL', plugins_url('',__FILE__));
28
 
 
 
 
29
  // loading language files
30
  load_plugin_textdomain('WSPSC', false, WP_CART_FOLDER . '/languages');
31
 
@@ -99,7 +105,7 @@ function reset_wp_cart()
99
  $_SESSION['simpleCart'] = $products;
100
  }
101
 
102
- if ($_POST['addcart'])
103
  {
104
  $domain_url = $_SERVER['SERVER_NAME'];
105
  $cookie_domain = str_replace("www","",$domain_url);
@@ -127,12 +133,20 @@ if ($_POST['addcart'])
127
 
128
  if ($count == 1)
129
  {
130
- if (!empty($_POST[$_POST['product']]))
131
  $price = $_POST[$_POST['product']];
132
- else
 
133
  $price = $_POST['price'];
 
134
 
135
- $product = array('name' => stripslashes($_POST['product']), 'price' => $price, 'quantity' => $count, 'shipping' => $_POST['shipping'], 'cartLink' => $_POST['cartLink'], 'item_number' => $_POST['item_number']);
 
 
 
 
 
 
136
  array_push($products, $product);
137
  }
138
 
@@ -154,7 +168,7 @@ if ($_POST['addcart'])
154
  }
155
  }
156
  }
157
- else if ($_POST['cquantity'])
158
  {
159
  $products = $_SESSION['simpleCart'];
160
  foreach ($products as $key => $item)
@@ -171,7 +185,7 @@ else if ($_POST['cquantity'])
171
  sort($products);
172
  $_SESSION['simpleCart'] = $products;
173
  }
174
- else if ($_POST['delcart'])
175
  {
176
  $products = $_SESSION['simpleCart'];
177
  foreach ($products as $key => $item)
@@ -266,7 +280,7 @@ function print_wp_shopping_cart()
266
  {
267
  $output .= '
268
  <tr>
269
- <th style="text-align: left">'.(__("Item Name", "WSPSC")).'</th><th>'.(__("Quantity", "WSPSC")).'</th><th>'.(__("Price", "WSPSC")).'</th>
270
  </tr>';
271
 
272
  foreach ($_SESSION['simpleCart'] as $item)
@@ -308,7 +322,7 @@ function print_wp_shopping_cart()
308
 
309
  $form .= "
310
  <input type=\"hidden\" name=\"item_name_$count\" value=\"".$item['name']."\" />
311
- <input type=\"hidden\" name=\"amount_$count\" value='".$item['price']."' />
312
  <input type=\"hidden\" name=\"quantity_$count\" value=\"".$item['quantity']."\" />
313
  <input type='hidden' name='item_number' value='".$item['item_number']."' />
314
  ";
@@ -317,7 +331,7 @@ function print_wp_shopping_cart()
317
  if (!get_option('wp_shopping_cart_use_profile_shipping'))
318
  {
319
  $postage_cost = number_format($postage_cost,2);
320
- $form .= "<input type=\"hidden\" name=\"shipping_1\" value='".$postage_cost."' />";
321
  }
322
  if (get_option('wp_shopping_cart_collect_address'))//force address collection
323
  {
@@ -342,7 +356,11 @@ function print_wp_shopping_cart()
342
  <tr><td colspan='2' style='font-weight: bold; text-align: right;'>".(__("Total", "WSPSC")).": </td><td style='text-align: center'>".print_payment_currency(($total+$postage_cost), $paypal_symbol, $decimal)."</td><td></td></tr>
343
  <tr><td colspan='4'>";
344
 
345
- $output .= "<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">$form";
 
 
 
 
346
  if ($count)
347
  $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")).'" />';
348
 
@@ -366,8 +384,6 @@ function print_wp_shopping_cart()
366
 
367
  return $output;
368
  }
369
- // https://www.sandbox.paypal.com/cgi-bin/webscr (paypal testing site)
370
- // https://www.paypal.com/us/cgi-bin/webscr (paypal live site )
371
 
372
  function wp_cart_add_custom_field()
373
  {
@@ -388,8 +404,6 @@ function wp_cart_add_custom_field()
388
 
389
  function print_wp_cart_button_new($content)
390
  {
391
- //wp_cart_add_read_form_javascript();
392
-
393
  $addcart = get_option('addToCartButtonName');
394
  if (!$addcart || ($addcart == '') )
395
  $addcart = __("Add to Cart", "WSPSC");
@@ -584,7 +598,11 @@ function cart_current_page_url() {
584
  }
585
 
586
  function show_wp_cart_options_page () {
587
- $wp_simple_paypal_shopping_cart_version = "3.2.3";
 
 
 
 
588
  if (isset($_POST['info_update']))
589
  {
590
  update_option('cart_payment_currency', (string)$_POST["cart_payment_currency"]);
@@ -608,6 +626,8 @@ function show_wp_cart_options_page () {
608
  update_option('wp_shopping_cart_image_hide', ($_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
609
  update_option('wp_use_aff_platform', ($_POST['wp_use_aff_platform']!='') ? 'checked="checked"':'' );
610
 
 
 
611
  echo '<div id="message" class="updated fade">';
612
  echo '<p><strong>'.(__("Options Updated!", "WSPSC")).'</strong></p></div>';
613
  }
@@ -668,19 +688,28 @@ function show_wp_cart_options_page () {
668
  else
669
  $wp_use_aff_platform = '';
670
 
 
 
 
 
 
671
  ?>
672
- <h2><?php _e("Simple Paypal Shopping Cart Settings", "WSPSC"); ?> v <?php echo $wp_simple_paypal_shopping_cart_version; ?></h2>
673
 
674
- <p><?php _e("For information, updates and detailed documentation, please visit:", "WSPSC"); ?><br />
675
- <a href="http://www.tipsandtricks-hq.com/?p=768">http://www.tipsandtricks-hq.com/?p=768</a></p>
 
 
676
 
677
- <fieldset class="options">
678
- <legend><?php _e("Usage:", "WSPSC"); ?></legend>
679
-
680
- <p><?php _e("1. To add the 'Add to Cart' button simply add the trigger text", "WSPSC"); ?> <strong>[wp_cart:<?php _e("PRODUCT-NAME", "WSPSC"); ?>:price:<?php _e("PRODUCT-PRICE", "WSPSC"); ?>:end]</strong> <?php _e("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]", "WSPSC"); ?></p>
681
- <p><?php _e("2. To add the shopping cart to a post or page (eg. checkout page) simply add the shortcode", "WSPSC"); ?> <strong>[show_wp_shopping_cart]</strong> <?php _e("to a post or page or use the sidebar widget to add the shopping cart to the sidebar.", "WSPSC"); ?></p>
682
- </fieldset>
683
 
 
 
684
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
685
  <input type="hidden" name="info_update" id="info_update" value="true" />
686
  <?php
@@ -696,6 +725,11 @@ echo '
696
  <td><input type="text" name="cart_paypal_email" value="'.$defaultEmail.'" size="40" /></td>
697
  </tr>
698
  <tr valign="top">
 
 
 
 
 
699
  <th scope="row">'.(__("Shopping Cart title", "WSPSC")).'</th>
700
  <td><input type="text" name="wp_cart_title" value="'.$title.'" size="40" /></td>
701
  </tr>
@@ -774,7 +808,7 @@ echo '
774
  <tr valign="top">
775
  <th scope="row">'.(__("Use WP Affiliate Platform", "WSPSC")).'</th>
776
  <td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
777
- <br />'.(__("Check this if using with the", "WSPSC")).' <a href="http://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", "WSPSC")).'</td>
778
  </tr>
779
  </table>
780
  </div></div>
@@ -786,6 +820,18 @@ echo '
786
  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>';
787
  }
788
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  function wp_cart_options()
790
  {
791
  echo '<div class="wrap"><h2>'.(__("WP Paypal Shopping Cart Options", "WSPSC")).'</h2>';
@@ -801,33 +847,33 @@ function wp_cart_options_page ()
801
  add_options_page(__("WP Paypal Shopping Cart", "WSPSC"), __("WP Shopping Cart", "WSPSC"), 'manage_options', __FILE__, 'wp_cart_options');
802
  }
803
 
804
- function show_wp_paypal_shopping_cart_widget($args)
805
  {
806
- extract($args);
807
-
808
- $cart_title = get_option('wp_cart_title');
809
- if (empty($cart_title)) $cart_title = __("Shopping Cart", "WSPSC");
810
-
811
- echo $before_widget;
812
- echo $before_title . $cart_title . $after_title;
813
- echo print_wp_shopping_cart();
814
- echo $after_widget;
815
  }
816
 
817
- function wp_paypal_shopping_cart_widget_control()
818
- {
819
- ?>
820
- <p>
821
- <?php _e("Set the Plugin Settings from the Settings menu", "WSPSC"); ?>
822
- </p>
823
- <?php
824
- }
825
-
826
- function widget_wp_paypal_shopping_cart_init()
827
- {
828
- $widget_options = array('classname' => 'widget_wp_paypal_shopping_cart', 'description' => __("Display WP Paypal Shopping Cart.", "WSPSC") );
829
- wp_register_sidebar_widget('wp_paypal_shopping_cart_widgets', __("WP Paypal Shopping Cart", "WSPSC"), 'show_wp_paypal_shopping_cart_widget', $widget_options);
830
- wp_register_widget_control('wp_paypal_shopping_cart_widgets', __("WP Paypal Shopping Cart", "WSPSC"), 'wp_paypal_shopping_cart_widget_control' );
 
 
 
 
 
 
 
 
831
  }
832
 
833
  function wp_cart_css()
@@ -848,14 +894,16 @@ add_filter('plugin_action_links', 'wp_simple_cart_add_settings_link', 10, 2 );
848
 
849
  // Insert the options page to the admin menu
850
  add_action('admin_menu','wp_cart_options_page');
851
- add_action('init', 'widget_wp_paypal_shopping_cart_init');
852
- //add_filter('the_content', 'print_wp_cart_button',11);
853
 
 
854
  add_filter('the_content', 'print_wp_cart_button_new',11);
855
  add_filter('the_content', 'shopping_cart_show');
856
 
857
- add_shortcode('show_wp_shopping_cart', 'show_wp_shopping_cart_handler');
 
858
 
 
859
  add_shortcode('always_show_wp_shopping_cart', 'always_show_cart_handler');
860
 
861
  add_action('wp_head', 'wp_cart_css');
1
  <?php
2
  /*
3
  Plugin Name: WP Simple Paypal Shopping cart
4
+ <<<<<<< .mine
5
+ Version: v3.3.0
6
+ =======
7
+ Version: v3.2.7
8
+ >>>>>>> .r565913
9
  Plugin URI: http://www.tipsandtricks-hq.com/?p=768
10
  Author: Ruhul Amin
11
  Author URI: http://www.tipsandtricks-hq.com/
22
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
  GNU General Public License for more details.
24
  */
25
+ if(!isset($_SESSION)){
 
26
  session_start();
27
  }
28
 
29
  define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
30
  define('WP_CART_URL', plugins_url('',__FILE__));
31
 
32
+ define('WP_CART_LIVE_PAYPAL_URL', 'https://www.paypal.com/cgi-bin/webscr');
33
+ define('WP_CART_SANDBOX_PAYPAL_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr');
34
+
35
  // loading language files
36
  load_plugin_textdomain('WSPSC', false, WP_CART_FOLDER . '/languages');
37
 
105
  $_SESSION['simpleCart'] = $products;
106
  }
107
 
108
+ if (isset($_POST['addcart']))
109
  {
110
  $domain_url = $_SERVER['SERVER_NAME'];
111
  $cookie_domain = str_replace("www","",$domain_url);
133
 
134
  if ($count == 1)
135
  {
136
+ if (!empty($_POST[$_POST['product']])){
137
  $price = $_POST[$_POST['product']];
138
+ }
139
+ else{
140
  $price = $_POST['price'];
141
+ }
142
 
143
+ $default_cur_symbol = get_option('cart_currency_symbol');
144
+ $price = str_replace($default_cur_symbol,"",$price);
145
+
146
+ $shipping = $_POST['shipping'];
147
+ $shipping = str_replace($default_cur_symbol,"",$shipping);
148
+
149
+ $product = array('name' => stripslashes($_POST['product']), 'price' => $price, 'quantity' => $count, 'shipping' => $shipping, 'cartLink' => $_POST['cartLink'], 'item_number' => $_POST['item_number']);
150
  array_push($products, $product);
151
  }
152
 
168
  }
169
  }
170
  }
171
+ else if (isset($_POST['cquantity']))
172
  {
173
  $products = $_SESSION['simpleCart'];
174
  foreach ($products as $key => $item)
185
  sort($products);
186
  $_SESSION['simpleCart'] = $products;
187
  }
188
+ else if (isset($_POST['delcart']))
189
  {
190
  $products = $_SESSION['simpleCart'];
191
  foreach ($products as $key => $item)
280
  {
281
  $output .= '
282
  <tr>
283
+ <th style="text-align: left">'.(__("Item Name", "WSPSC")).'</th><th>'.(__("Quantity", "WSPSC")).'</th><th>'.(__("Price", "WSPSC")).'</th><th></th>
284
  </tr>';
285
 
286
  foreach ($_SESSION['simpleCart'] as $item)
322
 
323
  $form .= "
324
  <input type=\"hidden\" name=\"item_name_$count\" value=\"".$item['name']."\" />
325
+ <input type=\"hidden\" name=\"amount_$count\" value='".number_format($item['price'],2)."' />
326
  <input type=\"hidden\" name=\"quantity_$count\" value=\"".$item['quantity']."\" />
327
  <input type='hidden' name='item_number' value='".$item['item_number']."' />
328
  ";
331
  if (!get_option('wp_shopping_cart_use_profile_shipping'))
332
  {
333
  $postage_cost = number_format($postage_cost,2);
334
+ $form .= "<input type=\"hidden\" name=\"shipping_1\" value='".$postage_cost."' />"; //You can also use "handling_cart" variable to use shipping and handling here
335
  }
336
  if (get_option('wp_shopping_cart_collect_address'))//force address collection
337
  {
356
  <tr><td colspan='2' style='font-weight: bold; text-align: right;'>".(__("Total", "WSPSC")).": </td><td style='text-align: center'>".print_payment_currency(($total+$postage_cost), $paypal_symbol, $decimal)."</td><td></td></tr>
357
  <tr><td colspan='4'>";
358
 
359
+ $paypal_checkout_url = WP_CART_LIVE_PAYPAL_URL;
360
+ if (get_option('wp_shopping_cart_enable_sandbox')){
361
+ $paypal_checkout_url = WP_CART_SANDBOX_PAYPAL_URL;
362
+ }
363
+ $output .= '<form action="'.$paypal_checkout_url.'" method="post">'.$form;
364
  if ($count)
365
  $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")).'" />';
366
 
384
 
385
  return $output;
386
  }
 
 
387
 
388
  function wp_cart_add_custom_field()
389
  {
404
 
405
  function print_wp_cart_button_new($content)
406
  {
 
 
407
  $addcart = get_option('addToCartButtonName');
408
  if (!$addcart || ($addcart == '') )
409
  $addcart = __("Add to Cart", "WSPSC");
598
  }
599
 
600
  function show_wp_cart_options_page () {
601
+ <<<<<<< .mine
602
+ $wp_simple_paypal_shopping_cart_version = "3.3.0";
603
+ =======
604
+ $wp_simple_paypal_shopping_cart_version = "3.2.7";
605
+ >>>>>>> .r565913
606
  if (isset($_POST['info_update']))
607
  {
608
  update_option('cart_payment_currency', (string)$_POST["cart_payment_currency"]);
626
  update_option('wp_shopping_cart_image_hide', ($_POST['wp_shopping_cart_image_hide']!='') ? 'checked="checked"':'' );
627
  update_option('wp_use_aff_platform', ($_POST['wp_use_aff_platform']!='') ? 'checked="checked"':'' );
628
 
629
+ update_option('wp_shopping_cart_enable_sandbox', ($_POST['wp_shopping_cart_enable_sandbox']!='') ? 'checked="checked"':'' );
630
+
631
  echo '<div id="message" class="updated fade">';
632
  echo '<p><strong>'.(__("Options Updated!", "WSPSC")).'</strong></p></div>';
633
  }
688
  else
689
  $wp_use_aff_platform = '';
690
 
691
+ //$wp_shopping_cart_enable_sandbox = get_option('wp_shopping_cart_enable_sandbox');
692
+ if (get_option('wp_shopping_cart_enable_sandbox'))
693
+ $wp_shopping_cart_enable_sandbox = 'checked="checked"';
694
+ else
695
+ $wp_shopping_cart_enable_sandbox = '';
696
  ?>
697
+ <h2><?php _e("Simple PayPal Shopping Cart Settings", "WSPSC"); ?> v <?php echo $wp_simple_paypal_shopping_cart_version; ?></h2>
698
 
699
+ <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;">
700
+ <p><?php _e("For more information, updates, detailed documentation and video tutorial, please visit:", "WSPSC"); ?><br />
701
+ <a href="http://www.tipsandtricks-hq.com/?p=768" target="_blank"><?php _e("WP simple cart homepage", "WSPSC"); ?></a></p>
702
+ </div>
703
 
704
+ <div class="postbox">
705
+ <h3><label for="title"><?php _e("Quick Usage Guide", "WSPSC"); ?></label></h3>
706
+ <div class="inside">
707
+
708
+ <p><?php _e("1. To add an 'Add to Cart' button for a product simply add the shortcode", "WSPSC"); ?> <strong>[wp_cart:<?php _e("PRODUCT-NAME", "WSPSC"); ?>:price:<?php _e("PRODUCT-PRICE", "WSPSC"); ?>:end]</strong> <?php _e("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]", "WSPSC"); ?></p>
709
+ <p><?php _e("2. To add the shopping cart to a post or page (example, checkout page) simply add the shortcode", "WSPSC"); ?><strong>[show_wp_shopping_cart]</strong> <?php _e("to a post or page or use the sidebar widget to add the shopping cart to the sidebar.", "WSPSC"); ?></p>
710
 
711
+ </div></div>
712
+
713
  <form method="post" action="<?php echo $_SERVER["REQUEST_URI"]; ?>">
714
  <input type="hidden" name="info_update" id="info_update" value="true" />
715
  <?php
725
  <td><input type="text" name="cart_paypal_email" value="'.$defaultEmail.'" size="40" /></td>
726
  </tr>
727
  <tr valign="top">
728
+ <th scope="row">'.(__("Enable Sandbox Testing", "WSPSC")).'</th>
729
+ <td><input type="checkbox" name="wp_shopping_cart_enable_sandbox" value="1" '.$wp_shopping_cart_enable_sandbox.' />
730
+ <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", "WSPSC")).'</td>
731
+ </tr>
732
+ <tr valign="top">
733
  <th scope="row">'.(__("Shopping Cart title", "WSPSC")).'</th>
734
  <td><input type="text" name="wp_cart_title" value="'.$title.'" size="40" /></td>
735
  </tr>
808
  <tr valign="top">
809
  <th scope="row">'.(__("Use WP Affiliate Platform", "WSPSC")).'</th>
810
  <td><input type="checkbox" name="wp_use_aff_platform" value="1" '.$wp_use_aff_platform.' />
811
+ <br />'.(__("Check this if using with the", "WSPSC")).' <a href="http://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", "WSPSC")).'</td>
812
  </tr>
813
  </table>
814
  </div></div>
820
  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>';
821
  }
822
 
823
+ function simple_cart_total()
824
+ {
825
+ $grand_total = 0;
826
+ foreach ((array) $_SESSION['simpleCart'] as $item)
827
+ {
828
+ $total += $item['price'] * $item['quantity'];
829
+ $item_total_shipping += $item['shipping'] * $item['quantity'];
830
+ }
831
+ $grand_total = $total + $item_total_shipping;
832
+ return number_format($grand_total,2);
833
+ }
834
+
835
  function wp_cart_options()
836
  {
837
  echo '<div class="wrap"><h2>'.(__("WP Paypal Shopping Cart Options", "WSPSC")).'</h2>';
847
  add_options_page(__("WP Paypal Shopping Cart", "WSPSC"), __("WP Shopping Cart", "WSPSC"), 'manage_options', __FILE__, 'wp_cart_options');
848
  }
849
 
850
+ function wp_paypal_shopping_cart_load_widgets()
851
  {
852
+ register_widget('WP_PayPal_Cart_Widget');
 
 
 
 
 
 
 
 
853
  }
854
 
855
+ class WP_PayPal_Cart_Widget extends WP_Widget {
856
+ function WP_PayPal_Cart_Widget() {
857
+ parent::WP_Widget('wp_paypal_shopping_cart_widgets', 'WP Paypal Shopping Cart', array('description' => 'WP Paypal Shopping Cart Widget') );
858
+ }
859
+ function form($instance) {
860
+ // outputs the options form on admin
861
+ }
862
+ function update($new_instance, $old_instance) {
863
+ // processes widget options to be saved
864
+ }
865
+ function widget($args, $instance) {
866
+ // outputs the content of the widget
867
+ extract( $args );
868
+
869
+ $cart_title = get_option('wp_cart_title');
870
+ if (empty($cart_title)) $cart_title = __("Shopping Cart", "WSPSC");
871
+
872
+ echo $before_widget;
873
+ echo $before_title . $cart_title . $after_title;
874
+ echo print_wp_shopping_cart();
875
+ echo $after_widget;
876
+ }
877
  }
878
 
879
  function wp_cart_css()
894
 
895
  // Insert the options page to the admin menu
896
  add_action('admin_menu','wp_cart_options_page');
897
+ add_action('widgets_init','wp_paypal_shopping_cart_load_widgets');
 
898
 
899
+ //add_filter('the_content', 'print_wp_cart_button',11);
900
  add_filter('the_content', 'print_wp_cart_button_new',11);
901
  add_filter('the_content', 'shopping_cart_show');
902
 
903
+ if (!is_admin())
904
+ {add_filter('widget_text', 'do_shortcode');}
905
 
906
+ add_shortcode('show_wp_shopping_cart', 'show_wp_shopping_cart_handler');
907
  add_shortcode('always_show_wp_shopping_cart', 'always_show_cart_handler');
908
 
909
  add_action('wp_head', 'wp_cart_css');