Version Description
Download this release
Release Info
Developer | mra13 |
Plugin | WordPress Simple PayPal Shopping Cart |
Version | 3.2.3 |
Comparing to | |
See all releases |
Code changes from version 3.1 to 3.2.3
- images/Thumbs.db +0 -0
- readme.txt +2 -2
- wp_shopping_cart.php +18 -9
- wp_shopping_cart_style.css +9 -0
images/Thumbs.db
DELETED
Binary file
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ 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.1
|
7 |
-
Stable tag: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 |
|
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 |
|
wp_shopping_cart.php
CHANGED
@@ -1,7 +1,7 @@
|
|
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/
|
@@ -23,10 +23,8 @@ if(!isset($_SESSION))
|
|
23 |
session_start();
|
24 |
}
|
25 |
|
26 |
-
$siteurl = get_option('siteurl');
|
27 |
define('WP_CART_FOLDER', dirname(plugin_basename(__FILE__)));
|
28 |
define('WP_CART_URL', plugins_url('',__FILE__));
|
29 |
-
//define('WP_CART_URL', get_option('siteurl').'/wp-content/plugins/' . WP_CART_FOLDER);
|
30 |
|
31 |
// loading language files
|
32 |
load_plugin_textdomain('WSPSC', false, WP_CART_FOLDER . '/languages');
|
@@ -89,6 +87,11 @@ if (get_option('wp_shopping_cart_reset_after_redirection_to_return_page'))
|
|
89 |
function reset_wp_cart()
|
90 |
{
|
91 |
$products = $_SESSION['simpleCart'];
|
|
|
|
|
|
|
|
|
|
|
92 |
foreach ($products as $key => $item)
|
93 |
{
|
94 |
unset($products[$key]);
|
@@ -98,6 +101,9 @@ function reset_wp_cart()
|
|
98 |
|
99 |
if ($_POST['addcart'])
|
100 |
{
|
|
|
|
|
|
|
101 |
$count = 1;
|
102 |
$products = $_SESSION['simpleCart'];
|
103 |
|
@@ -239,8 +245,8 @@ function print_wp_shopping_cart()
|
|
239 |
global $plugin_dir_name;
|
240 |
$output .= '<div class="shopping_cart" style=" padding: 5px;">';
|
241 |
if (!get_option('wp_shopping_cart_image_hide'))
|
242 |
-
{
|
243 |
-
$output .= "<
|
244 |
}
|
245 |
if(!empty($title))
|
246 |
{
|
@@ -310,6 +316,7 @@ function print_wp_shopping_cart()
|
|
310 |
}
|
311 |
if (!get_option('wp_shopping_cart_use_profile_shipping'))
|
312 |
{
|
|
|
313 |
$form .= "<input type=\"hidden\" name=\"shipping_1\" value='".$postage_cost."' />";
|
314 |
}
|
315 |
if (get_option('wp_shopping_cart_collect_address'))//force address collection
|
@@ -459,7 +466,8 @@ function print_wp_cart_button_new($content)
|
|
459 |
|
460 |
$pieces = explode(':',$m);
|
461 |
|
462 |
-
$replacement = '<object
|
|
|
463 |
if (!empty($var_output))
|
464 |
{
|
465 |
$replacement .= $var_output;
|
@@ -482,7 +490,8 @@ function print_wp_cart_button_new($content)
|
|
482 |
$replacement .= '<input type="hidden" name="shipping" value="'.$pieces['2'].'" />';
|
483 |
}
|
484 |
$replacement .= '<input type="hidden" name="cartLink" value="'.cart_current_page_url().'" />';
|
485 |
-
$replacement .= '<input type="hidden" name="addcart" value="1" /></form
|
|
|
486 |
$content = str_replace ($match, $replacement, $content);
|
487 |
}
|
488 |
return $content;
|
@@ -529,7 +538,7 @@ function print_wp_cart_button_for_product($name, $price, $shipping=0)
|
|
529 |
$addcart = __("Add to Cart", "WSPSC");
|
530 |
|
531 |
|
532 |
-
$replacement = '<object><form method="post"
|
533 |
if (preg_match("/http:/", $addcart)) // Use the image as the 'add to cart' button
|
534 |
{
|
535 |
$replacement .= '<input type="image" src="'.$addcart.'" class="wp_cart_button" alt="'.(__("Add to Cart", "WSPSC")).'"/>';
|
@@ -575,7 +584,7 @@ function cart_current_page_url() {
|
|
575 |
}
|
576 |
|
577 |
function show_wp_cart_options_page () {
|
578 |
-
$wp_simple_paypal_shopping_cart_version = "3.
|
579 |
if (isset($_POST['info_update']))
|
580 |
{
|
581 |
update_option('cart_payment_currency', (string)$_POST["cart_payment_currency"]);
|
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/
|
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');
|
87 |
function reset_wp_cart()
|
88 |
{
|
89 |
$products = $_SESSION['simpleCart'];
|
90 |
+
if(empty($products))
|
91 |
+
{
|
92 |
+
unset($_SESSION['simpleCart']);
|
93 |
+
return;
|
94 |
+
}
|
95 |
foreach ($products as $key => $item)
|
96 |
{
|
97 |
unset($products[$key]);
|
101 |
|
102 |
if ($_POST['addcart'])
|
103 |
{
|
104 |
+
$domain_url = $_SERVER['SERVER_NAME'];
|
105 |
+
$cookie_domain = str_replace("www","",$domain_url);
|
106 |
+
setcookie("cart_in_use","true",time()+21600,"/",$cookie_domain); //useful to not serve cached page when using with a caching plugin
|
107 |
$count = 1;
|
108 |
$products = $_SESSION['simpleCart'];
|
109 |
|
245 |
global $plugin_dir_name;
|
246 |
$output .= '<div class="shopping_cart" style=" padding: 5px;">';
|
247 |
if (!get_option('wp_shopping_cart_image_hide'))
|
248 |
+
{
|
249 |
+
$output .= "<img src='".WP_CART_URL."/images/shopping_cart_icon.png' value='".(__("Cart", "WSPSC"))."' title='".(__("Cart", "WSPSC"))."' />";
|
250 |
}
|
251 |
if(!empty($title))
|
252 |
{
|
316 |
}
|
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
|
466 |
|
467 |
$pieces = explode(':',$m);
|
468 |
|
469 |
+
$replacement = '<object>';
|
470 |
+
$replacement .= '<form method="post" class="wp-cart-button-form" action="" style="display:inline" onsubmit="return ReadForm(this, true);">';
|
471 |
if (!empty($var_output))
|
472 |
{
|
473 |
$replacement .= $var_output;
|
490 |
$replacement .= '<input type="hidden" name="shipping" value="'.$pieces['2'].'" />';
|
491 |
}
|
492 |
$replacement .= '<input type="hidden" name="cartLink" value="'.cart_current_page_url().'" />';
|
493 |
+
$replacement .= '<input type="hidden" name="addcart" value="1" /></form>';
|
494 |
+
$replacement .= '</object>';
|
495 |
$content = str_replace ($match, $replacement, $content);
|
496 |
}
|
497 |
return $content;
|
538 |
$addcart = __("Add to Cart", "WSPSC");
|
539 |
|
540 |
|
541 |
+
$replacement = '<object><form method="post" class="wp-cart-button-form" action="" style="display:inline">';
|
542 |
if (preg_match("/http:/", $addcart)) // Use the image as the 'add to cart' button
|
543 |
{
|
544 |
$replacement .= '<input type="image" src="'.$addcart.'" class="wp_cart_button" alt="'.(__("Add to Cart", "WSPSC")).'"/>';
|
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"]);
|
wp_shopping_cart_style.css
CHANGED
@@ -4,6 +4,15 @@ font-size:12px;
|
|
4 |
.shopping_cart h2{
|
5 |
font-size:14px;
|
6 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
.wp_cart_checkout_button:hover{
|
8 |
opacity:0.7;
|
9 |
}
|
4 |
.shopping_cart h2{
|
5 |
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 |
+
}
|
16 |
.wp_cart_checkout_button:hover{
|
17 |
opacity:0.7;
|
18 |
}
|