Skip to content

Instantly share code, notes, and snippets.

Looking for a new challenge in 2022!

Zakir Sajib zakirsajib

Looking for a new challenge in 2022!
View GitHub Profile
zakirsajib / single-product-layout-type-1.liquid
Last active Sep 7, 2022
How to copy payment image from footer to product single page in shopify.
View single-product-layout-type-1.liquid
# First copy this code from footer.liquid file
<img src="{{ 'payment.png' | asset_url }}" alt="Payment" />
and then go to `snippets` and find the `single-product-layout-type-1.liquid` file
And go to line #250
and add the code:
zakirsajib / function.php
Last active Sep 7, 2022
Adding User Details before billing details in checkout page in Woocommerce
View function.php
add_action( 'woocommerce_checkout_before_customer_details', 'superdville_checkout_fields_before_billing_details', 20 );
function superdville_checkout_fields_before_billing_details(){
$domain = 'superDville';
$checkout = WC()->checkout;
echo '<div class="col2-set" id="superdville_custom_checkout_field">';
echo '<div class="col-1">';
echo '<h3>' . __('User Details') . '</h3>';
woocommerce_form_field( 'your_role', array(
zakirsajib / function.php
Created Sep 7, 2022
Change the default country on the checkout page: Woocommerce
View function.php
add_filter( 'default_checkout_billing_country', 'change_default_checkout_country' );
function change_default_checkout_country() {
if ( WC()->customer->get_is_paying_customer() ) {
return $country;
return 'US';
zakirsajib / src@components@header.js
Created May 31, 2022
Dark Mode implementation in Mars theme of Frontity App
View src@components@header.js
import { connect, styled, Global, css } from "frontity";
import Link from "./link";
import Nav from "./nav";
import NavTabletMobile from "./nav-mobile";
import MobileMenu from "./menu";
import SearchForm from "./search/search-form";
import LogoDark from '../../img/nirvana.jpg';
import JoinMobile from '../../img/join-mobile.svg';
import Toggle from "./toggle";
zakirsajib / index.html
Last active Apr 23, 2022
Horizontal Scrolling
View index.html
View gist:8cbe37e2bd73696db51c4b1fb9846d5d
.box {
background-color: #f0f8ff;
box-shadow: 0px 25px 35px -25px #97a3b8;
transition: all 0.3s ease-in;
.box:hover {
background-color: #f0ffff;
box-shadow: 0px 0px 0px 0px rgb(136 0 64 / 49%);
transform: translateY(-1px);
zakirsajib /
Last active Apr 20, 2022
Redirect one domain to another domain in cloudflare

First both domains must be within cloudflare. Both domains Nameservers must be changed to cloudflare's nameservers.

  1. Then login to first domain cludflare DNS dashboard. Lets say our first domain is

  2. click Add Record

  3. Select Type A, In Name field, enter: and in IPV4 address, add: Save.

  4. Again Click Add Record

  5. Select Type A, In Name field, enter: www and in IPv4 address, type: Save.

  6. Make sure both field has proxy status: Proxied and TTL auto set.

  7. Now go to Page Rules tab.

zakirsajib / gist:6ea77f7877ed293e6fe9aed905e05233
Created Apr 20, 2022
Adding vendor signup option in checkout page (Dokan multivendor, WooCommerce)
View gist:6ea77f7877ed293e6fe9aed905e05233
* Adding vendor signup option in checkout page (Dokan multivendor, WooCommerce).
* In checkout page, we are providing custom fields, so if a customer interested to become a vendor, they must fill out his
* store name and store url.
* These 2 fields will be saved into User's database and integrated to Dokan framework.
add_action('woocommerce_after_checkout_billing_form', 'fluf_vendor_registration_checkout');
zakirsajib / gist:3bd4602406df988ce621790e7f7b5cc1
Created Apr 17, 2022
View gist:3bd4602406df988ce621790e7f7b5cc1
zakirsajib / button.css
Last active Jan 12, 2022
CTA Button Example
View button.css
.cta-button {
max-width: 333px;
width: 100%;
position: relative;
.cta-button .ss-button {
border-top-left-radius: 30px;
border-bottom-right-radius: 30px;
width: 273px;
height: 63px;