Skip to content

Commit

Permalink
Merge branch 'main' into sergeytolkachyov-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeytolkachyov authored Nov 30, 2023
2 parents ae8c981 + 587a407 commit 58ea9ac
Show file tree
Hide file tree
Showing 9 changed files with 229 additions and 212 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
.packages
.phing
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Version](https://img.shields.io/badge/Version-2.0.0-blue.svg)](https://web-tolk.ru/en/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options.html?utm_source=github) [![Status](https://img.shields.io/badge/Status-stable-green.svg)]() [![JoomlaVersion](https://img.shields.io/badge/Joomla-4.x-orange.svg)]() [![JoomlaVersion](https://img.shields.io/badge/Joomla-5.x-orange.svg)]() [![JoomShoppingVersion](https://img.shields.io/badge/JoomShopping-5.x-important.svg)]() [![DocumentationRus](https://img.shields.io/badge/Documentation-rus-blue.svg)](https://web-tolk.ru/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options.html?utm_source=github) [![DocumentationEng](https://img.shields.io/badge/Documentation-eng-blueviolet.svg)](https://web-tolk.ru/en/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options.html?utm_source=github)
[![Version](https://img.shields.io/badge/Version-2.0.0-blue.svg)](https://web-tolk.ru/en/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options?utm_source=github) [![Status](https://img.shields.io/badge/Status-stable-green.svg)]() [![JoomlaVersion](https://img.shields.io/badge/Joomla-4.x-orange.svg)]() [![JoomlaVersion](https://img.shields.io/badge/Joomla-5.x-orange.svg)]() [![JoomShoppingVersion](https://img.shields.io/badge/JoomShopping-5.x-important.svg)]() [![DocumentationRus](https://img.shields.io/badge/Documentation-rus-blue.svg)](https://web-tolk.ru/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options?utm_source=github) [![DocumentationEng](https://img.shields.io/badge/Documentation-eng-blueviolet.svg)](https://web-tolk.ru/en/dev/joomla-plugins/wt-add-products-info-to-joomla-script-options?utm_source=github)

# WT Add products info to Joomla script options
Adds JoomShopping product info to Joomla script options. You can access it from javascript via `Joomla.getOptions('jshop_products_details').` Joomla 4 and Joomla 5 (and above) support. **Warning! Joomla 3 is no longer supported!**

Expand All @@ -12,8 +13,8 @@ To create feedback forms in the online store on Joomla JoomShopping, such as:
- And so on - for all Joomla feedback forms, where you need to specify information about the product.

This plugin is necessary for those who use the professional plugin feedback form - [Radical Form on JED](https://extensions.joomla.org/extension/radicalform/), [Radical Form on GitHub](https://github.com/Delo-Design/radicalform) - in their work.
[Tutorial 1 (Russiain language)](https://web-tolk.ru/blog/razrabotka-form-obratnoj-svyazi-dlya-magazinov-na-joomla-3.html?utm_source=github)
[Tutorial 2 (Russiain language)](https://web-tolk.ru/blog/integratsiya-form-obratnoj-svyazi-i-bitriks24-na-sajte-joomla.html?utm_source=github)
[Tutorial 1 (Russiain language)](https://web-tolk.ru/blog/razrabotka-form-obratnoj-svyazi-dlya-magazinov-na-joomla-3?utm_source=github)
[Tutorial 2 (Russiain language)](https://web-tolk.ru/blog/integratsiya-form-obratnoj-svyazi-i-bitriks24-na-sajte-joomla?utm_source=github)

# Why it?
In order to make a beautiful and informative lead magnet, a feedback form that specifies the specific product in question.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_AFTER_DISCOVER_INSTALL = "Than
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_AFTER_UPDATE = "Thank you for updating extension"
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_AFTER_UNINSTALL = "We are sorry that you deleted the extension"
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_MAYBE_INTERESTING="<h4>It may be interesting</h4><ul class=\"nav nav-tabs nav-stacked list-group\"><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/web-assets\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla 4 & Joomla 5 Web Assets.</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomshopping\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">JoomShopping extensions</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-plugins\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla plugins</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-modules\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla modules</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/components\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla components</a></li><li class=\"list-group-item\"><a href=\"https://web-tolk.ru/en/dev/joomla-libraries\" target=\"_blank\" title=\"Go to https://web-tolk.ru\">Joomla libraries for developers.</a></li></ul>"
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_WHATS_NEW="<h3>v.2.0.0 What's new?</h3><h4>Joomla 5 is ready</h4><p>The plugin has been rewritten for the <strong>Joomla 4</strong>, <strong>Joomla 5</strong>. This means that the extension will work without any problems on <strong>Joomla 6</strong></p><h4>End of Joomla 3 support</h4><p>Removed support for <strong>Joomla 3.x.x</strong> versions</p><div class=\"alert alert-info\"><p style=\"text-align:center;\" class=\"alert-link\">This plugin is intended for developers. This solution is not in \"1 click\".</p></div><h2>What is it and why?</h2><h3>What is it?</h3><p>To create feedback forms in the online store on Joomla JoomShopping, such as:</p><ul><li>quick order of goods</li><li>ask a question about the product</li><li>request for a discount on an ite</li><li>wholesale price request</li></ul><p>And so on - <strong>for all Joomla feedback forms, where you need to specify information about the product.</strong></p><p>This plugin is necessary for those who use the <a class=\"text-info\" href=\"https://extensions.joomla.org/extension/radicalform/\">professional plugin feedback form - Radical Form</a> - in their work. I wrote <a class=\"text-info\" href=\"blog/integratsiya-form-obratnoj-svyazi-i-bitriks24-na-sajte-joomla.html\" target=\"_blank\">more about how to use Radical Form (in Russian)</a> in my blog.</p><h3>Why it?</h3><p>In order to make a beautiful and informative lead magnet, a feedback form that specifies the specific product in question.</p><p><span style=\"background-color: inherit; color: inherit; font-family: inherit; font-size: 1rem; caret-color: auto;\">Webmasters often get data for forms directly from the HTML layout of the site. In the case of a design change, it is easy to damage the structure on which the JS script relies and the feedback form will stop receiving data about the product.</span></p><p>This data should not depend on the design of the site. In Joomla there is a great native way to transfer data from PHP to JavaScript using a JSON object and receive it.</p><h2>Getting data about JoomShopping products for the feedback form</h2><div style=\"margin-top:15px; margin-bottom:15px; padding:10px; text-align:center;\"><code style=\"font-weight:bold\">Joomla.getOptions('your_json_object_with_data_from_php_here');</code></div><p>This way, you can get data from a JSON object. The <code>product_id</code> variable is read in advance from the button that the site visitor clicks on.</p><p><code>let jshop_products_details=Joomla.getOptions('jshop_products_details');&gt;</code><br/><code>let product_name=jshop_products_details[product_id]['product_name'];</code><br/><code>let product_price=jshop_products_details[product_id]['price'];</code><br/><code>let product_image_url=jshop_products_details[product_id]['product_image_url'];</code><br/><code>let product_ean=jshop_products_details[product_id]['ean'];</code></p><p>The plugin works in the product category, the list of products of the manufacturer, the favorite products list <a href=\"https://web-tolk.ru/en/dev/joomshopping/wt-joomshopping-favorite.html\" target=\"_blank\">WT JoomShopping Favorites</a> the single product view. The structure of the json array is the same everywhere - you don't have to write different code for different pages.</p>"
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_WHATS_NEW="<h3>v.2.0.0 What's new?</h3><h4>Joomla 5 ready</h4><p>The plugin has been rewritten for the <strong>Joomla 4</strong>, <strong>Joomla 5</strong>. This means that the extension will work without any problems on <strong>Joomla 6</strong></p><h4>End of Joomla 3 support</h4><p>Removed support for <strong>Joomla 3.x.x</strong> versions</p><div class=\"alert alert-info\"><p style=\"text-align:center;\" class=\"alert-link\">This plugin is intended for developers. This solution is not in \"1 click\".</p></div><h2>What is it and why?</h2><h3>What is it?</h3><p>To create feedback forms in the online store on Joomla JoomShopping, such as:</p><ul><li>quick order of goods</li><li>ask a question about the product</li><li>request for a discount on an ite</li><li>wholesale price request</li></ul><p>And so on - <strong>for all Joomla feedback forms, where you need to specify information about the product.</strong></p><p>This plugin is necessary for those who use the <a class=\"text-info\" href=\"https://extensions.joomla.org/extension/radicalform/\">professional plugin feedback form - Radical Form</a> - in their work. I wrote <a class=\"text-info\" href=\"blog/integratsiya-form-obratnoj-svyazi-i-bitriks24-na-sajte-joomla\" target=\"_blank\">more about how to use Radical Form (in Russian)</a> in my blog.</p><h3>Why it?</h3><p>In order to make a beautiful and informative lead magnet, a feedback form that specifies the specific product in question.</p><p><span style=\"background-color: inherit; color: inherit; font-family: inherit; font-size: 1rem; caret-color: auto;\">Webmasters often get data for forms directly from the HTML layout of the site. In the case of a design change, it is easy to damage the structure on which the JS script relies and the feedback form will stop receiving data about the product.</span></p><p>This data should not depend on the design of the site. In Joomla there is a great native way to transfer data from PHP to JavaScript using a JSON object and receive it.</p><h2>Getting data about JoomShopping products for the feedback form</h2><div style=\"margin-top:15px; margin-bottom:15px; padding:10px; text-align:center;\"><code style=\"font-weight:bold\">Joomla.getOptions('your_json_object_with_data_from_php_here');</code></div><p>This way, you can get data from a JSON object. The <code>product_id</code> variable is read in advance from the button that the site visitor clicks on.</p><p><code>let jshop_products_details=Joomla.getOptions('jshop_products_details');&gt;</code><br/><code>let product_name=jshop_products_details[product_id]['product_name'];</code><br/><code>let product_price=jshop_products_details[product_id]['price'];</code><br/><code>let product_image_url=jshop_products_details[product_id]['product_image_url'];</code><br/><code>let product_ean=jshop_products_details[product_id]['ean'];</code></p><p>The plugin works in the product category, the list of products of the manufacturer, the favorite products list <a href=\"https://web-tolk.ru/en/dev/joomshopping/wt-joomshopping-favorite.html\" target=\"_blank\">WT JoomShopping Favorites</a> the single product view. The structure of the json array is the same everywhere - you don't have to write different code for different pages.</p>"
PLG_WT_ADD_PRODUCTS_INFO_TO_JOOMLA_SCRIPT_OPTIONS_JOOMLARU_TELEGRAM_CHAT="Joomla community in Telegram"
Loading

0 comments on commit 58ea9ac

Please sign in to comment.