Everything posted by gfxpixeldesigns
- Connecting to REST API & integrating to website
-
Connecting to REST API & integrating to website
Hi all, I'm trying to figure out how to connect to a REST API i have been provided and integrate to a magento web store. I have never worked with REST before and my knowledge of API's stops at basic paypal level with the form post method. Needless to say i dont know where to begin or what i should even be reading up on. The API i have been provided is http://docs.rxverification.apiary.io and my basic understanding is i need to collect customer info and pass it on to the API where results will then be displayed for the customer to select. Where would i start with this and is there any resources i can read over? Thanks
-
Bootstrap 3 unwanted horizontal scrolling in IE
Well dont i feel silly right now . Reset IE to default settings and the problem has gone away so all that time for nothing. Still no idea what caused it; i never use IE so there were no extensions installed but somehow it got borked and caused me a world of pain. Typical Internet Explorer for you that.
-
Bootstrap 3 unwanted horizontal scrolling in IE
Possibly speed related as i noted above if i scroll extra slowly it doesnt happen. jQuery updated to the latest version and i've also made sure all my javascript is under one script which should make the site load extra fast. But you guessed it still the scroll issue is there.
-
Bootstrap 3 unwanted horizontal scrolling in IE
Well i already tried stripping it down yesterday so i was left with the base bootstrap dependencies but the scrollbars were still present. I've checked a dozen bootstrap sites including the offical bootstrap examples and i see the same issue there too. This is why i think it may be a bootstrap bug rather than something i have done but perhaps with it being so difficult to spot its not been documented at all- i must be the first to spot it lucky me. What i could do with is someone running windows 8 (specifically 8.1) with IE11 to verify they are seeing the scrollbars too. The only other machine i have to test on is my XP machine which has IE8 installed and there is no horizontal scroll bar appearing there. IE11 compatibility view shows the issue in all IE versions. My guess if your not seeing the scrollbar in windows 7 is that its IE11 or possibly windows 8 specific but without having any other hardware to test it on i just dont know.
-
Bootstrap 3 unwanted horizontal scrolling in IE
Ok that should be fixed now but still seeing this god for saken scrollbar! In truth the mobile layout needs a bit of fine tuning as there are all sorts of odd things going on there but i wanted to get to the bottom of the scroll bar first. Best to sort all the normal styles before i start messing with anymore media queries .
-
Bootstrap 3 unwanted horizontal scrolling in IE
Okay just saw the grey title bars and presumed ie7 my bad! I cant see that my end but i'll load up my XP machine and check as you may be onto something there.
-
Bootstrap 3 unwanted horizontal scrolling in IE
Thanks for the attachment. i'm guessing that must be IE7? Havent really looked into supporting IE7 to be honest; i have added respond.js for basic media query support but thats probably as far as i'm going with it. So for now its just IE8+ but thanks.
-
Bootstrap 3 unwanted horizontal scrolling in IE
Heres a screenshot of what i am seeing. Note that you have to scroll fast otherwise the scrollbar doesnt appear. The as low as price link seems fine here so i'm not sure what you mean there; could you possibly attach a screen grab?
-
Bootstrap 3 unwanted horizontal scrolling in IE
Running at 1920x1080 here but it happens on all resolutions. I'm also in IE11 desktop mode on windows 8.1
-
Bootstrap 3 unwanted horizontal scrolling in IE
Its very strange and frankly i've never seen anything like it but then again this is my first time with bootstrap. What i have noticed is if i scroll slowly the horizontal scroll bar doesnt appear but if i scroll rapidly it does. I would rather find the issue at hand rather than cover it up but how do you debug something like this as theres no overflow that i can see?
-
Bootstrap 3 unwanted horizontal scrolling in IE
Hi all, I have built this (http://goo.gl/plH43k) using bootstrap 3 and i'm just adding finising touches but something is really bugging me in IE. If i open the site in IE11 or below initially everything loads up and it looks fine but if i start scrolling to the bottom the horizontal scrollbar appears. I've checked all my code and i just cant seem to figure out what is causing this. Its my first time using bootstrap or anything responsive for that matter but i decided to check the bootstrap demo page and i get the same behaviour there (http://getbootstrap.com/examples/theme/) so i'm wondering if this is some sort of bootstrap bug that has been overlooked. Any thoughts?
-
php for each get next array
So i figured out how to get the next index using [$index + 1] but this only works for the first column. Here is my updated code. <?php $_next = $_tierPrices[$index + 1]; $_qty = $_next['price_qty'] - 1; if($_qty > 0) $_format = 'Buy %1$s-' . $_qty . ' for %2$s each'; echo $this->__($_format, $_price['price_qty'], $_price['formated_price']); ?> Which outputs the following. Buy 10-19 for £3.32 each Buy 20-19 for £2.99 each Buy 50-19 for £2.39 each How would i get the above to work for every column, sort of like a loop ? Thanks
-
php for each get next array
I have the following php code which outputs prices and quantities for a set of products. Its running under a foreach. <?php echo $this->__('Buy %1$s - %2$s @ %3$s each', $_price['price_qty'], $_price['price_qty'], $_price['formated_price']) ?> The above currently outputs something like: Buy 10 - 10 @ £3.32 Buy 20 - 20 @ £2.99 Buy 50 - 50 @ £2.39 I want the second quantity number to output the first number from the second row and finally take 1 (- 1). So it would look something like. Buy 10 - 19 @ £3.32 Buy 20 - 49 @ £2.99 Buy 50 - 99 @ £2.39 How would this be done ? I was thinking i could alter my code so it reads the next array although im not sure how to write this correctly. <?php echo $this->__('Buy %1$s - %2$s @ %3$s each', $_price['price_qty'], next($_price['price_qty']) -1, $_price['formated_price']) ?>
-
SQL (phpmyadmin) import CSV with key constraints disabled
I have a CSV file im trying to import into a database using phpmyadmin (cpanel). The tables have key constraints so need to be disabled in order to import successfully only i dont know how to this with the CSV format. Usually i would be doing this directly through SQL and just adding SET FOREIGN_KEY_CHECKS=0 How can i disable the key constraints using the CSV format ? Thanks
-
Google maps with user defined location
Pure determination has got me there in the end and i now have a fully functioning map script. Not only that but im proud to say that i coded the majority of this myself . For anyone interested here is the working example http://rayoflightes.com/gmaps/form1.php My js code is: var geocoder = new google.maps.Geocoder(); function geocodePosition(pos) { geocoder.geocode({ latLng: pos }, function(responses) { if (responses && responses.length > 0) { updateMarkerAddress(responses[0].formatted_address); } else { updateMarkerAddress('Cannot determine address at this location.'); } }); } function updateMarkerStatus(str) { document.getElementById('markerStatus').innerHTML = str; } function updateMarkerPosition(latLng) { document.getElementById('latitude').value = [ latLng.lat() ]; document.getElementById('longitude').value = [ latLng.lng() ]; } function initialize() { var address = document.getElementById("address").value; var latLng = new google.maps.LatLng(-34.397, 150.644); var map = new google.maps.Map(document.getElementById('mapCanvas'), { zoom: 12, center: latLng, mapTypeId: google.maps.MapTypeId.SATELLITE }); geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, draggable: true, position: results[0].geometry.location, }); map.setZoom(18); // Update current position info. updateMarkerPosition(latLng); geocodePosition(latLng); // Add dragging event listeners. google.maps.event.addListener(marker, 'dragstart', function() { updateMarkerAddress('Dragging...'); }); google.maps.event.addListener(marker, 'drag', function() { updateMarkerStatus('Dragging...'); updateMarkerPosition(marker.getPosition()); }); google.maps.event.addListener(marker, 'dragend', function() { updateMarkerStatus('Drag ended'); geocodePosition(marker.getPosition()); }); /* When geocoding "fails", see if it was because of over quota error: */ } else if (status == google.maps.GeocoderStatus.OVER_QUERY_LIMIT) { wait = true; setTimeout("wait = false", 1000); } else { alert("Geocode was not successful for the following reason: " + status); } }); } // Onload handler to fire off the app. google.maps.event.addDomListener(window, 'load', initialize); Enter your address in the first form, submit it and move the marker, you should see the long / lat fields updating as you move. Note that the above will be changing, for starters i need to add some styling and get rid / hide any unecessary fields. Im just glad its working, finally ! Another perhaps more important step is checking this for errors and testing in different browsers. I would appreciate it if someone would have a quick scan over my code for errors. Im not sure about the else if statement myself, it doesnt look quite right but its working so i've left it.
-
Mobile Website Form issues
Its a strange one. Then again opera may have some sort of mobile redirection built in. I really cant replicate this here, what sandbox are you using to test it in ? I've tried ipad lnk and opera mobile desktop link.
-
Mobile Website Form issues
I can also report that changing the flight type works fine in opera mobile.
-
Mobile Website Form issues
I dont see the next buttons on my mobile unless i change the user agent to desktop. With default mobile settings (user agent = mobile) it takes me to a different form with no next buttons link. This works perfectly fine here. If i change my user agent to desktop it does take me to the form with the next buttons but again this works perfectly fine and it doesnt scroll me to the top or anything like that.
-
Mobile Website Form issues
Mike just thought id have a look at this seeing that you helped me so much . I've had a look at the example link on my dell streak 5 which is running android, i've tried opera mobile, firefox, dolphin and the form fills out fine here. Not once did it jump me to the top so im guessing this is a specific mobile device problem or perhaps os based ? Perhaps it would be of use if you could let us know what browser / mobile os your using.
-
Google maps with user defined location
No worries Mike and thank you again for all your help. You have most certainly made me a little more knowledgeable on the javascript side and i hope the code will be of use to someone else as well. I'm still non the wiser on the reverse geocoding, according to the api it should just work on the end there but im wondering if it needs to be inside its own function or something. Anyway i'm giving up for tonight as i have a huge headache but i will tackle this again tomorrow.
-
Google maps with user defined location
Cheers for that I've spent the last few hours reading through javascript tutorials as well as the google api trying to figure out what everything does. I still dont understand all of it but i now have a much better understanding of it all. Just one quick question, simply put what does <body onload="initialize()"> do exactly ? I cant find a definite answer on the web but i would have to assume it loads the javascript the moment the page loads. Is that right ? Your code did indeed work straight away and does everything i need but as i want a few extra's i've made some minor changes. Firstly i needed the map to zoom on the location and the marker to be draggable so i've done this with map.setZoom(18); draggable: true The rest seems to be identical to the simple google example so i've left that as it is, the only expection to this being the jquery autocomplete and reverse geocoding for the marker. I dont really need the autocomplete but i figure its something different and the end user will appreciate it so i have added it. The reverse geocoding is quite important to me though as without it the latitude / longitude fields wont update when the user drags the marker so this is completely necessary. I've implemented it using //Add listener to marker for reverse geocoding google.maps.event.addListener(marker, 'drag', function() { geocoder.geocode({'latLng': marker.getPosition()}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { $('#address').val(results[0].formatted_address); $('#latitude').val(marker.getPosition().lat()); $('#longitude').val(marker.getPosition().lng()); } } }); }); but for some reason this doesnt appear to be working. I've debugged it in firebug and cant find any issues so im presuming im using the wrong identifier or something insanely silly ! Could somebody have a quick look over my code to see if im going wrong anywhere. The entire code for form2 is: <head> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.1.custom.min.js"></script> <script type="text/javascript"> var geocoder; var map; var marker; function initialize() { geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(41.659,-4.714); var options = { zoom: 8, center: latlng, mapTypeId: google.maps.MapTypeId.SATELLITE } map = new google.maps.Map(document.getElementById("map_canvas"), options); var address = document.getElementById("address").value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { map.setCenter(results[0].geometry.location); var marker = new google.maps.Marker({ map: map, draggable: true, position: results[0].geometry.location }); map.setZoom(18); } else { alert("Geocode was not successful for the following reason: " + status); } }); $("#address").autocomplete({ //This bit uses the geocoder to fetch address values source: function(request, response) { geocoder.geocode( {'address': request.term }, function(results, status) { response($.map(results, function(item) { return { label: item.formatted_address, value: item.formatted_address, latitude: item.geometry.location.lat(), longitude: item.geometry.location.lng() } })); }) }, //This bit is executed upon selection of an address select: function(event, ui) { $("#latitude").val(ui.item.latitude); $("#longitude").val(ui.item.longitude); var location = new google.maps.LatLng(ui.item.latitude, ui.item.longitude); marker.setPosition(location); map.setCenter(location); } }); //Add listener to marker for reverse geocoding google.maps.event.addListener(marker, 'drag', function() { geocoder.geocode({'latLng': marker.getPosition()}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[0]) { $('#address').val(results[0].formatted_address); $('#latitude').val(marker.getPosition().lat()); $('#longitude').val(marker.getPosition().lng()); } } }); }); } </script> </head> <body onload="initialize()"> <form class="geocode" method="post"> <input id="address" style="visibility: hidden;" type="textbox" value="<?php echo $_POST["address"]; ?>"> <input type="button" style="visibility: hidden;" value="Geocode" onclick="initialize()"> <div id="map_canvas" style="width:300px; height:300px"></div><br/> <label>latitude: </label><input id="latitude" name="latitude" type="text" value="<?php echo $_POST["latitude"]; ?>"/><br/> <label>longitude: </label><input id="longitude" id="longitude" type="text"value="<?php echo $_POST["longitude"]; ?>"/> <p><label>Name:</label> <input type="text" name="name"></p> <p><label>Street Address:</label> <input type="text" name="street_address"></p> <p><label>City:</label> <input type="text" name="state"></p> <p><label>State:</label> <input type="text" name="state"></p> <p><label>Postal Code:</label> <input type="text" name="postal_code"></p> <p><label>Country:</label> <input type="text" name="country"></p> <p><input type="submit" value="Submit"></p> </form> </body>
-
Google maps with user defined location
No worries thats why i asked . I have changed it to handle one address though and it does actually work. I'm just trying to do something similar using the simple google example.
-
Google maps with user defined location
With a couple changes this appears to be working fine. Am i okay to use this as a base ?
-
Google maps with user defined location
So i think the issue now is how do i execute your codeAddress function without the onlick.