You may sometimes need to provide your shoppers with direct URLs to a product, but with specific options already selected. For example, let’s say you have a shirt that comes in three colors, and you’d like to provide URLs with each variation already pre-selected. Perhaps it’s for a targeted marketing campaign, maybe it’s for a social media post that showcases specific options.
Whatever the reason, the preselected option URL can be constructed by adding the following code at the end of the product’s page URL:
Just be sure to substitute the [option_id] above with the respective option’s ID number from your store.
How do I get the Option ID?
Glad you asked. Each option you create on the products will have a unique database ID number assigned to it by the store (similar to the product’s “catalogid” creation). To retrieve a specific option’s ID number, use the following steps:
From your Online Store Manager:
- Go to Products ->Product List
- Select the product you’d like to edit and click on its name to open it.
- Then click on the Options tab
Once there, you’ll see each option that you’ve created for your product.
At the far right of each selectable option, you will see a link labeled “Select” which is usually used to create product bundles. Although its purpose it to begin creating a bundled item, this link can also be used to view what the respective option’s ID is on the store’s database.
- Click on the “Select” link
When the popup window appears, look at the popup window’s URL/address bar. At the end of the URL you will see “optcatalogid” followed by a number. This number is the ID you’ll be using for your preselected option URL.
- Use the option ID number to create your pre-selected options URL.
So let’s say your shirt in 3 colors has the following IDs for the options:
- Red is option ID 100
- Blue is option ID 101
- Green is option ID 102
You would construct your pre-selected option URLs in the following manner:
- Red: http://your-store-domain/shirt-product.html?preSelOpt=100
- Blue: http://your-store-domain/shirt-product.html?preSelOpt=101
- Green: http://your-store-domain/shirt-product.html?preSelOpt=102
But what if I have multiple options that I want pre-selected?
In cases where the product has multiple option sets to choose from, you can create your URL simply by separating the option ID numbers with a comma, like this:
So, in the case of our shirt example; if the shirt also comes in three sizes along with colors, you’d need to find the option IDs for the individual size options as well.
Using the steps above, in our case the size option IDs are as follow:
- Small is option ID 200
- Medium is option ID 201
- Large is option ID 202
You would then construct your URLs in this manner:
When followed, each URL will display the product for your shopper along with the individual options pre-selected for them
In order for the above to work, your options cannot be hidden from view and must be visible/selectable.