Skip to content

Instantly share code, notes, and snippets.

View sahuspilwal's full-sized avatar

Sahus Pilwal sahuspilwal

View GitHub Profile
@sahuspilwal
sahuspilwal / functions.php
Created August 1, 2019 15:19 — forked from thejamescollins/functions.php
Display product description on WooCommerce shop/category pages
<?php
/**
* Add the product's short description (excerpt) to the WooCommerce shop/category pages. The description displays after the product's name, but before the product's price.
*
* Ref: https://gist.github.com/om4james/9883140
*
* Put this snippet into a child theme's functions.php file
*/
function woocommerce_after_shop_loop_item_title_short_description() {
global $product;
@sahuspilwal
sahuspilwal / gist:71b21143f026664405234451271b0415
Created April 2, 2017 21:44 — forked from pelmered/gist:9593f6ca25a84a7ce962
Remove and reset all products and categories in magento
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_product_bundle_option`;
TRUNCATE TABLE `catalog_product_bundle_option_value`;
TRUNCATE TABLE `catalog_product_bundle_selection`;
TRUNCATE TABLE `catalog_product_entity_datetime`;
TRUNCATE TABLE `catalog_product_entity_decimal`;
TRUNCATE TABLE `catalog_product_entity_gallery`;

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@sahuspilwal
sahuspilwal / Dot underscore
Created February 8, 2017 15:41 — forked from pierrehenri220/Dot underscore
Remove dot underscore files in mac / linux inside the current directory
find . -name "._*" -exec rm -f {} \;

Contract


Between us [company name] and you [customer name]

Summary: