Version Description
- [+] Improved the compatibility with AJAX-based themes for WP and some web search engines out there.
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- ecwid-shopping-cart.php +5 -3
- lib/ecwid_catalog.php +23 -10
- readme.txt +4 -2
ecwid-shopping-cart.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Ecwid Shopping Cart
|
|
4 |
Plugin URI: http://www.ecwid.com/
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integreted with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Author: Ecwid Team
|
7 |
-
Version: 1.
|
8 |
Author URI: http://www.ecwid.com/
|
9 |
*/
|
10 |
|
@@ -606,8 +606,10 @@ echo "<a href=\"https://my.ecwid.com/\" target=\"_blank\">Go to the Ecwid Contro
|
|
606 |
}
|
607 |
|
608 |
function ecwid_add_dashboard_widgets() {
|
609 |
-
|
610 |
-
|
|
|
|
|
611 |
|
612 |
|
613 |
|
4 |
Plugin URI: http://www.ecwid.com/
|
5 |
Description: Ecwid is a free full-featured shopping cart. It can be easily integreted with any Wordpress blog and takes less than 5 minutes to set up.
|
6 |
Author: Ecwid Team
|
7 |
+
Version: 1.1
|
8 |
Author URI: http://www.ecwid.com/
|
9 |
*/
|
10 |
|
606 |
}
|
607 |
|
608 |
function ecwid_add_dashboard_widgets() {
|
609 |
+
if (current_user_can('administrator')) {
|
610 |
+
wp_add_dashboard_widget('ecwid_dashboard_widget','Ecwid Links', 'ecwid_dashboard_widget_function');
|
611 |
+
}
|
612 |
+
}
|
613 |
|
614 |
|
615 |
|
lib/ecwid_catalog.php
CHANGED
@@ -8,6 +8,7 @@ function show_ecwid($params) {
|
|
8 |
|
9 |
$list_of_views = $params['list_of_views'];
|
10 |
|
|
|
11 |
foreach ($list_of_views as $k=>$v) {
|
12 |
if (!in_array($v, array('list','grid','table'))) unset($list_of_views[$k]);
|
13 |
}
|
@@ -61,13 +62,13 @@ function show_ecwid($params) {
|
|
61 |
|
62 |
$ecwid_mobile_catalog_link = $params['ecwid_mobile_catalog_link'];
|
63 |
if (empty($ecwid_mobile_catalog_link)) {
|
64 |
-
$ecwid_mobile_catalog_link = "
|
65 |
}
|
66 |
|
67 |
$html_catalog = '';
|
68 |
if ($ecwid_show_seo_catalog) {
|
69 |
if (!empty($_GET['ecwid_product_id'])) {
|
70 |
-
$ecwid_open_product = '<script> if (!document.location.hash) document.location.hash = "ecwid:category=0&mode=product&product='. intval($_GET['ecwid_product_id']) .'";</script>';
|
71 |
} elseif (!empty($_GET['ecwid_category_id'])) {
|
72 |
$ecwid_default_category_id = intval($_GET['ecwid_category_id']);
|
73 |
}
|
@@ -95,13 +96,23 @@ function show_ecwid($params) {
|
|
95 |
$protocol = "https";
|
96 |
}
|
97 |
|
|
|
|
|
|
|
|
|
98 |
$integration_code = <<<EOT
|
99 |
<div>
|
100 |
-
<script type="text/javascript" src="
|
101 |
-
<
|
102 |
-
|
103 |
-
|
|
|
|
|
|
|
|
|
|
|
104 |
$ecwid_open_product
|
|
|
105 |
EOT;
|
106 |
|
107 |
return $integration_code;
|
@@ -144,8 +155,10 @@ function show_ecwid_catalog($ecwid_store_id) {
|
|
144 |
|
145 |
if (is_array($product)) {
|
146 |
$html = "<div class='hproduct'>";
|
147 |
-
$html .= "<
|
148 |
-
|
|
|
|
|
149 |
$html .= "<div class='ecwid_catalog_product_price price'>Price: " . $product["price"] . " " . $profile["currency"] . "</div>";
|
150 |
$html .= "<div class='ecwid_catalog_product_description description'>" . $product["description"] . "</div>";
|
151 |
$html .= "</div>";
|
@@ -154,7 +167,7 @@ function show_ecwid_catalog($ecwid_store_id) {
|
|
154 |
foreach ($categories as $category) {
|
155 |
$category_url = ecwid_internal_construct_url($category["url"], array("ecwid_category_id" => $category["id"]));
|
156 |
$category_name = $category["name"];
|
157 |
-
$html .= "<div class='ecwid_catalog_category_name'><a href='" . $category_url . "'>" . $category_name . "</a><br /></div>";
|
158 |
}
|
159 |
}
|
160 |
|
@@ -164,7 +177,7 @@ function show_ecwid_catalog($ecwid_store_id) {
|
|
164 |
$product_name = $product["name"];
|
165 |
$product_price = $product["price"] . " " . $profile["currency"];
|
166 |
$html .= "<div>";
|
167 |
-
$html .= "<span class='ecwid_product_name'><a href='" . $product_url . "'>" . $product_name . "</a></span>";
|
168 |
$html .= " <span class='ecwid_product_price'>" . $product_price . "</span>";
|
169 |
$html .= "</div>";
|
170 |
}
|
8 |
|
9 |
$list_of_views = $params['list_of_views'];
|
10 |
|
11 |
+
if (is_array($list_of_views))
|
12 |
foreach ($list_of_views as $k=>$v) {
|
13 |
if (!in_array($v, array('list','grid','table'))) unset($list_of_views[$k]);
|
14 |
}
|
62 |
|
63 |
$ecwid_mobile_catalog_link = $params['ecwid_mobile_catalog_link'];
|
64 |
if (empty($ecwid_mobile_catalog_link)) {
|
65 |
+
$ecwid_mobile_catalog_link = "//$ecwid_com/jsp/$store_id/catalog";
|
66 |
}
|
67 |
|
68 |
$html_catalog = '';
|
69 |
if ($ecwid_show_seo_catalog) {
|
70 |
if (!empty($_GET['ecwid_product_id'])) {
|
71 |
+
$ecwid_open_product = '<script type="text/javascript"> if (!document.location.hash) document.location.hash = "ecwid:category=0&mode=product&product='. intval($_GET['ecwid_product_id']) .'";</script>';
|
72 |
} elseif (!empty($_GET['ecwid_category_id'])) {
|
73 |
$ecwid_default_category_id = intval($_GET['ecwid_category_id']);
|
74 |
}
|
96 |
$protocol = "https";
|
97 |
}
|
98 |
|
99 |
+
$ecwid_element_id = "ecwid-inline-catalog";
|
100 |
+
if (!empty($params['ecwid_element_id'])) {
|
101 |
+
$ecwid_element_id = $params['ecwid_element_id'];
|
102 |
+
}
|
103 |
$integration_code = <<<EOT
|
104 |
<div>
|
105 |
+
<script type="text/javascript" src="//$ecwid_com/script.js?$store_id"></script>
|
106 |
+
<div id="$ecwid_element_id">$html_catalog</div>
|
107 |
+
<script type="text/javascript"> xProductBrowser(
|
108 |
+
"categoriesPerRow=$ecwid_pb_categoriesperrow",
|
109 |
+
"views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)",
|
110 |
+
"categoryView=$ecwid_pb_defaultview",
|
111 |
+
"searchView=$ecwid_pb_searchview",
|
112 |
+
"id=$ecwid_element_id",
|
113 |
+
"style="$ecwid_default_category_str);</script>
|
114 |
$ecwid_open_product
|
115 |
+
</div>
|
116 |
EOT;
|
117 |
|
118 |
return $integration_code;
|
155 |
|
156 |
if (is_array($product)) {
|
157 |
$html = "<div class='hproduct'>";
|
158 |
+
$html .= "<h3 class='ecwid_catalog_product_name fn'>" . htmlentities($product["name"],ENT_COMPAT,'UTF-8') . "</h3>";
|
159 |
+
if (!empty($product["thumbnailUrl"])) {
|
160 |
+
$html .= "<div class='ecwid_catalog_product_image photo'><img src='" . $product["thumbnailUrl"] . "' alt='" . htmlentities($product["sku"],ENT_COMPAT,'UTF-8') . " " . htmlentities($product["name"],ENT_COMPAT,'UTF-8') . "'/></div>";
|
161 |
+
}
|
162 |
$html .= "<div class='ecwid_catalog_product_price price'>Price: " . $product["price"] . " " . $profile["currency"] . "</div>";
|
163 |
$html .= "<div class='ecwid_catalog_product_description description'>" . $product["description"] . "</div>";
|
164 |
$html .= "</div>";
|
167 |
foreach ($categories as $category) {
|
168 |
$category_url = ecwid_internal_construct_url($category["url"], array("ecwid_category_id" => $category["id"]));
|
169 |
$category_name = $category["name"];
|
170 |
+
$html .= "<div class='ecwid_catalog_category_name'><a href='" . htmlspecialchars($category_url) . "'>" . $category_name . "</a><br /></div>";
|
171 |
}
|
172 |
}
|
173 |
|
177 |
$product_name = $product["name"];
|
178 |
$product_price = $product["price"] . " " . $profile["currency"];
|
179 |
$html .= "<div>";
|
180 |
+
$html .= "<span class='ecwid_product_name'><a href='" . htmlspecialchars($product_url) . "'>" . $product_name . "</a></span>";
|
181 |
$html .= " <span class='ecwid_product_price'>" . $product_price . "</span>";
|
182 |
$html .= "</div>";
|
183 |
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Ecwid Team
|
|
3 |
Tags: shopping cart, ecommerce, e-commerce, paypal, google checkout, 2checkout, store, shop, product catalog, inventory
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.4
|
6 |
-
Stable tag: 1.
|
7 |
|
8 |
Ecwid is a free full-featured shopping cart that can easily be added to any blog
|
9 |
and takes less than 5 minutes to set up.
|
@@ -18,7 +18,7 @@ There are eight key advantages to Ecwid:
|
|
18 |
- It has AJAX everywhere and supports drag-and-drop.
|
19 |
- It can be easily integrated to any existing site or Facebook profile in minutes.
|
20 |
- It can be mirrored on many sites at the same time. Add your store to many sites, manage it from one place.
|
21 |
-
-
|
22 |
- Simple to use and maintain. For both store owner and customer.
|
23 |
- Lightning fast. New-gen technologies make Ecwid much faster than usual
|
24 |
shopping carts regardless the hosting service you use.
|
@@ -53,6 +53,8 @@ Links
|
|
53 |
- Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
|
54 |
|
55 |
== Changelog ==
|
|
|
|
|
56 |
= 1.0 =
|
57 |
- [!] The "Single Sign-on" feature didn't work properly in some cases. Fixed.
|
58 |
|
3 |
Tags: shopping cart, ecommerce, e-commerce, paypal, google checkout, 2checkout, store, shop, product catalog, inventory
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 3.4
|
6 |
+
Stable tag: 1.1
|
7 |
|
8 |
Ecwid is a free full-featured shopping cart that can easily be added to any blog
|
9 |
and takes less than 5 minutes to set up.
|
18 |
- It has AJAX everywhere and supports drag-and-drop.
|
19 |
- It can be easily integrated to any existing site or Facebook profile in minutes.
|
20 |
- It can be mirrored on many sites at the same time. Add your store to many sites, manage it from one place.
|
21 |
+
- Integrates with social networks. Run your own store on Facebook, mySpace and many others, or let your customers share the links to your products and their purchases.
|
22 |
- Simple to use and maintain. For both store owner and customer.
|
23 |
- Lightning fast. New-gen technologies make Ecwid much faster than usual
|
24 |
shopping carts regardless the hosting service you use.
|
53 |
- Knowledge Base: [http://kb.ecwid.com](http://kb.ecwid.com)
|
54 |
|
55 |
== Changelog ==
|
56 |
+
= 1.1 =
|
57 |
+
- [+] Improved the compatibility with AJAX-based themes for WP and some web search engines out there.
|
58 |
= 1.0 =
|
59 |
- [!] The "Single Sign-on" feature didn't work properly in some cases. Fixed.
|
60 |
|