Skip to content

Instantly share code, notes, and snippets.

@vijayrami
Last active August 10, 2020 08:33
Show Gist options
  • Save vijayrami/d5738c33d2e1491d5a1c377c23ca4518 to your computer and use it in GitHub Desktop.
Save vijayrami/d5738c33d2e1491d5a1c377c23ca4518 to your computer and use it in GitHub Desktop.
Porto Theme Customization and bugs

Remove JS from WYSIWYG editor

##### Add New file in app/design/frontend/Smartwave/porto_child/Magento_Cms/layout/cms_index_index.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="before.body.end">
            <block class="Magento\Framework\View\Element\Template" name="homePageScrupt" template="Magento_Cms::homepagescript.phtml" />
        </referenceContainer>
    </body>
</page>

##### app/design/frontend/Smartwave/porto_child/Magento_Cms/templates/homepagescript.phtml

<script src="<?php echo $block->getViewFileUrl('Magento_Cms::js/homepagescript.js')?>"></script>

##### app/design/frontend/Smartwave/porto_child/Magento_Cms/web/js/homepagescript.js

require([
'jquery',
'owl.carousel/owl.carousel.min'
], function ($) {
});

To make images for same sizes

app/design/frontend/Smartwave/porto_child/Smartwave_Filterproducts/templates/owl_list.phtml

$productImage = $_imagehelper->init($_product, $image)->constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(TRUE)->resize($image_width);

footer not display in OneStepCheckout

add file in app/design/frontend/Smartwave/porto_child/Magento_Checkout/layout/onestepcheckout_index_index.xml

change layout="checkout" to layout="1column"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment