While I can't find an exact course I want, I found a list of institutions
When I am not vain, I am ...
Thursday, April 9, 2026
Friday, May 30, 2025
linux command
//find one level down exactly for docx without base name
find . -mindepth 2 -maxdepth 2 -type f -name "*.docx" -exec basename {} \;
find . -mindepth 2 -maxdepth 2 -type f -name "*.docx" ! \( -iname "*on-going*" -o -iname "*on_going*" \) -exec basename {} \;
find . -mindepth 2 -type f -name "*.docx" -exec basename {} \;
find . -type f -exec stat -f "%m %N" {} + | sort -n | tail -1 | cut -d' ' -f2-
find . -mindepth 2 -type f -name "*.docx" | \
awk -F/ '
{
dir = "";
for (i = 2; i < NF; i++) dir = dir $i "/";
folder = dir;
cmd = "stat -c %Y \"" $0 "\"";
cmd | getline mtime;
close(cmd);
if (mtime > max[folder] || !(folder in max)) {
max[folder] = mtime;
latest[folder] = $0;
}
}
END {
for (f in latest) {
cmd = "basename \"" latest[f] "\"";
cmd | getline fname;
close(cmd);
print fname;
}
}'
Friday, January 10, 2025
Thai Language Learning
How are you? : Khun sabaidee mai ka? (You feel good?)
I am good: Phom (M) / Chan (F) sabaidee krab / ka
I am not good: Phom (M) / Chan (F) mai sabai krab / ka
What's your name?: Khun chue arai krab / ka?
I am [NAME] : Phom (M) / Chan (F) [NAME] krab / ka
Tuesday, November 26, 2024
Healthy Tea Recipes
Spina Date Seed Seman Platycladi Tea
Ingredients: Seman Platycladi, Date Seed, Honey.
Method: Stir fry the 2 dry herbs. Steep in boiling hot water, add honey.
Functions: Boost heart functions, calm the mind.
Chinese Rose Tea
Ingredients: Chinese Rose, Tea Leaves, Brown Sugar
Method: Steep in boiling hot water, add sugar.
Functions: Boost liver functions, nourish blood
Herbe Eupator Rugosa Tea
Ingredients: Herbe Eupator, Rugosa, zgreen tea leaves
Method: Steep in boiling hot water, add sugar.
Functions: Nourish spleen and stomach. (Avoid: Abdominal distension)
Longan Red Dates Tea
Ingredients: Longan, Red Dates
Method: Steep in boiling hot water, add sugar.
Functions: Nourish blood. (Avoid: Deficiency, sore throat, dry mouth, abdominal distension)
Almond Osmanthus Tea
Ingredients: South Apricot (sweet almond), Osmanthus, Honey
Method: Steep in boiling hot water, add honey.
Functions: Boost lungs function, clear the phelgm
Cordyceps Mulberry Tea
Ingredients: Cordyceps flower, mulberry, chinese wolfverries.
Method: Steep in boiling hot water.
Functions: Boost kidney & liver functions (Avoid: not suitable when having flu)
Ginseng Tea
Ingredients: Ginseng slices, honey
Method: Steep in boiling hot water., add honey.
Functions: Qi (Avoid: allergies, high blood pressure, menstruation, dizziness, colds, inflammation must avoid this tea. Note: Ginseng cannot be taken together with tea leaves and radish)
Cellulite Slimming Tea
Ingredients: Hawthorn, Spian Date Seed, Licorice Roots
Method: Steep in boiling hot water.
Functions: Sleep well, cellulite
Monday, November 25, 2024
TCM Remedies
Manganese: enzyme component for metabolism and wond healing - nuts, grains, seeds, legumes, fruits, vegetables.
Grey Hair
poor blood circulation & fatigue
To do: nourish the kidney and expel wind in the body.
Herb: He Shou Wu
Crack Lips
stomach & spleen problem
To do: eat cooling food. water chestnut, barley, greends, watermelons, fruits
Herb: Qian Shi
Wrinkles
sluggish blood circulation
To do: nourish blood and qi.
Herb: Dang Gui, Ling Zhi, American ginseng, bird's nest, cordyceps
Dead Eyes
eyes not sparking, liver detox suffers
To do: improve liver detox function
Herb: Qi Zi (goji berry), chrysanthemum flowers. Too much screen time: lotus seed and longan.
Papi Why?
Reasons:
Are you trying to convert me to Judaism?
Racism
Bonus: Pay for trips because I also want to see my family?
ME: Refuse to give time, energy, money if you continue to endanger my life this way.
When I mention about my allergy, you keep talking about your eggs and swollen arm.
We are not the same. I've been hospitalised 2 times in SG for my allergy. 5 days each time. ia m not being difficult, I am trying not to die.
You don't need to care about me, I don't care. But don't pretend like you care. Just be honest with yourself. We don't need to have a relationship.
IGNORANCE / INDIFFERENCE - endanger my life.
Sunday, November 24, 2024
Customer Service
Customer pulse is recursively:
- Stop
- Start
- Continue
Our actions affecting their choices and the way brand is represented
CUSTOMER EXPERIENCE:
- Brand
- Product Quality
- Customer Service
- Public Relationship
2022 COVID
16 July - Saturday
Art Fair, Indian Restaurant
18 July - Monday night / Tuesday morning @ 3am
sore throat, throat closed / inflamed
steroids 5g
19 July - Tuesday morning
headache - massive, extreme
bodh ache - swollen organs inside (bladder, kidney, stomach)
fever
swollen feet (correspond to reflexology of organs)
NO APPETITE
NO: cough, loss of smell / taste
tylenol@ night [check oximeter: ok no problem]
20 July - Wednesday
symptoms from Tuesday persists
took ivermectin during the day - symptoms subside
took tylenol during the night.
ONLY symptoms left: headache, fever
starts to cough with phelgm on Wednesday night
no appetite
VERY ITCHY FEET at night
21 July - Thursday
took ivermectin during the dau
aches: solar plexus, abdominal ribs, stomach
COUGH with phelgm persists
drank luo han guo
body still hot; not fever
no appetite
22 July - Friday
took Rapid Response COVID-19 antigen test; POSITIVE
cough, phelgm
FINALLY CACA
sore throat - gargle with mouthwash
stomaches: like a keris is cutting my inside
aches: solar plexus
hungry @ 12 am
took Lian Hua Qing Wen x2 | DANG GUI
HEADACHE
23 July - Saturday
less headache but still there
solar plexus pain : less
stomach: still feels like being cut
MORNING coffee - pain!
CACA huge!
ivermectin x 1 | vitamins
cought, phelgm
DINNER: soup & biscuit
4x Lian Hua Qing Wen
In between bleeding (is it from dang gui?)
blocked nose @ night
24 July - Sunday
neck / nape trigger - HUGE
cough, phelgm
sore throat
blocked nose
in between bleeding???
eczema | VERY ITCHY after fish supper
25 July - Monday
getting better
hands very itchy | eczema
neck / nape trigger
cough, phelgm
blocked nose
ivermectin x 1
eat: ginger soup + tang yuan, chicken soup, mango
23 Sept 2014
San Ku was upset with me because she thought I got married to Pedro without telling her.
Friday, November 22, 2024
48 Laws of Power
- Never outshine the master, make them look good.
- Never put too much trust in friends, learn to use enemies. Why? Friends will envy. Hire enemies, they will try to prove themselves to you.
- Conceal your intentions. Keep them in the dark so nobody has any clue of you.
- Say less than necessary. Vague and intimidating.
- Reputation, guard with your life. It is power.
- Court attention. Stand out.
- Other's work, take credit.
- Make others come to you, Use bait to lure them in.
- Win through actions not argument.
- Infection is unhappy and unlucky.
- Learn to keep people dependent.
- Use selective honesty and generosity to disarm people.
- Asking for help - appeal to self interest, never mercy or gratitude.
- Pose as a friend, work as spy.
- Crush your enemy totally.
- Use absence to increase respect and honour. Create value through scarcity.
- Keep others in suspense, cultivate air of unpredictability. Predictable - they can control you.
- Do not build fortress to protect, isolation is dangerous. Cut off from information.
- Know who you're dealing with. Do not offend wrong person.
- Do not commit to anyone, do not take sides.
- Play dumb, let them feel smart and therefore unsuspicious.
- Surrender tactic, time to recover.
- Concentrate on your forces.
- Perfect courtier, power and political dexterity.
- Recreate yourself.
- Keep your hands clean: efficiency etc
- Play on people's need to believe therefore cult-like following (enthusiasm).
- Enter action with boldness, not unsureness / timid.
- Plan all the way to the end, strategic planning.
- Make accomplishments seem effortless, with ease.
- Control options, give others the choice in my favour.
- Play to people's fantasies, manufacture romance.
- Discover men's weakness: insecure, secret pleasure...
- Royal in own fashion, like King. Respect (regal, powerful)
- Art of timing, no hurrying. Stand back, strike fierce.
- Disdain things you can't have. Ignore them. No interest.
- Create compelling spectacles, aura of power.
- Think as you like, behave as others. Go with tide or they think I look down on them therefore resentment.
- Stir up waters to catch fish. Calm, make enemies angry / off-balance.
- Despise the free lunch. Trick or hidden obligation, guilt, deceit, no cutting corners.
- Avoid stepping into a great man's shoes. Shadow and establish own-self.
- Strike sheppard, sheep will scatter. Trouble has leader, therefore neutralise the influence.
- Work on hearts and minds. Seduce to my directions on their desire, intellect and fear.
- Disarm with mirror effect. Mirror enemies. Mock / humiliate. Seduce with shared values.
- Preach the need for change. NO extreme reform because revolt. Gentle improvement.
Saturday, November 2, 2024
Tuesday, October 29, 2024
Sunday, October 27, 2024
2025 To Do & Learn
Languages to Learn:
Spanish : Where?
Thai: Where?
Arabic @ Al-Ahdaf Academy; can use skillsfuture credit
===
Technical
AI: NLP
AI: Image Processing, Vision?
Udemy business courses
===
Pre-sales
Ekman: micro expressions
NLP, Neurolinguistic Programming
===
Side Hustle
Art
Procreate
Messing: With my new-ish phone
Sony Ericsson W890i.
Hehehe. My new phone was an after thought. It was the slimmest phone from Sony Ericsson when I wanted one; early May 2008. So this is what I was stuck with.
But oh, do I learn to love it. I love slim phones and boy is this one slim with aluminum casing! I love aluminum casing... Shuttle (I call it Giskard) is aluminum too.
Read the complete review at mobilehypermarket.
I will say, Sony Ericsson has come a long way. This is oh, so gorgeous!
Blue tooth to Mac:
Sharing, click on all 3.
Devices--> Setup new device (but don't connect via mobile). What I do is just X the window prior to that. Turn bluetooth off/on. It works! There you have it!

Tuesday, October 15, 2024
Quote from Chef Edward Lee (Culinary Class Wars)
The success of a strategy is a team's ability to execute
Thursday, August 11, 2022
Put Woocommerce Store into Vacation Mode
// This snippet will remove the single product page "Add to Cart" Button//
/* STORE VACATION */
add_filter( 'woocommerce_is_purchasable', '__return_false' );
Wednesday, June 29, 2022
Saturday, May 7, 2022
Friday, May 6, 2022
2022 Achievements
Conversational Spanish - Duo Lingo & Classes??
Python programming
Data Science:
Kaggle
AI Singapore
Wednesday, February 9, 2022
Thursday, December 16, 2021
Thursday, November 18, 2021
Tuesday, November 9, 2021
Wednesday, November 3, 2021
Monday, October 4, 2021
Thursday, September 30, 2021
DIY Dawn PowerWash
https://haphazardhomemaker.com/2020/09/22/how-to-make-copycat-dawn-powerwash/
I used the recipe above into my old powerwash bottle. Works like a charm!
1/4 Dawn Platinum
3 tablespoon alcohol (I upped the alcohol, no idea why...)
Fill up with water
That's it!
Tuesday, April 6, 2021
Monday, February 22, 2021
Thursday, February 11, 2021
PHP removal
Removing this from PHP customisation
// Hide "in stock" @ Single Products
function my_wc_hide_in_stock_message( $html, $text, $product ) {
$availability = $product->get_availability();
if ( isset( $availability['class'] ) && 'in-stock' === $availability['class'] ) {
return '';
}
return $html;
}
add_filter( 'woocommerce_stock_html', 'my_wc_hide_in_stock_message', 10, 3 );
Wednesday, February 10, 2021
My Small Weekly Vegan Challah
INGREDIENTS:
- 1/2 Cup milk (warm)
- 2 Tablespoon aquafaba OR 1 Tablespoon of (unsweetened) apple sauce
- 2 Tablespoon coconut oil
- 1/4 cup + 1 teaspoon white sugar
- 1 teaspoon salt
- 2 cups bread flour
- 1 teaspoon active dry yeast
egg wash: very diluted maple syrup
DIRECTIONS:
- Put all the above ingredients in that order into Cuisinart Bread Maker (except for egg wash)
- Start the Cuisinart Bread Maker in Program 7 - Artisan Bread
- Let it finish kneading for Rise 3.
- Take it out and braid it.
- Rise in oven, 2 cups hot water on each side for 30 mins. Oven lights on.
- Take the risen braided challah out and put the vegan egg wash on top.
- Bake at 175C for 20-25 minutes.
Tuesday, January 26, 2021
Antique Pocket Watch Lookup Sites
Check this site for the maker & to date your pocket watch (I think this is only American but I will confirm another time)
https://pocketwatchdatabase.com/
If silver, then check the silver maker mark
http://www.silvercollection.it/englishsilvermarksXWDUE.html
Understand more through this forum
Monday, January 25, 2021
What is Siam Sterling?
This website explains it really well. https://salamanderalley.com/blogs/under-the-leaves/what-is-siam-sterling-jewelry
Read the article here:
WHAT IS IT
Siam sterling jewelry is sterling silver jewelry made in Thailand and depicts the characters of mythology and from the Ramakien (the Thailand national story) as well as the story of Mekhala and Ramasoon. It was manufactured with two different combinations - Sterling / Niello and Sterling / Enamel. For our purposes here, I will be focusing on Niello.
WHAT IS NIELLO
It is the black part of the Siam Sterling jewelry and can be confused with Damascene. Niello is made from silver, copper, sulphur, lead and ammonium chloride. It is applied while Damascene is not.
Damascene is the art of inlaying one metal into another with the black base usually being a black oxidized steel.
WHEN WAS SIAM STERLING JEWELRY MADE
It was made from approximately 1926 until 1989. I know, not what a lot of people think when they see the word 'Siam', falsely thinking that this name dates the piece.
What differentiates the pieces is by how they are marked. Here is a general guideline for marks:
No markings - 1926 - 1935
Sterling - 1926 - 1946
Siam Silver - late 1940s
Handmade in Siam - Early 1950s
Made in Siam - 1940s
Siam Sterling - Early 1950s - mid 1960s
Sterling Thailand - 1965 to present
The bulk of the jewelry made has been made since 1965.
IS IT ALL HAND ENGRAVED
No. Some is hand engraved while some is stamped and in a few VERY rare cases, it was cast. Often it is a mixture of stamped sterling and finishing touches are hand done.
Take a 10x loupe and view the indentations of the design inside the Niello area. If it is hand carved the deepest part of the line will be sharp, not rounded. Check more than one line.
Often the piece is stamped and then the open work edge is finished off (enhanced) by hand. The most common pieces are stamped.
WHAT'S IT WORTH
That is a loaded question and it depends on what you have. If you have one of the small lightweight link bracelets marked Siam Sterling...not much. If you have a small narrow bracelet marked Sena...then you have something.
Obviously all the jewelry has worth dependent upon the price of silver. What adds worth above and beyond the silver is the design, the workmanship, the rarity, and how it is marked.
These are my favorite makers and I'm willing to pay more for these names...
Thai Nakon
Margrett
Sena
Alex & Co
Yap Kui Kee
Ratanabha
Amfarco
One more comment on worth - that is suites (sets). These are rare and expect to pay well for them. Most of the jewelry made was made to be sold as individual pieces.
Tuesday, December 15, 2020
Friday, December 11, 2020
Shapes of Bread
Don't know where this is from but it showed up in my social media. If it's yours, tell me and I will credit you.
Friday, December 4, 2020
Recipes to try
Making my own vegan butter:
https://lovingitvegan.com/homemade-vegan-butter/
Air Fryer Sufganiyot
https://www.thespruceeats.com/air-fryer-sufganiyot-4776497
Vegan Challah - Bread Machine
1/3 of the recipe. Add 1 more egg to original recipe. Use artisanal dough settings. Take it out of machine, braid and let it rise for another hour. Diluted maple syrup wash on top. Bake at 350F for 30 minutes.
https://www.allrecipes.com/recipe/7043/bread-machine-challah-i/
Thursday, October 29, 2020
Woocommerce: Only add the order item image when the product exists in the Woocommerce Order view
https://www.thinbug.com/q/51848205
// Display the product thumbnail in order view pages
add_filter( 'woocommerce_order_item_name', 'display_product_image_in_order_item', 20, 3 );
function display_product_image_in_order_item( $item_name, $item, $is_visible ) {
// Targeting view order pages only
if( is_wc_endpoint_url( 'view-order' ) ) {
// Get the WC_Product object (from order item)
$product = $item->get_product();
// Testing if the product exist in Woocommerce <== UPDATE
if( $product && is_object( $product ) ) {
// Get the product thumbnail (from product object)
$thumbnail = $product->get_image(array( 36, 36));
// Avoiding empty thumbnail (updated)
if( $product->get_image_id() > 0 )
$item_name = '<div class="item-thumbnail">' . $thumbnail . '</div>' . $item_name;
} else {
// When product doesn't exist, we get the name from the order item (with no thumbnail)
$item_name = $item->get_name();
}
}
return $item_name;
}
Woocommerce: Cart Page more customisation (Future Requirements)
https://css-tricks.com/how-to-customize-the-woocommerce-cart-page-on-a-wordpress-site/
Sunday, October 25, 2020
Woocommerce: My Account Page --> Initial login redirects to orders page like Walmart
// Redirect initial login straight away to orders page like Walmart
//
add_action('template_redirect', 'redirect_to_orders_from_dashboard' );
function redirect_to_orders_from_dashboard(){
if( is_account_page() && empty( WC()->query->get_current_endpoint() ) ){
wp_safe_redirect( wc_get_account_endpoint_url( 'orders' ) );
exit;
}
}
Woocommerce: Disable Default Shop Page
/**
* DISABLE DEFAULT SHOP PAGE
*/
function woocommerce_disable_shop_page() {
global $post;
if (is_shop()):
global $wp_query;
$wp_query->set_404();
status_header(404);
endif;
}
add_action( 'wp', 'woocommerce_disable_shop_page' );
Friday, October 23, 2020
Woocommerce: Cart Summary - which "Return to Shop" to use?
Shows nothing....
// Hide "Return to Shop" button when all items are removed @ Cart Page
remove_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10); //remove the default message
add_action( 'woocommerce_cart_is_empty', 'custom_empty_cart_message', 10); //add custom designed
function custom_empty_cart_message() {
echo "Oops your cart is lonely...";
add_action( 'woocommerce_return_to_shop', 'return_to_shop', 10); //remove return to shop button
//$_SERVER['cart'];
}
Shows both messages with custom messaging....
// Hide "Return to Shop" button when all items are removed @ Cart Page
remove_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10 );
add_action( 'woocommerce_cart_is_empty', 'custom_empty_cart_message', 10 );
function custom_empty_cart_message() {
//$html = '<div class="col-12 offset-md-1 col-md-10"><p class="cart-empty">';
$html .= wp_kses_post( apply_filters( 'wc_empty_cart_message', __( 'Your cart is currently empty.', 'woocommerce' ) ) );
echo $html . '</p></div>';
}
Woocommerce: Cart Summary Page Customisation
/**
* CART SUMMARY PAGE CUSTOMISATION
*/
// Hide Other shipping rates when free shipping is available @ Cart & Checkout Page
add_filter( 'woocommerce_package_rates', 'my_hide_shipping_when_free_is_available' );
function my_hide_shipping_when_free_is_available( $rates ) {
$free = array();
foreach( $rates as $rate_id => $rate ) {
if( 'free_shipping' === $rate->method_id ) {
$free[ $rate_id ] = $rate;
break;
}
}
return ! empty( $free ) ? $free : $rates;
}
// Changes the redirect URL for the Return To Shop button in the cart (return string)
function wc_empty_cart_redirect_url() {
return 'http://olamiie.com/product-category/shop/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
// Hide "Return to Shop" button when all items are removed @ Cart Page
remove_action( 'woocommerce_cart_is_empty', 'wc_empty_cart_message', 10); //remove the default message
add_action( 'woocommerce_cart_is_empty', 'custom_empty_cart_message', 10); //add custom designed
function custom_empty_cart_message() {
echo "Oops your cart is lonely...";
add_action( 'woocommerce_return_to_shop', 'return_to_shop', 10); //remove return to shop button
//$_SERVER['cart'];
}
Woocommerce: My Account Page Customisation
/**
* My ACCOUNT PAGE CUSTOMISATION
*/
//Merge Two "My Account" Tabs @ WooCommerce Account
// Remove Downloads Tab (downloads in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_downloads_my_account', 999 );
function remove_downloads_my_account( $items ) {
unset($items['downloads']);
return $items;
}
// 1. First, hide the tab that needs to be merged/moved (edit-address in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_address_my_account', 999 );
function remove_address_my_account( $items ) {
unset($items['edit-address']);
return $items;
}
// 1. First, hide the tab that needs to be merged/moved (payment-methods in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_payment_my_account', 999 );
function remove_payment_my_account( $items ) {
unset($items['payment-methods']);
return $items;
}
// 2. Second, print the ex tab content into an existing tab (edit-account in this case)
add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_edit_address' );
//add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_payment_methods' );
/**
* Register new endpoints to use inside My Account page.
*/
add_action( 'init', 'my_account_new_endpoints' );
function my_account_new_endpoints() {
add_rewrite_endpoint( 'warranty-requests', EP_ROOT | EP_PAGES );
}
/**
* Get new endpoint content
*/
// Warranty
add_action( 'woocommerce_warranty_requests_endpoint', 'warranty_requests_endpoint_content' );
function warranty_requests_endpoint_content() {
get_template_part('warranty-requests');
}
// Rename, re-order my account menu items
function reorder_my_account_menu() {
$neworder = array(
'dashboard' => __( 'Dashboard', 'woocommerce' ),
'orders' => __( 'Orders', 'woocommerce' ),
'wishlist' => __( 'Wishlist', 'woocommerce' ),
//‘edit-address' => __( 'Addresses', 'woocommerce' ),
'edit-account' => __( 'Account Details', 'woocommerce' ),
'warranty-requests' => __( 'Limited Warranty', 'woocommerce' ),
'customer-logout' => __( 'Logout', 'woocommerce' ),
);
return $neworder;
}
add_filter ( 'woocommerce_account_menu_items', 'reorder_my_account_menu' );
// Display the product thumbnail in order view pages like Uniqlo
add_filter( 'woocommerce_order_item_name', 'display_product_image_in_order_item', 20, 3 );
function display_product_image_in_order_item( $item_name, $item, $is_visible ) {
// Targeting view order pages only
if( is_wc_endpoint_url( 'view-order' ) ) {
// Get the WC_Product object (from order item)
$product = $item->get_product();
// Testing if the product exist in Woocommerce <== UPDATE
if( $product && is_object( $product ) ) {
// Get the product thumbnail (from product object)
$thumbnail = $product->get_image(array( 36, 36));
// Avoiding empty thumbnail (updated)
if( $product->get_image_id() > 0 )
$item_name = '<div class="item-thumbnail">' . $thumbnail . '</div>' . $item_name;
} else {
// When product doesn't exist, we get the name from the order item (with no thumbnail)
$item_name = $item->get_name();
}
}
return $item_name;
}
Woocommerce: Checkout Page Customisation
/**
* CHECKOUT PAGE CUSTOMISATION
*/
// Remove Coupon form at checkout page
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );
// Show product thumbnail on checkout page.
// @see {templates|woocommerce}/checkout/review-order.php
add_filter( 'woocommerce_cart_item_name', 'jfs_checkout_show_product_thumbnail', 10, 2 );
function jfs_checkout_show_product_thumbnail( $name, $cart_item ) {
if ( ! is_checkout() ) return $name;
$thumbnail = '<span class="product-name__thumbnail" style="float: left; padding-right: 15px">' . get_the_post_thumbnail( $cart_item['product_id'], array( 60, 120 ) ) . '</span>';
return $thumbnail . '<span class="product-name__text">' . $name . '</span>';
}
Woocommerce: Temporarily Disable Shop Page - While on Vacation
https://passwordprotectwp.com/disable-woocommerce-shop-page/
/**
* @snippet WooCommerce Holiday/Pause Mode
* @how-to Get CustomizeWoo.com FREE
* @sourcecode https://businessbloomer.com/?p=20862
* @author Rodolfo Melogli
* @testedwith WooCommerce 3.5.1
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
// Trigger Holiday Mode
add_action ('init', 'bbloomer_woocommerce_holiday_mode');
// Disable Cart, Checkout, Add Cart
function bbloomer_woocommerce_holiday_mode() {
remove_action( 'woocommerce_after_shop_loop_item', 'woocommerce_template_loop_add_to_cart', 10 );
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_add_to_cart', 30 );
remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
remove_action( 'woocommerce_checkout_order_review', 'woocommerce_checkout_payment', 20 );
add_action( 'woocommerce_before_main_content', 'bbloomer_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_cart', 'bbloomer_wc_shop_disabled', 5 );
add_action( 'woocommerce_before_checkout_form', 'bbloomer_wc_shop_disabled', 5 );
}
// Show Holiday Notice
function bbloomer_wc_shop_disabled() {
wc_print_notice( 'Our Online Shop is Closed Today :)', 'error');
}
Thursday, October 22, 2020
Woocommerce: My Additional CSS
/** MY ACCOUNT PAGE --> ORDERS BUTTONS **/ a.view { margin: 3px; } /*Remove Package tracking buttons*/ a.woocommerce-button.button.ast_track { display: none; } /*Remove Warranty Request buttons*/ a.woocommerce-button.button.warranty_request { display: none; } /** MY ACCOUNT PAGE --> Individual Order **/ /*Underline tracking number for clicking to see the tracking information page */ td.tracking-number { text-decoration: underline !important; } /** WISHLIST HEART ICON STYLING **/ i.fa-heart-o { color: darksalmon; /*font-size: 0.3em;*/ } i.fa-heart { color: darksalmon; /*font-size: 0.3em;*/ } /* Hide the old red "x" & hover */ .remove.remove_from_wishlist { visibility:hidden!important; /*hide everything*/ width:auto!important; /*make sure to have the need width for "remove" */ } /* Add a Fontawesome icon instead for "remove from cart" icon with garbage icon */ .remove.remove_from_wishlist:before { visibility:visible; font-family: FontAwesome; font-size: 17px; color: dimgray; content: "\f1f8"; float: left; text-indent: 0; } } /** SINGLE PRODUCT PAGE **/ /** Reviews Styling **/ h2.woocommerce-Reviews-title{ font-family: Poppins; font-weight: 200; font-size: 12px; line-height: 1.5; } /** Hide QTY text box on Single Product Page ONLY**/ .single-product .quantity input[type="number"] { display: none !important; } /** CART PAGE STYLING FOR MOBILE **/ /** MyStyle: Show thumbnail in cart larger than default 32px **/ .woocommerce-cart table.cart img { width: auto; min-width: 32px; max-width: 100px; } @media(max-width:768px) { /** Show thumbnail row in cart on mobile **/ .woocommerce-page table.cart .product-thumbnail { display: inline-block !important; } /** hide colon above thumbnail for mobile **/ .woocommerce-page table.cart .product-thumbnail:before { display: none; } } /** CART PAGE STYLING **/ /**Remove all internal borders**/ /*.woocommerce-cart .woocommerce table.shop_table{ border: 1px solid #54595f;}*/ .woocommerce-cart table.shop_table thead{ border: none; color: none; text-align: right; } .woocommerce-cart table.shop_table td{ border: none; } .woocommerce-cart .cart-collaterals .cart_totals tr th{ border: none; } .woocommerce-cart .cart-collaterals .cart_totals tr td{ border: none; } /* Hide the old red "x" & hover */ .woocommerce-cart a.remove { visibility:hidden!important; /*hide everything*/ width:auto!important; /*make sure to have the need width for "remove" */ } /* Add a Fontawesome icon instead for "remove from cart" icon with garbage icon */ .woocommerce-cart a.remove:before { visibility:visible; font-family: FontAwesome; font-size: 17px; color: dimgray; content: "\f1f8"; float: left; text-indent: 0; } } /*Update cart button*/ .woocommerce-cart table.cart td.actions .button, .woocommerce-checkout table.cart td.actions .button, #add_payment_method table.cart td.actions .button { float: right; margin: 30px; } /** CHECKOUT PAGE STYLING **/ /**Remove all internal borders**/ woocommerce #order_review table.shop_table th{ border: none; --text-align: left; } .woocommerce #order_review table.shop_table td{ border: none; --text-align: left; } .woocommerce #order_review table.shop_table th{ border: none; --text-align: left; } /**Always show checkout coupon, reduce clicking**/ .checkout_coupon { display: block !important; } .woocommerce-info { display:none; }
Woocommerce: Single Product Page Customisation
/**
* SINGLE PRODUCT PAGE CUSTOMISATION
*/
// Remove Categories @ Single Products
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 );
// Hide "in stock" @ Single Products
function my_wc_hide_in_stock_message( $html, $text, $product ) {
$availability = $product->get_availability();
if ( isset( $availability['class'] ) && 'in-stock' === $availability['class'] ) {
return '';
}
return $html;
}
add_filter( 'woocommerce_stock_html', 'my_wc_hide_in_stock_message', 10, 3 );
// Hide "Additional Information tab" @ Single Products
add_filter( 'woocommerce_product_tabs', 'bbloomer_remove_product_tabs', 9999 );
function bbloomer_remove_product_tabs( $tabs ) {
unset( $tabs['additional_information'] );
return $tabs;
}
// Hide "xx product has been added to your cart" @ Single Product Page
add_filter( 'wc_add_to_cart_message_html', '__return_false' );
// Change location of price to above "Add to Cart" button
remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );
add_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 20 );
Woocommerce: My Account Page Customisation
/**
* My ACCOUNT PAGE CUSTOMISATION
*/
/**
* @snippet Merge Two "My Account" Tabs @ WooCommerce Account
* @how-to Get CustomizeWoo.com FREE
* @source https://businessbloomer.com/?p=73601
* @author Rodolfo Melogli
* @compatible Woo 3.5.3
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
// -------------------------------
// Remove Downloads Tab (downloads in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_downloads_my_account', 999 );
function remove_downloads_my_account( $items ) {
unset($items['downloads']);
return $items;
}
// -------------------------------
// 1. First, hide the tab that needs to be merged/moved (edit-address in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_address_my_account', 999 );
function remove_address_my_account( $items ) {
unset($items['edit-address']);
return $items;
}
// -------------------------------
// 1. First, hide the tab that needs to be merged/moved (payment-methods in this case)
add_filter( 'woocommerce_account_menu_items', 'remove_payment_my_account', 999 );
function remove_payment_my_account( $items ) {
unset($items['payment-methods']);
return $items;
}
// -------------------------------
// 2. Second, print the ex tab content into an existing tab (edit-account in this case)
add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_edit_address' );
//add_action( 'woocommerce_account_edit-account_endpoint', 'woocommerce_account_payment_methods' );
// -------------------------------
// Redirect initial login straight away to orders page like Walmart
//
add_action('template_redirect', 'redirect_to_orders_from_dashboard' );
function redirect_to_orders_from_dashboard(){
if( is_account_page() && empty( WC()->query->get_current_endpoint() ) ){
wp_safe_redirect( wc_get_account_endpoint_url( 'orders' ) );
exit;
}
}
// Display the product thumbnail in order view pages
add_filter( 'woocommerce_order_item_name', 'display_product_image_in_order_item', 20, 3 );
function display_product_image_in_order_item( $item_name, $item, $is_visible ) {
// Targeting view order pages only
if( is_wc_endpoint_url( 'view-order' ) ) {
// Get the WC_Product object (from order item)
$product = $item->get_product();
// Testing if the product exist in Woocommerce <== UPDATE
if( $product && is_object( $product ) ) {
// Get the product thumbnail (from product object)
$thumbnail = $product->get_image(array( 36, 36));
// Avoiding empty thumbnail (updated)
if( $product->get_image_id() > 0 )
$item_name = '<div class="item-thumbnail">' . $thumbnail . '</div>' . $item_name;
} else {
// When product doesn't exist, we get the name from the order item (with no thumbnail)
$item_name = $item->get_name();
}
}
return $item_name;
}

