How can I add a quick buy option to my collections?
Add a quick buy button to your products in the "Featured collection" section as well as on the collections pages by doing the following steps:
1. Go to Online store->Themes->Palo Alto theme
2. Click "Actions"
3. Click "Edit code"
4. Search for the "Layout" folder
5. Open the "theme.liquid" file
6. On line 45 add the following block of code to the class attribute of the body element
{% if settings.enable_quick_buy %}quick-buy-enabled{% endif %}
Before
After
7. Click "Save"
8. Search for the "Snippets" folder
9. Open the "footer-javascript.liquid" file
10. On line 1 add the following block of code to the if statement
or template == 'collection'
Before
After
11. Click "Save"
12. In the same folder, open the "product-grid-item.liquid" file
13. Replace all the content with the code of the link here
14. Click "Save"
15. Search for the "Assets" folder
16. Open the "theme.scss.liquid" file
17. Append the code from the link here to the bottom of the file
18. Click "Save"
19. In the same folder, open the "theme.js.liquid" file
20. On line 987, add the following block of code
if($('body').hasClass('quick-buy-enabled')){ sections.register('featured-collection', PaloAlto.QuickBuyPopup($('.quick_buy_button'))); }
Before
After
21. On line 1595, after the end of the FeaturedImage function(screenshot), paste the code from the link here
22. Click "Save"
23. Search for the "Config" folder
24. Open the "settings_schema.json" file
25. On line 1123, add the following block of code
{ "type": "checkbox", "id": "enable_quick_buy", "label": "Enable Quick Buy", "default": true },
Before
After
Note: Don't forget the comma!
26. Click "Save"
27. Search for the "Locales" folder
28. Open the "en.default.json" file
29. On line 281 add the following block of code
, "quick_buy": "Quick Buy"
Before
After
Note: Don't forget the comma!
30. Click "Save"
Now you will be able to enable/disable the quick buy option if you go to Online store>Themes>Palo Alto>Click "Customize">Theme settings>Product grid