diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 1b297f3..0000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -src/Resources/public/administration/js/* -src/Resources/app/storefront/dist/storefront/js/ diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index a96313e..0000000 --- a/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -/.gitattributes export-ignore -/.eslintignore export-ignore -/.phpstan.neon.dist export-ignore -/psalm.xml export-ignore -/bin export-ignore diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml deleted file mode 100644 index 2182132..0000000 --- a/.github/workflows/code-style.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Code Style -on: - workflow_dispatch: - pull_request: - push: - branches: - - main - -jobs: - cs: - if: github.event_name != 'schedule' - uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main - phpstan: - uses: shopware/github-actions/.github/workflows/phpstan.yml@main - with: - extensionName: FroshTools - shopwareVersion: v6.6.0.0-rc1 diff --git a/.github/workflows/store.yml b/.github/workflows/store.yml deleted file mode 100644 index a08a547..0000000 --- a/.github/workflows/store.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Build extension -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - build: - uses: FriendsOfShopware/actions/.github/workflows/store-shopware-cli.yml@main - with: - extensionName: ${{ github.event.repository.name }} - secrets: - accountUser: ${{ secrets.ACCOUNT_USER }} - accountPassword: ${{ secrets.ACCOUNT_PASSWORD }} - ghToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100755 index 67a36c1..0000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/.idea -/.php-cs-fixer.cache -/composer.lock -src/Resources/app/storefront/dist/storefront/js/ -src/Resources/public -src/Resources/app/storefront/node_modules/ \ No newline at end of file diff --git a/.shopware-extension.yml b/.shopware-extension.yml deleted file mode 100644 index d98ccaf..0000000 --- a/.shopware-extension.yml +++ /dev/null @@ -1,8 +0,0 @@ -build: - zip: - assets: - enable_es_build_for_admin: true - enable_es_build_for_storefront: true - -changelog: - enabled: true diff --git a/CHANGELOG_en-GB.md b/CHANGELOG_en-GB.md new file mode 100755 index 0000000..2c71c8d --- /dev/null +++ b/CHANGELOG_en-GB.md @@ -0,0 +1,6 @@ +# 2.1.0 +- [chore: prepare release (#47)](/3d7564f) +- [feat: Add save, restore and delete cart to customer account (#45)](/10766f7) +- [feat: Add possibility to save the cart to offcanvas cart (#40)](/819dda4) +- [feat: Add blocks to the cart page share basket template (#42)](/5d54120) +- [Fixed wrapper (#38)](/14f20ce) \ No newline at end of file diff --git a/src/Resources/app/storefront/dist/storefront/js/frosh-platform-share-basket/frosh-platform-share-basket.js b/src/Resources/app/storefront/dist/storefront/js/frosh-platform-share-basket/frosh-platform-share-basket.js new file mode 100755 index 0000000..212dc67 --- /dev/null +++ b/src/Resources/app/storefront/dist/storefront/js/frosh-platform-share-basket/frosh-platform-share-basket.js @@ -0,0 +1 @@ +(()=>{var h=Object.defineProperty;var u=(t,r)=>()=>(t&&(r=t(t=0)),r);var o=(t,r)=>{for(var e in r)h(t,e,{get:r[e],enumerable:!0})};var s={};o(s,{default:()=>n});var c,n,a=u(()=>{({PluginBaseClass:c}=window),n=class extends c{constructor(e,l,i){super(e,l,i);this.urlShareBtn=null;this.urlShareInput=null;this.webShareBtn=null;this.options={urlShareSelector:".btn-share-basket-url",urlInputSelector:"#share-basket-url",webShareSelector:".btn-share-basket-webshare"};this.urlShareBtn=this.el.querySelector(this.options.urlShareSelector),this.urlShareInput=this.el.querySelector(this.options.urlInputSelector),this.webShareBtn=this.el.querySelector(this.options.webShareSelector),this.#e()}init(){}#e(){this.urlShareBtn&&this.urlShareBtn.addEventListener("click",this.#t.bind(this)),this.webShareBtn&&navigator.share!==void 0&&(this.webShareBtn.addEventListener("click",this.#r.bind(this)),this.webShareBtn.style.display="inline-block")}#t(e){e.preventDefault(),this.urlShareInput&&(this.urlShareInput.select(),document.execCommand("copy"))}#r(e){e.preventDefault();let l=e.currentTarget;navigator.share({title:l.dataset.shareTitle,text:l.dataset.shareText,url:l.dataset.shareUrl})}}});window.PluginManager.register("FroshShareBasketButtons",()=>Promise.resolve().then(()=>(a(),s)),"[data-frosh-share-basket-buttons]");})(); diff --git a/src/Resources/public/administration/css/frosh-platform-share-basket.css b/src/Resources/public/administration/css/frosh-platform-share-basket.css new file mode 100755 index 0000000..4d8c1eb --- /dev/null +++ b/src/Resources/public/administration/css/frosh-platform-share-basket.css @@ -0,0 +1 @@ +.frosh-share-basket-list .sw-collapse__content{padding:0 20px} diff --git a/src/Resources/public/administration/js/frosh-platform-share-basket.js b/src/Resources/public/administration/js/frosh-platform-share-basket.js new file mode 100755 index 0000000..1086736 --- /dev/null +++ b/src/Resources/public/administration/js/frosh-platform-share-basket.js @@ -0,0 +1,98 @@ +(()=>{var r=`{% block frosh_share_basket_list %} + + + {% block frosh_share_basket_list_content %} + + {% endblock %} + + {% block frosh_share_basket_list_sidebar %} + + {% endblock %} + + +{% endblock %} +`;var{Component:o,Mixin:l}=Shopware,{Criteria:s}=Shopware.Data;o.register("frosh-share-basket-list",{template:r,inject:["repositoryFactory","syncService","localeToLanguageService"],mixins:[l.getByName("listing")],data(){return{isLoading:!1,items:null,languageId:localStorage.getItem("sw-admin-current-language"),total:0,sortBy:"saveCount",sortDirection:"DESC",filterSidebarIsOpen:!1,salesChannelFilters:[],internalFilters:{}}},metaInfo(){return{title:this.$createTitle()}},computed:{columns(){return[{property:"productName",label:"frosh-share-basket.list.columnProductName",allowResize:!0,primary:!0},{property:"productNumber",label:"frosh-share-basket.list.columnProductNumber",allowResize:!0},{property:"saveCount",label:"frosh-share-basket.list.columnProductSaveCount",allowResize:!0},{property:"totalQuantity",label:"frosh-share-basket.list.columnProductQuantity",allowResize:!0}]},salesChannelStore(){return this.repositoryFactory.create("sales_channel")}},created(){this.createdComponent()},methods:{createdComponent(){let e=new s(1,100),t=localStorage.getItem("sw-admin-locale");this.salesChannelStore.search(e,Shopware.Context.api).then(a=>{this.salesChannelFilters=a}),this.localeToLanguageService.localeToLanguage(t).then(a=>{this.languageId=a,this.getList()})},handleBooleanFilter(e){if(Array.isArray(this[e.group])||(this[e.group]=[]),!e.value){this[e.group]=this[e.group].filter(t=>t!==e.id),this[e.group].length>0?this.internalFilters[e.group]=s.equalsAny(e.group,this[e.group]):delete this.internalFilters[e.group];return}this[e.group].push(e.id),this.internalFilters[e.group]=s.equalsAny(e.group,this[e.group])},onChange(e){e===null&&(e=[]),this.handleBooleanFilter(e),this.getList()},closeContent(){if(this.filterSidebarIsOpen){this.$refs.filterSideBar.closeContent(),this.filterSidebarIsOpen=!1;return}this.$refs.filterSideBar.openContent(),this.filterSidebarIsOpen=!0},getList(){this.isLoading=!0;let e=new s(this.page,this.limit,this.term);return e.languageId=this.languageId,e.addSorting(s.sort(this.sortBy,this.sortDirection)),Object.values(this.internalFilters).forEach(t=>{e.addFilter(t)}),this.syncService.httpClient.post("/frosh/sharebasket/statistics",e,{headers:this.syncService.getBasicHeaders()}).then(t=>{this.items=t.data.data,this.total=t.data.total,this.isLoading=!1}).catch(()=>{this.isLoading=!1})}}});var{Module:n}=Shopware;n.register("frosh-share-basket",{type:"plugin",name:"ShareBasket",title:"frosh-share-basket.general.mainMenuItemGeneral",description:"frosh-share-basket.general.descriptionTextModule",color:"#079FDF",icon:"default-shopping-paper-bag-product",routes:{list:{component:"frosh-share-basket-list",path:"list"}},navigation:[{label:"frosh-share-basket.general.mainMenuItemGeneral",color:"#079FDF",path:"frosh.share.basket.list",icon:"default-shopping-paper-bag-product",parent:"sw-marketing"}]});})(); diff --git a/src/Resources/store/de.md b/src/Resources/store/de.md deleted file mode 100644 index 587c3cf..0000000 --- a/src/Resources/store/de.md +++ /dev/null @@ -1,15 +0,0 @@ -# FroshPlatformShareBasket - -Dieses Plugin erlaubt es Ihren Kunden den aktuellen Warenkorb zu speichern und per Link zu teilen. - -## Features -* Speichert Produkte und Rabatte/Aktionen. -* Teilen per Link, E-Mail, Facebook oder WhatsApp. -* Der Link kann bequem per Button in die Zwischenablage kopiert werden. -* Konfiguration über den Shopware Admin. -* Grundlegende Statistiken über gespeicherte Produkte. - -Das Plugin wird von der Github Organization [FriendsOfShopware](https://github.com/FriendsOfShopware/) entwickelt. -Maintainer des Plugin ist [Stefan Poensgen](https://github.com/stefanpoensgen). -Das Github Repository ist [hier](https://github.com/FriendsOfShopware/FroshPlatformShareBasket) zu finden. -[Bei Fragen / Fehlern bitte ein Github Issue erstellen](https://github.com/FriendsOfShopware/FroshPlatformShareBasket/issues/new) diff --git a/src/Resources/store/en.md b/src/Resources/store/en.md deleted file mode 100644 index 4537bf1..0000000 --- a/src/Resources/store/en.md +++ /dev/null @@ -1,15 +0,0 @@ -# FroshPlatformShareBasket - -This plugin allows your customers to save the current basket and share it via link. - -## Features -* Stores products and promotions. -* Share via link, email, Facebook or WhatsApp. -* The link can be conveniently copied to the clipboard by button. -* Configuration via the Shopware Admin. -* Basic statistics about stored products. - -The plugin is provided by the Github Organization [FriendsOfShopware](https://github.com/FriendsOfShopware/). -Maintainer of the plugin is [Stefan Poensgen](https://github.com/stefanpoensgen). -You can find the Github Repository [here](https://github.com/FriendsOfShopware/FroshPlatformShareBasket). -[For questions / errors please create a Github Issue](https://github.com/FriendsOfShopware/FroshPlatformShareBasket/issues/new) diff --git a/src/Resources/store/icon.png b/src/Resources/store/icon.png deleted file mode 100644 index 885856b..0000000 Binary files a/src/Resources/store/icon.png and /dev/null differ diff --git a/src/Resources/store/images/0.png b/src/Resources/store/images/0.png deleted file mode 100644 index f3e1e1e..0000000 Binary files a/src/Resources/store/images/0.png and /dev/null differ diff --git a/src/Resources/store/images/1.png b/src/Resources/store/images/1.png deleted file mode 100644 index 6e70269..0000000 Binary files a/src/Resources/store/images/1.png and /dev/null differ diff --git a/src/Resources/store/images/2.png b/src/Resources/store/images/2.png deleted file mode 100644 index 70b8c41..0000000 Binary files a/src/Resources/store/images/2.png and /dev/null differ diff --git a/src/Resources/store/images/3.png b/src/Resources/store/images/3.png deleted file mode 100644 index 980fcac..0000000 Binary files a/src/Resources/store/images/3.png and /dev/null differ diff --git a/src/Resources/store/images/description_0.gif b/src/Resources/store/images/description_0.gif deleted file mode 100644 index 2d215bf..0000000 Binary files a/src/Resources/store/images/description_0.gif and /dev/null differ diff --git a/src/Resources/store/store.json b/src/Resources/store/store.json deleted file mode 100644 index 7ee0412..0000000 --- a/src/Resources/store/store.json +++ /dev/null @@ -1,28 +0,0 @@ - -{ - "storeAvailabilities": [ - "International", - "German" - ], - "standardLocale": "en_GB", - "localizations": [ - "en_GB", - "de_DE" - ], - "categories": [ - "Checkout" - ], - "productType": "extension", - "responsive": true, - "tags": { - "en": [ - "cart", - "basket", - "checkout" - ], - "de": [ - "warenkorb", - "checkout" - ] - } -}