Ex 1. if 50 qty = 100 rs so 200 qty = ?
200/50 * 100 = 400
Ex 2. if 36 qty = 34.02 so 144 qty = ?
144/36 * 34.02 = 136.08
Shopify, Shopify Apps, Magento, WordPress, Codeigniter, Joomla, Big Commerce | PHP
Ex 1. if 50 qty = 100 rs so 200 qty = ?
200/50 * 100 = 400
Ex 2. if 36 qty = 34.02 so 144 qty = ?
144/36 * 34.02 = 136.08
var container = document.querySelector('iframe#gorgias-chat-container');
var chatButtonHead = container?.querySelector('#chat-button')?.contentWindow.document.querySelector('head');
var chatButton = container?.querySelector('#chat-button')?.contentWindow.document.querySelector('body');
chatButton = chatButton?.querySelector('button');
if (chatButton?.children.length){
var chatbuttonStyle = document.createElement('div');
chatbuttonStyle.style.textAlign = "center";
chatbuttonStyle.style.fontWeight = "500";
chatbuttonStyle.textContent = 'Chat';
chatButton.appendChild(chatbuttonStyle);
window.clearInterval(gorgiasChatbutton);
}
Example 2
var gorgiasChatbutton = window.setInterval(function() {
var container = document.querySelector('#gorgias-chat-container');
var chatButtonHead = container?.querySelector('#chat-button')?.contentWindow.document.querySelector('head');
var chatButton = container?.querySelector('#chat-button')?.contentWindow.document.querySelector('body');
var chatButton = container?.querySelector('#chat-button')?.contentWindow.document.querySelector('body');
chatButton = chatButton?.querySelector('button');
chatButton = chatButton?.querySelector('.messenger-button-iframe-uscp54');
chatButton = chatButton?.querySelector('.messenger-button-iframe-clht14');
if (chatButton?.children.length){
var buttonStyle = document.createElement('style');
buttonStyle.textContent = '.chattext{color: #0e2fb5;text-align: center;font-weight: 500;position: absolute;bottom: 6px;left: 2px;font-size: 12px;background: #FFF;border-radius: 100%;}'; // the custom CSS for the chat button
chatButtonHead.appendChild(buttonStyle);
var chatbuttonStyle = document.createElement('div');
chatbuttonStyle.classList.add("chattext")
chatbuttonStyle.textContent = 'Chat';
chatButton.appendChild(chatbuttonStyle);
window.clearInterval(gorgiasChatbutton);
}
}, 100);
add {% section 'contactpagefaq' %} on your template file
{% if section.settings.faqenable %}<h2>{{ section.settings.faqtitle }}</h2>{% for block in section.blocks %}<button class="accordion">{{ block.settings.sectiontitle }}</button><div class="panel"><p>{{ block.settings.sectiontext }}</p></div>{% endfor %}{% endif %}{% schema %}{"name": "Contact Page FAQ","max_blocks": 5,"settings": [{"id": "faqenable","type": "checkbox","label": "Enable","default": true},{"id": "faqtitle","type": "text","label": "Heading","default": "FAQ"}],"blocks": [{"type": "select","name": "Block","settings": [{"id": "sectiontitle","type": "text","label": "Title"},{"id": "sectiontext","type": "textarea","label": "Text"}]}]}{% endschema %}{% stylesheet %}{% endstylesheet %}{% javascript %}{% endjavascript %}
Sort by updated date
<script>
var data = "[
{
"_id": "5efd566ab3e22f002484bbb0",
"first_name": "Jaydip",
"last_name": "Kansagra",
"rate": "0",
"createdAt": "2020-07-02T03:37:14.808Z",
"updatedAt": "2020-07-02T03:37:14.808Z"
},
{
"_id": "5f16d3933fdf4a0024b7a2f8",
"first_name": "Jaydip",
"last_name": "Kansagra",
"rate": "5",
"createdAt": "2020-07-21T11:37:55.310Z",
"updatedAt": "2020-07-21T11:37:55.310Z"
},
{
"_id": "5f3bc286436d850024a2b574",
"first_name": "Jaydip",
"last_name": "Kansagra",
"rate": "3",
"createdAt": "2020-08-18T11:59:02.825Z",
"updatedAt": "2020-08-18T11:59:02.825Z"
}
]";
theme.blend_Obj = data;
theme.blend_Obj.sort((a, b) => (a.updatedAt > b.updatedAt) ? 1 : -1)
</script>
==================================
Sort by Rate (integer value)
<script>
topRates = [...theme.blend_Obj]
topRates.sort((a, b) => (parseInt(a.rate) < parseInt(b.rate)) ? 1 : -1);
</script>
function createxmlele($data, $name='root', &$doc=null, &$node=null){if ($doc==null){$doc = new DOMDocument('1.0','UTF-8');$doc->formatOutput = TRUE;$node = $doc;}if (is_array($data)){foreach($data as $var=>$val){if (is_numeric($var)){$this->createxmlele($val, $name, $doc, $node);}else{if (!isset($child)){$child = $doc->createElement($name);$node->appendChild($child);}$this->createxmlele($val, $var, $doc, $child);}}}else{$child = $doc->createElement($name);$node->appendChild($child);$textNode = $doc->createTextNode($data);$child->appendChild($textNode);}if ($doc==$node){return $doc;}}
<a href="#FlavoredToothpicks">Jaydip Kansagra is developer</a>
<span class="anchor" id="FlavoredToothpicks"></span><h3 class="subsection-title">Jaydip Kansagra is developer</h3>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
.anchor {
display: block;
height: 100px;
margin-top: -100px;
visibility: hidden;
}