-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a39e88
commit fe1a5dc
Showing
8 changed files
with
516 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
jQuery(function ($) { | ||
// Function to handle the cart update. | ||
function update_cart() { | ||
$.ajax({ | ||
type: 'POST', | ||
url: wine_shop_minimum_order_ajax_object.ajax_url, | ||
data: { | ||
action: 'wine_shop_minimum_order_update_cart', | ||
}, | ||
dataType: 'json', | ||
success: function (response) { | ||
if (response.success) { | ||
$('.woocommerce-error, .woocommerce-message').remove(); | ||
$('.woocommerce').prepend('<div class="woocommerce-message" role="alert">' + response.message + '</div>'); | ||
} else { | ||
$('.woocommerce-error, .woocommerce-message').remove(); | ||
$('.woocommerce').prepend('<div class="woocommerce-error" role="alert">' + response.message + '</div>'); | ||
} | ||
}, | ||
}); | ||
} | ||
|
||
// Update the cart when the quantity is changed. | ||
$('body').on('change', 'input.qty', function () { | ||
update_cart(); | ||
}); | ||
|
||
// Update the cart when an item is removed. | ||
$('body').on('click', 'a.remove', function () { | ||
$(document.body).on('wc_fragments_refreshed', function () { | ||
update_cart(); | ||
}); | ||
}); | ||
}); |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Wine Shop Minimum Order\n" | ||
"POT-Creation-Date: 2023-04-07 16:24+0200\n" | ||
"PO-Revision-Date: 2023-04-07 16:25+0200\n" | ||
"Last-Translator: Birgit Olzem <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: de\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.2.2\n" | ||
"X-Poedit-Basepath: ..\n" | ||
"X-Poedit-Flags-xgettext: --add-comments=translators:\n" | ||
"X-Poedit-WPHeader: wine-shop-minimum-order.php\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" | ||
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" | ||
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" | ||
"X-Poedit-SearchPath-0: .\n" | ||
"X-Poedit-SearchPathExcluded-0: *.min.js\n" | ||
|
||
#: wine-shop-minimum-order.php:74 | ||
msgid "Your cart has been updated!" | ||
msgstr "Dein Warenkorb wurde aktualisiert!" | ||
|
||
#: wine-shop-minimum-order.php:80 wine-shop-minimum-order.php:129 | ||
#, php-format | ||
msgid "You must have a multiple of %s bottles in your cart." | ||
msgstr "Die Bestellmenge in deinem Warenkorb muss durch %s teilbar sein." | ||
|
||
#. Plugin Name of the plugin/theme | ||
#: wine-shop-minimum-order.php:88 | ||
msgid "Wine Shop Minimum Order" | ||
msgstr "Weinshop Mindestbestellung" | ||
|
||
#: wine-shop-minimum-order.php:103 | ||
msgid "Wine Shop Minimum Order Settings" | ||
msgstr "Weinshop Mindestbestellung Einstellungen" | ||
|
||
#: wine-shop-minimum-order.php:109 | ||
msgid "Minimum Bottles" | ||
msgstr "Mindestanzahl Flaschen" | ||
|
||
#: wine-shop-minimum-order.php:111 | ||
msgid "Minimum number of bottles required in the cart." | ||
msgstr "Mindestanzahl von Flaschen im Warenkorb erforderlich." | ||
|
||
#: wine-shop-minimum-order.php:117 | ||
msgid "Minimum Quantity Message" | ||
msgstr "Mindestbestellmenge Nachricht" | ||
|
||
#: wine-shop-minimum-order.php:119 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart does not meet the minimum quantity. " | ||
"Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
"Individuelle Meldung, die angezeigt wird, wenn der Warenkorb die " | ||
"Mindestmenge nicht erreicht. Verwende %s als Platzhalter für die " | ||
"Mindestmenge." | ||
|
||
#: wine-shop-minimum-order.php:121 | ||
#, php-format | ||
msgid "You must have a minimum of %s bottles in your cart." | ||
msgstr "Du musst mindestens %s Flaschen in deinem Warenkorb haben." | ||
|
||
#: wine-shop-minimum-order.php:125 | ||
msgid "Divisible Quantity Message" | ||
msgstr "Mindestbestellmenge teilbar durch" | ||
|
||
#: wine-shop-minimum-order.php:127 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart quantity is not divisible by the " | ||
"minimum quantity. Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
"Individuelle Meldung, die angezeigt wird, wenn die Warenkorbmenge nicht " | ||
"durch die Mindestmenge teilbar ist. Verwende %s als Platzhalter für die " | ||
"Mindestmenge." | ||
|
||
#. Plugin URI of the plugin/theme | ||
msgid "https://coachbirgit.com/plugins/wine-shop-minimum-order" | ||
msgstr "https://coachbirgit.com/plugins/wine-shop-minimum-order" | ||
|
||
#. Description of the plugin/theme | ||
msgid "" | ||
"Enforces a minimum order quantity of wine bottles in the cart with " | ||
"customizable increments." | ||
msgstr "" | ||
"Erzwingt eine Mindestbestellmenge von Weinflaschen im Warenkorb mit " | ||
"anpassbaren Abstufungen." | ||
|
||
#. Author of the plugin/theme | ||
msgid "Birgit Olzem" | ||
msgstr "Birgit Olzem" | ||
|
||
#. Author URI of the plugin/theme | ||
msgid "https://coachbirgit.com" | ||
msgstr "https://coachbirgit.com" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Wine Shop Minimum Order\n" | ||
"POT-Creation-Date: 2023-04-07 16:17+0200\n" | ||
"PO-Revision-Date: 2023-04-07 16:26+0200\n" | ||
"Last-Translator: Birgit Olzem <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: de_DE@formal\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.2.2\n" | ||
"X-Poedit-Basepath: ..\n" | ||
"X-Poedit-Flags-xgettext: --add-comments=translators:\n" | ||
"X-Poedit-WPHeader: wine-shop-minimum-order.php\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" | ||
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" | ||
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" | ||
"X-Poedit-SearchPath-0: .\n" | ||
"X-Poedit-SearchPathExcluded-0: *.min.js\n" | ||
|
||
#: wine-shop-minimum-order.php:74 | ||
msgid "Your cart has been updated!" | ||
msgstr "Ihr Warenkorb wurde aktualisiert!" | ||
|
||
#: wine-shop-minimum-order.php:80 | ||
#, php-format | ||
msgid "You must have a multiple of %s bottles in your cart." | ||
msgstr "Die Bestellmenge in Ihrem Warenkorb muss durch %s teilbar sein." | ||
|
||
#. Plugin Name of the plugin/theme | ||
#: wine-shop-minimum-order.php:88 | ||
msgid "Wine Shop Minimum Order" | ||
msgstr "Weinshop Mindestbestellung" | ||
|
||
#: wine-shop-minimum-order.php:103 | ||
msgid "Wine Shop Minimum Order Settings" | ||
msgstr "Weinshop Mindestbestellung Einstellungen" | ||
|
||
#: wine-shop-minimum-order.php:109 | ||
msgid "Minimum Bottles" | ||
msgstr "Mindestanzahl Flaschen" | ||
|
||
#: wine-shop-minimum-order.php:111 | ||
msgid "Minimum number of bottles required in the cart." | ||
msgstr "Mindestanzahl von Flaschen im Warenkorb erforderlich." | ||
|
||
#: wine-shop-minimum-order.php:117 | ||
msgid "Minimum Quantity Message" | ||
msgstr "Mindestbestellmenge Nachricht" | ||
|
||
#: wine-shop-minimum-order.php:119 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart does not meet the minimum quantity. " | ||
"Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
"Individuelle Meldung, die angezeigt wird, wenn der Warenkorb die " | ||
"Mindestmenge nicht erreicht. Verwenden Sie %s als Platzhalter für die " | ||
"Mindestmenge." | ||
|
||
#: wine-shop-minimum-order.php:125 | ||
msgid "Divisible Quantity Message" | ||
msgstr "Mindestbestellmenge teilbar durch" | ||
|
||
#: wine-shop-minimum-order.php:127 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart quantity is not divisible by the " | ||
"minimum quantity. Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
"Individuelle Meldung, die angezeigt wird, wenn die Warenkorbmenge nicht " | ||
"durch die Mindestmenge teilbar ist. Verwenden Sie %s als Platzhalter für " | ||
"die Mindestmenge." | ||
|
||
#. Plugin URI of the plugin/theme | ||
msgid "https://coachbirgit.com/plugins/wine-shop-minimum-order" | ||
msgstr "https://coachbirgit.com/plugins/wine-shop-minimum-order" | ||
|
||
#. Description of the plugin/theme | ||
msgid "" | ||
"Enforces a minimum order quantity of wine bottles in the cart with " | ||
"customizable increments." | ||
msgstr "" | ||
"Erzwingt eine Mindestbestellmenge von Weinflaschen im Warenkorb mit " | ||
"anpassbaren Abstufungen." | ||
|
||
#. Author of the plugin/theme | ||
msgid "Birgit Olzem" | ||
msgstr "Birgit Olzem" | ||
|
||
#. Author URI of the plugin/theme | ||
msgid "https://coachbirgit.com" | ||
msgstr "https://coachbirgit.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#, fuzzy | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Wine Shop Minimum Order\n" | ||
"POT-Creation-Date: 2023-04-07 16:51+0200\n" | ||
"PO-Revision-Date: 2023-04-07 15:15+0200\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" | ||
"X-Generator: Poedit 3.2.2\n" | ||
"X-Poedit-Basepath: ..\n" | ||
"X-Poedit-Flags-xgettext: --add-comments=translators:\n" | ||
"X-Poedit-WPHeader: wine-shop-minimum-order.php\n" | ||
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;" | ||
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;" | ||
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n" | ||
"X-Poedit-SearchPath-0: .\n" | ||
"X-Poedit-SearchPathExcluded-0: *.min.js\n" | ||
|
||
#: wine-shop-minimum-order.php:74 | ||
msgid "Your cart has been updated!" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:80 wine-shop-minimum-order.php:129 | ||
#, php-format | ||
msgid "You must have a multiple of %s bottles in your cart." | ||
msgstr "" | ||
|
||
#. Plugin Name of the plugin/theme | ||
#: wine-shop-minimum-order.php:88 | ||
msgid "Wine Shop Minimum Order" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:103 | ||
msgid "Wine Shop Minimum Order Settings" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:109 | ||
msgid "Minimum Bottles" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:111 | ||
msgid "Minimum number of bottles required in the cart." | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:117 | ||
msgid "Minimum Quantity Message" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:119 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart does not meet the minimum quantity. " | ||
"Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:121 | ||
#, php-format | ||
msgid "You must have a minimum of %s bottles in your cart." | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:125 | ||
msgid "Divisible Quantity Message" | ||
msgstr "" | ||
|
||
#: wine-shop-minimum-order.php:127 | ||
#, php-format | ||
msgid "" | ||
"Custom message displayed when the cart quantity is not divisible by the " | ||
"minimum quantity. Use %s as a placeholder for the minimum quantity." | ||
msgstr "" | ||
|
||
#. Plugin URI of the plugin/theme | ||
msgid "https://coachbirgit.com/plugins/wine-shop-minimum-order" | ||
msgstr "" | ||
|
||
#. Description of the plugin/theme | ||
msgid "" | ||
"Enforces a minimum order quantity of wine bottles in the cart with " | ||
"customizable increments." | ||
msgstr "" | ||
|
||
#. Author of the plugin/theme | ||
msgid "Birgit Olzem" | ||
msgstr "" | ||
|
||
#. Author URI of the plugin/theme | ||
msgid "https://coachbirgit.com" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
=== Wine Shop Minimum Order === | ||
Contributors: coachbirgit | ||
Tags: woocommerce, wine, shop, minimum order, quantity, winery, environment-friendly | ||
Requires at least: 5.3 | ||
Tested up to: 6.2.x | ||
Requires PHP: 7.4 | ||
Stable tag: 1.0.0 | ||
License: GPLv2 or later | ||
License URI: https://www.gnu.org/licenses/gpl-2.0.html | ||
|
||
A WooCommerce plugin that enforces a minimum order quantity of wine bottles in the cart with customizable increments, designed for wineries and wine shops looking to optimize their sales process and contribute to a greener environment. | ||
|
||
== Description == | ||
|
||
Wine Shop Minimum Order is a WooCommerce plugin tailored specifically for winery owners and wine shops aiming to streamline their online sales process while ensuring environment-friendly shipping solutions. By enforcing a minimum order quantity of wine bottles in the cart, the plugin makes it easier for customers to order in cartons containing six bottles each, reducing packaging waste and environmental impact. | ||
|
||
The plugin provides an easy-to-use settings page under the WooCommerce settings tab, allowing the shop owner to set the minimum number of bottles required in an order, as well as custom validation messages for minimum and divisible quantities. With Wine Shop Minimum Order, you can offer a more sustainable shopping experience for your customers and optimize your winery's online sales process. | ||
|
||
**Features:** | ||
|
||
1. Enforce a minimum order quantity of wine bottles in the cart with customizable increments. | ||
2. Set custom validation messages for minimum and divisible quantities. | ||
3. Seamlessly integrate the plugin with your WooCommerce store. | ||
4. Contribute to a greener environment with environment-friendly shipping. | ||
5. Easily configure the plugin through a dedicated settings page under the WooCommerce settings tab. | ||
|
||
== Installation == | ||
|
||
1. Upload the `wine-shop-minimum-order` folder to the `/wp-content/plugins/` directory. | ||
2. Activate the plugin through the 'Plugins' menu in WordPress. | ||
3. Go to WooCommerce -> Settings -> Wine Shop Minimum Order and configure the settings. | ||
|
||
== Frequently Asked Questions == | ||
|
||
= Is this plugin compatible with the latest version of WooCommerce? = | ||
|
||
Yes, this plugin is tested up to WooCommerce 7.5.x. | ||
|
||
= Can I change the minimum number of bottles required in an order? = | ||
|
||
Yes, you can easily change the minimum number of bottles required by visiting the WooCommerce -> Settings -> Wine Shop Minimum Order tab and updating the 'Minimum Bottles' setting. | ||
|
||
= Can I customize the validation messages? = | ||
|
||
Yes, you can customize the validation messages for minimum and divisible quantities by visiting the WooCommerce -> Settings -> Wine Shop Minimum Order tab and updating the 'Minimum Quantity Message' and 'Divisible Quantity Message' settings. | ||
|
||
== Changelog == | ||
|
||
= 1.0.0 = | ||
* Initial release | ||
|
||
== Upgrade Notice == | ||
|
||
= 1.0.0 = | ||
Initial release |
Oops, something went wrong.