Collections¶
Let’s say you want to include four products into your new post and also in an older post. As explained on the [asa2] shortcode page you would have to include the shortcode [asa2]
four times in every post. With copy and paste it still would be acceptable but not very convenient. That would be the right moment to think about ASA2’s collections feature.
With collections you can bundle an unlimited amount of products into one collection container identified by a name of your choice. To embed this bunch of products in your pages, you only have to insert one shortcode [asa2_collection] with the name of your collection.
[asa2_collection]lego_starwars_spaceships[/asa2_collection]
Screencast¶
Create a new collection¶
To create a new collection, select the section “Collections” from the ASA2 main menu:
Name¶
Then click the button “Create new collection” and enter a name for the new collection, e.g. “lego_starwars_spaceships”. Collections names may only contain alphanumeric characters, numbers and underscores.
Comment¶
Optionally you can enter a comment for a collection. This will show up in the list of collections when you hover over the collection name.
Save the new collection and you will be redirected to the main collections page where the new item can be found in the listed.
Add new items¶
Hover over the list item and select the option “Manage items”.
On the “Manage collection” page, use the ASIN field to enter the ASIN of the product you want to add to the collection. When you click in the ASIN field, ASA2’s Product Picker will open up automatically. Use it to search the Amazon store of your choice for the products you want to add.
Clicking on the title of a product in the list will add its ASIN to the ASIN field. Then click the button “Add” and the product will be added to the collection.
Go ahead and add as much items to the collection as you want.
Delete items¶
To delete an item from a collection, hover over the entry and click the “Delete” link.
To delete multiple items, select the items and use the bulk action “Delete”.
Embedding¶
Shortcode¶
To embed a collection in a page, use the shortcode asa2_collection
and place the name of the collection inside the tag, like this:
[asa2_collection]lego_starwars_spaceships[/asa2_collection]
Check the documentation page [asa2_collection] to learn about all the options of this shortcode.
Copy collection¶
If you want to create a new collection similar to one you already have, you could use the “Copy” function. Hover over the list item of the collection you want to copy and click the link “Copy”.
A duplicate collection will be created containing all the items of the original one.
Export collection¶
If you want to move a collection from one site to another or just want to create a backup file, you can use the “Export” function. Hover over the list item of the collection you want to copy and click the link “Export”. You will be prompted to store the XML export file to your local computer.
Import collection¶
To import a collection, select the button “Import collection” on top of the collections main page. In the import form select a XML file generated by the collection export function. To mark the name of an imported collection, you may insert a prefix which will be prepended to the imported collection’s name.
Click “Submit” and wait a short moment while the import will be processed.
Import ASA 1 collections¶
You can import your collections of ASA 1 to ASA 2. Just be sure to update to the newest release of ASA 1. Then you will see an “Export” button in ASA 1’s collections manage console:
You will receive an XML export file which you can use to import in ASA 2 as a new collection.
After you imported a ASA 1 collection in ASA 2, switch to the “Manage items” page.
Because ASA 1 does not store the item title and preview image in collections, those fields are empty. To update the items, select all and choose “Refresh” from the bulk actions.