Q:
My Web site is built with MacroMedia's Dreamweaver. There is a
restriction in Dreamweaver that all name= options on the PAGE (as
opposed to in that single form) must be unique. Thus the name=add
in the order image becomes name=add, name=add2, name=add3 etc.
My question is: will this have an adverse effect upon the cgi
requests? I have tried it a few times and it seems to work, but I
am hesitant to make the code public. Can you clarify what might
need to be done?
A:
It will USUALLY work, since add is the default operation
of the cart. Some special purpose add items want to see that
add button be name=add variable populated so test as you go.
The really safe way to do it would be to include this with
each item:
The same technique will work for view.x and checkout.x
With those hidden variables included, it will not matter what the image is named
and full compatibility is assured.
The same issue may come up with name=item. You would use name=item_something
name=item_somethingelse. (Any unique text AFTER the underscore will do)
op variables would then be named op1_something to match item_something.
This naming approach is actually the approach we use if you'd wanted
to have more than one item per FORM. Dreamweaver just expands the
necessity to use it to a per PAGE situation.
For more information on this naming convention, see the FAQ chapter on
"Multi-item additions to cart".
Got any other Dreamweaver problems or hints? Please send them in.