PDA

View Full Version : Component Variables in Table


jeff p
18-Dec-2003, 07:25 PM
I've done html tables but need to create one (for the first time) within a Catalog template.

How do I arrange the size Components on this page next to each other...what are the Variables called?



As always all help greatly appreciated.

NormanRouxel
19-Dec-2003, 12:17 AM
Putting these in a table is quite difficult.

However you can get them all to appear on the same line very easily:-

If you look in Act_VariantAttributeName.html (in Site1) you'll see it's only 1 line

<span class="actxsmall">NETQUOTEVAR:ATTRIBUTENAME</span><br>


If you remove the <br> then all names will line up with their choices.

If they next choice is too tight against the previous then put a space above in front of the <span...>

However this will affect all attribute names. You can fix this for those attributes that need a new line by opening an attribute in Actinic's product tree and changing the separator to New Line.

Norman

p.s. You are using a very complicated and error prone system for customers to set their choices. Asking them to add things up for you will be losing you business.

Also why not just have a single drop down containing the valid colours instead of the complex and possibly contradictory set of radio buttons. I'd make it as simple as possible for the customer (possibly by moving any unusual combinations (like those extra prices 2XL's) to be a separate product on the same page.

There are many ways to make this much easier for your customers. Have a look at www.rouxel.cwc.net/actinicstuff.html and you'll see a big set of (paid for) patches that implement a full colour size matrix. These can also be made to implement a minimum in each size or an overall minimum. There's a working demo at

http://www.drillpine.biz/aura/acatalog/Shirt_Sizes_Demo.html


I've also got some free patches that would automate the system you're trying to use. These hide the total quantity and instead sum all attributes where the attribute name is "Qty Small", "Qty Medium", Qty Large". Basically the choices set in any attribute Starting with "Qty " are summed and presented to the cart as a total. They also prevent the customer fiddling with the totals in the Cart as they can do with your existing system.

I don't have a clothing type demo of this handy but if you look at

http://www.snowlines.co.uk/acatalog/Snowlines_Online-FISHING-FLY_SALMON-FLIES-BUZZERS_NYMPHS.html

(it's a real live site) you'll see the effect if you put some flies in the cart.

jeff p
19-Dec-2003, 12:36 AM
Norman:

The fly fishing site would work IF I could still do price permutations based on the shirt color and quantity...is that possible. That's the reason I have that complex color scheme...in order to break down the pricing. I guess I could do it for every color permutation but, obviously, that's a good deal more time consuming.

Is that patch...the fly fishing one...available somewhere?

In case you don't hear it often enough...you're quite amazing. Actually, you do hear it quite a bit...but it doesn't make it less valid.

NormanRouxel
19-Dec-2003, 01:16 AM
Can you give an example of the your pricing structure and I'll see what would fit.

Norman

jeff p
19-Dec-2003, 03:04 AM
Well, some garments are divided by color...neutrals, heathers, colors...each category costing more than the previous.

Then there are quantity discounts...base price for 12, lower price for 36, 72, 144, 288, 576, 1,000 (there are higher breaks but I don't see the need to include those on the web site). Could actually stop at 576...but...even that gives you 21 price permutations.

Does that make sense?

NormanRouxel
19-Dec-2003, 04:33 AM
Both of my patches above work only where all the products are the same price. It's ideal where you have lots of colours and sizes all at the same price.

To get them to work with your system you'd have to have a product for each range of colours that come at a different price.
I.e. all your Neutrals at one price, then the Heathers, etc. You could use different Product Templates for the subsequent ones that hides the product description, etc as this doesn't really need duplicated.

A major problem with this is that Actinic only makes quantity discounts on identical products and I presume you need to calculate the discount quantity across all the colours.

Norman

jeff p
19-Dec-2003, 11:42 AM
Yes, the quantity does go across all colors. Most orders, however, are for a single color...the exceptions being kids sports leagues but those orders tend NOT to be placed on the web. For the web I think it could be based on a single color.

I tried doing permutations based on each of the individual colors in order to eliminate the "group" selection but it seems to have exceeded Actinic's capacity and locked up the program. Some products come in 30 colors multiplied by 5 or 6 quantity levels gives you 150-180 permutations. Prices are pretty stable so doing the work once would last a year or two, so that's not bad but I think it exceeds the program's capacity. If I'm wrong...I hope to hear from Chris or someone else at Actinic.

Again, Norman, thanks for the help...it would really be a boon if I could find a way to simplify this.

jeff p
19-Dec-2003, 03:08 PM
Norman...
I was able to simplify (at least for this product) by eliminating the Color Category so the color can be chosen in one drop-down, once only. It looks a lot better.

Tried eliminating the <BR> in Act_VariantAttribute.html but it didn't do anything...so I returned it to the original state. Still would like to line the size inputs up horizontally...would greatly enhance appearance.

I also see what you mean about people fiddling with the quantity in the cart...if they increase quantity they would overpay (and I would be honest and tell them and issue a credit), but if they lower the quantity enough to drop to a lower level then they're in a position to cheat. Not much I can do...except contact them and either get it corrected or refuse the order. These type of sales are almost impossible without human intervention and contact...just too many elements involved.

Anyway...need a way to get the sizes horizontal.

Thanks...as always.

cdicken
19-Dec-2003, 03:15 PM
With Actinic, you can do quantity-based discounts regardless of choice (set up in the 'Prices' tab of the product) but this eliminates the ability to charge different amounts per product, because you cannot use it when pricing is in the permutations.

Then, you can set up the 'Prices' grids within the components, but then you have a problem because the quantity dependent pricing will be calculated separately for each colour selection.

You are falling between these two modes of operation.

I'm with Norman. Create a different product for each available colour and then edit the templates so you just have a name, a quantity field and a price showing for each colour (comment out the full description etc.). That way you don't need any permutations (other than for size) - and you can just enter as many quantity breaks as you need for each colour.

jeff p
19-Dec-2003, 03:33 PM
Chris, I'm willing to give it a try.

Two things...is there any site you know where I can see this?

Second, since I'm new at fiddling with templates...have done a bunch of really basic inserts (for e-mail and the 2atonce you sent me...)...please tell me which templates I'd need to comment out the description, etc. I'd also have to take the heading down considerably...have a product at the top that can't be ordered with all the basic info...then just a listing type. Am I correct?

Also, could I have a small color image next to the name showing the color (that way wouldn't have to have the Extended Info pop-up?

Thanks for your help...there are literally hundreds of potential products which have this same configuration...this is just the one I chose to fool with.

NormanRouxel
19-Dec-2003, 06:07 PM
Also, could I have a small color image next to the name showing the color (that way wouldn't have to have the Extended Info pop-up?

That one's easy. If you use Radio Buttons for a choice then you can include the extra image in the HTML for Name field of each choice.

E.g. You've an attribute Colour, wuth choices, Red and Green. Now in the Red choice's HTML for Name field put

Red <img src="redicon.jpg">

and the green one

Green <img src="greenicon.jpg">


You may have to load these images via Advanced / Additional Files.

Norman

p.s. There's a fancy example of that at

http://www.theprostore.co.uk/the_pro_store/acatalog/Sunglasses.shtml

Click one of the Radio Buttons and see what happens.

jeff p
01-Jan-2004, 09:17 PM
Originally posted by NormanRouxel
I've also got some free patches that would automate the system you're trying to use. These hide the total quantity and instead sum all attributes where the attribute name is "Qty Small", "Qty Medium", Qty Large". Basically the choices set in any attribute Starting with "Qty " are summed and presented to the cart as a total. They also prevent the customer fiddling with the totals in the Cart as they can do with your existing system.


Norman...Which patch is it? None of them mention totalling the Qty Small, Qty Medium, etc.? Like to give this a try.

NormanRouxel
01-Jan-2004, 10:06 PM
They're actually in a set of 3 replacement Perl scripts that implement some additionsal functionality I use in conjunction with another software package.

Usually I publish these patches as readme files that describe what you need to do to change the existing scripts. I'm not doing this with these patches as I keep these scripts up-to-date with Actinic changes so I should always have a current set available.

If you let me know the version of Actinic you use I'll send them to you. They're not for general distribution, however.

Norman

jeff p
03-Jan-2004, 06:40 PM
Norman:

Version is 6.1.3.1

Thanks

NormanRouxel
03-Jan-2004, 07:03 PM
Jeff,

Here is a patch that might make your radio buttons with icons look better. It also automates somewhat the embedding of the image names.

Displaying a thumbnail image against each choice's radio button.

To use this all you need to do is to place the supplementary image name in the choices
HTML for Name field within curly brackets. E.g. Blue{widget_blue.jpg}

The image code against the radio button is then created automatically.

In addition you can have these radio buttons spread in columns across the page,
the radio button next to or under the image and the choice name next to the
radio button or under it.

Created 02-01-04

Author Norman Rouxel rouxel@attglobal.net


SETUP

Add the following code to Act_Primary.html (just above the </HEAD> tag).



<SCRIPT LANGUAGE="JavaScript" SRC="radioiconsupport.js" TYPE="text/javascript"></SCRIPT>



Make a file in Site1 called radioiconsupport.js from the following:-



// START Icon Images on Radio Buttons
var colcount;
var colpos;
var textunder;
var buttonunder;
function radioicon(radiohtml, choicename){
var result = choicename.match(/(.*)\{(.*)\}(.*)/); // see if HTML for Name contains {.....}
if ( result != null )
{
var textsep = textunder ? '<br>' : ''; // do we want text under button
var twidth = Math.floor(100 / colcount); // how many do we want per row
document.write('<table width="' + twidth + '%" align=left>'); // start a table if appropriate width
document.write('<tr><td><img src="' + result[2] + '">'); // first cell with image
if ( buttonunder ) // where do we want the button text
{
document.write('<br>' + radiohtml + textsep + result[1] + result[3]); // button under image
}
else
{
document.write('</td><td width="100%" valign=top>'); // new cell next to image
document.write(radiohtml + textsep + result[1] + result[3]); // then radio button and description
}
document.write('</td></tr></table>'); // finally end table
if ( ++colpos >= colcount ) // have we done last column
{
document.write('<br clear=all>'); // if so, new line
colpos = 0;
}
}
else
{
document.write(radiohtml + choicename); // the unaltered choice text
}
}
// END Icon Images on Radio Buttons






Replace Act_VariantRadioButton.html (in Site1) with the following


<!-- VariantRadioButton HTML begin -->
<!-- This template is used for a product variant radio button. -->
<SPAN CLASS="actxsmall">
<script language=JavaScript>
radioicon('<INPUT TYPE=RADIO NAME="NETQUOTEVAR:ATTRIBUTEREF" VALUE="NETQUOTEVAR:CHOICESELVALUE" NETQUOTEVAR:RADIOCHECKED>', 'NETQUOTEVAR:CHOICENAME');
</script>
<noscript><INPUT TYPE=RADIO NAME="NETQUOTEVAR:ATTRIBUTEREF" VALUE="NETQUOTEVAR:CHOICESELVALUE" NETQUOTEVAR:RADIOCHECKED>NETQUOTEVAR:CHOICENAME</noscript>
</SPAN>
<!-- This template is used for a product variant radio button. -->
<!-- VariantRadioButton HTML end -->




In all Product Templates you intend to use with such products
add the following code after all occurences of the line NETQUOTEVAR:PRODUCTFORMBEGIN


<script language=JavaScript>
<!--
colcount = CUSTOMVAR:ICONSPERLINE;
colpos = 0;
buttonunder = CUSTOMVAR:BUTTONUNDER;
textunder = CUSTOMVAR:TEXTUNDER;
// -->
</script>




In Actinic / Advanced / Custom Properties click the "+" sign and create a variable called ICONSPERLINE.
Again click the "+" sign and create a variable called BUTTONUNDER.
Again click the "+" sign and create a variable called TEXTUNDER.

Go to Design / Options / Site Defaults / Properties.

Click the "+" sign and select ICONSPERLINE.
Set it's Value to 1 (for one icon per line - or whatever number across that you want).
If using Business uncheck Searchable and check Use as CUSTOMVAR.

Click the "+" sign and select BUTTONUNDER.
If you want the Radio Button (and Choice name) under the image then set it's Value to 1.
If you want the Radio Button to the right of the image set it's value to 0.
If using Business uncheck Searchable and check Use as CUSTOMVAR.

Click the "+" sign and select TEXTUNDER.
If you want the Choice name under the Radio Button then set it's Value to 1.
If you want the Choice name to the right of the Radio Button set it's value to 0.
If using Business uncheck Searchable and check Use as CUSTOMVAR.

That's setup done.


OPERATION



When you have a product that you want to display an image against a radio button selection
do the following.

For each Choice in the HTML for Name field add the image file name within { and }
(leave out any path name, it will be uploaded via Advanced / Additional Files)

e.g.

You have an Attribute called Colour
Choice 1 uses Blue{widget_blue.jpg}
Choice 2 uses Green{widget_green.jpg}
Choice 3 uses Yellow{widget_yellow.jpg}
etc.

Save these additional images in Site1\PreviewHTML (so they'll appear on site previews).
Make sure that these additional images are loaded via Advanced / Additional Files.
(I've not been able to find a way to persuade Actinic to automatically upload these)

That's that.


NOTES.

The code works in Preview and on Live sites.

If you don't have an image for a choice I'd recommend you use a dummy blank image.
It's not a good idea to have some choices without images and some with for the same attribute.

The number of these choices across the page can be changed via the Custom Property
ICONSPERLINE, the radio button position via BUTTONUNDER and text position via TEXTUNDER.
at either the Catalog, Section or Product levels.
(if using Business remember to uncheck Searchable and check Use as CUSTOMVAR)


LAYOUT

Because of the way radio buttons are created by Actinic there is no way to detect when
the last one has been generated. If you display these buttons in columns and the final row
isn't full then the next attribute name may be displayed in the remaining position.

A work-around for this is to change Act_VariantAttributeName.html to be:-

<br clear=all><span class="actxsmall">NETQUOTEVAR:ATTRIBUTENAME</span><br>

as this will allow further attributes to line up better.

Alternatively you can put "<br clear=all>" into the User Defined Separator field
of the Attribute that uses these buttons.

Tested with IE6, Netscape 7 and Opera 7.


Norman

jeff p
04-Jan-2004, 03:39 AM
Norman:

Thank you...will give this new variation a try tomorrow if possible. Certainly should give a lot of variation and control possibilities.

I e-mailed you re: the 3 perl scripts.

NormanRouxel
04-Jan-2004, 01:23 PM
You may also want to consider a Product Template like this. This is the default template from the demo site modified to place all the choices full width across the bottom of the image and description.



<!-- ProductLine HTML begin -->
<!-- Insert HTML for the top of the individual product -->
NETQUOTEVAR:INCLUDE Act_ProductSeparator.html
NETQUOTEVAR:ENDSEPARATOR
NETQUOTEVAR:PRODUCTFORMBEGIN
<tr>
<td rowspan="2" valign="TOP" align="CENTER"> NETQUOTEVAR:TEMPLATEBEGINXML NETQUOTEVAR:PRODUCTIMAGE </td>
<td valign="TOP" align="LEFT" colspan="2">
<a name="NETQUOTEVAR:PRODUCTANCHOR"><span class="actregular"><b>NETQUOTEVAR:PRODUCTNAME</b></span></a>
<span class="actxsmall">NETQUOTEVAR:PRODUCTREF <br>
NETQUOTEVAR:PRODUCTDESCRIPTION NETQUOTEVAR:EXTINFOLINK</span>NETQUOTEVAR:EXTINFOBUTTON
<br>
<span class="actxsmall">NETQUOTEVAR:PRODUCTBEGINLINKNETQUOTEVAR:PRODUCTLINKTEXTNETQUOTEVAR:PRODUCTENDLINK
NETQUOTEVAR:PRICEEXPLANATION </span><br>
<b>NETQUOTEVAR:PRODUCTPRICE</b>
<span class="actxsmall">NETQUOTEVAR:OTHERINFOPROMPT </span>
<span class="actxsmall">NETQUOTEVAR:DATEPROMPT </span>
</td>
</tr>
<tr>
<td align="LEFT" colspan="2"><span class="actxsmall">
NETQUOTEVAR:CARTERRORXMLNETQUOTEVAR:PRODUCTQUANTITY</span>
</td>
</tr>
<tr>
<td colspan=3>
<span class="actxsmall"><Actinic:ACTIONS>NETQUOTEVAR:ADDTOCARTBUTTON</Actinic:ACTIONS></span>
NETQUOTEVAR:TEMPLATEENDXML
</td>
</tr>
NETQUOTEVAR:PRODUCTFORMEND
NETQUOTEVAR:NEXT
<!-- Insert HTML for the bottom of the individual product -->
<!-- ProductLine HTML end -->



You'll need to patch this for the radio buttons with icons as per the earlier readme.

Norman

jeff p
04-Jan-2004, 11:28 PM
Norman:

Okay...I followed all the steps and the program is acting wacky.

First, ICONSCALE is no longer part of the script. If I Preview the entire site (Control W) I get a small icon. If I Preview Page (Control A) I get the full sized image.

The Button Under and Text Under are both set to 1 so they should appear over each other. If I eliminate ICONSCALE they'll stack but the image is full sized. If I add ICONSCALE at a value of 10, they revert back to the old horizontal layout.

Confusing as all get out. Don't know how to show you unless I upload the changes and then I have no idea what the site will look like.

Suggestions?

jeff p
04-Jan-2004, 11:48 PM
Norman:

Curiosity got the better of me. Updated the site and you can see the results at any of the pages below this section.

http://www.solutions-marketing.net/acatalog/For_You_and_Your_Home.html

The settings are all the same 4 columns, Button Under, Text Under, ICONSCALE (which doesn't seem to be referenced anywhere) is set to 10.

Help...please.

NormanRouxel
05-Jan-2004, 03:41 AM
Jeff,

I think your'e mixing things up from another thread ( probably http://community.actinic.com/showthread.php?s=&threadid=4540 ). I never mention anything called ICONSCALE in this one. This thread started about you wanting to show some small cloth samples against choices as per

http://solutions-marketing.net/acatalog/100__Cotton_Piques.html

and I posted some things in this thread to show you how to attach small unscaled icons to each radio button's HTML for Name and then later added some JavaScript that would automate them abit and make them much more tidy.

To see what you'd done I went to the link you just posted but it didn't lead to any products so I went to

http://www.solutions-marketing.net/acatalog/Towels.html

where I see the multiple icons per line working as expected but I think you want them to appear smaller and to replace the main image when clicked.

This means you must use the more sophisticated patch that allows scaled down icons that replace the main product image when selected then use the attached readme instead.

The thread that discusses it is http://community.actinic.com/showthread.php?s=&threadid=4540

You should undo all the changes made from this thread before starting on the new readme.


Norman

NormanRouxel
05-Jan-2004, 05:22 AM
Whew! I've merged these two patches so you can have:-

1) Scaled down images against the radio buttons that change the main image.

2) Small unscaled icons against the radio buttons that don't affect the main image.

Attached is a new (bigger) readme. Undo any prior changes before using it.

Norman

NormanRouxel
05-Jan-2004, 05:54 AM
Final ;) update. This allows easier previewing.

Norman

jeff p
05-Jan-2004, 01:03 PM
Norman:

Sorry for the previous confusion on my part. I obviously didn't understand that the patch on 4-2 was for icons that didn't change the main image.

I'll give this latest combined patch a try later today and let you know when it's ready for viewing.

Your help--and your incredible expertise--are so greatly appreciated.

Finally, you had said you'd send me some Perl scripts for the Qty Small, Qty Medium, etc., system utilized by the fly fishing site. I'm running Catalog 6.1.3.1. Would love to integrate this ability into the site.

Thanks again.

NormanRouxel
05-Jan-2004, 02:42 PM
I emailed the patches to solutionsmarketing@comcast.net ob the 2nd January. Perhaps you missed the attachment.

Norman

jeff p
05-Jan-2004, 02:54 PM
Sorry Norman, nothing arrived on Jan 2 or 3.

Could you resend. Sorry.

NormanRouxel
05-Jan-2004, 03:04 PM
Just re-sent.

Norman

jeff p
05-Jan-2004, 03:34 PM
Still nothing...strange.

jeff p
05-Jan-2004, 11:38 PM
Norman:

The combined patch works just perfectly.

http://www.solutions-marketing.net/acatalog/Pillows.html

and

http://www.solutions-marketing.net/acatalog/Tote_Bags.html

Also tested the Icons without changing picture [choice] and they work just as well (although I need to do some work to make them the exact same size).

Thanks..

Oh, still no e-mail perl scripts...

NormanRouxel
06-Jan-2004, 01:15 AM
Sending again to jeff@solutions-marketing.net

Norman

jeff p
06-Jan-2004, 12:41 PM
Norman:

All I can surmise is that the US National Security Agency is going over those perl scripts looking for some hidden messages because they aren't getting through to me. Got 31 e-mails yesterday but none from you.

I can give you another e-mail address (jeffpollack@comcast.net) but I since it's also at Comcast don't see what difference that would make.

NormanRouxel
06-Jan-2004, 01:58 PM
I'm trying that e-mail address now. I've sent 2 copies, 1 with the zipfile attached and one without, just to see if either get through.

Nothing has bounced back to me.

Norman

jeff p
06-Jan-2004, 10:11 PM
Norman:

New scripts up on two items. Had to keep the quantity range because pricing permutations are dependent on that factor and it seems to be the only way to control the number of permutations.

The sizes work although, I guess, a customer could use 1,000+ as the pricing range and then only give sizes for 36 shirts. I still need to figure out how to line the size inputs up horizontally. Removing the <BR> from Act_VariantAttributeName only moves the name next to the box...I'd rather have it over the box but all the names and boxes lined up horizontally.

It seems that it must be "Quantity on Confirmation" page because when I tried a Single Add to Cart Button per page, it put the quantity box in even though the template has it commented out.

Here are two links so you can see it...and try it...if you'd like....since this is the first time (I think you said) that it has been used for clothing.
http://www.solutions-marketing.net/acatalog/100__Cotton_Piques.html

and
http://www.solutions-marketing.net/acatalog/Heavyweight_Cotton.html

The thing that's throwing me is that on these two pages I've lost the ability to run the attributes and choices full width...under the product image. It's weird because my pages in the dogs section are fine.

Looked at every template and they seem to be the way they're supposed to be. Will keep looking.

Thanks again...it makes a tremendous difference.

jeff p
08-Jan-2004, 10:44 PM
Norman:

I have checked my Act_Primary.html and it matches the Act_Primary_Dawgs.html where the icons go under the picture, i.e., both contain the line:

<SCRIPT LANGUAGE="JavaScript" SRC="dynamicimagesupport.js" TYPE="text/javascript"></SCRIPT>

Every Act_ProductLine...every one has the necessary code inserted.

But the AllDawgs pages go under the picture and the Golf and T-Shirts don't.

Any suggestions on what else I can check?

P.S....you asked to know when a site puts up NorCascade. It's up at http://www.solutions-marketing.net

NormanRouxel
08-Jan-2004, 11:45 PM
Every Act_ProductLine...every one has the necessary code inserted.

Well there has to be something different between the templates each Product is using.

Why not put some text into the Product Template that you think these pages are using and see if it appears on both the working and faulty pages.

Norman