The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #1  
Old 04-25-2014, 08:33 AM
Jeremy Marshall's Avatar
Jeremy Marshall is offline
Junior Member
 
Join Date: Apr 2014
Posts: 1
Default

JQuery Mobile


Hi

love ecwid and I'm new at it

I was trying to integrate the mobile site into my jqm site with this sort of thing

$(document).on("pageinit", "#shop-page", function (event) {
$("#ecwid").load('//xxxxxxxxxxx.ecwid.com');
})

where #ecwid is a div in a page

but I get a
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://m.localhost:4443' is therefore not allowed access.

I suppose this isn't allowed but how can I embed my store in a page?
  #2  
Old 04-29-2014, 08:13 AM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by Jeremy Marshall View Post
Hi

love ecwid and I'm new at it

I was trying to integrate the mobile site into my jqm site with this sort of thing

$(document).on("pageinit", "#shop-page", function (event) {
$("#ecwid").load('//xxxxxxxxxxx.ecwid.com');
})

where #ecwid is a div in a page

but I get a
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://m.localhost:4443' is therefore not allowed access.

I suppose this isn't allowed but how can I embed my store in a page?
Hello,

This is a security limitation in modern browsers called 'same origin policy'. It allows the script coming from your site to make AJAX requests only to the domain of your site and not to the other domains. Without such limitation anyone could do virtually anything on the web on behalf of the unsuspecting customer who is visiting your page.

In order to load Ecwid mobile version inside your jqm site, I suggest you to use iFrame element, with link to mobile version of your Ecwid store in source.

For example:
Code:
$(document).on("pageinit", "#shop-page", function (event) {
   $('<iframe>', {
       src: '//xxxxxx.ecwid.com/m',
       id:  'myFrame',
       frameborder: 0,
       scrolling: 'yes',
       width: 500,
       height: 500
   }).appendTo('#ecwid');
})
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
jquery mobile, mobile app store

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:24 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.