Forums / Templates, Stylesheets, Page Layout / Recognize URL with JScript so you can identify Cpath & prodID - Useful in Flash

Recognize URL with JScript so you can identify Cpath & prodID - Useful in Flash

Locked

Views: 1,545

Results 1 to 1 of 1
This thread is locked. New replies are disabled.
21 Apr 2009, 8:56 AM
#1
zebra avatar

zebra

New Zenner

Join Date:
Apr 2009
Posts:
18
Plugin Contributions:
0

Recognize URL with JScript so you can identify Cpath & prodID - Useful in Flash

If you would like to design a product info page in flash, as in Zebra Vinilos Decorativos - go to any product to see it -

Then , you will need to know the cpath and prod id becuase you need it when you send the query action=add_product form the BUY button in flash

So how do you do it?

in the first feyframes in flash you trigger this

getURL('javascript:window.document.myFlash.SetVariable("myVar", document.URL)');

a few keyframes later ( let flash recibe the result ) you collect the result in a flash variable

_global.uerele=myVar;

then is easy in flash to find in that string the Cpath and the products ID

BUT . ATTENTION!

in your zen cart product description be sure that you include this :

name="myFlash" swLiveConnect="true"

Very well explained in

http://www.adobe.com/es/support/flash/ts/documents/javascript_comm.htm

Hope you find it usefull and excuse my horror english

regards,