Posts

Showing posts with the label prestashop

jPlayer multiple instances issue

Image
Clash Royale CLAN TAG #URR8PPP jPlayer multiple instances issue I've created multiple instances of jPlayer on a product list, at main page of my shop. In file product-list.tpl I've attached iframe inside foreach loop which load jPlayer tracks from custom directories - based on a product name. Every instance of jPlayer have individual ID: #jquery_jplayer_1, #jquery_jplayer_2, etc. Everything works fine except playing just from one jPlayer at the same. When some track is playing and then we click on another player there is two songs playing at the same time. I've tried few solutions to solve this problem but nothing seems work. There is script where every instance of jPlayer is created: <script type="text/javascript"> var querystring = window.location.search, match = querystring.match(/playerNumber=(.*)?&*/), playerNumber = match[1]; new jPlayerPlaylist({ jPlayer: "#jquery_jplayer_"+playerNumber, cssSelectorAncestor: "#jp_container_...

Prestashop Web service to return JSON

Image
Clash Royale CLAN TAG #URR8PPP Prestashop Web service to return JSON After extensive search over internet i am sure that Prestashop does not return data in JSON format, it only returns in XML format (which leads to cross domain accessing issue unfortunately). Now, I am trying to convert XML(returned by Prestashop) to JSON. I want to write php code which could take XML from web service and sent back JSON. For this purpose i tried many tutorial but in vain. The converted JSON does not have value in it, so is useless. The methods i tried are listed below. http://www.sitepoint.com/php-xml-to-json-proxy/ PHP convert XML to JSON XML to convert: <name> <language id="1" xlink:href="http://localhost/prestashop/api/languages/1"> <![CDATA[ iPod Nano ]]> </language> </name> Returned JSON: "name":{"language":{"@attributes":{"id":"1"}}} I hope for the help in this regard. Thank you. ...