Version Description
- [+] Plugin settings page was updated.
- [+] Two new options: "Full link to your mobile catalog" and "Default category ID".
Download this release
Release Info
Developer | Ecwid |
Plugin | Ecwid Ecommerce Shopping Cart |
Version | 0.5 |
Comparing to | |
See all releases |
Code changes from version 0.3 to 0.5
- ecwid-shopping-cart.php +147 -100
- readme.txt +11 -2
ecwid-shopping-cart.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/*
|
3 |
Plugin Name: Ecwid Shopping Cart
|
4 |
Plugin URI: http://www.ecwid.com/
|
5 |
-
Description: Ecwid is free full-fledged 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: 0.
|
8 |
Author URI: http://www.ecwid.com/
|
9 |
*/
|
10 |
|
@@ -27,15 +27,17 @@ add_shortcode('ecwid_productbrowser', 'ecwid_productbrowser_shortcode');
|
|
27 |
|
28 |
|
29 |
function ecwid_script_shortcode() {
|
|
|
30 |
$store_id = get_ecwid_store_id();
|
31 |
-
$s = "<div><script type=\"text/javascript\" src=\"
|
32 |
return $s;
|
33 |
}
|
34 |
|
35 |
|
36 |
function ecwid_minicart_shortcode() {
|
37 |
$ecwid_enable_minicart = get_option('ecwid_enable_minicart');
|
38 |
-
|
|
|
39 |
$s = <<<EOT
|
40 |
<div><script type="text/javascript"> xMinicart("style=","layout=attachToCategories"); </script></div>
|
41 |
EOT;
|
@@ -72,12 +74,6 @@ function ecwid_productbrowser_shortcode() {
|
|
72 |
$store_id = get_ecwid_store_id();
|
73 |
$list_of_views = array('list','grid','table');
|
74 |
|
75 |
-
/*
|
76 |
-
$ecwid_pb_itemsperrow = get_option('ecwid_pb_itemsperrow');
|
77 |
-
$ecwid_pb_itemsperpage = get_option('ecwid_pb_itemsperpage');
|
78 |
-
$ecwid_pb_searchresultsitemsperpage = get_option('ecwid_pb_searchresultsitemsperpage');
|
79 |
-
*/
|
80 |
-
|
81 |
$ecwid_pb_categoriesperrow = get_option('ecwid_pb_categoriesperrow');
|
82 |
$ecwid_pb_productspercolumn_grid = get_option('ecwid_pb_productspercolumn_grid');
|
83 |
$ecwid_pb_productsperrow_grid = get_option('ecwid_pb_productsperrow_grid');
|
@@ -86,6 +82,9 @@ function ecwid_productbrowser_shortcode() {
|
|
86 |
$ecwid_pb_defaultview = get_option('ecwid_pb_defaultview');
|
87 |
$ecwid_pb_searchview = get_option('ecwid_pb_searchview');
|
88 |
|
|
|
|
|
|
|
89 |
if (empty($ecwid_pb_categoriesperrow)) {
|
90 |
$ecwid_pb_categoriesperrow = 3;
|
91 |
}
|
@@ -109,20 +108,20 @@ function ecwid_productbrowser_shortcode() {
|
|
109 |
$ecwid_pb_searchview = 'list';
|
110 |
}
|
111 |
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
if (empty($ecwid_pb_itemsperpage))
|
117 |
-
$ecwid_pb_itemsperpage = 6;
|
118 |
|
119 |
-
if (empty($
|
120 |
-
|
121 |
-
|
|
|
|
|
122 |
|
|
|
123 |
$s = <<<EOT
|
124 |
-
<div> <script type="text/javascript"> xProductBrowser("categoriesPerRow=$ecwid_pb_categoriesperrow","views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)","categoryView=$ecwid_pb_defaultview","searchView=$ecwid_pb_searchview","style=");</script></div>
|
125 |
-
<noscript>Your browser does not support JavaScript.<a href="
|
126 |
EOT;
|
127 |
return $s;
|
128 |
}
|
@@ -137,17 +136,13 @@ function ecwid_store_activate() {
|
|
137 |
<!-- Ecwid code end -->
|
138 |
|
139 |
EOT;
|
140 |
-
|
141 |
-
|
142 |
|
143 |
add_option("ecwid_enable_minicart", 'Y', '', 'yes');
|
144 |
add_option("ecwid_show_categories", 'Y', '', 'yes');
|
145 |
add_option("ecwid_show_search_box", '', '', 'yes');
|
146 |
|
147 |
-
/* old */
|
148 |
-
#add_option("ecwid_pb_itemsperrow", '3', '', 'yes');
|
149 |
-
#add_option("ecwid_pb_itemsperpage", '6', '', 'yes');
|
150 |
-
#add_option("ecwid_pb_searchresultsitemsperpage", '10', '', 'yes');
|
151 |
|
152 |
add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
|
153 |
|
@@ -159,6 +154,12 @@ EOT;
|
|
159 |
add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
|
160 |
add_option("ecwid_pb_searchview", 'list', '', 'yes');
|
161 |
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
$id = get_option("ecwid_store_page_id");
|
163 |
$_tmp_page = null;
|
164 |
if (!empty($id) and ($id > 0)) {
|
@@ -224,14 +225,10 @@ function ecwid_settings_api_init() {
|
|
224 |
register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval');
|
225 |
register_setting('ecwid_options_page', 'ecwid_pb_defaultview');
|
226 |
register_setting('ecwid_options_page', 'ecwid_pb_searchview');
|
227 |
-
|
228 |
-
|
229 |
-
register_setting('ecwid_options_page', '
|
230 |
-
register_setting('ecwid_options_page', '
|
231 |
-
register_setting('ecwid_options_page', 'ecwid_pb_searchresultsitemsperpage','intval');
|
232 |
-
*/
|
233 |
-
|
234 |
-
|
235 |
}
|
236 |
|
237 |
function ecwid_options_add_page() {
|
@@ -243,11 +240,6 @@ function ecwid_options_do_page() {
|
|
243 |
$ecwid_enable_minicart = get_option('ecwid_enable_minicart');
|
244 |
$ecwid_show_categories = get_option('ecwid_show_categories');
|
245 |
$ecwid_show_search_box = get_option('ecwid_show_search_box');
|
246 |
-
/*
|
247 |
-
$ecwid_pb_itemsperrow = get_option('ecwid_pb_itemsperrow');
|
248 |
-
$ecwid_pb_itemsperpage = get_option('ecwid_pb_itemsperpage');
|
249 |
-
$ecwid_pb_searchresultsitemsperpage = get_option('ecwid_pb_searchresultsitemsperpage');
|
250 |
-
*/
|
251 |
|
252 |
$ecwid_pb_categoriesperrow = get_option('ecwid_pb_categoriesperrow');
|
253 |
$ecwid_pb_productspercolumn_grid = get_option('ecwid_pb_productspercolumn_grid');
|
@@ -256,6 +248,12 @@ function ecwid_options_do_page() {
|
|
256 |
$ecwid_pb_productsperpage_table = get_option('ecwid_pb_productsperpage_table');
|
257 |
$ecwid_pb_defaultview = get_option('ecwid_pb_defaultview');
|
258 |
$ecwid_pb_searchview = get_option('ecwid_pb_searchview');
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
261 |
$_tmp_page = null;
|
@@ -279,53 +277,61 @@ function ecwid_options_do_page() {
|
|
279 |
<form method="post" action="options.php">
|
280 |
<?php settings_fields('ecwid_options_page'); ?>
|
281 |
<table class="form-table">
|
282 |
-
|
|
|
283 |
<td><input type="text" name="ecwid_store_id" value="<?php if ($store_id != 1003) echo $store_id; ?>" /></td>
|
284 |
</tr>
|
285 |
-
|
286 |
-
|
287 |
-
<
|
288 |
-
Enable minicart attached to categories?</th>
|
289 |
-
<td><input type="checkbox" name="ecwid_enable_minicart" <?php if (!empty($ecwid_enable_minicart)) echo "checked=\"checked\"";?> <? echo $disabled_str; ?> />
|
290 |
-
<small>(If you added minicart to your blog's sidebar, please disable this option)</small>
|
291 |
-
|
292 |
</td>
|
293 |
</tr>
|
294 |
<tr><th scope="row">
|
295 |
-
Show
|
296 |
-
|
297 |
</td>
|
298 |
</tr>
|
299 |
-
|
300 |
<tr><th scope="row">
|
301 |
-
|
302 |
-
<td><input type="checkbox" name="
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
303 |
</td>
|
304 |
</tr>
|
305 |
|
306 |
-
|
307 |
-
<td><input type="text" name="ecwid_pb_categoriesperrow" value="<?php echo $ecwid_pb_categoriesperrow; ?>" <?php echo $disabled_str;?> /></td>
|
308 |
-
</tr>
|
309 |
|
310 |
-
<tr><th scope="row">
|
311 |
-
<td><input type="text" name="
|
312 |
-
</tr>
|
313 |
|
314 |
-
<
|
|
|
|
|
|
|
|
|
|
|
315 |
</tr>
|
316 |
|
317 |
-
<tr><th scope="row">Products per page in list mode</th>
|
318 |
-
<td><input type="text" name="ecwid_pb_productsperpage_list" value="<?php echo $ecwid_pb_productsperpage_list; ?>" <?php echo $disabled_str;?> /></td>
|
319 |
</tr>
|
320 |
|
321 |
-
<tr><th scope="row">Products per page in table mode</th>
|
322 |
-
<td><input type="text" name="ecwid_pb_productsperpage_table" value="<?php echo $ecwid_pb_productsperpage_table; ?>" <?php echo $disabled_str;?> /></td>
|
323 |
</tr>
|
324 |
|
325 |
|
326 |
-
<tr><th scope="row">Default view mode on product pages</th>
|
327 |
<td>
|
328 |
-
<select name="ecwid_pb_defaultview" <?php echo $disabled_str;?> >
|
329 |
<option value="grid" <?php if($ecwid_pb_defaultview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
|
330 |
<option value="list" <?php if($ecwid_pb_defaultview == 'list') echo 'selected="selected"' ?> >List mode</option>
|
331 |
<option value="table" <?php if($ecwid_pb_defaultview == 'table') echo 'selected="selected"' ?> >Table mode</option>
|
@@ -333,15 +339,43 @@ Enable minicart attached to categories?</th>
|
|
333 |
</td>
|
334 |
</tr>
|
335 |
|
336 |
-
<tr><th scope="row">Default view mode on search results</th>
|
337 |
<td>
|
338 |
-
<select name="ecwid_pb_searchview" <?php echo $disabled_str;?> >
|
339 |
<option value="grid" <?php if($ecwid_pb_searchview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
|
340 |
<option value="list" <?php if($ecwid_pb_searchview == 'list') echo 'selected="selected"' ?> >List mode</option>
|
341 |
<option value="table" <?php if($ecwid_pb_searchview == 'table') echo 'selected="selected"' ?> >Table mode</option>
|
342 |
</select>
|
343 |
</td>
|
344 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
</table>
|
346 |
<p class="submit">
|
347 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
@@ -411,27 +445,29 @@ with these ones:
|
|
411 |
}
|
412 |
|
413 |
?>
|
414 |
-
<div id="ecwid-instruction" >
|
415 |
-
<h4>Instruction on how to get your free Store ID</h4>
|
416 |
-
<ul style="padding-left:30px;list-style-type:disc;" id="ecwid-instruction-ul">
|
417 |
-
<li>Go to the <a href="https://my.ecwid.com/cp/#register" target="_blank">Ecwid control panel</a>. Open this URL: <a href="https://my.ecwid.com/cp/#register" target="_blank">https://my.ecwid.com/cp/#register</a>. You will get to 'Sign in or Register' form.</li>
|
418 |
-
<li> Register an account at Ecwid. Use section "Using Ecwid account" for that. The registration is free.<br />
|
419 |
-
Or you can login using your account at Gmail, Facebook, Twitter, Yahoo, or another provider. Choose one from the list of the providers (click on 'More providers' if you don't see your provider there). Click on the provider logo, you will be redirected to the account login page. Submit your username/password there to login to your Ecwid.
|
420 |
-
<br />
|
421 |
-
Note: the login might take several seconds. Please, be patient.</li>
|
422 |
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
<
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
</div>
|
|
|
|
|
|
|
435 |
</form>
|
436 |
|
437 |
|
@@ -441,26 +477,34 @@ with these ones:
|
|
441 |
}
|
442 |
|
443 |
function get_ecwid_store_id() {
|
|
|
|
|
444 |
$store_id = get_option('ecwid_store_id');
|
445 |
if (empty($store_id))
|
446 |
-
|
|
|
447 |
return $store_id;
|
448 |
}
|
449 |
|
450 |
-
function
|
451 |
-
|
452 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
453 |
}
|
454 |
-
|
455 |
-
|
456 |
function ecwid_dashboard_widget_function() {
|
457 |
-
echo "<a href=\"https://my.ecwid.com/\" target=\"_blank\">Go to the Ecwid Control Panel</a>";
|
458 |
}
|
459 |
|
460 |
-
// Create the function use in the action hook
|
461 |
-
|
462 |
function ecwid_add_dashboard_widgets() {
|
463 |
-
wp_add_dashboard_widget('ecwid_dashboard_widget','Ecwid
|
464 |
}
|
465 |
|
466 |
|
@@ -482,7 +526,8 @@ class EcwidMinicartWidget extends WP_Widget {
|
|
482 |
echo $before_title . $title . $after_title;
|
483 |
|
484 |
$store_id = get_ecwid_store_id();
|
485 |
-
|
|
|
486 |
|
487 |
|
488 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
@@ -532,7 +577,8 @@ class EcwidSearchWidget extends WP_Widget {
|
|
532 |
echo $before_title . $title . $after_title;
|
533 |
|
534 |
$store_id = get_ecwid_store_id();
|
535 |
-
|
|
|
536 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
537 |
$page_url = get_page_link($ecwid_page_id);
|
538 |
$_tmp_page = get_page($ecwid_page_id);
|
@@ -580,7 +626,8 @@ class EcwidVCategoriesWidget extends WP_Widget {
|
|
580 |
echo $before_title . $title . $after_title;
|
581 |
|
582 |
$store_id = get_ecwid_store_id();
|
583 |
-
|
|
|
584 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
585 |
$page_url = get_page_link($ecwid_page_id);
|
586 |
$_tmp_page = get_page($ecwid_page_id);
|
2 |
/*
|
3 |
Plugin Name: Ecwid Shopping Cart
|
4 |
Plugin URI: http://www.ecwid.com/
|
5 |
+
Description: Ecwid is a free full-fledged 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: 0.5
|
8 |
Author URI: http://www.ecwid.com/
|
9 |
*/
|
10 |
|
27 |
|
28 |
|
29 |
function ecwid_script_shortcode() {
|
30 |
+
$ecwid_protocol = get_ecwid_protocol();
|
31 |
$store_id = get_ecwid_store_id();
|
32 |
+
$s = "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://app.ecwid.com/script.js?$store_id\"></script></div>";
|
33 |
return $s;
|
34 |
}
|
35 |
|
36 |
|
37 |
function ecwid_minicart_shortcode() {
|
38 |
$ecwid_enable_minicart = get_option('ecwid_enable_minicart');
|
39 |
+
$ecwid_show_categories = get_option('ecwid_show_categories');
|
40 |
+
if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) {
|
41 |
$s = <<<EOT
|
42 |
<div><script type="text/javascript"> xMinicart("style=","layout=attachToCategories"); </script></div>
|
43 |
EOT;
|
74 |
$store_id = get_ecwid_store_id();
|
75 |
$list_of_views = array('list','grid','table');
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$ecwid_pb_categoriesperrow = get_option('ecwid_pb_categoriesperrow');
|
78 |
$ecwid_pb_productspercolumn_grid = get_option('ecwid_pb_productspercolumn_grid');
|
79 |
$ecwid_pb_productsperrow_grid = get_option('ecwid_pb_productsperrow_grid');
|
82 |
$ecwid_pb_defaultview = get_option('ecwid_pb_defaultview');
|
83 |
$ecwid_pb_searchview = get_option('ecwid_pb_searchview');
|
84 |
|
85 |
+
$ecwid_mobile_catalog_link = get_option('ecwid_mobile_catalog_link');
|
86 |
+
$ecwid_default_category_id = get_option('ecwid_default_category_id');
|
87 |
+
|
88 |
if (empty($ecwid_pb_categoriesperrow)) {
|
89 |
$ecwid_pb_categoriesperrow = 3;
|
90 |
}
|
108 |
$ecwid_pb_searchview = 'list';
|
109 |
}
|
110 |
|
111 |
+
if (empty($ecwid_mobile_catalog_link)) {
|
112 |
+
$ecwid_mobile_catalog_link = "http://app.ecwid.com/jsp/{$store_id}/catalog";
|
113 |
+
}
|
|
|
|
|
|
|
114 |
|
115 |
+
if (empty($ecwid_default_category_id)) {
|
116 |
+
$ecwid_default_category_str = '';
|
117 |
+
} else {
|
118 |
+
$ecwid_default_category_str = ',"defaultCategoryId='. $ecwid_default_category_id .'"';
|
119 |
+
}
|
120 |
|
121 |
+
|
122 |
$s = <<<EOT
|
123 |
+
<div> <script type="text/javascript"> xProductBrowser("categoriesPerRow=$ecwid_pb_categoriesperrow","views=grid($ecwid_pb_productspercolumn_grid,$ecwid_pb_productsperrow_grid) list($ecwid_pb_productsperpage_list) table($ecwid_pb_productsperpage_table)","categoryView=$ecwid_pb_defaultview","searchView=$ecwid_pb_searchview","style="$ecwid_default_category_str);</script></div>
|
124 |
+
<noscript>Your browser does not support JavaScript.<a href="{$ecwid_mobile_catalog_link}">HTML version of this store</a></noscript>
|
125 |
EOT;
|
126 |
return $s;
|
127 |
}
|
136 |
<!-- Ecwid code end -->
|
137 |
|
138 |
EOT;
|
139 |
+
add_option("ecwid_store_page_id", '', '', 'yes');
|
140 |
+
add_option("ecwid_store_id", '1003', '', 'yes');
|
141 |
|
142 |
add_option("ecwid_enable_minicart", 'Y', '', 'yes');
|
143 |
add_option("ecwid_show_categories", 'Y', '', 'yes');
|
144 |
add_option("ecwid_show_search_box", '', '', 'yes');
|
145 |
|
|
|
|
|
|
|
|
|
146 |
|
147 |
add_option("ecwid_pb_categoriesperrow", '3', '', 'yes');
|
148 |
|
154 |
add_option("ecwid_pb_defaultview", 'grid', '', 'yes');
|
155 |
add_option("ecwid_pb_searchview", 'list', '', 'yes');
|
156 |
|
157 |
+
add_option("ecwid_enable_ssl", '', '', 'yes');
|
158 |
+
|
159 |
+
add_option("ecwid_mobile_catalog_link", '', '', 'yes');
|
160 |
+
add_option("ecwid_default_category_id", '', '', 'yes');
|
161 |
+
|
162 |
+
|
163 |
$id = get_option("ecwid_store_page_id");
|
164 |
$_tmp_page = null;
|
165 |
if (!empty($id) and ($id > 0)) {
|
225 |
register_setting('ecwid_options_page', 'ecwid_pb_productsperpage_table', 'ecwid_abs_intval');
|
226 |
register_setting('ecwid_options_page', 'ecwid_pb_defaultview');
|
227 |
register_setting('ecwid_options_page', 'ecwid_pb_searchview');
|
228 |
+
register_setting('ecwid_options_page', 'ecwid_enable_ssl');
|
229 |
+
|
230 |
+
register_setting('ecwid_options_page', 'ecwid_mobile_catalog_link');
|
231 |
+
register_setting('ecwid_options_page', 'ecwid_default_category_id');
|
|
|
|
|
|
|
|
|
232 |
}
|
233 |
|
234 |
function ecwid_options_add_page() {
|
240 |
$ecwid_enable_minicart = get_option('ecwid_enable_minicart');
|
241 |
$ecwid_show_categories = get_option('ecwid_show_categories');
|
242 |
$ecwid_show_search_box = get_option('ecwid_show_search_box');
|
|
|
|
|
|
|
|
|
|
|
243 |
|
244 |
$ecwid_pb_categoriesperrow = get_option('ecwid_pb_categoriesperrow');
|
245 |
$ecwid_pb_productspercolumn_grid = get_option('ecwid_pb_productspercolumn_grid');
|
248 |
$ecwid_pb_productsperpage_table = get_option('ecwid_pb_productsperpage_table');
|
249 |
$ecwid_pb_defaultview = get_option('ecwid_pb_defaultview');
|
250 |
$ecwid_pb_searchview = get_option('ecwid_pb_searchview');
|
251 |
+
|
252 |
+
$ecwid_mobile_catalog_link = get_option('ecwid_mobile_catalog_link');
|
253 |
+
$ecwid_default_category_id = get_option('ecwid_default_category_id');
|
254 |
+
|
255 |
+
|
256 |
+
$ecwid_enable_ssl = get_option('ecwid_enable_ssl');
|
257 |
|
258 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
259 |
$_tmp_page = null;
|
277 |
<form method="post" action="options.php">
|
278 |
<?php settings_fields('ecwid_options_page'); ?>
|
279 |
<table class="form-table">
|
280 |
+
<tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">General</h3></th></tr>
|
281 |
+
<tr><th scope="row"><a href="http://kb.ecwid.com/Instruction-on-how-to-get-your-free-Store-ID-(for-WordPress)" target="_blank">Store ID</a>:</th>
|
282 |
<td><input type="text" name="ecwid_store_id" value="<?php if ($store_id != 1003) echo $store_id; ?>" /></td>
|
283 |
</tr>
|
284 |
+
<tr><th scope="row">
|
285 |
+
<label for="ecwid_show_categories">Show horizontal categories?</label> </th>
|
286 |
+
<td><input type="checkbox" id="ecwid_show_categories" name="ecwid_show_categories" <?php if (!empty($ecwid_show_categories)) echo "checked=\"checked\""; echo $disabled_str; ?> />
|
|
|
|
|
|
|
|
|
287 |
</td>
|
288 |
</tr>
|
289 |
<tr><th scope="row">
|
290 |
+
<label for="ecwid_show_search_box">Show search box?</label> </th>
|
291 |
+
<td><input type="checkbox" id="ecwid_show_search_box" name="ecwid_show_search_box" <?php if (!empty($ecwid_show_search_box)) echo "checked=\"checked\"";?> <?php echo $disabled_str;?> />
|
292 |
</td>
|
293 |
</tr>
|
294 |
+
|
295 |
<tr><th scope="row">
|
296 |
+
<label for="ecwid_enable_minicart">Enable minicart attached to horizontal categories?</label></th>
|
297 |
+
<td><input type="checkbox" name="ecwid_enable_minicart" id="ecwid_enable_minicart" <?php if (!empty($ecwid_enable_minicart) && !empty($ecwid_show_categories)) echo "checked=\"checked\"";?>
|
298 |
+
<? if (empty($ecwid_show_categories)) {
|
299 |
+
echo 'disabled = "disabled"';
|
300 |
+
}
|
301 |
+
else {
|
302 |
+
echo $disabled_str;
|
303 |
+
} ?> />
|
304 |
+
<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt=""> If you added minicart to your blog's sidebar, please disable this option.
|
305 |
+
|
306 |
</td>
|
307 |
</tr>
|
308 |
|
309 |
+
<tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">Appearance</h3></th></tr>
|
|
|
|
|
310 |
|
311 |
+
<tr><th scope="row"><label for="ecwid_pb_categoriesperrow">Categories per row</label></th>
|
312 |
+
<td><input type="text" id="ecwid_pb_categoriesperrow" name="ecwid_pb_categoriesperrow" value="<?php echo $ecwid_pb_categoriesperrow; ?>" <?php echo $disabled_str;?> /></td>
|
313 |
+
</tr>
|
314 |
|
315 |
+
<tr><th scope="row"><label for="ecwid_pb_productspercolumn_grid">Products per column in grid mode</th>
|
316 |
+
<td><input type="text" id="ecwid_pb_productspercolumn_grid" name="ecwid_pb_productspercolumn_grid" value="<?php echo $ecwid_pb_productspercolumn_grid; ?>" <?php echo $disabled_str;?> /></td>
|
317 |
+
</tr>
|
318 |
+
|
319 |
+
<tr><th scope="row"><label for="ecwid_pb_productsperrow_grid">Products per row in grid mode</label></th>
|
320 |
+
<td><input type="text" id="ecwid_pb_productsperrow_grid" name="ecwid_pb_productsperrow_grid" value="<?php echo $ecwid_pb_productsperrow_grid; ?>" <?php echo $disabled_str;?> /></td>
|
321 |
</tr>
|
322 |
|
323 |
+
<tr><th scope="row"><label for="ecwid_pb_productsperpage_list">Products per page in list mode</label></th>
|
324 |
+
<td><input type="text" id="ecwid_pb_productsperpage_list" name="ecwid_pb_productsperpage_list" value="<?php echo $ecwid_pb_productsperpage_list; ?>" <?php echo $disabled_str;?> /></td>
|
325 |
</tr>
|
326 |
|
327 |
+
<tr><th scope="row"><label for="ecwid_pb_productsperpage_table">Products per page in table mode</label></th>
|
328 |
+
<td><input type="text" id="ecwid_pb_productsperpage_table" name="ecwid_pb_productsperpage_table" value="<?php echo $ecwid_pb_productsperpage_table; ?>" <?php echo $disabled_str;?> /></td>
|
329 |
</tr>
|
330 |
|
331 |
|
332 |
+
<tr><th scope="row"><label for="ecwid_pb_defaultview">Default view mode on product pages</label></th>
|
333 |
<td>
|
334 |
+
<select id="ecwid_pb_defaultview" name="ecwid_pb_defaultview" <?php echo $disabled_str;?> >
|
335 |
<option value="grid" <?php if($ecwid_pb_defaultview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
|
336 |
<option value="list" <?php if($ecwid_pb_defaultview == 'list') echo 'selected="selected"' ?> >List mode</option>
|
337 |
<option value="table" <?php if($ecwid_pb_defaultview == 'table') echo 'selected="selected"' ?> >Table mode</option>
|
339 |
</td>
|
340 |
</tr>
|
341 |
|
342 |
+
<tr><th scope="row"><label for="ecwid_pb_searchview">Default view mode on search results</label></th>
|
343 |
<td>
|
344 |
+
<select id="ecwid_pb_searchview" name="ecwid_pb_searchview" <?php echo $disabled_str;?> >
|
345 |
<option value="grid" <?php if($ecwid_pb_searchview == 'grid') echo 'selected="selected"' ?> >Grid mode</option>
|
346 |
<option value="list" <?php if($ecwid_pb_searchview == 'list') echo 'selected="selected"' ?> >List mode</option>
|
347 |
<option value="table" <?php if($ecwid_pb_searchview == 'table') echo 'selected="selected"' ?> >Table mode</option>
|
348 |
</select>
|
349 |
</td>
|
350 |
</tr>
|
351 |
+
|
352 |
+
<tr><th colspan="2" style="padding:0px;margin:0px;"><h3 style="padding:0px;margin:0px;">Advanced</h3></th></tr>
|
353 |
+
|
354 |
+
<tr><th scope="row"><label for="ecwid_enable_ssl">
|
355 |
+
Enable the following option, if you use Ecwid on a secure HTTPS page</label>
|
356 |
+
</th>
|
357 |
+
<td><input id="ecwid_enable_ssl" type="checkbox" name="ecwid_enable_ssl" <?php if (!empty($ecwid_enable_ssl)) echo "checked=\"checked\"";?> />
|
358 |
+
<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt=""> <a href="http://kb.ecwid.com/SSL-HTTPS" target="_blank">Information about Ecwid and SSL/HTTPS</a>
|
359 |
+
|
360 |
+
</td> </tr>
|
361 |
+
|
362 |
+
<tr><th scope="row"><label for="ecwid_mobile_catalog_link">
|
363 |
+
Full link to your mobile catalog</label>
|
364 |
+
</th>
|
365 |
+
<td><input id="ecwid_mobile_catalog_link" type="text" name="ecwid_mobile_catalog_link" value="<?php echo $ecwid_mobile_catalog_link; ?>" />
|
366 |
+
<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt=""> For example <em>http://mdemo.ecwid.com</em>. <a href="http://kb.ecwid.com/Mobile-Catalog" target="_blank">Information about Ecwid and mobile catalogs.</a>
|
367 |
+
|
368 |
+
</td> </tr>
|
369 |
+
|
370 |
+
<tr><th scope="row"><label for="ecwid_default_category_id">
|
371 |
+
Default category ID</label>
|
372 |
+
</th>
|
373 |
+
<td><input id="ecwid_default_category_id" type="text" name="ecwid_default_category_id" value="<?php echo $ecwid_default_category_id; ?>"/>
|
374 |
+
<img src="//www.ecwid.com/wp-content/uploads/ecwid_wp_attention.gif" alt=""> <a href="http://kb.ecwid.com/Default-category-for-product-browser" target="_blank">What is it?</a>
|
375 |
+
|
376 |
+
</td> </tr>
|
377 |
+
|
378 |
+
|
379 |
</table>
|
380 |
<p class="submit">
|
381 |
<input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
|
445 |
}
|
446 |
|
447 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
448 |
|
449 |
+
<?php
|
450 |
+
if ($store_id == '1003') {
|
451 |
+
?>
|
452 |
+
<div id="ecwid-instruction" >
|
453 |
+
<h4>Instruction on how to get your free Store ID</h4>
|
454 |
+
<ul style="padding-left:30px;list-style-type:disc;" id="ecwid-instruction-ul">
|
455 |
+
<li>Go to the <a target="_blank" href="https://my.ecwid.com/cp/#register">Ecwid control panel</a>. Open this URL: <a target="_blank" href="https://my.ecwid.com/cp/#register">https://my.ecwid.com/cp/#register</a>. You will get to 'Sign In or Register' form.</li>
|
456 |
+
<li>Register an account at Ecwid. Use section "Using Ecwid account" for that. The registration is free.
|
457 |
+
<p>Or you can log in using your account at Gmail, Facebook, Twitter, Yahoo, or another provider. Choose one from the list of the providers (click on 'More providers' if you don't see your provider there). Click on the provider logo, you will be redirected to the account login page. Submit your username/password there to login to your Ecwid.</p>
|
458 |
+
<p>Note: the login might take several seconds. Please, be patient.</p>
|
459 |
+
</li>
|
460 |
+
<li>Look at the right bottom corner of the page.</li>
|
461 |
+
<li>You will see the <span style="background-color:#d3e9e9;">"Store ID: <strong>NNNNNN</strong>"</span> text, where <strong>NNNNNN</strong> is your <strong>Store ID</strong>.<br />
|
462 |
+
<p>For example if the text is <span style="background-color:#d3e9e9;">Store ID:</span> <strong><span style="background-color:#d3e9e9;">1003</span></strong>, your Store ID is <strong>1003</strong>. </p><br />
|
463 |
+
You will also get your Store ID by email.
|
464 |
+
</li>
|
465 |
+
</ul>
|
466 |
+
<p>If you have any questions, feel free to ask them on <a href="http://www.ecwid.com/forums/">Ecwid forums</a> or <a href="http://www.ecwid.com/contact-us.html">contact Ecwid team</a>.</p>
|
467 |
</div>
|
468 |
+
<?php
|
469 |
+
}
|
470 |
+
?>
|
471 |
</form>
|
472 |
|
473 |
|
477 |
}
|
478 |
|
479 |
function get_ecwid_store_id() {
|
480 |
+
static $store_id = null;
|
481 |
+
if (is_null($store_id)) {
|
482 |
$store_id = get_option('ecwid_store_id');
|
483 |
if (empty($store_id))
|
484 |
+
$store_id = 1003;
|
485 |
+
}
|
486 |
return $store_id;
|
487 |
}
|
488 |
|
489 |
+
function get_ecwid_protocol() {
|
490 |
+
static $ecwid_enable_ssl = null;
|
491 |
+
if (is_null($ecwid_enable_ssl)) {
|
492 |
+
$ecwid_enable_ssl = get_option('ecwid_enable_ssl');
|
493 |
+
}
|
494 |
+
if (empty($ecwid_enable_ssl)) {
|
495 |
+
return "http";
|
496 |
+
}
|
497 |
+
else {
|
498 |
+
return "https";
|
499 |
+
}
|
500 |
}
|
501 |
+
|
|
|
502 |
function ecwid_dashboard_widget_function() {
|
503 |
+
echo "<a href=\"https://my.ecwid.com/\" target=\"_blank\">Go to the Ecwid Control Panel</a><br /><br /><a href=\"http://kb.ecwid.com/\" target=\"_blank\">Ecwid Knowledge Base</a> | <a href=\"http://www.ecwid.com/forums/\" target=\"_blank\">Ecwid Forums</a>";
|
504 |
}
|
505 |
|
|
|
|
|
506 |
function ecwid_add_dashboard_widgets() {
|
507 |
+
wp_add_dashboard_widget('ecwid_dashboard_widget','Ecwid Links', 'ecwid_dashboard_widget_function');
|
508 |
}
|
509 |
|
510 |
|
526 |
echo $before_title . $title . $after_title;
|
527 |
|
528 |
$store_id = get_ecwid_store_id();
|
529 |
+
$ecwid_protocol = get_ecwid_protocol();
|
530 |
+
echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://app.ecwid.com/script.js?$store_id\"></script>";
|
531 |
|
532 |
|
533 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
577 |
echo $before_title . $title . $after_title;
|
578 |
|
579 |
$store_id = get_ecwid_store_id();
|
580 |
+
$ecwid_protocol = get_ecwid_protocol();
|
581 |
+
echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://app.ecwid.com/script.js?$store_id\"></script>";
|
582 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
583 |
$page_url = get_page_link($ecwid_page_id);
|
584 |
$_tmp_page = get_page($ecwid_page_id);
|
626 |
echo $before_title . $title . $after_title;
|
627 |
|
628 |
$store_id = get_ecwid_store_id();
|
629 |
+
$ecwid_protocol = get_ecwid_protocol();
|
630 |
+
echo "<div><script type=\"text/javascript\" src=\"$ecwid_protocol://app.ecwid.com/script.js?$store_id\"></script>";
|
631 |
$ecwid_page_id = get_option("ecwid_store_page_id");
|
632 |
$page_url = get_page_link($ecwid_page_id);
|
633 |
$_tmp_page = get_page($ecwid_page_id);
|
readme.txt
CHANGED
@@ -3,13 +3,13 @@ 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: 2.9
|
6 |
-
Stable tag: 0.
|
7 |
|
8 |
Ecwid is a free full-fledged shopping cart that can easily be added to any blog
|
9 |
and takes less than 5 minutes to set up.
|
10 |
|
11 |
== Description ==
|
12 |
-
Ecwid is a free full-fledged shopping cart that can easily be
|
13 |
It offers the performance and flexibility you need,
|
14 |
with none of the hassles you don't.
|
15 |
|
@@ -39,6 +39,15 @@ Full list of features:
|
|
39 |
[http://www.ecwid.com/faq.html](http://www.ecwid.com/faq.html)
|
40 |
|
41 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
= 0.3 =
|
43 |
- [+] Ecwid integration code was updated to the last vesion
|
44 |
- [+] New product browser parameters: http://kb.ecwid.com/Product-Browser
|
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: 2.9
|
6 |
+
Stable tag: 0.5
|
7 |
|
8 |
Ecwid is a free full-fledged shopping cart that can easily be added to any blog
|
9 |
and takes less than 5 minutes to set up.
|
10 |
|
11 |
== Description ==
|
12 |
+
Ecwid is a free full-fledged shopping cart that can easily be added to any blog.
|
13 |
It offers the performance and flexibility you need,
|
14 |
with none of the hassles you don't.
|
15 |
|
39 |
[http://www.ecwid.com/faq.html](http://www.ecwid.com/faq.html)
|
40 |
|
41 |
== Changelog ==
|
42 |
+
= 0.5 =
|
43 |
+
- [+] Plugin settings page was updated.
|
44 |
+
- [+] Two new options: "Full link to your mobile catalog" and "Default category ID".
|
45 |
+
|
46 |
+
= 0.4 =
|
47 |
+
- [+] Instruction in the plugin settings was updated.
|
48 |
+
- [+] New plugin option to use on secure pages was added.
|
49 |
+
- [+] Some code tweaks and optimizations.
|
50 |
+
|
51 |
= 0.3 =
|
52 |
- [+] Ecwid integration code was updated to the last vesion
|
53 |
- [+] New product browser parameters: http://kb.ecwid.com/Product-Browser
|