This file contains 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
/* | |
Tạo element paragraph trước element size, đặt class là `float-position-element` trong mục Advanced của element. | |
Thay thế block UX id `lightbox-sizechart` bằng block chứa size-chart của bạn. | |
Nội dung element: <a href="#lightboxsizechart" target="_self" class="button secondary is-xsmall custom-sizeguide"><span>Size Guide</span></a>[lightbox width="800px" id="lightboxsizechart"][block id="lightbox-sizechart"][/lightbox] | |
Demo: https://greencity.woocodex.com/product/jesus-is-my-god-all-over-printed-shirts-221220/ | |
*/ |
This file contains 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
-- Run this SQL commands from PhpMyAdmin or similar ways | |
-- change the wp_ to your tables prefix to make it works | |
-- Script from SalesGen.io | |
DELETE FROM wp_term_taxonomy WHERE taxonomy = 'product_cat' AND count = 0; | |
DELETE t FROM wp_terms t LEFT JOIN wp_term_taxonomy tt ON tt.term_id = t.term_id WHERE tt.term_id IS NULL; |
This file contains 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
-- Run this SQL commands from PhpMyAdmin or similar ways | |
-- change the wp_ to your tables prefix to make it works | |
-- Script from SalesGen.io | |
UPDATE wp_term_taxonomy tt SET count = (SELECT COUNT(object_id) FROM wp_term_relationships WHERE term_taxonomy_id = tt.term_taxonomy_id) WHERE taxonomy = 'product_cat'; |
This file contains 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
-- SalesGen.io | |
-- Change 'category name' by your category name | |
-- Reduce current price 5 | |
update `wp_postmeta` SET meta_value = meta_value - 5 WHERE meta_key IN ('_regular_price', '_price') AND meta_value <> '' AND post_id IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name = 'category name'))); | |
-- Increase current price 5 | |
update `wp_postmeta` SET meta_value = meta_value + 5 WHERE meta_key IN ('_regular_price', '_price') AND meta_value <> '' AND post_id IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name = 'category name'))) |
This file contains 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
-- replace category_name by your category name | |
DELETE FROM wp_posts WHERE ID IN (SELECT object_id from wp_term_relationships WHERE term_taxonomy_id IN(SELECT term_taxonomy_id FROM `wp_term_taxonomy` WHERE taxonomy = 'product_cat' AND term_id IN (SELECT term_id FROM `wp_terms` WHERE name like '%category_name%'))) |
This file contains 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
-- Delete product variants | |
DELETE FROM wp_posts WHERE post_type = 'product_variation' AND post_parent IN (DELETE FROM wp_posts WHERE post_type = 'product' AND post_status = 'trash'); | |
-- Delete main product | |
DELETE FROM wp_posts WHERE post_type = 'product' AND post_status = 'trash'; | |
-- clean metapost | |
DELETE pm | |
FROM wp_postmeta pm |
This file contains 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 | |
// SalesGen.io | |
// WooCommerce plugins, woocommerce upsell, woocommerce buy more save more | |
/*** Follow Steps ***/ | |
// 1 Put the code below into the functions.php of your theme | |
add_filter('woocommerce_get_price_html', 'salesgen_hide_variation_price', 99, 2); | |
function salesgen_hide_variation_price( $v_price, $v_product ) { |
This file contains 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
div[id^=zoid-paypal-buttons]:nth-child(3), | |
div[id^=zoid-paypal-buttons]:nth-child(1) { | |
display: none!important; | |
} |
This file contains 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
/* | |
Anthony from SalesGen.io | |
Demo page https://greencity.woocodex.com/product/let-your-faith-be-bigger-than-your-fear-all-over-printed-shirts-2/ | |
Copy this script into your functions.php file theme | |
*/ | |
add_action('wp_footer', function(){ | |
/* Code By SalesGen.io */ | |
?> |
This file contains 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 | |
//SalesGen.io | |
//remove reviews and additional_information tab | |
add_filter( 'woocommerce_product_tabs', 'salesgen_remove_product_tabs', 98 ); | |
function salesgen_remove_product_tabs( $tabs ) { | |
if(is_product()){ | |
unset( $tabs['additional_information'] ); // Remove the additional information tab | |
unset( $tabs['reviews'] ); // Remove the additional information tab |
NewerOlder