Aeon:
1. an indefinitely long period of time; age.
2. the largest division of geologic time, comprising two or more eras.
3. Astronomy. one billion years.
aeonmedia.com
with our thoughts we shape the world
Aeon Media : development firm in NJ, owned and operated by R. L. O'Shell. Our delight: To Create Ageless and Timeless Media. Delivering your message in purity, integrity, and light.
Filemaker as a CMS Push
When working with a framework that is set up for multiple languages, I decided to give some more power to the client by evolving a content management system within Filemaker. The defined constants in each language file, for instance, can be controlled by editing the language file. The constants placed upon the design layer of the application allow for ease of changes, making it both possible and fun to provide a version of your site in alternative languages without worrying about the resultant shift in the design.
Calculation fields in filemaker can drive content and with the 360Works ScriptMaster ( is a free, general-purpose, modular plugin. It comes out of the box with modules for file manipulation, URL and network utilities, Web Services, shell scripting, event/script triggering, and many others) you can automatically ftp the resultant file built around the calculation.
This is a time consuming process, but well worth it. The result will be more empowerment for the marketing pro who wants to update content easier. Other steps along this path include editing of stylesheets. Practically anything that is text based can be modified this way and sent to a live site via ftp. In fact, this is so fun I just may decide to code up my version of a content editor inside of filemaker to see if it can be done.
Flex powered shopping cart
Tapping into the power of flex, we are developing a flashed out skin for elastic cart. It’s moving along nicely and in general we like how it’s forming up. We’ve been posting here and there about flex techniques we pick up along the way.
Why do we like flex over css, and why select flex to provide a 2.0 experience? Because of the visual aspect of flex. Bored with differences in how machines display interfaces – browser variations between OS platforms are one example, not to mention the gaps in how platforms display data – we are looking for a magic bullet. Why Not?
AJAX and CSS won’t do all we need it to do. We were mesmerized by the potential of creating application type experiences over the web, and providing cool effects like drag and drop while ensuring a close match in appearance between both mac and pc – is a wonderful thing. We like it.
Its more than the visual and creative side of the web that draws us to flex. Air applications are a strong pull and we feel the tug – green apps that can reduce the cost of production and stay viable over the long run via web hosted sql updates. That adds bang to the buck.
For these reasons, we selected flex as our skin for elastic cart, and we will be posting more and more about it between now and October…
The Rules
of security and e-commerce applications are constantly evolving. There are four basic rules we keep in mind when dealing with e-commerce. privacy, integrity, authentication and non-repudiation. In basic terms, it works like this:
1. Keep information from unauthorized parties. If you promise to keep data safe, don’t do stupid things like not log people out – especially if you told them they could ‘check out without an account’. Log them out to prevent identity theft. Even if you are not taking credit cards, you are taking responsibility for their name, address, phone number, and an account history. Be respectful of that.
2. Don’t alter purchase records
3. Provide encryption and decryption so data is secured in transit
4. Store and keep good records of proof the purchase went through.
How shall we safeguard against the issue of shared fingerprints, and the news that “The venerable MD5, for example, has been broken, making it easy to introduce a forgery.”
It’s an interesting question. Some people think that MD5 has officially ‘bit the dust’. I share that opinion, which is why I am rewriting the password algorithms in elastic cart and we will probably be using SHA1. Maybe. I am exploring the potential flaws in it as well.
Category Icons that Adjust According to Number of Values Returned
If you are using zen cart, it may be that you want to control the number of icons per row and have variation there. generally, this is accomplished through the setting in the control panel, which is a constant that is defined. One size fits all, and that is not a lot of fun. If you want to allow your category icons to adjust based on the number of them returned in each search, the solution is a simple switch command that sets a new variable, and replacing the max value in the code with your new variable.
This modification will affect the core code of the site, so be careful. Back everything up before you do this. Skill level required is Intermediate.
OK – lets get started.
1. using the php editor of your choice, i prefer ZEND, open the file:
your_zen_site/includes/modules/category_row.php
2. add a switch statement. track down this line of code:
$num_categories = $categories->RecordCount();
and add a switch:
// new script to set cat rows based on number of returns
switch ($num_categories) {
case 1:
$colSelect = 2;
break;
case 2:
$colSelect = 2;
break;
case 3:
$colSelect = 3;
break;
case 4:
$colSelect = 2;
break;
case “5″:
$colSelect = “3″;
break;
case “6″:
$colSelect = “3″;
break;
case “7″:
$colSelect = “4″;
break;
case “8″:
$colSelect = “4″;
break;
case “9″:
$colSelect = “3″;
break;
case “10″:
$colSelect = “4″;
break;
case “11″:
$colSelect = “3″;
break;
case 12:
$colSelect = 4;
break;
case 13:
$colSelect = 4;
break;
case 14:
$colSelect = 3;
break;
}
note: the values can be strings or not, php doesn’t mind either way.
now, look for the highlighted lines of code here and replace your code with the lines in bold.
/ eof new script
$row = 0;
$col = 0;
$list_box_contents = ”;
if ($num_categories > 0) {
if ($num_categories < $colSelect || $colSelect == 0) {
$col_width = floor(100/$num_categories);
} else {
$col_width = floor(100/$colSelect);
}
…. and further down in the code, replace this line with the new bold as well:
$col ++;
if ($col > ($colSelect -1)) {
$col = 0;
$row ++;
}
$categories->MoveNext();
}
}
the result will be a series of category icons that redistribute themselves based on their number, redefine the percentage each item takes up, and cleans up white space accordingly. Thanks goes to Annie S. for this, who is the designer and photographer on aEons current favorite project – for this inspiration behind the code. Once she suggested it, I wondered why I hadn’t thought of it yet.
Once the site is live, I will post a relevant link and further examples.
experiment a little and have fun with the results. please post any questions or suggestions
Dynamic Product Requests on Product Listing in Zen Cart
If you are selling online – or maybe even using a shopping cart framework as a quote builder, chances are you will need to display category specific information on the display page. One such application would be a catalog request – but only for the specific category you are in. Zen Cart uses the time proven method of generating an array of catalog ‘folders’ which are tagged with specific, if not arbitrary numerical values.
My solution to this is to refer to the function that generates the category path. In Zen Cart, its the function called zen_get_path. The globals defined on this page include the $cPath_array. The page used to display item specific info is named: tpl_product_info_display.php – and if you are using a custom template or product type, you will already know the changes made to this filename.
You can echo out the array, just to see how it looks if you want:
echo $cPath_array[0] . ‘
‘;
You will need to define some variables to dynamically change the display of information as needed. Here is an example of a hard link in the zen cart system, there are three options that will be displayed based on the category displayed. For this example, I took off the <> tags that form the div, form and input type. Sorry about that.
$displayCatOne = '
div id="requestCatalog"
form name="cart_quantity" action="index.php?main_page=product_info&products_id=5398&action=add_product" method="post" enctype="multipart/form-data"
input type="hidden" name="cart_quantity" value="1" />
input type="image" src="includes/templates/template_default/buttons/english/button_in_cart_cat.gif"
div
form';
$displayCatTwo= '
div id="requestCatalog"
form name="cart_quantity" action="index.php?main_page=product_info&products_id=5398&action=add_product" method="post" enctype="multipart/form-data"
input type="hidden" name="cart_quantity" value="1" />
input type="image" src="includes/templates/template_default/buttons/english/button_in_cart_cat.gif"
div
form';
$displayCatThree = '
div id="requestCatalog"
form name="cart_quantity" action="index.php?main_page=product_info&products_id=5398&action=add_product" method="post" enctype="multipart/form-data"
input type="hidden" name="cart_quantity" value="1" />
input type="image" src="includes/templates/template_default/buttons/english/button_in_cart_cat.gif"
div
form';
Now all that remains is to determine the value of the category you are viewing, and then determine the appropriate variable to display:
if ($cPath_array[0] == '65'){
echo $displayCatOne;
}
if ($cPath_array[0] == '1'){
echo $displayCatTwo;
}
if ($cPath_array[0] == '3'){
echo $displayCatThree;
}
The result is nice. A dynamic button that changes the product id added to the cart determined by the first value in the category path array. Benefits include not having to touch any of the core code – as all the additional code is on the product display layer.
First Module for Elastic Cart
Elastic Cart has an open architecture that allows for modules to be written as ad-ons. Tonight we finished one such module. We will eventually make this part of the framework, and allow a full web based or possibly air based solution for data entry – but for now this is a Filemaker ESS solution and ‘contribution’ based code addendum. Using actual technologies open ODBC driver for data piping, we breathed life into the ‘fast event calendar‘ for Elastic. This can also be easily adapted to both Zen Cart and OS Commerce, cube cart, or any of the other popular open source frameworks.
Interacting with a simple filemaker interface, your data entry personnel update the web immediately by simple interaction with the record in Filemaker. On commit, if the status of the record is on, viewers of the website will see immediate updating and adding of entry or event records. Add images to depict your events, plus a link for each event.
@todo – plans include ticket sales and full integration to the shopping cart portion of elastic, as well as to add social bookmarking to each event in the calendar.
You were born with potential. You were born with goodness and trust.
You were born with ideals and dreams. You were born with greatness.
You were born with wings. You are not meant for crawling, so don't.
You have wings. Learn to use them and fly.
-----Rumi------ (13th century)