Advertisement
salmancreation

Woocomerce

Jun 22nd, 2015
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.23 KB | None | 0 0
  1. 1. woocommerce useful links
  2.  
  3.  
  4. http://www.skyverge.com/blog/category/tutorials/woocommerce-tutorials/
  5. http://www.woothemes.com/woocommerce/
  6. http://docs.woothemes.com/documentation/plugins/woocommerce/
  7.  
  8. http://code.tutsplus.com/articles/an-introduction-to-theming-woocommerce-for-wordpress--wp-31577
  9.  
  10. https://support.woothemes.com/hc/en-us/articles/203106357-Add-Login-Logout-Links-To-The-Custom-Primary-Menu-Area
  11. http://docs.woothemes.com/document/woocommerce-shortcodes/
  12.  
  13. http://www.woothemes.com/2014/08/five-quick-woocommerce-customization-tips/
  14.  
  15. http://www.skyverge.com/blog/get-woocommerce-page-urls/
  16.  
  17. http://www.pootlepress.com/2014/04/100-woocommerce-tips-tricks/
  18.  
  19.  
  20.  2.woocomarce page এর Log-in, Account, Cart, Chakout কে ডাইনামিক করার জন্য header.php পেজের শুরুতে নিচের কোডটি ব্যাবহার করুন।
  21. <?php
  22. global $woocommerce;
  23. ?>
  24.  
  25.  
  26.  
  27. 3.pages -                      shortcode
  28.   My Account -                 [woocommerce_my_account]
  29.   cart       -                 [woocommerce_cart]
  30.   Checkout -                    [woocommerce_checkout]
  31.   Wishlist -                    [yith_wcwl_wishlist]
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  4. //NUMBER OF PRODICTS TO DISPLAY ON SHOP PAGE
  39.  
  40. add_filter('loop_shop_per_page', create_function('$cols', 'return 4;'));
  41.  
  42. এখানে একটা ফাংশন তৈরী করা হয়েছে ভেরিযেবল $cols হল column, retun 4 হল কতগুলো product shop page a প্রদর্শন করবে।এখানে আপনি ১২ দিলে page a ১২ টি product প্রদর্শন করবে।
  43.  
  44.  
  45. 5./* for log in log out menu https://wordpress.org/support/topic/send-users-to-woocommerce-my-account-page-instead-of-default-wp-loginlogout-pa */
  46.  
  47. /*Add LoginOut in Top Menu */
  48. add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
  49. function add_loginout_link( $items, $args ) {
  50.     if (is_user_logged_in() && $args->theme_location == 'main_top_menu') {
  51.             $items .= '
  52. <li><a href="'. wp_logout_url( get_permalink( wc_get_page_id( 'myaccount' ) ) ) .'">Log Out</a></li>
  53. <li><a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">My Account</a></li>
  54.  
  55.  
  56. ';
  57.     }
  58.     elseif (!is_user_logged_in() && $args->theme_location == 'main_top_menu') {
  59.             $items .= '
  60. <li><a href="' . get_permalink( wc_get_page_id( 'myaccount' ) ) . '">Log In</a></li>'; } return $items; }  
  61.  
  62.   6. for Enable registration on the "My Account" page  go to WooCommerce > Settings > go to Accounts tab > in Registration Options  Enable registration on the "My Account" page
  63.  
  64.  
  65.  
  66.     7.plugin - https://wordpress.org/plugins/yith-woocommerce-wishlist/
  67.   8.quickstart theme http://www.woothemes.com/storefront/
  68.     9.https://github.com/bassjobsen/woocommerce-twitterbootstrap
  69.     https://github.com/bassjobsen/jbst
  70.     https://wordpress.org/plugins/woocommerce-twitterbootstrap/
  71.    
  72.    
  73.    
  74.    
  75.    
  76.    
  77.     9.How to fix: Default WooCommerce CSS not working properly
  78.     <body <?php body_class(); ?>>
  79.    
  80.     or //link http://stanhub.com/how-to-fix-default-woocommerce-css-not-working-properly/
  81.    
  82.     <div class="woocommerce">
  83.    page content goes here
  84. </div>
  85.  
  86.  
  87.  
  88.  
  89.  
  90. 10 . page link - <a href="<?php bloginfo('home'); ?>/wp-login.php"></a> //default  wp login link
  91.  
  92.  
  93. <a href="<?php bloginfo('home'); ?>/wp-login.php?action=register">Register</a> // default wp Register link
  94.  
  95.  
  96.  
  97.  
  98. <a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>">My account </a> // woothemes My Account link http://docs.woothemes.com/document/display-my-account-link-in-a-template-file/
  99.  
  100. <a href="<?php echo get_permalink( get_option('woocommerce_cart_page_id') ); ?>">Cart</a> // Cart url
  101.  
  102. <a href="<?php echo get_permalink( get_option('woocommerce_checkout_page_id') ); ?>">checkout</a> //checkout
  103.  
  104. <a href="<?php echo get_permalink( get_option('woocommerce_shop_page_id') ); ?>">Shop</a> // Shop url
  105.  
  106.  
  107. <a href="<?php echo get_permalink( get_option('yith_wcwl_wishlist_page_id') ); ?>">Wishlist</a>//Wishlist
  108.  
  109. 11.// Customize Woocommerce Related Products Output
  110.  function woocommerce_output_related_products() {
  111.  woocommerce_related_products(6,3);       // Display 6 products in 3 columns
  112.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement