This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login url | |
<?php echo Mage::getUrl('customer/account/login'); ?> | |
logout url | |
<?php echo Mage::getUrl('customer/account/logout'); ?> | |
My Account url | |
<?php echo Mage::getUrl('customer/account'); ?> | |
Register url |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener("DOMContentLoaded", function(){ | |
// Detect dark mode with Vanilla JS and add class to BODY | |
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { | |
document.body.classList.add("dark-mode"); // your class here | |
} | |
// Turn Dark Mode on/off, manually | |
document.querySelector('.lightsoff').onclick = function() { | |
document.querySelector('body').classList.toggle('dark-mode'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Light mode */ | |
@media (prefers-color-scheme: light) { | |
body { | |
background-color: #FFFFFF; | |
color: #000000; | |
} | |
} | |
/* Dark mode */ | |
@media (prefers-color-scheme: dark) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* 1) open your invoice.php file | |
* 2) comment: // $wpo_wcpdf->billing_address(); | |
* 3) copy/pasta: the first php block you see below | |
* 4) copy/pasta: the second php block remove what you don't need | |
* 5) save | |
* 6) go ham! | |
*/ | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get current page URL | |
$URL = $this->getUrl('*/*/*', ['_current' => true, '_use_rewrite' => true]); | |
// get current product name & ID | |
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); | |
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); //get current product | |
$id = $product->getId(); | |
$title = $product->getName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
+ If you want, you can set manually the '$storeId' with the number (id) of the desired store. | |
+ You can also change 'Mage_Core_Model_Store::URL_TYPE_LINK' with one of these: | |
- Mage_Core_Model_Store::URL_TYPE_JS | |
- Mage_Core_Model_Store::URL_TYPE_LINK | |
- Mage_Core_Model_Store::URL_TYPE_MEDIA | |
- Mage_Core_Model_Store::URL_TYPE_SKIN | |
- Mage_Core_Model_Store::URL_TYPE_WEB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function lazyload_filter_content($content) { | |
global $post; // getting The whole post objects | |
$content = $post->post_content; | |
if( is_singular() && is_main_query() ) { | |
//Renaming images for lazy loader!!! |