| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Embedding Flash/XML using a div | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hey there, I am having some trouble embedding this flash document found here: http://p-treasures.com/banner on to the index page (http://p-treasures.com/) in that black box. When I designed the static html/css template, it worked fine. When I put the same code into X-Cart, it won't work! I don't understand, but I thought it *might* have something to do with smarty.class.php stopping embedding of xml/swf into divs.
Any help would be very much appreciated, and I will donate to the person who helps me.
__________________
X-Cart Pro 4.2.2 |
|||||||
#2
|
|||||||||
|
|||||||||
![]() The javascript code on your index page looks different than the code on the other link you posted.
Are you using {literal}{/literal} in your template so smarty will not try and compile the javascript? See this Also - you have this commented out - is that intended?: // flashvars.settingsXML = "../banner/settings.xml";
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
#3
|
|||||||
|
|||||||
![]() Hey thanks for your reply. I am editing custom/service_head.tpl and this is the code:
Code:
__________________
X-Cart Pro 4.2.2 |
|||||||
#4
|
|||||||||
|
|||||||||
![]() Assuming all your variables/parameters are set up correctly, that leaves your paths to the files.
I am not sure why you need the "../" in the paths - you have XCART installed at the top of your directory structure - not a sub-directory, correct? Then XCART is running at the top of your directory structure. Also - depending upon how the script/flash you are using is written - the path defined for your xml file may not be relative to home.php? The information for how to set the path should be in the script/flash or any documentation provided.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#5
|
|||||||
|
|||||||
![]() It says to add this line:
Code:
Just to clarify, this is where ALL the flash files are (xml, images, swf file, the js files required by the flash script) in www/banner/. X-Cart is on the root. The code as it stands now based off of what you said is this: Code:
__________________
X-Cart Pro 4.2.2 |
|||||||
#6
|
|||||||||
|
|||||||||
![]() Not skin1 - it is true the templates are in skin1 - but what is executing (home.php, etc.) is at your top level.
Without going over the documentation about what exactly the parameters of your script are - I suspect this: flashvars.folderPath = "banner" flashvars.settingsXML = "banner/settings.xml" It that does not work - I would go back to what you were originally trying to do - get it to work outside of XCART first. But this time - put your experimental file at your top level directory. Once you get it to work there - do the same thing in XCART. I don't think there is anything in XCART that will prevent it from working.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#7
|
|||||||
|
|||||||
![]() I added that but man, it still won't work. It works fine at http://p-treasures.com/banner/ and that is at the root directory (obviously from the url). It has to be something x-cart is doing. Even if the xml was wrong, the SWF should still show up! It would just not work correctly. As long as I can get the swf to show up, I think I can figure out the rest. I just don't understand.
__________________
X-Cart Pro 4.2.2 |
|||||||
#8
|
|||||||||
|
|||||||||
![]() Debug your file in your top level directory - http://p-treasures.com - not in the banner subdirectory. XCART runs in your top level directory. If you get it to run at your top level outside of XCART - then you know you have your parameters/paths set correctly.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
#9
|
|||||||
|
|||||||
![]() So I need to create a file like banner.php and run the js and html to make it work on p-treasures.com/banner.php? I can keep all the script files in www/banner/ right? Just the js and the html div should be on the top level, correct?
__________________
X-Cart Pro 4.2.2 |
|||||||
#10
|
|||||||||
|
|||||||||
![]() Yes - I think that is the best way. Once you get the file at http://p-treasures.com/banner.php to work - then you know you have the parameters & paths set up correctly. Then - drop that code into the XCART templates - which you have already figured out.
Your other option - which would be messier - is to get rid of the banner subdirectory and move all the code inside to the top level. You might look for guidance in the documentation for the script/flash, or , if they gave you the flash source, you can see in the actionscript how they are referencing the xml file. Usually - they will try and give you information about properly setting up paths to the xml. This all has to be set up correctly for such scripts/flash to work properly. The flash has to be able to find the xml file.
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|