---------------------------------------------------------------
PHP, WORDPRESS, MAGENTO, JOOMLA
Thursday, 18 May 2023
Laravel
---------------------------------------------------------------
Thursday, 9 March 2023
Java Script ES6
//use of var keyword-> variable scope globally
console.log(name);
var name="lalit";
name="abc";
console.log(name);
name="test";
console.log(name);
//use of let keyword-> variable scope within the block
//console.log(name);
let name="lalit";
name="abc";
console.log(name);
name="test";
console.log(name);
//use of const keyword-> variable can not possible reassign
//console.log(name);
const name="lalit";
console.log(name);
name="test";
console.log(name);
*********************************************
//Function Declaration ES5
function greet(name) {
return "Hello" + " " + name;
}
console.log(greet("lalit"));
//Function Declaration ES6 (Arrow Function)
const greet= (name) => {
return "Hello There" + " " + name;
};
console.log(greet("Lalit"));
or
const greet= name => { //put code here };
//Function Declaration Multiple Parameter ES6 (Arrow Function)
const greet= (name,age) => {
return "Hello There" + " " + name + " " + age;
};
console.log(greet("Lalit",30));
//Function Declaration Single Parameter ES6 (Arrow Function)
const Sqr = num => {
return num*num;
};
console.log(Sqr(6));
or write this
const Sqr = num => num*num;
console.log(Sqr(6));
*******************************
//this Keyword with Arrow Function
//ES5
const person = {
test(){
console.log(this);
},
};
person.test();
--------------------------------------------------------------------------
const person = {
test(){
var self = this;
setTimeout( function(){
console.log(self);
}, 2000);
},
};
person.test();
ES6
const person = {
test(){
//var self = this;
setTimeout(() => {
console.log(this);
}, 2000);
},
};
person.test();
*******************************
//Template Literals
-ES5
var name = "lalit";
console.log("welcome to" + " " + name + " ! Have a nice day");
-ES6 -> use tiled symbol and ${varname}
const name1 = "lalit";
console.log(`welcome to ${name1} ! Have a nice day`);
//Print Multiline string in JS
-ES5
//var name = "lalit";
//var res = "Welcome \n to "+name;
//console.log(res);
-ES6
const name = "lalit";
const res = `welcome to Blue
world mandhana
${name}`;
console.log(res);
*************************************************
Objects Destructing in
-ES5
var details = {
name: "lalit",
contact: "1238899",
email: "abc@gmail.com"
}
var name = details.name;
var contact = details.contact;
var email = details.email;
console.log(name);
console.log(contact);
console.log(email);
-ES6
let detailsNew = {
name1: "lalit",
contact1: "1238899",
email1: "abc@gmail.com"
}
const {name1:company_name,contact1,email1} = detailsNew;
console.log(company_name);
console.log(contact);
console.log(email);
************************************
//Array Destructing in
-ES5
var arr = ["A1","A2","A3","A4"]
var v1 = arr[0];
var v2 = arr[1];
var v3 = arr[2];
var v4 = arr[3];
console.log(v1);
console.log(v2);
console.log(v3);
console.log(v4);
-ES6
var arres6 = ["B1","B2","B3","B4"];
let [var1,var2,var3,var4] = arres6;
console.log(var1);
console.log(var2);
console.log(var3);
console.log(var4);
************************************
Spread Operator
//const oldArray = [1,2,3,4,5];
//const newArray = ["A","B","C",...oldArray,6,7,8,9,10];
//console.log(newArray);
Rest Operator with limited same as parameter value
const sum = (a,b,c,d) => a+b+c+d;
console.log(sum(1,2,3,4));
//console.log(sum(1,2,3,4,5,6,7)); not handle more than parameter(4) value
Rest operator with infinite value
const sum = (...numbers) => {
let total = 0;
numbers.forEach((n) => {
total += n;
});
console.log(total);
}
sum(1,2,3,4,5,6,7,8)
************************************
//Array Map Method
const courses = ["PHP", "ReactJS", "AngularJS", "JavaScript"];
const newCourses = courses.map((c) => {
return `<li> ${c} </li>`;
});
console.log(courses);
console.log(newCourses);
--------------------------
const series = [1,2,3,4,5,6,7,8,9,10];
const num = 5;
const table = series.map((s) => s*num );
console.log(table);
************************************
-------
Friday, 3 February 2023
English Speaking
create an image in mind and speak in English use present Indefinite, Past Indefinite (2nd form), present continuous (4th form)
1- Use Go
-----------------------------------
I go to Market.
I got to School.
I got to Hospital.
I go to Jim.
I go to Zoo.
2- Use eat(have)
-----------------------------------
I have Breakfast daily.
I have my lunch with my family.
I have dinner with friends.
3- Use Play
-----------------------------------
I play footbaal daily.
I play cricket.
I play Ludo.
I play Online Games.
I play Outer Games
4- Use Watch (kisi ko observe kerke dekhna)
----------------------------------------------
I Watch youtube video.
I watch movies.
I watch News.
5- Use See (achanak se dekhna)
----------------------------------------------
I saw beautiful girl.
I saw beautiful building.
6- Use Look at (eyes ko direction dena)
----------------------------------------------
look at this beautiful girl.
look at this beautiful building.
look at this car.
7- Use Read (kya-2 cheese hai padne wali- Nowels, Magzines)
-------------------------------------------------------
I read Nowels
I read Magzines
I read Newspapers
I read Indian Express Newspaper
**************************************
How to remove scrollbar bottom border in any section
==============================================
50 English Phrases https://www.youtube.com/watch?v=BS9Tfg1On1A
All Tenses in English Grammar https://www.youtube.com/watch?v=67TgyZQaig4
**********************************************
Basic Spoken English course 2023 (5 day course)
----------------------------------------------------
https://www.youtube.com/watch?v=UfXaMhJ9r2o
**********************************************************
Thursday, 2 February 2023
React JS
https://www.youtube.com/watch?v=NSyCRfUzMb0
https://www.youtube.com/playlist?list=PLXIf5ibIbJuz_e3m6M2WMKrLUFIY2y23A
When (start) Create first React JS program need to install some software
1- node js download & install (nodejs.org)
2- Visual studio editor download & install
3- set location where want to create project eg-> D drive:/ -> Create folder->reactsample (go to under folder and press shift + right click mouse= open powershell windo here)-> selecting path-> and just write cmd and press enter
4- and write react app creation type command->npx create-react-app firstapp
5- selecting path-> and just write cmd and press enter-> type command->code space dot(code .)-> then open all project folders & files in visual studio
6- now go to terminal-> new terminal and type here-> npm start -> now start development server -> default url localhost:3000
7- now go to FirstApp->src->App.js and edit code after the logo to check code is working
8- go PowerShell type->go to project folder-> cd my-app(folder name)
go PowerShell run project->npm start
go run the project using vs code-> view-> Terminal
Local - http://localhost:3000
On Your Network - http://192.168.1.10:3000
Points covered :
- Download Html website template
- Create React application from create-react-app
- Add all folders from html website template to react project
- Add Html code into reactjs app
- Correct all comments , Images , In put fields , Hr , Br tags.
- Finally run the reactjs app.
***************************************************************
React First demo App (How to Setup ReactJS Project using CDN Links)
------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>React Demo</title>
<meta charset="UTF-8">
<script crossorigin src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!--<script src="assests/babel.min.js"></script>-->
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<!--<script src="assests/react.development.js"></script>-->
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<!--<script src="assests/react-dom.development.js"></script>-->
</head>
<body>
<div id="root"></div>
<script type="text/babel">
class App extends React.Component {
render() {
return (
<div>
<h1> Hello React JS Demo</h1>
</div>
);
}
}
ReactDOM.render(<App />, document.getElementById("root"));
</script>
</body>
</html>
*****************************************************
REACT TRANING
https://onedrive.live.com/redir?resid=288165385EEB6B14%21131&authkey=%21AL98gGTAABIAWnI&page=View&wd=target%28React.one%7C6be36bff-da06-4846-943f-b37ed1804c7e%2FReact%20Notes%7C512a80bf-da2f-466b-bf60-b955f483e32f%2F%29&wdorigin=NavigationUrl
******************************************
Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated away from the rest of your code — and utilize them in your web apps. Web Components aims to solve such problems — it consists of three main technologies 1. Custom elements- A set of JavaScript APIs that allow you to define custom elements and their behavior, which can then be used as desired in your user interface. 2. Shadow DOM- A set of JavaScript APIs for attaching an encapsulated "shadow" DOM tree to an element — which is rendered separately from the main document DOM — and controlling associated functionality. In this way, you can keep an element's features private, so they can be scripted and styled without the fear of collision with other parts of the document. 3. HTML templates The template and slot elements enable you to write markup templates that are not displayed on the rendered page. These can then be reused multiple times as the basis of a custom element's structure.
-------------------------------------------------------------------------------
Create New React Component
------------------------------
Step 1- Go to project folder -> my-firstapp-> src
Step 2- under src folder create Lalit.js component same as App.js
-----lalit.js-------
import './App.css';
function Lalit() {
return (
<div className="Lalit">
<header className="Lalit-header">
<h1>React Heading lalit </h1>
<p>React testing description</p>
</header>
</div>
);
}
export default Lalit;
-------------------------------------
Step 3- go to index.js and import component
import Lalit from './Lalit';
and call component syntax
<Lalit />
********************************************
Sunday, 25 December 2022
WIX
Learning Wix Platform
- Create Account (wix.com)
- Benefits Wix -> fast speed, easily edit no required coding
- Create your website Using ADI (Artificial Design Interface)
- Create your website with the Editor (Mostly Used)
- Go to wix editor-> media-> upload media->add logo
- Go to wix editor-> media-> upload media->add banner
- Add Elements -> text, image, button, menu, video, socials icons ..etc
****************************************
How to make URL and SEO
https://www.youtube.com/watch?v=H-DgyD_rTyo
Step-1->
1- Go to Wix Editor-> Site-> My dashboard
2- Click on contacts-> Marketing & SEO-> Get found on google -> Get Started
3- What’s your business or brand name? -> Binary Web Solutions-> next
4- Click on online
5- Which keywords do you want to use in your checklist? (enter keywords rank your website -> Enter 3 important keywort eg. Binary Technical blog)
Step-2-> Settings-> Website Settings-> Enter site name -> Set fav icon-> set social links-> Click on save.
Step-3-> On Page SEO
1- Go to Wix Editor-> click on pages & menus->
2- Site Menu-> Click on 3 dots-> SEO basics-> Enter Site title, url, Des etc...
Meta title-> No. 1 Wbsite creating service in Mumbai | Binary Web Solutions
Meta title-> put related content (Limit 50 char to 300 char)
All Images put alt tag
Go to google webmaster tool & bing webmaster-> and verify website-> copy and put code in Wix dashboard-> Setting seo-> paste and generate site map
3- Important Mandatory Notice-> 1 <H1> tag include in website home page and set keyword is must
Step-4-> Create Backlinks and do Off Page SEO
********************************************
How to Change or Update URL
Site Menu-> Click on 3 dots-> SEO basics-> Enter Site title, url, Des etc...
Or
1- Go to Wix Editor-> Site-> My dashboard
2- Click on my site-> Go to MySites->
2- Go to Site Actions -> Rename Site-> Enter Site Name and put url-> Save
****************************************
Online booking system
Make new website for restaurant And start RND for booking system
https://www.youtube.com/watch?v=Gv09QQxcmXU
https://www.youtube.com/watch?v=-bcKCI-4Asw
1- Business Info => Go to dashboard-> Settings-> Business Info->enter business name, short description, and select category
enter email id, phone no, on location-> Put address, time 24 hours
2- Connect Payment => Go to dashboard-> Settings-> Accept Payments
3- Setup Online Ordering => Go to dashboard->Restaurants->orders->show here all order details-> Click on Setting->here put pickup, delivery
Online booking system Apps
Go to add apps-> Wix app market -Add apps
1- Wix Restaurants Menu
2- Wix Restaurants Order
3- Wix Table Reservations
****************************************
Starting with Wix Velo Code
---------------------------
Create a Database
1- Goto Content Manager -> Collection-> New collection
Enter collection name-> User Profile
How to create custom Wix forms
---------------------------
https://www.youtube.com/watch?v=CObN26-1qKU
https://www.youtube.com/watch?v=xdH8YdCfGnE
1- Goto wix editor-> add elements-> input-> add text input, upload button (add file), rich text(text box), button(Text & Icon button)
2- and connect all field to database
3- Goto content manager-> main-> Add Content Elements-> Form dataset
For Frontend
4- Goto content manager-> collections-> user profiles-> add blank dynamic page
********************************************************************************
How to create custom tabs in Wix
-------------------------------
1- Goto wix editor-> box-> multi-state box-> take ist box
2- click on manage states-> create duplicate state
3- go to velo code-> give id every box-> click properties & events-> give same id & different state id
4- add 3 buttons (out of multi-state box)-> put unique id
5- put velo code
https://support.wix.com/en/article/velo-tutorial-working-with-multi-state-boxes-and-code
$w.onReady(function () {
$w("#aboutbtn").onClick(() => {
$w('#demostatebox').changeState("aboutState");
} );
$w("#joinbtn").onClick(() => {
$w('#demostatebox').changeState("joinState");
} );
$w("#contactbtn").onClick(() => {
$w('#demostatebox').changeState("contactState");
} );
});
********************************************************************************
How to rotate infinite any image or text on WIX or Wix Animation
------------------------------------------------
https://www.editorx.com/infiniterotation
// Velo API Reference: https://www.wix.com/velo/reference/api-overview/introduction
import wixAnimations from 'wix-animations';
const infinity_rotation_timeline = wixAnimations.timeline({ repeat: -1 });
$w.onReady(function (){
initRotationAnimation();
});
function initRotationAnimation() {
const element_to_rotate =
$w('#handBgId');
infinity_rotation_timeline.add(element_to_rotate, {
rotate: 360,
duration: 40000,
easing: 'easeLinear'
}).play();
}
**********************************************
- The
myLogoDisplayclass is the class of the custom element, which we'll use when registering the custom element. - We use standard
constructor()andsuper()functions to create an instance of the element. connectedCallback()is a lifecycle callback function that is triggered automatically when the element is connected. When the custom element is able to start rendering on the site, the two parts of our logo image can be displayed, with the help of thecreateImg()function.Our last step is to register the custom element class with the
customElements.define(name, class)method.Once registered, new custom elements can be used in your site.
- The first parameter, pink-threejs-cube, maps to the tag name, which we'll soon define in the Wix Editor.
- The second parameter, PinkThreeJS, is the class name of the custom element.
1customElements.define('my-logo-display', myLogoDisplay);
Saturday, 7 May 2022
Ajax
Ajax Syntax
---------------------------------------- ajax.php------------------------------------------------------------
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<a href="javascript:void(0)" onclick="click_here()"> click Here </a>
<script>
function click_here(){
//alert('ajax');
jQuery.ajax({
url:'get.php',
type:'post',
success:function(result){
alert(result);
}
});
}
</script>
<hr>
<input type="textbox" id="num1">
<script>
function click_here(){
var num1 = jQuery("#num1").val();
jQuery.ajax({
url:'get.php',
type:'post',
data:'num1='+num1,
success:function(result){
alert(result);
} });
}
</script>
---------------------------get.php-------------------------
<?php
//echo"Hello";
// print_r($_POST);
echo $_POST["num1"]+20;
?>
-----------------------------------types_ajax.php---------------------------
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<a href="javascript:void(0)" onclick="click_here()"> click Here </a>
<script>
hit1();
hit2();
function hit1(){
jQuery.ajax({
url:'get1.php',
type:'post',
async:false,
success:function(result){
//alert(result);
console.log(result);
}
});
}
function hit2(){
jQuery.ajax({
url:'get2.php',
type:'post',
success:function(result){
// alert(result);
console.log(result);
} });
}
</script>
-----------------------------get1.php-----------------------
<?php
sleep(5);
echo"get1";
?>
------------------------------------get2.php---------------------------
<?php
echo"get2";
?>
===================================================================
Tuesday, 24 November 2020
SHOPIFY
https://www.shopify.com/partners/shopify-cheat-sheet
https://www.yahoobaba.net/
edit code, theme liquid
https://store.xyz.in/adminID - abc Password - 123
login and Go to
(1) Online Store -> Themes->oct 2020->action-> Only Preview (not publish)
(2) Online Store -> Themes->oct 2020->action-> Edit Code (go to code part)
(3) Go to Assets->Add a new asset-> mobile_custom.css
and call this on head
<head>
{% include 'booster-seo' %}
{{ 'mobile_custom.css' | asset_url | stylesheet_tag }}
</head>
(4) Go to Section -> create-> mobile-nav-top.liquid
and call this under head section
=====================================================================
ADD INCLUDE CUSTOM SECTION CSS, JS
steps to add a custom section - https://www.tech-prastish.com/blog/how-to-create-custom-sections-in-shopify/
Call JS
{{ 'customer_area.js' | asset_url | script_tag }}
Call CSS
<link rel="stylesheet" href="{{ 'theme.css' | asset_url }}" type="text/css" media="print" onload="this.media='all';onLoadStylesheet()">
or <link rel="stylesheet" href="{{ 'custom.css' | asset_url }}" type="text/css">
{{ 'mobile_custom.css' | asset_url | stylesheet_tag }}
**************************************
How to run Shopify in local
==============================================
1- Install Powershell
2- Install Chocolatey
3- Install Themekit
4- Intall V S code editor
5- Go Terminal-> New Terminal
6- type command -> theme download
7- after then -> theme watch
**********************************************
ADD COMMENT
{% comment %}
code put here
{% endcomment %}
======================================================================
How to find Shopify actual theme name
-------------------------------------------
https://www.youtube.com/watch?v=64CHt6d-DQg
1- Go to inspect website and goto view source
2- and Search => "boomerang"
3- find theme name => window.BOOMR.themeName = "Canopy";
2nd method but not give correct name
------------------------------------------
1- Go to inspect website and goto view source
2- and Search => "shopify.theme"
3- find theme name => window.BOOMR.themeName = "Canopy";
4- Shopify.theme = {"name":"Cross","id":8285892,"theme_store_id":null,"role":"main"};
**********************************************************
How to create a new page in Shopify
Step 1- go to live theme and create template (customize_quiz_steps=page.customize_quiz_steps)
and call under this css, js
<link type="text/css" href="{{ 'customize_atta_itc.css' | asset_url }}" rel="stylesheet">
{{ 'style_quiz.css' | asset_url | stylesheet_tag }}
{{ 'script_quiz.js' | asset_url | script_tag }}
<script src="https://cdn.jsdelivr.net/npm/smartwizard@5/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/smartwizard@5/dist/js/jquery.smartWizard.min.js" type="text/javascript"></script>
Step 2- page.customize_quiz_steps
<div class="page-tpl customize-select-atta">
<div class="container">
{% include 'customized-ashirwaad-atta-select' %}
</div>
</div>
Step 3- create snippet
Step 4- Click on pages-> add new-> put page name-> and select template
=========================================================================
How to set any prouct Quantity Min 4 or 2 in shopify
---------------------------------------------------
Step 1- First Create tag Go to Live theme ->Go products->Go Collections->Create Collection
Enter Title->Min Quantity Four, Collection type->Automated, Products must match:All condition
Product tag is equal to (product category name->Dining Chairs)
Step 2- Select tag(Min Quantity Two) which product as you want(Crown Dining Chair)
Step 3- Put This code in product-template.liquid (call tag name using if condition)
<div class="qty-group">
<a href="#" data-minus-qtt class="minus button"></a>
{% if product.tags contains 'Min Quantity Four' %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" id="quantity" name="quantity" value="4" min="4" class="quantity-selector quantity-input" readonly="">
{% else %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" name="quantity" value="1">
{% endif %}
<a href="#" data-plus-qtt class="plus button"></a>
</div>
and show message using this
{% if product.tags contains 'Min Quantity Four' %}
<div class="min_orderf">Minimum Order Quantity is 4.</div>
{% endif %}
Step 4- Add This JS in app.js ot theme.js page
$('document').ready(function () {
$('.qty-group .minus').on('click', function(){
var qty = parseInt($(this).parent('.qty-group').find('.quantity-input').val());
//alert(qty);
if($(this).hasClass('plus')) {
qty++;
}else {
if(qty == '4') {
return false;
//qty--;
}
}
qty = (isNaN(qty))?1:qty;
$(this).parent('.qty-group').find('.quantity-input').val(qty);
});
});
Step 5- Add this code in Cart Page
<div class="qty-group">
<a href="#" data-minus-quantity class="minus button"></a>
{% if item.product.tags contains 'Min Quantity Four' %}
<input type="text" min="4" data-qtt-id="quantity__{{ product.id }}" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}" class="quantity-selector quantity-input" readonly="">
{% else %}
<input type="text" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}">
{% endif %}
<a href="#" data-plus-quantity class="plus button"></a>
</div>
and show message using this
{% if item.product.tags contains 'Min Quantity Four' %}
<div class="min_orderf">Minimum Order Quantity is 4.</div>
{% endif %}
=======================================
Mutiple Min Quantity Condition
--------------------------pdp page-------------------------------------
<div class="quantity">
<div class="qty-group">
<a href="#" data-minus-qtt class="minus button"></a>
{% if product.tags contains 'Min Quantity Four' %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" id="quantity" name="quantity" value="4" min="4" class="quantity-selector quantity-input" readonly="">
<input type="hidden" value="4" name="mininquantity_name" id="idminquantity">
{% elsif product.tags contains 'Min Quantity Two' %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" id="quantity" name="quantity" value="2" min="2" class="quantity-selector quantity-input" readonly="">
<input type="hidden" value="2" name="mininquantity_name" id="idminquantity">
{% else %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" name="quantity" value="1">
<input type="hidden" value="0" name="mininquantity_name" id="idminquantity">
{% endif %}
{% comment %}
<input type="text" data-qtt-id="quantity__{{ product.id }}" name="quantity" value="1">
{% endcomment %}
<a href="#" data-plus-qtt class="plus button"></a>
</div>
</div>
{% if product.tags contains 'Min Quantity Four' %}
<p class="qtity-text">Minimum Order Quantity is 4.</p>
{% elsif product.tags contains 'Min Quantity Two' %}
<p class="qtity-text">Minimum Order Quantity is 2.</p>
{% endif %}
--------------------cart page--------------------------------------------------
<div class="qty-group">
<a href="#" data-minus-quantity class="minus button"></a>
{% if item.product.tags contains 'Min Quantity Four' %}
<input type="text" min="4" data-qtt-id="quantity__{{ product.id }}" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}" min="4" class="quantity-selector quantity-input" readonly="">
<input type="hidden" value="4" name="mininquantity_name" id="idminquantity">
{% elsif item.product.tags contains 'Min Quantity Two' %}
<input type="text" min="2" data-qtt-id="quantity__{{ product.id }}" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}" min="2" class="quantity-selector quantity-input" readonly="">
<input type="hidden" value="2" name="mininquantity_name" id="idminquantity">
{% else %}
<input type="text" name="updates[]" id="updates_{{ item.id }}" value="{{ item.quantity }}">
<input type="hidden" value="0" name="mininquantity_name" id="idminquantity">
{% endif %}
----------------------theme.js-------------------------------------------------------------------
$('document').ready(function () {
$('.qty-group .minus').on('click', function(){
var qty = parseInt($(this).parent('.qty-group').find('.quantity-input').val());
var minqty = $('#idminquantity').val();
if($(this).hasClass('plus')) {
qty++;
}else {
if(qty == minqty && minqty!=0) {
return false;
//qty--;
}
}
qty = (isNaN(qty))?1:qty;
$(this).parent('.qty-group').find('.quantity-input').val(qty);
});
==========================================================
Change multiple variant images according to the selected color
------------------------------------------------------------
{% for media in product.media %}
{% case media.media_type %}
{% when 'image' %}
<div thumbnail-color=”{{ media.alt }}” class="item altitem filter-{{ media.alt | handle }}">
<div class="product-single__media lalit" data-media-id="{{ media.id }}">
<a href="javascript:void(0)" data-image="{{ media | img_url: 'original' }}" data-zoom-image="{{ media | img_url: 'original' }}">
<img src="{{ media | img_url: 'compact' }}" alt="{{ media.alt | escape }}">
</a>
</div>
</div>
{% endfor %}
--------------------------------------------
<script>
$(document).on('change','#product-selectors-option-1',function () {
$('.altitem').css('display', 'none');
var color= $(this).val();
color= color.toLowerCase();
//alert(color);
//$('.filter-'+color).css('display','block');
});
</script>
or using Visibility in place of Display
$(document).on('change','#product-selectors-option-1',function () {
$('.altitem').css('visibility', 'hidden');
var color= $(this).val();
color= color.toLowerCase();
//alert(color);
$('.filter-'+color).css('visibility','visible');
});
========================================================================
===================================================================
https://www.youtube.com/watch?v=TlgHl-F-crg&list=PLOTfR5AmSOWBTgr6aprfjZWjiYXqkFrU1
Step 1- First create Account https://partners.shopify.com/
Step 2- Go to Store & create Store()
Step 3- Fill store Details Name, URL, Address, City, Zip Code, password, Purpose->Client
Step 4- After than Click on online store
Step 5- Click on Online store -> Themes-> Customize (manage logo, Announcement)
Step 6- Access in Locally -> first intall Shopify Theme Kit-> https://shopify.dev/apps/tools, https://shopify.dev/themes/tools/theme-kit/getting-started
Step 7- What is liquid? https://shopify.github.io/liquid/ | https://www.shopify.in/partners/shopify-cheat-sheet
Ans- Liquid is an open-source template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts.
Liquid uses a combination of (objects, tags, and filters) inside template files to display dynamic content.
(a) Objects
Objects contain the content that Liquid displays on a page. Objects and variables are displayed when enclosed in double curly braces: {{ and }}.
Input
{{ page.title }}
Output = Introduction
(b) Tags
Tags create the logic and control flow for templates. The curly brace percentage delimiters {% and %} and the text that they surround do not produce any visible output when the template is rendered. This lets you assign variables and create conditions or loops without showing any of the Liquid logic on the page.
Input-
{% if user %}
Hello {{ user.name }}!
{% endif %}
Output = Hello Adam!
Tags can be categorized into various types:
b1.1- Control flow
b1.2-Iteration
b1.3- Template
b1.4- Variable assignment
(C) Filters
Filters change the output of a Liquid object or variable. They are used within double curly braces {{ }} and variable assignment, and are separated by a pipe character |.
Input
{{ "/my/fancy/url" | append: ".html" }}
Output
/my/fancy/url.html
Multiple filters can be used on one output, and are applied from left to right.
Input
{{ "adam!" | capitalize | prepend: "Hello " }}
Output
Hello Adam!
***************************************************************
---------------------------------------------------------------------------------------------
Step 1- How to create template in shopify
(page.abc-pratice.liquid)
Step 2- call sections in under template
{% section 'abc-pratice' %}
{% section 'image-text-custom' %}
Step 3- Put Content under 'abc-pratice' Section
<section class="welcome">
<div class="container pdp-web-banner-section">
<div class="row">
<div class="col-md-6 pdp-web-banner-section-1">
{{ section.settings.custom_image_1 | img_url: '2048x' | img_tag }}
</div>
<div class="col-md-6 pdp-web-banner-section-1">
<div class="welcome-outter">
<h1 class="section-large-heading">Heading</h1>
<p class="discription">Lorem ipsum is placeholder text commonly used...</p>
</div>
</div>
</div>
</div>
</section>
{% schema %}
{
"name": "Image",
"settings": [
{
"type": "image_picker",
"id": "custom_image_1",
"label": "Image"
}
],
"presets": [
{
"name": "Image",
"category": "Content"
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
Step 4- How to add Dynamic Image In Block
Put Where place you want to display:-
{{ section.settings.custom_image_1 | img_url: '2048x' | img_tag }}
Create Schema:-
"name": "Image",
"settings": [
{
"type": "image_picker",
"id": "custom_image_1",
"label": "Image"
}
],
============================================================================ HOW TO CREATE, theme, Index, Snippets, SECTION IN SHOPIFY
1- theme.liquid
{% comment %}
{{ content_for_layout }}
{% endcomment %}
2- index.liquid
{{ content_for_index }}
3- Call Section in theme.liquid
{% section 'header' %}
{% section 'footer' %}
4- IF else condition
{%- if request.page_type contains 'customers/' -%}
<script src="{{ 'shopify_common.js' | shopify_asset_url }}" defer="defer"></script>
{%- endif -%}
5- How to create snippets (best-rateing.liquid)
-----------------------------------
<section class="best-rated-section">
<div class="container">
<div class="best-rated-title">
<h2>We Provide The Sweetest Dreams!</h2>
<p class="one-line-decsription-new">For a good night’s sleep, pick the best rated mattresses.</p>
</div>
<div class="row">
<div class="col-4 col-md-4 best-rated">
<a href="https://doctordreams.com/apps/s/review"> <p><img data-srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-02.png?v=1623410816"
alt="google" itemprop="logo" class="lazyload"
data-sizes="auto" srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-02.png?v=1623410816"></p>
<span class="rating-count">4.7/5</span>
<p class="star-svg">{% include 'star-svg'%}</p>
<p class="review-number">250+ Reviews</p></a>
</div>
<div class="col-4 col-md-4 best-rated">
<a href="https://doctordreams.com/apps/s/review"> <p> <img data-srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-01.png?v=1623410816"
alt="doctor-dream" itemprop="logo" class="lazyload"
data-sizes="auto" srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-01.png?v=1623410816"></p>
<span class="rating-count">4.8/5</span>
<p class="star-svg">{% include 'star-svg'%}</p>
<p class="review-number">400+ Reviews</p> </a>
</div>
<div class="col-4 col-md-4 best-rated">
<a href="https://doctordreams.com/apps/s/review"> <p> <img data-srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-03.png?v=1623410816"
alt="facebook" itemprop="logo" class="lazyload facebook-logo"
data-sizes="auto" srcset="//cdn.shopify.com/s/files/1/0248/7766/2271/files/Icon_G_F_DD-03.png?v=1623410816"></p>
<span class="rating-count">5/5</span>
<p class="star-svg">{% include 'star-svg'%}</p>
<p class="review-number">300+ Reviews</p></a>
</div>
</div>
</div>
</section>
-------------------------------
6- Snippets call in home-slideshow.liquid section using include function
{% include 'best-rateing' %}
{% include 'Banner-combo-image' %}
7- (home-slideshow.liquid) Section
<section class="homepage-reviews" id="section-{{section.id}}">
<div class="container">
<div class="row">
{% if section.settings.title != blank %}
<div class="col-12 text-center">
<h2 class="main-title">
h12jnArtiivn
{% render 'multilang' with section.settings.title %}
</h2>
</div>
{% endif %}
</div>
<div class="reviews-social-section" >
{% comment %}
<ul class="rating_section1">
</ul>
{% endcomment %}
<div id="filter_add">
</div>
</div>
<div class="review-filter-block">
<div class="slider multiple-items review_html1">
</div>
</div>
<div class="text-center">
<a href="https://india.com/apps/s/review" class="btn secondary-button">Read More</a>
</div>
</div>
</section>
<style>
#section-{{section.id}}{
margin-top: {{ section.settings.space_on }}px;
margin-bottom: {{ section.settings.space_below }}px;
position: relative;
z-index: 1;
}
.video-ds .play-icon-ds {
position: absolute;
top: calc(50% - 10px);
align-items: center;
left: calc(50% - 10px);
}
.video-ds {
position: relative;
}
.video-ds .play-icon-ds div {
background-color: #ffffff;
border-radius: 20px;
width: 40px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 10px 20px 0 rgb(0 0 0 / 20%);
}
</style>
{% schema %}
{
"name": "Customer Google Reviews",
"class": "homepage-reviews-sections",
"settings": [
{
"type": "range",
"id": "space_on",
"label": "Space on",
"min": 0,
"max": 100,
"step": 1,
"default": 20
},
{
"type": "range",
"id": "space_below",
"label": "Space below",
"min": 0,
"max": 100,
"step": 1,
"default": 25
},
{
"type": "text",
"id": "title",
"label": "Title",
"default": "Customer Reviews"
},
{
"type": "select",
"id": "title_style",
"label": "Title Style:",
"options": [
{
"value": "style_1",
"label": "Style 1"
},
{
"value": "style_2",
"label": "Style 2"
}
],
"default": "style_1"
},
{
"type": "select",
"id": "per_row",
"label": "Customer review per row",
"options": [
{
"value": "1",
"label": "1"
},
{
"value": "2",
"label": "2"
},
{
"value": "3",
"label": "3"
},
{
"value": "4",
"label": "4"
},
{
"value": "5",
"label": "5"
}
],
"default": "3"
}
],
"blocks": [
{
"type": "Review",
"name": "Review",
"settings": [
{
"type" : "image_picker",
"id" : "reviews_image",
"label" : "Select Image"
},
{
"type" : "text",
"id" : "reviews_heading",
"label" : "Heading",
"default" : "Awesome..."
},
{
"type": "select",
"id": "rating",
"label": "Rating",
"options": [
{ "value": "star0", "label": "0 star" },
{ "value": "star1", "label": "1 star" },
{ "value": "star2", "label": "2 star" },
{ "value": "star3", "label": "3 star" },
{ "value": "star4", "label": "4 star" },
{ "value": "star5", "label": "5 star" }
],
"default": "star5"
},
{
"type" : "text",
"id" : "reviews_purchased_text",
"label" : "Purchased text",
"default" : "Purchased:"
},
{
"type" : "text",
"id" : "reviews_title",
"label" : "Title",
"default" : "Title"
},
{
"type" : "url",
"id" : "reviews_link",
"label" : "Link"
},
{
"type": "textarea",
"id": "body_review",
"label": "Content of Review",
"default": "Nam tempus turpis at metus scelerisque placerat nulla deumantos delo sollicitudin delos felis. Pellentesque diam dolor an elementum et lobortis at mollis ut risus. Curabitur semper sagittis mi condimentum..."
},
{
"type" : "text",
"id" : "name",
"label" : "Customer Name",
"default" : "Customer Name"
},
{
"type" : "text",
"id" : "date_review",
"label" : "Date",
"default" : "Wednesday, Jan 26, 2019"
}
]
}
],
"presets": [
{
"name": "Customer Google Reviews",
"category": "Reviews"
}
]
}
{% endschema %}
<script>
$('body').on('click', '.show_model_review', function() {
$("#youtube-preview-name").text("");
$("#youtube-preview-src").attr('src',"");
$("#youtube-preview-name").text($(this).data('review_title'));
$("#youtube-preview-src").attr('src',$(this).data('review_src'));
$("#myModal").modal('show');
});
$('body').on('hidden.bs.modal', '#myModal', function() {
$("#youtube-preview-name").text("");
$("#youtube-preview-src").attr('src',"");
});
$('document').ready(function(){
$.ajax({
url: 'https://middleware.doctordreams.com/api/review/filter/dynamic',
type: 'get',
success: function(resp){
if(resp.success == true){
$('#filter_add').html(resp.filter_html);
}
},
error:function(){
console.log('error');
}
});
$.ajax({
url: 'https://middleware.doctordreams.com/api/get/review/data1',
type: 'POST',
success: function(resp){
console.log("arti",resp)
if(resp.success == true){
$('.review_html1').html(resp.review_small_data);
slickSlider();
}
},
error:function(){
console.log('error');
}
});
function slickSlider(){
// slick slider
$('.multiple-items').slick({
infinite: true,
slidesToShow: 4,
slidesToScroll: 1,
dots: false,
prevArrow: '<button class="slide-arrow prev-arrow"><svg xmlns="http://www.w3.org/2000/svg" width="40.163" height="46.18" viewBox="0 0 40.163 46.18"><defs><style>.a{fill:#083f88;}</style></defs><path class="as" d="M22.75,0,45.5,39.375H0Z" transform="matrix(-0.017, 1, -1, -0.017, 40.163, 0.687)"/></svg></button>',
nextArrow: '<button class="slide-arrow next-arrow"><svg xmlns="http://www.w3.org/2000/svg" width="40.163" height="46.18" viewBox="0 0 40.163 46.18"><defs><style>.a{fill:#083f88;}</style></defs><path class="as" d="M22.75,0,45.5,39.375H0Z" transform="matrix(-0.017, 1, -1, -0.017, 40.163, 0.687)"/></svg></button>',
responsive: [
{
breakpoint: 992,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 400,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
}
});
</script>
---------------------------------------------------------------
How to call Dynamic Heading, Description, Image, Link in Blocks
----------------------------------------------------
<h2> {{ section.settings.fproduct_text_title }} </h2>
<div>{{ section.settings.fproduct_text_body }}</div>
------------------------------------------------
{%for block in section.blocks %}
<div class="col-6 col-md-3">
<div class="collection-item">
<div class="img-box banner-item">
<a href="{{ block.settings.link }}" title="">
<img src={{ block.settings.fproduct_image | img_url: "600x" }} />
</a>
</div>
</div>
</div>
{% endfor %}
{% schema %}
{
"name": "Family products",
"settings": [
{
"id": "fproduct_text_title",
"type": "text",
"label": "heading",
"default": "title"
},
{
"id": "fproduct_text_body",
"type": "richtext",
"label": "Add custom text below",
"default": "<p>Add your text here</p>"
}
],
"blocks": [
{
"type": "image_picker",
"name": "fproduct_image",
"settings": [
{
"id": "fproduct_image",
"type": "image_picker",
"label": "Select image"
},
{
"id": "link",
"type": "url",
"label": "Image link"
}
]
}
],
"presets": [
{
"name": "Family products section",
"category": "fproduct_image"
}
]
}
{% endschema %}
--------------------call image in section------------------------
<div>
<img class="desktop_img" src="https://cdn.shopify.com/s/files/1/0248/7766/2271/files/icefoam_1289X400-01.jpg?v=1650522831" alt="image1">
</div>
{% if section.settings.fproduct_image %}
<img src={{ section.settings.fproduct_image | img_url: "600x" }} />
{% endif %}
{
"id": "fproduct_image",
"type": "image_picker",
"label": "Select image"
}
=====================================================================================================
Custom color swatches Shopify
-----------------------------------------------------
(Snippets-> product-swatch.liquid)
https://www.nilkamalfurniture.com/products/nilkamal-rowan-shoe-cabinet-rack-walnut?variant=39651984015449
https://www.youtube.com/watch?v=UM-CLntvR5Q
https://community.shopify.com/c/shopify-design/product-pages-add-color-swatches-to-products/td-p/616427
Change image url
https://stackoverflow.com/questions/61315571/how-do-i-display-the-variant-image-when-the-color-swatch-of-a-variant-is-hovered
references-
https://shopwithcaa.com/collections/luggage-sets/products/swiss-gear-tyax-3-piece-expandable-hardside-luggage-set-online-only?variant=39558787203123
https://landmarkxcite.com/products/studiowest-lipbar-creme-lipstick-cbr-04
iPhone Menu
---------------------------------------
Nilkamal Furniture - 10 day 10 deals - 15/01/22
https://tympanus.net/Development/ResponsiveMultiLevelMenu/index3.html
https://www.homecentre.in/in/en/c/livingroom-sofas-sofasets
https://app.lambdatest.com/console/realtime
ajaxify cart msg
-----------------------------------------
https://community.shopify.com/c/shopify-design/product-pages-stay-on-the-product-page-after-adding-products-to/m-p/616440
https://www.youtube.com/watch?v=8_DA_cgOZq0
===============================================================================================================
vertical menu (How to add multlevel (4,5,6..etc) menu) using shopify handle (main menu(home,about,contact)->next->start home always)
=======================================================================================================
<div class="vertical-menu">
{% for link in linklists[vertical-menu].links %}
{% if linklists[link.handle] == empty %}
<li><a href="{{ link.url }}" class="top_link {% if link.active %}active{% endif %}" data-dropdown-rel="{{ link.handle }}">{{ link.title }}</a></li>
{% else %}
<li class="sublink"><a data-no-instant href="{{ link.url }}" class="dropdown_link--vertical {% if link.active %}active{% endif %}" data-dropdown-rel="{{ link.handle }}" data-click-count="0">{{ link.title }} <span class="icon-down-arrow"></span></a>
<ul class="vertical-menu_submenu newvermenu">
{% for link in linklists[link.handle].links %}
{% if linklists[link.handle] == empty %}
<li><a href="{{ link.url }}">{{ link.title }}</a></li>
{% else %}
<li class="sublink newvermenu-sublink"><a data-no-instant href="{{ link.url }}" data-click-count="0">{{ link.title }} <span class="right icon-down-arrow"></span></a>
<ul class="vertical-menu_sub-submenu">
{% for link in linklists[link.handle].links %}
{% if linklists[link.handle] == empty %}
<li><a href="{{ link.url }}" >{{ link.title }}</a></li>
{% else %}
<li class="sublink"><a data-no-instant href="{{ link.url }}" data-click-count="0" class="lioneactivea">{{ link.title }} <span class="right icon-down-arrow"></span></a>
<ul class="vertical-menu_sub-submenu">
{% for link in linklists[link.handle].links %}
{% if linklists[link.handle] == empty %}
<li><a href="{{ link.url }}" >{{ link.title }}</a></li>
{% else %}
<li class="sublink"><a data-no-instant href="{{ link.url }}" data-click-count="0" class="litwoactivea">{{ link.title }} <span class="right icon-down-arrow"></span></a>
<ul class="vertical-menu_sub-submenu level3custommenu">
{% for link in linklists[link.handle].links %}
{% if linklists[link.handle] == empty %}
<li><a href="{{ link.url }}" >{{ link.title }}</a></li>
{% else %}
<li class="sublink"><a data-no-instant href="{{ link.url }}" data-click-count="0" class="lithreeactivea">{{ link.title }} <span class="right icon-down-arrow"></span></a>
<ul class="vertical-menu_sub-submenu level4custommenu">
{% for link in linklists[link.handle].links %}
<li><a href="{{ link.url }}" >{{ link.title }}</a></li>
{% endfor %}
</ul> </li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endfor %}
</div>
<script>
$(document).ready(function() {
if ($(this).hasClass("vertical-menu--align-right")) {
setTimeout(function () {
$(".vertical-menu .vertical-menu_submenu .vertical-menu_sub-submenu").removeClass("vertical-menu--align-right");
}, 10);
}
});
$('.vertical-menu_submenu ul').addClass(function(){
return "level-"+$(this).parents('ul').length;
});
$(".level4custommenu li:first-child a").addClass("lifouractivea ");
</script>
========================================================
tags according to page url
{% if product.handle contains 'at-home-gift-card' %}
<div class="select col-sm-6 col-md-6">
<select id="product-select-{{ product.id }}{{ product-form }}{{ section.id }}{{ block.id }}" name="id" class="testx multi_select">
{% for v in product.variants %}
<option {% if v == variant %}selected="selected"{% endif %} value="{{ v.id }}" data-sku="{{ v.sku }}">{{ v.title }}</option>
{% endfor %}
</select>
</div>
{% endif %}
=======================================================
Add 3D in PDP page using url handle if tag
-----------------------------------------------
{% if product.handle contains 'nilkamal-double-pillow-top-bonnell-spring-mattress' %}
<div class="threed-title">
<h3>Know Your Mattress</h3>
<div class="d-flex layerDesc-block flex-column flex-md-row">
<div class="col-12 col-md-4 col-lg-6 col-xl-6 p-0">
<div class="imgLayeringWrap">
<div class="imgLayering" id="imglayr">
<img class="img-responsive alsoBuy-image vin-lazy-load img-fluid float-right layerImg" style="width:100%;height:auto;object-fit:cover;" data-src="https://cdn.shopify.com/s/files/1/0044/1208/0217/files/FDPT_layer.png?v=1650536562" alt="" src="https://cdn.shopify.com/s/files/1/0044/1208/0217/files/FDPT_layer.png?v=1650536562">
<div class="img-numLayering active" data-layer="layer-num-1">
<div class="layerImgWrap">
</div>
<div class="layerNum"><span>1</span></div>
</div>
<div class="img-numLayering" data-layer="layer-num-2">
<div class="layerImgWrap">
</div>
<div class="layerNum"><span>2</span></div>
</div>
<div class="img-numLayering" data-layer="layer-num-3">
<div class="layerImgWrap">
</div>
<div class="layerNum"><span>3</span></div>
</div>
<div class="img-numLayering" data-layer="layer-num-4">
<div class="layerImgWrap">
</div>
<div class="layerNum"><span>4</span></div>
</div>
<div class="img-numLayering" data-layer="layer-num-5">
<div class="layerImgWrap">
<div class="layerNum"><span>5</span></div>
</div>
</div>
<div class="img-numLayering" data-layer="layer-num-6">
<div class="layerImgWrap">
<div class="layerNum"><span>6</span></div>
</div>
</div>
<div class="img-numLayering" data-layer="layer-num-7">
<div class="layerImgWrap">
<div class="layerNum"><span>7</span></div>
</div>
</div>
<div class="img-numLayering" data-layer="layer-num-8">
<div class="layerImgWrap">
<div class="layerNum"><span>8</span></div>
</div>
</div>
<div class="img-numLayering" data-layer="layer-num-9">
<div class="layerImgWrap">
<div class="layerNum"><span>9</span></div>
</div>
</div>
<div class="img-numLayering" data-layer="layer-num-10">
<div class="layerImgWrap">
<div class="layerNum"><span>10</span></div>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 col-md-8 col-lg-6 col-xl-5 d-flex justify-content-center flex-direction-column">
<div class="layerDescAccordianWrap" id="layerDescAccordianW">
<div class="layerDescAccordian active" data-layer="layer-num-1">
<h4 class="layerDescAccordian-head" data-layer="layer-num-1">
<span class="textLayerNum"></span>Knitted Fabric
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Premium quality knitting creates a super smooth and comfortable outer fabric.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-2">
<h4 class="layerDescAccordian-head" data-layer="layer-num-2">
<span class="textLayerNum"></span>PU Foam Quilt & Soft Wadding
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Soft fabric, supportive foam, and thick cushioning combine to provide ultimate relaxing comfort.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-3">
<h4 class="layerDescAccordian-head" data-layer="layer-num-3">
<span class="textLayerNum"></span>Pure PU Foam
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Supportive and relaxing, foam supports your spine and muscles as you sleep.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-4">
<h4 class="layerDescAccordian-head" data-layer="layer-num-4">
<span class="textLayerNum"></span>Cotton Felt
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Lightweight cotton fabric provides excellent padding and comfort.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-5">
<h4 class="layerDescAccordian-head" data-layer="layer-num-5">
<span class="textLayerNum"></span>Nylon Mesh
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Durable fabric that wicks away moisture and improves breathability.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-6">
<h4 class="layerDescAccordian-head" data-layer="layer-num-6">
<span class="textLayerNum"></span>Bonnell Springs
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Bouncy, pressure-absorbing springs encourage elevation and support.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-7">
<h4 class="layerDescAccordian-head" data-layer="layer-num-7">
<span class="textLayerNum"></span>Nylon Mesh
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Durable fabric that wicks away moisture and improves breathability.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-8">
<h4 class="layerDescAccordian-head" data-layer="layer-num-8">
<span class="textLayerNum"></span>Cotton Felt
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Lightweight cotton fabric provides excellent padding and comfort.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-9">
<h4 class="layerDescAccordian-head" data-layer="layer-num-9">
<span class="textLayerNum"></span>Pure PU Foam
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Supportive and relaxing, foam supports your spine and muscles as you sleep.
</div>
</div>
<div class="layerDescAccordian" data-layer="layer-num-10">
<h4 class="layerDescAccordian-head" data-layer="layer-num-10">
<span class="textLayerNum"></span>PU Foam Quilt & Soft Wadding
<i class="fa fa-caret-down"></i>
<i class="fa fa-caret-up"></i>
</h4>
<div class="layerDescAccordian-body">
Soft fabric, supportive foam, and thick cushioning combine to provide ultimate relaxing comfort.
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
--------------------------------------------------------
<script>
$('.img-numLayering,.layerDescAccordian').click(function(){
var fav=$(this).data("layer");
$(".layerDescAccordian").removeClass('active');
$(".img-numLayering").removeClass('active');
// $("[data-layer='"+ fav +"']").addClass('img-numLayering active');
$("[data-layer='"+ fav +"']").addClass('active');
//$('.img-numLayering[data-layer="'+fav+'"]').addClass('active');
});
</script>
<style>
.layerDescAccordian-body {
display: none;
}
.layerDescAccordian.active .layerDescAccordian-body {
display: block;
color: #404041;
font-family: 'gothamRounded-medium';
font-size: 16px;
}
.layerDescAccordian {
cursor: pointer;
margin-bottom: 15px;
}
.layerDescAccordian.active i.fa.fa-caret-down {
display: none;
}
.layerDescAccordian i.fa.fa-caret-up {
display: none;
}
i.fa.fa-caret-down, i.fa.fa-caret-up {
float: right;
}
.layerDescAccordian.active i.fa.fa-caret-up {
display: block;
}
</style>
--------------------------------------------------------------
.number-3d-layer span{
background-color: orange;
padding: 10px 17px;
color: #fff;
border-radius: 50%;
}
.number-3d-layer{
text-align: center;
position: absolute;
right: 29%;
margin-top: 40px;
}
.image-3d-layer{
max-width: 80%;
}
.imgLayeringWrap {
padding: 0 0;
left: -200px;
position: relative;
width: 780px;
}
.imgLayering {
position: absolute;
}
.img-numLayering:nth-child(1) {
top: 0px;
z-index: 8;
}
.img-numLayering {
position: relative;
}
.img-numLayering.active .layerImgWrap {
cursor: pointer;
transform: scale(1.02);
}
.img-numLayering .layerImgWrap {
transform: scale(1);
transition: opacity 1s ease,transform 1s ease;
}
.img-numLayering .layerNum {
margin-top: -54px;
}
.img-numLayering .layerNum {
right: 80px;
}
.img-numLayering .layerNum {
position: relative;
right: 80px;
float: right;
z-index: 20;
height: 0;
margin-top: -42px;
width: 30px;
}
.img-numLayering.active .layerNum::before {
width: 280px;
}
.layerNum::before {
content: '';
width: 0;
border-bottom: solid 1px #023e88;
position: absolute;
z-index: 1;
right: 100%;
top: 15px;
display: none;
position: relative;
left: 0;
transition: width 1s ease;
display: block;
}
.img-numLayering .layerNum span::before, .img-numLayering .layerNum span::after {
display: block;
box-shadow: transparent 0 0 0.1875rem 0.1875rem;
width: 3rem;
height: 3rem;
margin-left: -0.5rem;
margin-top: -0.5rem;
content: "";
border: 4px double transparent;
border-radius: 100%;
position: absolute;
opacity:0.2;
}
.img-numLayering.active .layerNum span::after {
animation-name: borderEff2;
}
.img-numLayering:hover .layerNum span::before, .img-numLayering:hover .layerNum span::after, .img-numLayering.active.layerNum span::before, .img-numLayering.active .layerNum span::after {
box-shadow: #023e88 0 0 0.1875rem 0.1875rem;
border-color: #023e88;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
animation-name: borderEff1;
}
.img-numLayering .layerNum span::before, .img-numLayering .layerNum span::after {
display: block;
box-shadow: transparent 0 0 0.1875rem 0.1875rem;
width: 3rem;
height: 3rem;
margin-left: -0.5rem;
margin-top: -0.5rem;
content: "";
border: 4px double transparent;
border-radius: 100%;
position: absolute;
}
.img-numLayering.active .layerNum span {
cursor: pointer;
background: #0093dd;
color: #fff;
}
.img-numLayering .layerNum span {
width: 2rem;
height: 2rem;
z-index: 1;
line-height: 35px;
background: #fff;
color: #023e88;
text-align: center;
display: grid;
vertical-align: bottom;
border-radius: 100%;
transition: background 0.4s ease,color 0.4s ease;
position: relative;
}
.img-numLayering .layerNum {
position: relative;
right: 80px;
float: right;
z-index: 20;
height: 0;
margin-top: -32px;
width: 30px;
}
.img-numLayering:nth-child(2) {
top: -512px;
z-index: 7;
left: -300px;
}
.img-numLayering:nth-child(3) {
top: -468px;
z-index: 6;
left: -59px;
}
.img-numLayering:nth-child(4) {
top: -406px;
z-index: 5;
left: -300px;
}
.img-numLayering:nth-child(5) {
top: -406px;
z-index: 4;
left: -63px;
}
.img-numLayering:nth-child(6) {
top: -354px;
z-index: 3;
left: -158px
}
.img-numLayering:nth-child(7) {
top: -297px;
z-index: 2;
left: -317px
}
.img-numLayering:nth-child(8) {
top: -333px;
z-index: 1;
left: -48px;
}
.img-numLayering:nth-child(9) {
top: -235px;
z-index: 1;
left: -313px;
}
.img-numLayering:nth-child(10) {
top: -248px;
z-index: 1;
left: -48px;
}
.img-numLayering:nth-child(11) {
top: -134px;
z-index: 1;
left: -314px
}
.layerDescAccordianWrap {
max-width: 555px;
margin-top: 0;
top: 0;
padding-bottom: 70px;
background: #fff;
z-index: 20;
padding-left: 10px;
}
.wrapper-header-bt {
z-index: 999 !important;
}
h4.layerDescAccordian-head {
margin-bottom: 0px;
color: #0093dd;
font-size: 22px;
text-transform: capitalize;
}
@media only screen and (max-width: 540px){
.imgLayeringWrap {
padding: 15px 15px 0px;
}
}
@media only screen and (max-width: 767px){
.imgLayeringWrap {
left: 0px;
width: 100%;
display: grid;
max-width: 540px;
margin: auto;
padding: 25px 25px 0px;
}
}
@media only screen and (max-width: 540px){
.img-numLayering:nth-child(2) {
top: -233px!important;
left: -76px;
}
}
@media only screen and (max-width: 540px){
.img-numLayering:nth-child(1) {
top: 0px;
}
}
@media only screen and (max-width: 450px){
.img-numLayering:nth-child(3) {
top: -208px!important;
left: 0;
}
.img-numLayering:nth-child(4) {
top: -178px!important;
left: -75px;
}
.img-numLayering:nth-child(5) {
top: -184px!important;
left: -167px;
}
.img-numLayering:nth-child(6) {
top: -163px!important;
left: 15px;
}
.img-numLayering:nth-child(7) {
top: -145px!important;
left: -77px;
}
.img-numLayering:nth-child(8) {
top: -142px!important;
left: -21px;
}
.img-numLayering:nth-child(9) {
top: -143px!important;
left: -193px;
}
.img-numLayering:nth-child(10) {
top: -80px!important;
left: -86px;}
.img-numLayering:nth-child(11) {
top: -102px!important;
left: 26px;}}
@media only screen and (max-width: 540px){
.layerDescWrap .layerDescAccordianWrap {
padding: 13px 24px 30px;
}
}
@media only screen and (max-width: 767px){
.layerDescWrap .layerDescAccordianWrap {
max-width: none;
z-index: -1;
position: relative;
margin-top: -7px;
margin-bottom: 26px;
padding: 8px 24px 12px;
background: rgb(243, 249, 249);}
.header-bottom { z-index: 999 !important;}
.layerNum::before {border-bottom: none;}
.layerDescAccordianWrap{padding-bottom: 0px;}
.img-numLayering.active .layerNum span::after, .img-numLayering.active.layerNum span::before, .img-numLayering:hover .layerNum span::after, .img-numLayering:hover .layerNum span::before {
box-shadow: #023e88 0 0 0.1875rem 0.1875rem;
border-color: #023e88;
animation-duration: 2s;
animation-iteration-count: infinite;
animation-timing-function: ease-out;
animation-name: borderEff1;
}
.layerDescAccordian {
display: none;
}
.layerDescAccordian.active {
display: block;
}
}
.threed-title h3{
font-size: 44px;
font-weight: 400;
line-height: 60px;
margin-bottom: 30px;
display: inline-block;
color: #0093dd;
text-align: center;
margin-top: 30px;
text-transform: capitalize;
}
.threed-title {
text-align: center;
}
.svgclr {
fill: white !important;
}
.wishdot {
position: absolute;
right: -4px;
top: -6px;
min-width: 14px;
min-height: 18px;
text-align: center;
padding: 2px 0 0 1px;
-moz-border-radius: 50%;
-webkit-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
z-index: 2;
background-color: #1e1e1e;
color: #ffffff;}
.awrap {
position: relative;
}
@media only screen and (max-width: 540px){
.img-numLayering:nth-child(1) {
top: 0px !important;
}
body#buy-plus-orthopaedic-mattress-online-doctor-dreams .img-numLayering:nth-child(1) {
top: 0px;}
}
.imgcls {
min-height: inherit;
object-fit: unset;
width: 425px;
height: 300px;
max-height: 100%;}
body#buy-nilkamal-flora-double-pillow-top-bonnell-spring-mattress-online .imgLayeringWrap { left: -69px;}
.imgLayering img {width: 90% !important;}
@media only screen and (max-width: 767px){
body#buy-nilkamal-flora-double-pillow-top-bonnell-spring-mattress-online .imgLayeringWrap {
left: 0px;
}
.imgLayering img {width: 100%!important;}
.imgLayering {position: relative;top: 0%; margin-bottom: -40px;}}
=======================================================================
Learn Practical Liquid
------------------------------------------page.demo.liquid------------------------
<div class="page-width">
<div class="grid">
<div class="grid__item medium-up--five-sixths medium-up--push-one-twelfth">
<div class="section-header text-center">
<h1>Liquid {{ page.title }} </h1>
</div>
<div class="rte">
<!-- assign variable here -->
{% assign my_variable = "This is my variable" %}
{% comment %} Print variable here {% endcomment %}
{{ my_variable }}
<!-- using capture variable here -->
{% capture about_me %}
I am Lalit and {{ my_variable }}.
{% endcapture %}
<!-- echo capture object -->
<div> {{ about_me }} </div>
<br>
{% assign num1 = 20 %}
{% assign num2 = 40 %}
Addition = {{ num1 | plus: num2 }}
<br>
Subtraction = {{ num2 | minus: num1 }}
<br>
Multiplication = {{ num1 | times: num2 }}
<br>
Division = {{ num2 | divided_by: num1 }}
<br>
{% if num2 > num1 %}
Greater than number is {{ num2 }}
{% else %}
Greater than number is {{ num1 }}
{% endif %}
<br> <br>
{% assign color = "blue" %}
{% case color %}
{% when "red" %}
Color is {{ color }}
{% when "blue" %}
Color is {{ color }}
{% when "green" %}
Color is {{ color }}
{% else %}
None of the above
{% endcase %}
<br><br>
<!---for loop---->
{% for i in (1..5) %}
The number is : {{ i }} <br>
{% endfor %}
<br>
<!-- use dynamic page object------>
<div> {{ page.title }} </div>
<div> {{ page.content }} </div>
<div> Handle = {{ page.handle }} </div>
<br>
<!-- tags according to page url------>
{% if page.handle contains 'demo' %}
Hi this is a demo.
{% endif %}
<br> <hr>
<!-- call sections------>
{% section 'demo_text' %}
</div>
</div>
</div>
</div>
-------------------------------------------Create Section (demo_text.liquid)-------------------------------------
<!--<div> Section is here</div>-->
{% if section.settings.enable_heading %}
<h4 class="custom_heading" style="text-align: {{ section.settings.text_position }}"> {{ section.settings.text_id }} </h4>
{% endif %}
{% if section.settings.myimage %}
<img src="{{ section.settings.myimage | img_url: "800x" }}" alt="img">
{% endif %}
<hr>
<div class="gallery">
{% for block in section.blocks %}
<div class="gallery_item">
{% if block.settings.enable_gallery_img %}
<img src="{{ block.settings.gallery_image | img_url: "400x" }}" alt="gallery img">
{% endif %}
</div>
{% endfor %}
</div>
{% schema %}
{
"name": "Demo page text",
"settings": [
{
"type": "text",
"id": "text_id",
"label": "Enter text",
"default": "Section Heading is here"
},
{
"type": "checkbox",
"id": "enable_heading",
"label": "Enter your text",
"default": true
},
{
"type": "select",
"id": "text_position",
"label": "Position your text",
"options": [
{"value": "left", "label": "Left" },
{"value": "center", "label": "Center" },
{"value": "right", "label": "Right" }
],
"default": "left"
},
{
"type": "image_picker",
"id": "myimage",
"label": "Select image"
}
],
"blocks": [
{
"type": "gallery",
"name": "gallery",
"settings": [
{
"type": "checkbox",
"id": "enable_gallery_img",
"label": "Enable Gallery Image",
"default": true
},
{
"type": "image_picker",
"id": "gallery_image",
"label": "Gallery image"
}
]
}
],
"presets": [
{
"name": "My Custom Text",
"category": "text",
"blocks": [
{
"type": "gallery"
}
]
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
https://www.shopify.com/partners/shopify-cheat-sheet
https://www.yahoobaba.net/