Tuesday, November 6, 2018

React Components in loop

How to create dynamic react component in loop

state={

  Userinfo:[

    { name: 'Ravish Jha', Location: 'India'},

    { name: 'Ritika Jha', Location: 'USA'},

    { name: 'Raju Jha', Location: 'UK'}

  ]

} 
 
render() {
return (
<div className="App">
{
this.state.Userinfo.map(info => {
return <Useroutput UserName= {info.name}
UserLocation
={info.Location} />
})}
</div>
);
}
 

How to remove Checkout Step 2, Step 3, Step 4, Step 5 in opencart 2.3.0.2

Dear Friends :)

Here is some Steps for remove Open cart checkout Steps:

For steps 2 : { Billing Details }

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 

Steps: 1
And find 


Line Number 129
$('#collapse-payment-address .panel-body').html(html);
 And Replace with

$('#collapse-payment-address .panel-body').html(html);
//Remove Billing Details
$('#collapse-payment-address #button-payment-address').trigger('click');
Enjoy Comments are welcome.

For steps 3 :{ Delivery Details}

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 
And find 


Line Number 382 
$('#collapse-shipping-address .panel-body').html(html);
 And Replace with

 $('#collapse-shipping-address .panel-body').html(html);
// Remove Delivery Details
$('#collapse-shipping-address #button-shipping-address').trigger('click');

Enjoy Comments are welcome

For steps 4 : { Delivery Method }

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 

And find 


$('#button-shipping-address').button('reset');
                    },
                    success: function(html) {
                        $('#collapse-shipping-method .panel-body').html(html);
 And Replace with

$('#button-shipping-address').button('reset');
                    },
                    success: function(html) {
      //Ravish code
                        $('#collapse-shipping-method .panel-body').html(html);
                        $('#collapse-shipping-method #button-shipping-method').trigger('click');
Enjoy Comments are welcome

For steps 5 : { Payment Method  }

Open your checkout.tpl
catalog\view\theme\default\template\checkout\checkout.tpl 

And find 


 $('#button-shipping-method').button('reset');
                    },
                    success: function(html) {
                        $('#collapse-payment-method .panel-body').html(html);
 And Replace with

 $('#button-shipping-method').button('reset');
                    },
                    success: function(html) {
                        $('#collapse-payment-method .panel-body').html(html);
      // Ravish Code
      $('#collapse-payment-method #button-payment-method').trigger('click');

Enjoy Comments are welcome
Now You Removed all your steps if code is working fine please like and follow my page or comments on post

Thanks for Visit My Blog

Tuesday, August 21, 2018

Css hack for IE11+, Edge


Hi
CSS Hack for IE browser version IE 11 + and edge , window 10

@charset "";

_:-ms-lang(x),

.selector {
top: 2px !important;
}

Let me know if code not working or facing some issue

Sunday, February 18, 2018

JavaScript rewrite URL


if (document.URL == "http://www.domainName.com/") {
console.log(document.URL);
        var restOfUrl = window.location.href.substr(11);
        window.location = "http://" + restOfUrl;
    }

Comments are welcome

Friday, February 9, 2018

wordpress post subcategory list with count

Hi,

When using WordPress as a CMS, or even as a blog you might want to display subcategories on category pages.

<?php
    if (is_category()) {
    $this_category = get_category($cat);
    }
    ?>
    <?php
    if($this_category->category_parent)
    $this_category = wp_list_categories('orderby=id&show_count=0
    &title_li=&use_desc_for_title=1&child_of='.$this_category->category_parent.
    "&echo=0"); else
    $this_category = wp_list_categories('orderby=id&depth=1&show_count=0
    &title_li=&use_desc_for_title=1&child_of='.$this_category->cat_ID.
    "&echo=0");
    if ($this_category) { ?>
 
<ul>
<?php echo $this_category; ?>
 
</ul>
 
<?php } ?>

Comments are welcome :)