Synopsis
Ok, so we made some lists of products, and we made some clever navigations. what next? Make our own lists!
Actinic has some marketing features, but its only got a few types of usable lists in V8, namely, the best sellers and the new items. But we can have so much more.
What about these:
- Managers specials
- Sale now on!
- Price ranges
- Arbitrary groups of items, such as brands.
Creating a custom special list
We're going to create a list to demonstrate this advanced technique. We're going to call it Gabriel's Deals. In it, we'll be creating a special group, and putting some items into it, from our catalog. then, we'll be displaying them in our tempaltes.
Step 1, making a special variable.
- Open the library {Design > Library...}
- Click the Variables tab.
- Right click in a blank space and click 'New Group'.
- Call it 'MyLists'
- Right click on our new group 'MyLists'. Click 'New Variable'
Name: GabrielsDeals
Prompt: GabrielsDeals
Place of setting: Product
Tab: Marketing
Type: True/False
Initial Value: False
- Click ok, and then 'Close'.
OK! we just made a new property, that allows us to choose if an item appears in our list. Now, pop into your catalog, and find some products. go to the marketing tab and then set a few items to yes. I did about 5 ish.
ok, so whats the code?
Well, i'll assume that you can now expand on blocks, so i'm only going to give very simple markup, so you can add to it later.
OK, so whats goind on here? Well first of all, due to the nature of Actinic when we loop a set of products, like this:
Actnic will list only the products that are in the current scope. that is, only products on the current page. To get around this, we loop all the sections, and then list all the products inside that. Like a loop inside a loop. See? This in effect lists all the products that there are in the shop.
We needed to limit that, to only products that we have chosen to be in our list. So, we use a simple blockif. that says in english:
'Show this item if GabrielsDeals is true'.
So, basically, we only show items in this list, that have this variable set to true. Actinic can deal with lots of these lists. so you can really go to town on the phrases you choose. Managers specials, deals, the lot. Go add some more markup and a link like i showed you earlier, and you have got yourself another marketing concept.
Did you say price ranges?
YES! i did. ok, so how do we do this?
Luckily, we dont need to create a variable for this. We already ahve one. you ahve the prices as a part of your products (or you should have).
ok, so, lets dive in with an example:
How does this work? Well, you may ahve noticed that the last example included the price of the item in the list too. we can use this price to make comparisons as well.
Our blockif in this one does not limit to the GabrielsDeals variable, it limits based on the price. In english?
'Show this item if the price is less than 15'
of course depending on your currency, you'll need to change some things, namely the pound sign, but its the number we're interested in. Using what you've learned earlier, you can easily change the amount thats filtered, or even make a list showing a price range, between two numbers.
Brand lists?
The idea for brand lists is a similar one to the last we made first in this tutorial. In this, we have a variable that is of type 'text'. then we type the brand name in there.
Assign each product a brand, then create a list like the ones above, that show only those brands that equal a brand you choose. Make a new block for each 'Brand'. When you have a new brand, then make a new block.
You can use ideas picked up earlier, to make all sorts of lists, and dropdown boxes for this idea, try it.
And finally...
Are you all seeing the things you can get up to with blockifs? I want no more daft noobie questions about them from now on mind you!
There might be some more tutorials later, when I can think of soemthing clever to use blocks for. Until then, happy blocking, Actinites.
ps: these tutorials will be also posted on my site at:
http://www.interact-studio.co.uk/int...utorial-1.html
http://www.interact-studio.co.uk/int...utorial-2.html
http://www.interact-studio.co.uk/int...utorial-3.html
http://www.interact-studio.co.uk/int...utorial-4.html
http://www.interact-studio.co.uk/int...utorial-5.html
in case they get lost here for any reason.
khnxbai
- GC
Ok, so we made some lists of products, and we made some clever navigations. what next? Make our own lists!
Actinic has some marketing features, but its only got a few types of usable lists in V8, namely, the best sellers and the new items. But we can have so much more.
What about these:
- Managers specials
- Sale now on!
- Price ranges
- Arbitrary groups of items, such as brands.
Creating a custom special list
We're going to create a list to demonstrate this advanced technique. We're going to call it Gabriel's Deals. In it, we'll be creating a special group, and putting some items into it, from our catalog. then, we'll be displaying them in our tempaltes.
Step 1, making a special variable.
- Open the library {Design > Library...}
- Click the Variables tab.
- Right click in a blank space and click 'New Group'.
- Call it 'MyLists'
- Right click on our new group 'MyLists'. Click 'New Variable'
Name: GabrielsDeals
Prompt: GabrielsDeals
Place of setting: Product
Tab: Marketing
Type: True/False
Initial Value: False
- Click ok, and then 'Close'.
OK! we just made a new property, that allows us to choose if an item appears in our list. Now, pop into your catalog, and find some products. go to the marketing tab and then set a few items to yes. I did about 5 ish.
ok, so whats the code?
Well, i'll assume that you can now expand on blocks, so i'm only going to give very simple markup, so you can add to it later.
Code:
<div> <actinic:block type="EntireSectionList" > <actinic:block type="ProductList" > <actinic:block if="%3cactinic%3avariable%20name%3d%22GabrielsDeals%22%20%2f%3e%20%3d%3d%20true" > £<actinic:variable name="ProductPriceRaw" />: <actinic:variable name="ProductName" /><br> </actinic:block> </actinic:block> </actinic:block> </div>
Code:
<actinic:block type="ProductList" >
We needed to limit that, to only products that we have chosen to be in our list. So, we use a simple blockif. that says in english:
'Show this item if GabrielsDeals is true'.
So, basically, we only show items in this list, that have this variable set to true. Actinic can deal with lots of these lists. so you can really go to town on the phrases you choose. Managers specials, deals, the lot. Go add some more markup and a link like i showed you earlier, and you have got yourself another marketing concept.
Did you say price ranges?
YES! i did. ok, so how do we do this?
Luckily, we dont need to create a variable for this. We already ahve one. you ahve the prices as a part of your products (or you should have).
ok, so, lets dive in with an example:
Code:
<div id="prices"> <actinic:block type="EntireSectionList" > <actinic:block type="ProductList" > <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceRaw%22%20%2f%3e%20%20%3c%3d%2015" > £<actinic:variable name="ProductPriceRaw" />: <actinic:variable name="ProductName" /><br> </actinic:block> </actinic:block> </actinic:block> </div>
Our blockif in this one does not limit to the GabrielsDeals variable, it limits based on the price. In english?
'Show this item if the price is less than 15'
of course depending on your currency, you'll need to change some things, namely the pound sign, but its the number we're interested in. Using what you've learned earlier, you can easily change the amount thats filtered, or even make a list showing a price range, between two numbers.
Brand lists?
The idea for brand lists is a similar one to the last we made first in this tutorial. In this, we have a variable that is of type 'text'. then we type the brand name in there.
Assign each product a brand, then create a list like the ones above, that show only those brands that equal a brand you choose. Make a new block for each 'Brand'. When you have a new brand, then make a new block.
You can use ideas picked up earlier, to make all sorts of lists, and dropdown boxes for this idea, try it.
And finally...
Are you all seeing the things you can get up to with blockifs? I want no more daft noobie questions about them from now on mind you!
There might be some more tutorials later, when I can think of soemthing clever to use blocks for. Until then, happy blocking, Actinites.
ps: these tutorials will be also posted on my site at:
http://www.interact-studio.co.uk/int...utorial-1.html
http://www.interact-studio.co.uk/int...utorial-2.html
http://www.interact-studio.co.uk/int...utorial-3.html
http://www.interact-studio.co.uk/int...utorial-4.html
http://www.interact-studio.co.uk/int...utorial-5.html
in case they get lost here for any reason.
khnxbai
- GC
Comment