Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    20
    Plugin Contributions
    0

    Idea or Suggestion Recognize attributes , product id from zencart from a flash info page

    Hi there,

    First of all, excuse my horror english.

    Thanks a lot for all the comunity for your help in this forum.

    I will post a very useful method to integrate flash in the zencart sistem.

    You can view how it looks in Zebra Vinilos Decorativos - GO TO ANY (-NOT MURAL-) PRODUCT TO SEE IT -

    I sell products that everyone of them use the same atributes names an options and values

    Atribute colors with a lot of posibilities

    Atribute Finisihing with 2 posibilities Mate and Shine

    Atribute orientation Normal or mirror.

    First of all I create the atributes in admin of zencart

    then I take note of the id of every atribute and option

    then, I create good looking buttons on a nice interface, where users can change the atributes in a so mutch more interactive way.


    when the user selected everything as he wants, he clicks flash button ADD

    then I pass the query that adds that product from flash to zencart adding all the hidden values like color and its selected option,


    Code:
    sendVars.products_id=_global.products_id; // data obtained from a javascript that recognizes url of the html page -- IF YOU NEED EXPLANATION ON HOW TO MAKE THIS METHOD IN FLASH, I WILL TELL IN OTHER POST
    sendVars.cart_quantity="1";
    
    if(_global.acabado=="mate"){
    	_global.acab="67";	// data decided by the user in the flash environmente
    }
    
    if(_global.acabado=="brillo"){ // user selected shine as finishing
    	_global.acab="66"; // data decided by the user in the flash environmente
    }
    
    sendVars["id[7]"] =_global.acab;// ID 7 ( wich is atribute name FINISIHING is MATE or SHINE -- defined in the 2 conditions above
    
    if(_global.orientacion=="normal"){
    	_global.orient="68";	// data decided by the user in the flash environmente
    }
    
    if(_global.orientacion=="espejado"){// user selected mirror as orientation
    	_global.orient="69";// data decided by the user in the flash environmente
    }
    
    sendVars["id[8]"] =_global.orient;//// ID 8 ( wich is atribute name ORIENTATION is NORMAL or MIRROR -- defined in the 2 conditions above
    
    sendVars["id[6]"] =_global.usercolor;//// // ID 6 ( wich is atribute name COLOR is decided by the user in the flash environment
    
    sendVars["id[txt_9]"] = _global.medidasazen;//// // ID 9 ( wich is atribute name MEDIDAS is decided by the user in the flash environment /// this is just a simulation , this atribute doesn´t change the price, it only tells me the size that the user selected, to change the price I used a very useful tactic explained in this forum  http://www.zen-cart.com/forum/showthread.php?t=70499    IF YOU NEED EXPLANATION ON HOW TO MAKE THIS METHOD IN FLASH, I WILL TELL IN OTHER POST
    
    _global.peticion="http://www.mydomain.com/mystore/index.php?main_page=product_info&cPath="+_global.cPath/*    OBTAINED BY JAVASCRIPT THAT RECOGNIZES THE URL AND THEN COLLECT THE CPATH   */+"&products_id="+_global.products_id+"&action=add_product";
    	
    
    
    sendVars.send(_global.peticion, "_self", "POST");// this sentence send the query to zencart.




    In the product info display , I disabled the php code that displays the atributes AND THE BUTTON "BUY" ( to avoid show the atributes twice, once in flash and again in php )



    This idea is only useful if every product of your shop uses the same atributes.

    If you have different atributes for different products in your shop, just ignore this post.

    Thanks to everyone and cya !

  2. #2
    Join Date
    Apr 2009
    Posts
    20
    Plugin Contributions
    0

    Idea or Suggestion Re: Recognize attributes , product id from zencart from a flash info page

    javascript recognize url is explained here

    http://www.zen-cart.com/forum/showthread.php?p=718502

 

 

Similar Threads

  1. v151 Hide some attributes from product info display.
    By Marta van Eck in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 27 May 2014, 05:46 PM
  2. Replies: 1
    Last Post: 14 Jan 2013, 03:43 AM
  3. Exporting product & tax info from Zencart
    By rcaroe in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 18 Aug 2010, 04:38 AM
  4. Replies: 3
    Last Post: 14 Jun 2010, 08:12 PM
  5. Removing Zencart info from page title bar
    By terrykiwi in forum Customization from the Admin
    Replies: 1
    Last Post: 29 Apr 2008, 03:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR