Home / Sushil_kumar (page 5)

Sushil_kumar

Woo-commerce simple product add custom field for vendor price and commission price on MRP

Woo-commerce simple product add custom field for vendor price  and commission price on MRP

Code copy and past in them functions.php , its work fine. add_action( 'woocommerce_product_options_pricing', 'wc_vendor_price_product_field' ); function wc_vendor_price_product_field() { woocommerce_wp_text_input( array( 'id' => 'vendor_price', 'class' => 'wc_input_price short', 'label' => __( 'Vendor Price', 'woocommerce' ) . ' (RS) ' ) ); } add_action( 'save_post', 'wc_vendor_price_save_product' ); function wc_vendor_price_save_product( $product_id ) { …

Read More »

WooCommerce Product Variations Grid or Table form with add to cart button

woocommerce-product-variation-grid-table

WooCommerce Product Variations Grid or Table form with add to cart button. Copy and Paste the code in your theme function.php function find_valid_variations() { global $product; $variations = $product->get_available_variations(); $attributes = $product->get_attributes(); $new_variants = array(); // Loop through all variations foreach( $variations as $variation ) { // Peruse the attributes. …

Read More »

How to hack wordpress website by linux?

WPScan.rb is a nifty bit of program that allows you to scan WordPress sites for information as well as do some fun stuff.Say for example you want to “hack” into your friends WordPress site :-)…or just get some information, whatever. I’m using BackTrack 5 r3 for this tutorial but you …

Read More »

Create swtch color on product list page in Magento

Copy and past the code . where you want to display color  below the name or above the name. follow the following steps: images updated in configurable simple product  acording to color . Change Visibility *: catalog search  List.phtml <? if($_product->getTypeId() == "configurable"): $conf = Mage::getModel('catalog/product_type_configurable')->setProduct($_product); $simple_collection = $conf->getUsedProductCollection()->addAttributeToSelect('*')->addFilterByRequiredOptions(); foreach($simple_collection …

Read More »

Magento: How to check if current page is homepage?

1.) // Put your homepage-only code in here. 2.) if($this->getIsHomePage()) { echo 'You are in Homepage!'; } else { echo 'You are NOT in Homepage!'; } 3.) $routeName = Mage::app()->getRequest()->getRouteName(); $identifier = Mage::getSingleton('cms/page')->getIdentifier(); if($routeName == 'cms' && $identifier == 'home') { echo 'You are in Homepage!'; } else { echo …

Read More »
0

December 10, 2016

Clear all