This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | php bin/magento config:set catalog/search/engine elasticsearch7 | |
| php bin/magento config:set catalog/search/elasticsearch7_server_hostname localhost | |
| php bin/magento config:set catalog/search/elasticsearch7_server_port 9200 | |
| php bin/magento config:set web/unsecure/base_url https://www.test.de/ | |
| php bin/magento config:set web/secure/base_url https://www.test.de/ | |
| Create admin user | |
| ----------------- | |
| php bin/magento admin:user:create --admin-user=navnit --admin-password=test@123 [email protected] --admin-firstname=born --admin-lastname=QA | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Step 1: | |
| File to changed should be added to the git | |
| git add -f vendor/dotmailer/dotmailer-magento2-extension/Api/Data/CouponAttributeInterface.php | |
| Step 2: | |
| Then make the changes to the core file | |
| Step 3: | |
| After making the changes run | |
| git diff vendor/dotmailer/dotmailer-magento2-extension/Api/Data/CouponAttributeInterface.php > m2-hotfixes/webapi-fix.patch | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| add_action('woocommerce_review_order_before_payment', 'gst_checkout_field'); | |
| function gst_checkout_field( $checkout ) { | |
| echo '<div id="gst_checkout_field_sec">'; | |
| woocommerce_form_field( 'gst_no', array( | |
| 'type' => 'text', | |
| 'class' => array('my-field-class orm-row-wide'), | |
| 'label' => __('GST No'), | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function my_previous_post_where() { | |
| global $post, $wpdb; | |
| return $wpdb->prepare( "WHERE p.menu_order < %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); | |
| } | |
| add_filter( 'get_previous_post_where', 'my_previous_post_where' ); | |
| function my_next_post_where() { | |
| global $post, $wpdb; | |
| return $wpdb->prepare( "WHERE p.menu_order > %s AND p.post_type = %s AND p.post_status = 'publish'", $post->menu_order, $post->post_type); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => -1, | |
| 'tax_query' => array( | |
| 'relation' => 'AND', | |
| array ( | |
| 'taxonomy' => 'product_cat', | |
| 'field' => 'slug', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => -1, | |
| 'tax_query' => array( | |
| 'relation' => 'AND', | |
| array ( | |
| 'taxonomy' => 'product_cat', | |
| 'field' => 'slug', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $args = array( | |
| 'post_type' => 'product', | |
| 'post_status' => 'publish', | |
| 'posts_per_page' => -1, | |
| /*'meta_key' => 'ingredients', | |
| 'meta_value' => ' ', | |
| 'meta_compare' => '!='*/ | |
| 'meta_query' => array( | |
| 'relation' => 'AND', | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>faq</title> | |
| <style> | |
| /*FAQS*/ | |
| .faq_question { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| function break_content($text,$length){ | |
| $text = trim($text); | |
| if(strlen($text)<$length+10) | |
| return $text;//don't cut if too short | |
| $break_pos = strpos($text, ' ', $length);//find next space after desired length | |
| $visible = substr($text, 0, $break_pos); | |
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| //Show post category wise shortcode [show_post_category_wise] | |
| add_shortcode('show_post_category_wise','show_post_category_wise_shortcode'); | |
| function show_post_category_wise_shortcode(){ | |
| $terms = get_terms('category'); | |
| $html = ''; | |
| if($terms) { | |
| foreach($terms as $term){ | 
NewerOlder