Skip to main content

Posts

Showing posts from August, 2016

Media Query

<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <style> body {     background-color:lightgreen; } @media only screen and (max-width: 500px) {     body {         background-color:lightblue;     } } </style> </head> <body> <p>Resize the browser window. When the width of this document is less than 500 pixels, the background-color is "lightblue", otherwise it is "lightgreen".</p> </body> </html>

Get Data From Ajax Request

page 1. <div class="container"> <div class="frmDronpDown">     <div class="row">             <label>Country:</label><br/>         <select name="country" id="country-list" class="demoInputBox" onChange="getState(this.value);">         <option value="">Select Product </option>          <?php   $sql2 = 'SELECT * FROM oc_product WHERE status=1'; $query2 = $this->db->query($sql2); foreach($query2->rows as $result2){   ?>   <option value="<?php echo $result2['product_id']; ?>"><?php echo $result2['model']; ?></option>   <?php   }    ?>                                 </select> ...

Get Single Product By ID in Opencart

<?php if(!empty($_POST["country_id"])) {     $query ="SELECT * FROM oc_product WHERE product_id = '" . $_POST["country_id"] . "'";     $results = $this->db->query($query);   $query2 ="SELECT * FROM oc_product_description WHERE product_id = '" . $_POST["country_id"] . "'";   $results2 = $this->db->query($query2);   $rowresults2 = $results2->row;   $rowresults = $results->row;   $name1 = $rowresults['model'];   $name2 = $rowresults2['name'];   $name3 = $rowresults['price'];   $name4 = 'Exe.' ?>

Get product From Open Cart

<select name="country" id="country-list" class="demoInputBox" onChange="getState(this.value);">         <option value="">Select Product </option>          <?php   $sql2 = 'SELECT * FROM oc_product WHERE status=1'; $query2 = $this->db->query($sql2); foreach($query2->rows as $result2){   ?>   <option value="<?php echo $result2['product_id']; ?>"><?php echo $result2['model']; ?></option>   <?php   }    ?>

Smooth Scrolling And Remove hashtag (#) from url

<script type="text/javascript">     $(function() {   $('a[href*="#"]:not([href="#"])').click(function() {     if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {       var target = $(this.hash);       target = target.length ? target : $('[name=' + this.hash.slice(1) +']');       if (target.length) {         $('html, body').animate({           scrollTop: target.offset().top         }, 1000);         return false;       }     }   }); });     </script>