opencart current url

the seo guy requested to add link to current url to each H1 in the site so i found this code to do this

  <?php  $url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>
  <h1><a href="<?php echo $url; ?>"><?php echo $heading_title; ?></a></h1>

passing parameters to iframe inside wordpress page

i wanted to move two inputs data to iframe in other page in the same site this is what i did

first in the home page i added a form and added this code


<input type="submit" class="wpcf7-form-control wpcf7-submit" value="submit"  onclick="createNewContract();return false;" >

function createNewContract() {

location.href = ' form/'+'?townId='+document.getElementById("townId").value+'&wasteAmount='+document.getElementById("wasteAmount").value;

making new option value column from 2 columns

i have this excel file which contains 2 columns of city names and city code i wanted to make from this 2 columns a new column with this  code

<option value=960>city name </option>

and i found this useful formula (thanks to jamal)

=CONCATENATE(“<option value=”,A2,”>”,B2,”</option>”)

when u put this code in the new column and copy them to the rest of the rows by pressing twice on the + sign .

woocommerce remove fields from checkout

well it is called “Customizing checkout fields using actions and filters”

what u need to do is to add this code in functions.php and u r done , you need to choose what you want to unset

add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
function custom_override_checkout_fields( $fields ) {
    return $fields;

how to add waze link to wordpress

waze is very common and lot request to add link to waze in the footer or contact us to do this u don’t plugins it is very simple link let me explain

first u find your address on google maps :

then from the url we copy the 2 numbers after @ in theis case 32.7142464,35.2547981,35.2547981,13z/data=!3m1!4b1!4m5!3m4!1s0x151c4e7cf16c0fff:0xd2385b30c1275dd6!8m2!3d32.6996331!4d35.3035355?hl=en

in the footer widget we copy this snippets

<p> <a href="waze://?ll=32.7142464,35.2547981&amp;navigate=yes">
<img src=""></a>
Navigate With-
<a href="waze://?ll=32.7142464,35.2547981&amp;navigate=yes">Waze</a>

and we change the numbers according to what we copy from google map

p.s here is the waze pic if u need it icon2