GithubHelp home page GithubHelp logo

friendsofshopware / froshsharebasket Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 5.0 2.52 MB

This plugin allows your customers to save the current basket and share it via link.

License: MIT License

PHP 72.65% JavaScript 12.15% HTML 5.58% Smarty 7.50% Less 2.11%

froshsharebasket's Introduction

FroshShareBasket

Join the chat at https://gitter.im/FriendsOfShopware/Lobby Travis CI Download @ Community Store

This plugin allows your customers to save the current basket and share it via link.

Features

  • Share via link, email, Facebook or WhatsApp.
  • The link can be conveniently copied to the clipboard by button.
  • Configuration via the Shopware Backend.
  • Voucher as well as the article mode is saved.
  • Also stores fields defined in the backend of the "s_order_basket_attributes" table. This results in a high compatibility with other plugins.

Demonstration

Statistics

Settings

Requirements

  • min Shopware 5.5.0
  • min PHP 5.6

Installation

  • Checkout Plugin in /custom/plugins/FroshShareBasket
  • Install the Plugin with the Plugin Manager

Contributing

Feel free to fork and send pull requests!

Licence

This project uses the MIT License.

froshsharebasket's People

Contributors

dneustadt avatar philippmahlow avatar shyim avatar stefanpoensgen avatar tinect avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

froshsharebasket's Issues

E-Mail Text anpassen

Es wäre toll, wenn mann in der E-Mail nicht nur den Link sehen würde, sondern auch einen zusätzlichen Text.
Mir würde es reichen wenn ein Textbaustein vor dem Link und ein Textbaustein danach wäre.

Falsche Freitextfelder Tabelle

PHP Version

7.4

Shopware Version

5.7.7

Actual behaviour

In Ihrer Config "Zusätzliche Felder speichern", beziehen sie sich auf die Tabelle "s_order_detail_attributes".
Aber in Ihrer Funktion "getBasketAttributes" bauen sie einen SQL-Query, der sich auf die Tabelle "s_order_basket_attributes" bezieht. Was dazu führt, dass die folgende Abfrage bei Freitextfeldern von anderen Plugins nicht ausgeführt wird.
Pfad: custom/plugins/FroshShareBasket/Components/ShareBasketService.php Zeile: 116 - 119
if ($value && in_array($attribute, $attributesToStore, false)) { $basketArticle['attributes'][$attribute] = $value; }

Expected behaviour

Wenn sie in ihrer Config die Tabelle "s_order_detail_attributes" mit der Tabelle "s_order_basket_attributes" austauschen, können die entsprechenden Freitextfelder ausgewählt und die Abfrage ausgeführt werden.

Steps to Reproduce?

Nachstellen können sie diesen Bug, mit jedem Freitextfeld welches nicht Standardmäßig von Shopware kommt.

consider using serialize

$articles = json_decode($basket->articles);

Just out of curiosity, is there a reason you prefer fetch mode PDO::FETCH_OBJ instead of an array? Personally I prefer arrays in that regard.

Then, while not absolutely necessary, maybe consider using un/serialize instead of json_en/decode. While encoding json is a tad faster at larger data sizes, serialize is optimized for use in closed PHP applications. See this page for reference. Also I'd prefer an array as the result of decoding, obviously wouldn't even be a question when using serialize. :)

AttributeData cannot be loaded when using a subdomain like https://backend.example.com/backend

Actual behaviour

Our Frontend is reachable under https://www.example.com and our backend under https://backend.example.com/backend.

When opening 'Store additional fields' within the plugin config to retrieve the possible attributes the plugin tries to reach the following URL:
https://backend/AttributeData/list?raw=1&table=s_order_details_attributes&_dc=1586171977581&page=1&start=0&limit=25
This runs into an error as 'backend' is for sure not valid.

Issue

The store 'url' in Resources/config.xml is not working when using a subdomain which includes 'backend'

grafik

Potential solution

  1. Make the url relative
proxy: {
	type: 'ajax',
	url: '/backend/AttributeData/list?raw=1&table=s_order_details_attributes',
	reader: {
		type: 'json',
		root: 'data',
		totalProperty: 'total'
	}
}
  1. Or a different structure
proxy: {
	type: 'ajax',
	url: window.location.protocol + '//' + window.location.hostname + '/backend/AttributeData/list?raw=1&table=s_order_details_attributes',
	reader: {
		type: 'json',
		root: 'data',
		totalProperty: 'total'
	}
}

How can this fix be considered (eg. opening a pull request)?

Thanks,
Dirk

LoadBasket in special controller

Me likes nice urls.
sharebasket/load/bID/[id] isn't nice.

Maybe a different controller loadbasket for this, rsulting like loadbasket/bID/[id] ?

Custom Product Configuration is deleted


Actual behaviour

If a product with a custom product is placed in the shopping basket, the configuration of the custom product remains until the shopping basket (item with the custom product position) is deleted in the originally created browser.

Expected behaviour

The configuration of the custom product should not be deleted when the shopping cart is loaded and the item is deleted in the created browser.

Environment

  • Shopware 5.5.10
  • Nginx & Apache
  • PHP Version 7.0.33-1
  • "Delete shopping baskets after X months" -> "6
  • "Validity of the custom products configurations:" -> "30

Steps to reproduce

  1. Go to https://www.xspo.com/atomic-redster-g9-fis
  2. "Choose your binding" under the Variants
    -> "Mounting"-> "Binding mounting desired (ski boot sole length necessary)"
    -> "length of skiing boots" -> "325"
    -> "Ski level" -> "very good skiing level"
    -> "Body weight" "80"
    -> "My age" -> "between 13 and 50 years"
    -> "selecetion of ski bindings (buy as set)" -> "Atomic X 19 VAR"
  3. "Add to shopping cart"
  4. "Edit shopping cart"
  5. "Save cart"
  6. Copy and open the Url in some incognito Browser Windows
    -> The configuration remains present all the time
  7. Delete the item from the shopping cart in the original browser window
  8. Open the Url again in some incognito Browser Window
    -> The configuration has disappeared

Checklist

  • [ X ] I have checked all issues and haven't found a similar report.
  • [ X ] I am using the latest stable version of this plugin.

--

♥ ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY ♥

Cart pricing problems

PHP Version

7.4.30

Shopware Version

5.5.10

Actual behaviour

When using the FroshShareBasket plugin with the "Set Article Plugin" the prices in the shopping cart are calculated incorrectly.
https://store.shopware.com/tonur31765851076/set-artikel.html

Both plugins work independently of each other.

We have to delete the server cache, to empty the price for the basket (also when its already empty)

Expected behaviour

Compatibility

Steps to Reproduce?

Reproduce:

htacces
konorg|shopware

Product without Set Article Plugin, go to cart and click "Warenkorb teilen", copy link into new tab
https://www.konorg-shop.de/_testumgebung/roll-up-display-basic-513

Product with Set Article Plugin , go to cart and click "Warenkorb teilen", copy link into new tab, reload different prices will be shown
https://www.konorg-shop.de/_testumgebung/led-messestand-modulap-one-set-cleo-1454

ShareBasket not working with Business Essentials

Actual behaviour

After saving a basket, the button "E-Mail" opens a new E-Mail, but don't include the link to the saved basket. 

Expected behaviour

I expected to see a new E-Mail open up with the link to the saved basket.

Environment

This only occurs in a shop using Business Essentials 3.2.2. Shopware 5.5.3 Build Rev 201810301443

Steps to reproduce

Shop without Business Essentials - working like expected:
grafik

Shop with Business Essentials - E-Mail share not working:
grafik

Checklist

  • [x ] I have checked all issues and haven't found a similar report.
  • [x ] I am using the latest stable version of this plugin.

--

♥ ANY INCOMPLETE REPORT WILL BE CLOSED RIGHT AWAY ♥

store additional Fields from Loan Plugin are not safed

Actual behaviour

We are using this plugin for our shopware Shop. It enables clients to rent articles for a certain time.
https://store.shopware.com/rhiem38738281933/mietartikel-artikel-vermieten.html
This time is not stored in the shared cart. I set all Fields in Backend to be stored, but these aren't stored.

Expected behaviour

Fields from external Plugin should be stored in Cart

Environment

Please provide information about the environment in which the issue occurs (e.g. PHP version, webserver, Shopware version, debugging information if you can provide).

Steps to reproduce

  1. Install both Plugins
  2. Rent some Articles
  3. Share Cart -

secure against db flooding

$basketID = $this->saveBasket(json_encode($articles));

Massively requesting that endpoint could result in a flooded database. How about a session-based timeout or storing the unique basket code once inserted and updating the according record on subsequent requests?

Edit: Maybe consider using an ajax post request to save the basket. Shopware's CSRF protection can provide some security against automated spam.

Unserialize

$attributes = unserialize($article->getAttributes());

Could be potential a security issue. Please fill the second parameter, to disallow instantiating of classes

Plugin Update throws error

PHP Version

7.3

Shopware Version

5.6.1

Actual behaviour

Hi there,
when I try to update "Warenkorb teilen" and "Variantenwechsel im Warenkorb" I get this error:
Error
Sie besitzen keine gültige Lizenz um dieses Plugin zu verwenden.

Error code: BinariesException-15

"You have no valid license for this plugin"

Thanks in Advance

Best Regards

Gunnar

Expected behaviour

Updateing the plugins.

Steps to Reproduce?

Click on Update button.

Keine volle Kompatibilität mit Custom Products

Actual behaviour

Beim Speichern von Custom Product Artikeln werden alle Daten korrekt gespeichert, die Endsumme im Warenkorb stimmt aber nicht, da wird nur der Grundbetrag das Custom Product Artikels genommen.

Expected behaviour

Die komplette Summe des Custom Products sollte inkl. der Konfiguration berücksichtigt werden.

Environment

PHP 7.2, SW 5.5.7

Steps to reproduce

  1. Custom Product Artikel in den Warenkorb legen.
  2. Warenkorb speichern.
  3. Gespeicherten Warenkorb aufrufen.

Checklist

  • I have checked all issues and haven't found a similar report.
  • I am using the latest stable version of this plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.