Version Description
- Added an option to specify a custom button image for the add to cart buttons. You can use the "button_image" parameter in the shortcode to customize the add to cart button image.
- Coupon code that is used in a transaciton will be saved with the order so you can see it in the back end.
Download this release
Release Info
Developer | mra13 |
Plugin | WordPress Simple PayPal Shopping Cart |
Version | 3.9.2 |
Comparing to | |
See all releases |
Code changes from version 3.8.9 to 3.9.2
- ipn_handle_debug.log +0 -0
- paypal.php +2 -0
- readme.txt +11 -3
- wp_shopping_cart.php +25 -12
- wp_shopping_cart_misc_functions.php +0 -1
- wp_shopping_cart_orders.php +5 -0
- wp_shopping_cart_shortcodes.php +3 -1
ipn_handle_debug.log
ADDED
File without changes
|
paypal.php
CHANGED
@@ -131,6 +131,7 @@ class paypal_ipn_handler {
|
|
131 |
//TODO
|
132 |
$post_id = $custom_values['wp_cart_id'];
|
133 |
$ip_address = $custom_values['ip'];
|
|
|
134 |
$currency_symbol = get_option('cart_currency_symbol');
|
135 |
$this->debug_log('custom values',true);
|
136 |
$this->debug_log_array($custom_values,true);
|
@@ -154,6 +155,7 @@ class paypal_ipn_handler {
|
|
154 |
update_post_meta( $post_id, 'wpsc_address', $address );
|
155 |
$status = "Paid";
|
156 |
update_post_meta( $post_id, 'wpsc_order_status', $status );
|
|
|
157 |
$cart_items = get_post_meta( $post_id, 'wpsc_cart_items', true );
|
158 |
$product_details = "";
|
159 |
$item_counter = 1;
|
131 |
//TODO
|
132 |
$post_id = $custom_values['wp_cart_id'];
|
133 |
$ip_address = $custom_values['ip'];
|
134 |
+
$applied_coupon_code = $custom_values['coupon_code'];
|
135 |
$currency_symbol = get_option('cart_currency_symbol');
|
136 |
$this->debug_log('custom values',true);
|
137 |
$this->debug_log_array($custom_values,true);
|
155 |
update_post_meta( $post_id, 'wpsc_address', $address );
|
156 |
$status = "Paid";
|
157 |
update_post_meta( $post_id, 'wpsc_order_status', $status );
|
158 |
+
update_post_meta( $post_id, 'wpsc_applied_coupon', $applied_coupon_code );
|
159 |
$cart_items = get_post_meta( $post_id, 'wpsc_cart_items', true );
|
160 |
$product_details = "";
|
161 |
$item_counter = 1;
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: Ruhul Amin, Tips and Tricks HQ
|
|
3 |
Donate link: http://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, digital downloads, paypal, paypal cart, e-shop
|
5 |
Requires at least: 3.0
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 3.
|
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.
|
@@ -45,6 +45,8 @@ or
|
|
45 |
* You can create coupons and give to your customers. When they use coupons during the checkout they will receive a discount.
|
46 |
* Compatible with WordPress Multi-site Installation.
|
47 |
* Ability to specify SKU (item number) for each of your products in the shortcode.
|
|
|
|
|
48 |
* Can be translated into any language.
|
49 |
* and more...
|
50 |
|
@@ -122,12 +124,18 @@ Visit the plugin site at http://www.tipsandtricks-hq.com/?p=768 for screenshots.
|
|
122 |
None
|
123 |
|
124 |
== Changelog ==
|
|
|
|
|
|
|
125 |
|
126 |
-
= 3.
|
|
|
127 |
|
|
|
128 |
- WP Super Cache workaround - http://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart-and-wp-super-cache-workaround-334
|
129 |
- Added a new shortcode argument to specify a SKU number for your product.
|
130 |
- Fixed a few debug warnings/notices
|
|
|
131 |
|
132 |
= 3.8.8 =
|
133 |
- Added a discount coupon feature to the shopping cart. You can now configure discount coupon via the Simple cart settings -> Coupon/Discount menu
|
3 |
Donate link: http://www.tipsandtricks-hq.com
|
4 |
Tags: cart, shopping cart, WordPress shopping cart, Paypal shopping cart, sell products, online shop, shop, e-commerce, wordpress ecommerce, wordpress store, store, PayPal cart widget, sell digital products, digital downloads, paypal, paypal cart, e-shop
|
5 |
Requires at least: 3.0
|
6 |
+
Tested up to: 3.8
|
7 |
+
Stable tag: 3.9.2
|
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.
|
45 |
* You can create coupons and give to your customers. When they use coupons during the checkout they will receive a discount.
|
46 |
* Compatible with WordPress Multi-site Installation.
|
47 |
* Ability to specify SKU (item number) for each of your products in the shortcode.
|
48 |
+
* Ability to customize the add to cart button image and use a custom image for your purchase buttons.
|
49 |
+
* Track coupons with the order to see which customer used which coupon code.
|
50 |
* Can be translated into any language.
|
51 |
* and more...
|
52 |
|
124 |
None
|
125 |
|
126 |
== Changelog ==
|
127 |
+
= 3.9.2 =
|
128 |
+
- Added an option to specify a custom button image for the add to cart buttons. You can use the "button_image" parameter in the shortcode to customize the add to cart button image.
|
129 |
+
- Coupon code that is used in a transaciton will be saved with the order so you can see it in the back end.
|
130 |
|
131 |
+
= 3.9.1 =
|
132 |
+
- WP 3.8 compatibility
|
133 |
|
134 |
+
= 3.9.0 and 3.8.9 =
|
135 |
- WP Super Cache workaround - http://www.tipsandtricks-hq.com/ecommerce/wp-shopping-cart-and-wp-super-cache-workaround-334
|
136 |
- Added a new shortcode argument to specify a SKU number for your product.
|
137 |
- Fixed a few debug warnings/notices
|
138 |
+
- Added Italian language file
|
139 |
|
140 |
= 3.8.8 =
|
141 |
- Added a discount coupon feature to the shopping cart. You can now configure discount coupon via the Simple cart settings -> Coupon/Discount menu
|
wp_shopping_cart.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Simple Paypal Shopping cart
|
4 |
-
Version: v3.
|
5 |
Plugin URI: http://www.tipsandtricks-hq.com/?p=768
|
6 |
-
Author: Ruhul Amin
|
7 |
Author URI: http://www.tipsandtricks-hq.com/
|
8 |
Description: Simple WordPress Shopping Cart Plugin, very easy to use and great for selling products and services from your blog!
|
9 |
*/
|
@@ -12,7 +12,7 @@ if(!isset($_SESSION)){
|
|
12 |
session_start();
|
13 |
}
|
14 |
|
15 |
-
define('WP_CART_VERSION', '3.
|
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__));
|
@@ -459,6 +459,12 @@ function wp_cart_add_custom_field()
|
|
459 |
$custom_field_val = wpc_append_values_to_custom_field($name,$value);
|
460 |
}
|
461 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
$output = '<input type="hidden" name="custom" value="'.$custom_field_val.'" />';
|
463 |
return $output;
|
464 |
}
|
@@ -654,15 +660,22 @@ function print_wp_cart_button_for_product($name, $price, $shipping=0, $var1='',
|
|
654 |
if (!empty($var_output)){//Show variation
|
655 |
$replacement .= '<div class="wp_cart_variation_section">'.$var_output.'</div>';
|
656 |
}
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
666 |
$replacement .= '<input type="hidden" name="product" value="'.$name.'" /><input type="hidden" name="price" value="'.$price.'" /><input type="hidden" name="shipping" value="'.$shipping.'" /><input type="hidden" name="addcart" value="1" /><input type="hidden" name="cartLink" value="'.cart_current_page_url().'" />';
|
667 |
$replacement .= '<input type="hidden" name="product_tmp" value="'.$name.'" />';
|
668 |
isset($atts['item_number'])?$item_num = $atts['item_number']: $item_num = '';
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Simple Paypal Shopping cart
|
4 |
+
Version: v3.9.2
|
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/
|
8 |
Description: Simple WordPress Shopping Cart Plugin, very easy to use and great for selling products and services from your blog!
|
9 |
*/
|
12 |
session_start();
|
13 |
}
|
14 |
|
15 |
+
define('WP_CART_VERSION', '3.9.2');
|
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__));
|
459 |
$custom_field_val = wpc_append_values_to_custom_field($name,$value);
|
460 |
}
|
461 |
}
|
462 |
+
|
463 |
+
if(isset($_SESSION['wpspsc_applied_coupon_code'])){
|
464 |
+
$name = "coupon_code";
|
465 |
+
$value = $_SESSION['wpspsc_applied_coupon_code'];
|
466 |
+
$custom_field_val = wpc_append_values_to_custom_field($name,$value);
|
467 |
+
}
|
468 |
$output = '<input type="hidden" name="custom" value="'.$custom_field_val.'" />';
|
469 |
return $output;
|
470 |
}
|
660 |
if (!empty($var_output)){//Show variation
|
661 |
$replacement .= '<div class="wp_cart_variation_section">'.$var_output.'</div>';
|
662 |
}
|
663 |
+
|
664 |
+
if(isset($atts['button_image']) && !empty($atts['button_image'])){
|
665 |
+
//Use the custom button image for this shortcode
|
666 |
+
$replacement .= '<input type="image" src="'.$atts['button_image'].'" class="wp_cart_button" alt="'.(__("Add to Cart", "WSPSC")).'"/>';
|
667 |
+
}
|
668 |
+
else
|
669 |
+
{
|
670 |
+
//Use the button text or image value from the settings
|
671 |
+
if (preg_match("/http:/", $addcart)){ // Use the image as the 'add to cart' button
|
672 |
+
$replacement .= '<input type="image" src="'.$addcart.'" class="wp_cart_button" alt="'.(__("Add to Cart", "WSPSC")).'"/>';
|
673 |
+
}
|
674 |
+
else{
|
675 |
+
$replacement .= '<input type="submit" value="'.$addcart.'" />';
|
676 |
+
}
|
677 |
+
}
|
678 |
+
|
679 |
$replacement .= '<input type="hidden" name="product" value="'.$name.'" /><input type="hidden" name="price" value="'.$price.'" /><input type="hidden" name="shipping" value="'.$shipping.'" /><input type="hidden" name="addcart" value="1" /><input type="hidden" name="cartLink" value="'.cart_current_page_url().'" />';
|
680 |
$replacement .= '<input type="hidden" name="product_tmp" value="'.$name.'" />';
|
681 |
isset($atts['item_number'])?$item_num = $atts['item_number']: $item_num = '';
|
wp_shopping_cart_misc_functions.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
/* TODO
|
4 |
- After processing an IPN, call a function to clear all trash orders that are older than 6 hours.
|
5 |
-
- add a "button_image" parameter in the shortcode to customize the add to cart button
|
6 |
- add an option for the admin email notification.
|
7 |
- add a reset cart button
|
8 |
- Mention the available languages
|
2 |
|
3 |
/* TODO
|
4 |
- After processing an IPN, call a function to clear all trash orders that are older than 6 hours.
|
|
|
5 |
- add an option for the admin email notification.
|
6 |
- add a reset cart button
|
7 |
- Mention the available languages
|
wp_shopping_cart_orders.php
CHANGED
@@ -62,6 +62,7 @@ function wpspc_order_review_meta_box($wpsc_cart_orders)
|
|
62 |
}
|
63 |
|
64 |
$items_ordered = get_post_meta( $wpsc_cart_orders->ID, 'wpspsc_items_ordered', true );
|
|
|
65 |
?>
|
66 |
<table>
|
67 |
<p>Order ID: #<?php echo $order_id;?></p>
|
@@ -100,6 +101,10 @@ function wpspc_order_review_meta_box($wpsc_cart_orders)
|
|
100 |
<td>Item(s) Ordered:</td>
|
101 |
<td><textarea name="wpspsc_items_ordered" cols="83" rows="5"><?php echo $items_ordered;?></textarea></td>
|
102 |
</tr>
|
|
|
|
|
|
|
|
|
103 |
|
104 |
</table>
|
105 |
<?php
|
62 |
}
|
63 |
|
64 |
$items_ordered = get_post_meta( $wpsc_cart_orders->ID, 'wpspsc_items_ordered', true );
|
65 |
+
$applied_coupon = get_post_meta( $wpsc_cart_orders->ID, 'wpsc_applied_coupon', true );
|
66 |
?>
|
67 |
<table>
|
68 |
<p>Order ID: #<?php echo $order_id;?></p>
|
101 |
<td>Item(s) Ordered:</td>
|
102 |
<td><textarea name="wpspsc_items_ordered" cols="83" rows="5"><?php echo $items_ordered;?></textarea></td>
|
103 |
</tr>
|
104 |
+
<tr>
|
105 |
+
<td>Applied Coupon Code:</td>
|
106 |
+
<td><input type="text" size="20" name="wpsc_applied_coupon" value="<?php echo $applied_coupon; ?>" readonly /></td>
|
107 |
+
</tr>
|
108 |
|
109 |
</table>
|
110 |
<?php
|
wp_shopping_cart_shortcodes.php
CHANGED
@@ -9,6 +9,7 @@ function wp_cart_button_handler($atts){
|
|
9 |
'var1' => '',
|
10 |
'var2' => '',
|
11 |
'var3' => '',
|
|
|
12 |
), $atts));
|
13 |
|
14 |
if(empty($name)){
|
@@ -31,7 +32,8 @@ function wp_cart_display_product_handler($atts)
|
|
31 |
'var2' => '',
|
32 |
'var3' => '',
|
33 |
'thumbnail' => '',
|
34 |
-
'description' => '',
|
|
|
35 |
), $atts));
|
36 |
|
37 |
if(empty($name)){
|
9 |
'var1' => '',
|
10 |
'var2' => '',
|
11 |
'var3' => '',
|
12 |
+
'button_image' => '',
|
13 |
), $atts));
|
14 |
|
15 |
if(empty($name)){
|
32 |
'var2' => '',
|
33 |
'var3' => '',
|
34 |
'thumbnail' => '',
|
35 |
+
'description' => '',
|
36 |
+
'button_image' => '',
|
37 |
), $atts));
|
38 |
|
39 |
if(empty($name)){
|