Shopping cart as downloadable PDF (Shopware 6)
- 1 Introduction
- 1.1 Features
- 2 Installation / Update
- 2.1 System requirements
- 2.2 Further requirements
- 2.3 Plugin installation
- 2.3.1 Manual Upload
- 2.3.2 Activation
- 2.4 Plugin update
- 3 Configuration
- 3.1 Store
- 3.2 ERP system
- 4 Operation
- 4.1 Store
- 5 Individualization
- 5.1 Templates
- 5.2 CSS
- 5.3 Text blocks
- 6 Troubleshooting
- 6.1 Check logs
- 6.1.1 Browser log
- 6.1.2 Store Log
- 6.1.3 Web server log
- 6.1 Check logs
- 7 FAQ
- 8 Changelog
- 9 Support and Contact
Introduction
The plugin offers shop users the possibility to download the current shopping cart as PDF
Features
Versatile configuration options for PDF display
Wide range of settings
Installation / Update
System requirements
Shopware 6.3 and all associated system requirements must be fulfilled.
Further requirements
No third-party accounts or API accesses are required.
Plugin installation
To install the plugin, the following steps are necessary:
Manual Upload
Download the plugin
In the admin dashboard under Settings → system → Plugins click on the button “Upload Plugin”
Mark the file and upload it
Activation
If the plugin is uploaded, the plugin must still be installed & activated. Please note that only installed plugins can be activated. To install the plugin select Install in the right column (button with 3 grey dots). After successful installation you can activate the plugin and continue with the further configuration.
Plugin update
All changes made in the plugin configuration are preserved during a plugin update. The exception of it forms new added text blocks, which replace an existing text block.
Configuration
Store
The configuration of the Plugin is divided into different, logically divided areas.
General plugin attitudes
Show plugin (yes/no): Indicates whether the plugin is to be activated in principle.
Show button in the Ajax shopping cart (yes/no): Indicates whether the button is displayed in the sidebar shopping cart or exclusively in the actual shopping cart.
Button style (selection):
Primary: The button is displayed similar to the "Checkout" button in the sidebar shopping cart
Secondary:
Link: The button is displayed similar to the "Add to cart" button in the sidebar shopping cart
Custom CSS: This checkbox influences the plugin's appearance only in combination with the next option
Custom CSS for Button (Text): This field allows you to define your own CSS for the button display.
Entering invalid CSS can significantly affect the appearance of the plugin.
User groups (multiple selection): The setting option lists all customer groups created in your store. The display of the plugin is limited to the customer groups shown here.
General PDF settings
Show invoice address on PDF (Yes/No): Indicates whether fields for an invoice address are shown on the generated PDFs
Show delivery address on PDF (Yes/No): Indicates whether fields for a delivery address are shown on the generated PDFs
Prefill invoice and delivery address (Yes/No): Indicates whether the address fields displayed in the PDF are prefilled with the standard delivery or invoice address for logged-in users.
Show B2B Fields (Yes/No): Adds fields for company and VAT ID to both address fields.
Preselect payment method (Yes/No): Marks the default payment method for logged in users as active in the PDF as well. Please refer to the info at the end of this settings block to learn more about this option.
Preselect shipping method (Yes/No): Marks the default shipping method used for this shopping cart as active in the PDF as well. Please refer to the info at the end of this settings block to learn more about this option.
File prefix (text input): When saving or downloading the PDF, a file name with current date and time is generated. The input here is prefixed, e.g. "MyOffer" becomes the file name "MyOffer_06112020_052711" when saving.
Font (selection): Specifies the font to be used for creating the PDF.
PDF Download (selection): Indicates whether the PDFs are opened in a new tab or downloaded.
Allowed payment methods (selection): Lists all payment methods created in the store and limits the display in the PDF to those selected here. Please note that the rule builder also plays a role here and, if an article is configured accordingly, e.g. prepayment will not be displayed despite selection with this setting. If no selection is made, all payment methods suitable for this shopping cart will be displayed.
Allowed shipping methods (selection): Lists all shipping methods created in the store and limits the display in the PDF to those selected here. Please note that the rule builder also plays a role here and if an article is configured accordingly, e.g. DHL will not be displayed despite selection with this setting. If no selection is made, all shipping methods suitable for this shopping cart will be displayed.
The options "Allowed shipping methods" or "Allowed payment methods" ignore the options "Preselect payment method" or "Preselect shipping method".
If a customer has a credit card as default payment method, but you do not have this payment method in your selection under "Allowed Payment Methods", no preselection will be made.
PDF header settings
Header height in cm (number field): Specifies the height of the header on the generated PDFs.
Header background color (color picker): Sets the background color for the header.
Logo (media selector): The logo is always positioned in the upper right corner.
PDF footer settings
Footer height in cm (number field): Specifies the height of the footer on the generated PDFs.
Footer columns (Selection): Specifies how many columns the PDF footer is divided into.
Footer font size (selection): Defines the font size applied to the footer.
Footer columns 1 to 5 (hint field): You can easily customize the contents of the footer as specified in the section Customization - Text Blocks
"Small print" (note field): You can easily customize the contents of the small print as described in the section Customization - Text blocks
Footer background color (color selector): Sets the background color for the footer.
Footer font color (color selector): Sets the font color for the footer.
PDF-shopping cart settings
Basket header background color (color picker): Sets the background color for the basket header.
Shopping cart header font color (color picker): Sets the font color for the shopping cart header.
Shopping cart footer background color (color picker): Sets the background color for the shopping cart footer.
Shopping cart footer font color (color picker): Sets the font color for the shopping cart footer.
ERP system
The plugin does not require an interface to an ERP system.
Operation
The plugin requires no further settings after a first one-time configuration.
Store
Depending on the configuration, the plugin adds two buttons to the storefront that are visible to users of the store.
Individualization
The plugin can be modified in the frontend accordingly.
Templates
Display in shopping cart (/storefront/page/checkout/cart/index.html.twig) via block
page_checkout_cart_action_proceed
in blocks360_pdf_cart_wrapper
Display in Ajax shopping cart (sidebar, /storefront/component/checkout/offcanvas-cart.html.twig) via block
component_offcanvas_cart_actions_cart
in blocks360_pdf_ajaxcart_wrapper
If you make changes in the plugin's own files, they will be irrevocably overwritten by an update!
CSS
The plugin offers up to the use of Inline-CSS many possibilities to adapt the representation in the Shop-Storefront. Changes, which go beyond the configuration possibilities in the administration are possible over the template system of Shopware in your own Storefront-Template.
Text blocks
You can easily customize the used text modules via the administration interface of your shopware installation. In the first tab "Shop" under "Settings" select the item "Textblocks", then click on "Edit" in the right column of the textblock set for which you want to make changes. Then you can search for "s360-pdf." in the search field above and find all textbricks that are relevant for the plugin.
Troubleshooting
Check logs
To find out where a problem lies, the logs will help you and us. Depending on the error pattern one of the following three logs is more or less relevant.
Browser log
The browser log is mostly relevant if something in the frontend of the store behaves strangely or does not react. (Example: You click a button and apparently nothing happens).
You can see the browser log if you press F12 in your browser and then switch to console.
Store Log
The shop-log is always interesting if unexpected error messages are displayed in the frontend or if the plugin reacts to input in the frontend but does not deliver the result that was expected. Sometimes the browser log also makes it clear that the information is more likely to be found in the store log.
Web server log
The web server log becomes relevant if you encounter an Error 500 (= white page) somewhere. The web server log can be provided by your host.
FAQ
I have activated my plugin, but I do not see a "Show PDF" button in my shopping cart?
One of the most frequent causes for this is that the inheritance of the template is not correctly accomplished. To be sure that it concerns only a representation error and not a programming error it makes sense to test the plugin uniquely in the Shopware-own storefront template and without other plugins. If the error should not exist any longer and the plugin functions as expected, the causes can be gone through now after the exclusion principle sequentially. First activate your possibly customized storefront-template and test the functionality, then activate your plugins step by step.
Changelog
v1.0.0 (October 2020)
Initiales Release
Support and Contact
siehe Support und Kontakt