This file contains hidden or 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
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> | |
<body> | |
<referenceContainer name="content"> | |
<block class="Magento\Review\Block\Product\Review" name="reviews.tab" as="reviews" template="Magento_Review::review.phtml" group="detailed_info"> | |
<block class="Magento\Review\Block\Product\View\ListView" name="product.info.product_additional_data" as="product_additional_data" template="product/view/list.phtml"/> | |
<block class="Magento\Theme\Block\Html\Pager" name="product_review_list.toolbar"/> | |
<block class="Magento\Review\Block\Form" name="product.review.form" as="review_form"> | |
<container name="product.review.form.fields.before" as="form_fields_before" label="Review Form Fields Before"/> | |
</block> | |
</block> |
This file contains hidden or 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 | |
# follow below url to fix date format issue on catalog product page | |
# https://github.com/fernandofauth/magento2_datetime | |
# | |
# |
This file contains hidden or 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 | |
# Here is what I use. It will display the current template file name to logged-in users. Paste this in your functions.php file and comment out/remove when not in use. | |
// REMOVE - show template name | |
add_action('wp_head', 'show_template'); | |
function show_template() { | |
global $template; | |
global $current_user; | |
get_currentuserinfo(); | |
if ($current_user->user_level == 10 ) print_r($template); |
This file contains hidden or 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
# Worked a treat on Magento 1.9, Backup first. | |
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `catalog_category_entity`; | |
TRUNCATE TABLE `catalog_category_entity_datetime`; | |
TRUNCATE TABLE `catalog_category_entity_decimal`; | |
TRUNCATE TABLE `catalog_category_entity_int`; | |
TRUNCATE TABLE `catalog_category_entity_text`; | |
TRUNCATE TABLE `catalog_category_entity_varchar`; | |
TRUNCATE TABLE `catalog_category_product`; |
This file contains hidden or 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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `core_url_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_category_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_product_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect`; |
This file contains hidden or 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 | |
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" /> | |
<title><?php echo $this->getTitle() ?></title> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<?php | |
if (Mage::registry('current_product')) { | |
$current_product = Mage::registry('current_product'); | |
$desc = preg_replace('/\s+?(\S+)?$/', '', substr(strip_tags(str_replace(array("\r\n", "\r", "\n"), "", $this->getDescription())), 0, 150)); |
This file contains hidden or 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 | |
# To get the category name of current product in magento add this code to any phtml file related to product view page like add to cart, add to, gallery page and paste this code. | |
$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); | |
$product = $objectManager->get('Magento\Framework\Registry')->registry('current_product'); | |
$categories = $product->getCategoryIds(); /*will return category ids array*/ | |
foreach($categories as $category){ | |
$cat = $objectManager->create('Magento\Catalog\Model\Category')->load($category); | |
echo $cat->getName(); | |
} | |
?> |
This file contains hidden or 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
https://tympanus.net/Development/HoverEffectIdeas/ | |
https://tympanus.net/Development/HoverEffectIdeas/index2.html |
This file contains hidden or 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
<!-- AOS --> | |
Step 1: follow: https://michalsnik.github.io/aos/ | |
Step 2: Add | |
<link href="https://unpkg.com/[email protected]/dist/aos.css" rel="stylesheet"> | |
<script src="https://unpkg.com/[email protected]/dist/aos.js"></script> | |
Step 3: add jquery dependency (requirejs-config.js) | |
var config = { | |
shim: { | |
jquery: { |