texts: Magento 2: Custom customer attribute not saving on DB

texts:
I have added a custom customer attribute on_account. It is displayed as expected in the admin forms: to create a new customer or to edit an existing one, also when creating an Order with a new customer.
However, when I try to save any customer it gives me the error:
"On Account" is a required value.
This is how my tables look like:
eav_attribute
attribute_id => 248,
entity_type_id => 1,
attribute_code => on_account,
attribute_model => null,
backend_model => null,
backend_type => int,
backend_table => null,
frontend_model => null,
frontend_input => boolean,
frontend_label => On Account,
frontend_class => null,
source_model => Magento\Eav\Model\Entity\Attribute\Source\Boolean,
is_required => 1,
is_user_defined => 1,
default_value => 0,
is_unique => 0,
note => null

customer_eav_attribute
attribute_id => 248,
is_visible => 1,
input_filter => null,
multiline_count => 0,
validate_rules => null,
is_system => 0,
sort_order => 120,
data_model => null,
is_used_in_grid => 0,
is_visible_in_grid => 0,
is_filterable_in_grid => 0,
is_searchable_in_grid => 0,
is_used_for_customer_segment => 0

customer_eav_attribute_website
attribute_id => 248,
website_id => 10,
is_visible => null,
is_required => null,
default_value => null,
multiline_count => null

customer_form_attribute
form_code => adminhtml_checkout,
attribute_id => 248

form_code => adminhtml_customer,
attribute_id => 248

Any ideas?
Thanks in advanced


texts: End Date must follow Start Date on cart price schdule new update

texts:
Does anyone experience this before, am trying to add schedule update for my rule in admin when I tried to save am getting End Date must follow Start Date

Error comes from vendor/magento/module-rule/Model/AbstractModel.php

I tried to print the start date and end date, getting some weird data

  [2019-07-17 13:32:17] report.INFO: foo
  {"fromdate":"2016-10-19","to":"2019-03-31"} [] [2019-07-17 13:32:17]
  report.INFO: foo {"fromdate":"2019-07-17","to":"2019-03-31"} []

Datepicker posting wrong values

am using Magento 2.3.2 Enterprise


texts: Magento 2 $data[] = $product->getQty(); Returns 0

texts:
Trying to get qty of the simple product for csv.

Using $data[] = $product->getQty(); but it returns 0. Looks like it returns default value. How to get the actual quantity of the products?


texts:
In Magento 2, I have made a special system. When a (configurable or virtual) product is ordered, the related products are automatically added.

The configurable and virtual products are mealboxes, and the related products that come with the box are the recipes. They are free of charge, and are added so the customer can 'save' the recipes in the customer dashboard that way.

Enough of that, now my question:

In the minicart, I want to filter the products. I want to show every product type EXCEPT for the downloadable products. But I don't know how to filter this, since the products are loaded via knockout.js...

Is there a way to do this?


texts: Magento 2: How to move breadcrumbs and sku before product title?

texts:
I am trying to move breadcrumb and SKU to show above the product title using xml.

Like

<move element="breadcrumbs" destination="product.info.main" before="page.title.wrapper" />

But breadcrumbs shows after add to cart button.Need layout like below image.Thanks


texts:
2016-04-14T04:50:53+00:00 DEBUG (7): Exception message:
  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (`magento_repair_db`.`catalog_product_index_eav`, CONSTRAINT
  `FK_CAT_PRD_IDX_EAV_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY
  (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`)),
  query was: INSERT INTO `catalog_product_index_eav` (`entity_id`,
  `attribute_id`, `store_id`, `value`) SELECT
  `catalog_product_index_eav_idx`.`entity_id`,
  `catalog_product_index_eav_idx`.`attribute_id`,
  `catalog_product_index_eav_idx`.`store_id`,
  `catalog_product_index_eav_idx`.`value` FROM
  `catalog_product_index_eav_idx` ON DUPLICATE KEY UPDATE `entity_id` =
  VALUES(`entity_id`), `attribute_id` = VALUES(`attribute_id`),
  `store_id` = VALUES(`store_id`), `value` = VALUES(`value`)

I have issue during attribute reindexing for layered navigation filter.

How can i solve this issue?


texts:
Title is self explanatory.
Recently I have changed all items of a certain brand as out of stock and the very next day a person purchased two product from this brand. My question is what could have caused this issue?

It is important to notice that

all items of this brand have 0 qty
all of them have stock vause as out of stock
I cannot see items from this brand on front end neither when browsing through categories nor when using search

Could a possible reason this could have happend be that a person had these items in their cart before I marked them as out of stock, or could he has purchased them via google cached page?

This has happened in the past and past research didn't give me much, so I created this question. Could not find any questions that would be similar too.


texts: I made clone of Magento 2.2.4 Enterprise edition from Integration branch but gives error There are no commands defined in the “cache” namespace

texts:
I made clone of Magento 2.2.4 Enterprise edition from Integration
branch.
php version 7.1.23
Magento 2.2.4 Enterprise edition (Cloud)

On running command php bin/magento cache:flush

  There are no commands defined in the “cache” namespace

I have tried

rm -Rf var/cache/*
rm -Rf var/generation/*

and this command working fine

php bin/magento


texts: Success message/notification not display on magento admin panel

texts:
I created a module and at admin panel, I submit/save form but they are not showing success notification at the header. Even not showing error/warning notification.

Please, can anybody explain to me that what code I need to write to display the notification?


texts: i have added the custom js in the magento 2 module but giving 404 error in static folder!

texts:
I've added all thing like require-js and script in custom but not worked.Please show me path with correct example of bootstrap in Magento 2.

my require-config.js is

var config = {
    map: {
        '*': {
            custom: 'Pfay_Contacts/js/test',
        }
    }
};


texts: Magento 1: module integration test without Ecomdev module

texts: What would be the most simple setup to create controller integration tests for Magento 1 custom module without the Ecomdev module ?


texts: Component Manager keeps on loading after System Upgrade

texts:
I did system upgrade from Magento ver. 2.0.7 to Magento ver. 2.1.6 by admin panel.

I clean the cache but the component manager keeps on loading.

There's an error on my console:

Failed to /setup/index.php/componentGrid/components load resource: the server responded with a status of 500 (Internal Server Error)

How to fix this one?


texts: Magento 1.9.3 - Can we override Mage_Core_Model_Session_Abstract_Varien class?

texts:
I am trying to override Mage_Core_Model_Session_Abstract_Varien class but not getting success.

My config.xml file -

 <models>
        <coreoverride>
            <class>Test_CoreOverride_Model</class>
        </coreoverride>
        <core>
            <rewrite>
                <session_abstract_varien>Test_CoreOverride_Model_Core_Session_Abstract_Varien</session_abstract_varien>
            </rewrite>
        </core>
    </models>

My custom model (Varien.php) file -

class Test_CoreOverride_Model_Core_Session_Abstract_Varien extends Mage_Core_Model_Session_Abstract_Varien {

    public function start($sessionName = null) {
        Mage::log('override success...', null, 'override.log');
    }

}

Just want to know that can we do override this class or not? If yes, what is the issue?

Thanks in advance!


texts: How to Override core customer model In Magento 2?

texts:
I have to override customer ResourceModel's customer.php file in my custom module.
I have tried but its not working.so what is correct way to override Model?   I follow below steps to override Model.

I have my own module called Namespace_Module with a di.xml file,

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
<preference for="Magento\Customer\Model\ResourceModel\Customer"   type="Namespace\Modulename\Model\ResourceModel\Customer" />
</config>

Then I have created php file,   Namespace\Modulename\Model\ResourceModel\Customer.php and try to override core file.but its not working for me.

So please anyone help me to solve my problem.


texts: Magento 2: how to get product details using Magento_Checkout/js/model/quote

texts: In Magento 2 how we can get the product details using Magento_Checkout/js/model/quote


texts: hide the attribute if attribute value is empty space

texts:
app/design/frontend/default/theme/template/catalog/product/view/attributes.phtml

http://pastebin.com/6uzYgauE

this is the attributes.phtml file we are using to display the attibutes in frontend.

suppose if attribute value is empty , than thiose attributes will not display in frontend for the

particular product.

but if we give some empty space in the attribute text field, than those attributes are displaying in the frontend.

if we gave empty space as attribute values , than we want to hide those attributes for the particular product.

ex: if attribute color = "" than color will not display in frontend

if attribute color = "  " than color will display in frontend. we want to hide color here....

please help me to find solution.


texts: Recalculate order grand total including discount and tax

texts:
I have an order data without shipping included, i tried to  re-calculate total order when adding shipping price like this:

$shippingAmount = '30000';
$quote = $this->getQuote();
$quote->setGrandTotal($quote->getGrandTotal() + $shippingAmount);

but the above code won't recalculate total discount and tax


texts: How to manage custom attributes in group customer

texts:
i'm new in the magento world (and php community).
I want to add some attributes to custom group in magento 2.2

I've created a new attribute by setup (his name is : 'exchange_id') :

use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\DB\Ddl\Table;

class UpgradeSchema implements UpgradeSchemaInterface
{
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $installer = $setup;
        $installer->startSetup();

        if (version_compare($context->getVersion(), '0.0.2') < 0) {
            $this->upgradeTo002($installer);
        }

        $installer->endSetup();
    }

    protected function upgradeTo002(SchemaSetupInterface $installer)
    {
        $tableName = $installer->getTable('customer_group');

        $columns = [
            'exchange_id' => [
                'type' => Table::TYPE_INTEGER,
                'nullable' => true,
                'comment' => 'Exchange id'
            ],
        ];
        $connection = $installer->getConnection();
        foreach ($columns as $name => $definition) {
            $connection->addColumn($tableName, $name, $definition);
        }

        $installer->endSetup();
    }
}

The customer group is created but not the extra data (like exchange_id).

/**
 * @var Magento\Customer\Api\Data\GroupInterfaceFactory;
 */
private $groupFactory

/**
 * @var Magento\Customer\Api\GroupRepositoryInterface;
 */
private $groupRepository

public function createGroup($groupCode, $exchangeId, $taxClassId)
{
    $group = $this->groupFactory->create();
    $group
        ->setCode($groupCode)
        ->setTaxClassId($taxClassId);
    $group->setData('exchange_id', $exchangeId);

    $this->groupRepository->save($group);

    return $group->getId();
}

The save method from groupRepository (in magento2) recreate another group for saving the group. And he lost the others data :

In mangento 2.2 (line131) : Magento\Customer\Model\ResourceModel\GroupRepository (who implements \Magento\Customer\Api\GroupRepositoryInterface)

        $groupModel = $this->groupFactory->create();
        $groupModel->setCode($group->getCode());

        $taxClassId = $group->getTaxClassId() ?: self::DEFAULT_TAX_CLASS_ID;
        $this->_verifyTaxClassModel($taxClassId, $group);
        $groupModel->setTaxClassId($taxClassId);

Thanks !


texts: How to import CSV from Frontend Customer panel?

texts: I want to import a CSV file in the custom table from the customer frontend view. please provide me the view form, controller, and model code.


texts: How to create a Block, Layout and Template for backend module in magento 2

texts:
I have doubt as how to create Backend Module using block,layout and templates.
After creating the block,I have assigned the block in app_appdashboard_index.xml file and I called the block page function in Template file(appdashboard.phtml). I didn't get the data from the Block function. It also makes my page empty

Please find the below code for creating Backend module

File path:app/code/VendorName/ModuleName/view/Adminhtml/layout/app_appdashboard_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <title>
            My App
        </title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="VendorName\ModuleName\Block\Dashboard" template="VendorName_ModuleName::appdashboard.phtml"/>
        </referenceContainer>
    </body>
</page>

File path:app/code/VendorName/ModuleName/Block/Adminhtml/Dashboard.php

<?php
namespace VendorName\ModuleName\Block\Adminhtml;
class Dashboard extends \Magento\Backend\Block\Template
{
    public function __construct(\Magento\Backend\Block\Template\Context $context)
    {
        parent::__construct($context);
    }

    public function sayHello()
    {
        return __('Hello World');
    }
}

File path:app/code/VendorName/ModuleName/view/Adminhtml/templates/appdashboard.phtml

<?php
echo $block->sayHello();
?>

Help me as how to get data from block function to template phtml file

Thanks in Advance :)

Regards,

Hari


texts: Why I do not have image files when install magento community version 2.1.5?

texts:
I followed the tutorial (http://devdocs.magento.com/guides/v2.0/install-gde/install/web/install-web.html), but it doesn't have any images under .....\pub\static\frontend\Magento\luma\en_US\images\
Why? and how to solve it?

I have other images, only do not have logo? svg?


texts: How to remove the "Estimate your Freight" option?

texts:
How to remove the: "Estimate your Freight" option from the check-out process?

Magento 1.9.1.

I did a search for this and it says:

"Search Results for  remove estimated freight

Your search returned no matches."


texts: Magento 2 - Display Custom Attribute on Cart Page

texts:
InstallData.php

    namespace Namespace\Module\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Eav\Setup\EavSetup;

/**
 * Class InstallData
 */
class InstallData implements InstallDataInterface
{
    /**
     * EAV setup factory
     *
     * @var EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     * Init
     *
     * @param EavSetupFactory $eavSetupFactory
     */
    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        /** @var EavSetup $eavSetup */
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        /**
         * Add attributes to the eav/attribute
         */

        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'product_point',
            [
                'type' => 'int',
                'label' => 'Product Point',
                'input' => 'text',
                'required' => false,
                'sort_order' => 3,
                'global' => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
                'group' => 'Product Details',
                'used_in_product_listing' => true,
                'visible_on_front' => true
            ]
        );
    }
}

The attribute can be seen inserted in the table eav_attribute. It can also be seen on listing page using below code.

app\code\Namespace\Module\Block\Product

namespace Namespace\Module\Block\Product;

class ListProduct extends \Magento\Catalog\Block\Product\ListProduct
{
    public function getProductDetailsHtml(\Magento\Catalog\Model\Product $product)
    {
        //echo '<pre>';print_r($product->getData());exit;
        $html = $this->getLayout()->createBlock('Magento\Framework\View\Element\Template')->setProduct($product)->setTemplate('Ei_Productpoint::points.phtml')->toHtml();
        $renderer = $this->getDetailsRenderer($product->getTypeId());
        if ($renderer) {
            $renderer->setProduct($product);
            return $html.$renderer->toHtml();
        }
        return '';
    }
}

Product Attribute can be seen as below in listing page

When I printed cart data

$_item = $block->getItem();
$product = $_item->getProduct();
echo '<pre>'; print_r($product->getdata());

it does not show my custom attribute. How do I display my custom attribute on cart page ?


texts:
I need to get the file PATH for an image in pub/static/[VENDOR_THEME] folder.

Currently, I can do this by using a helper:

public function __construct(
    \Magento\Framework\App\Helper\Context $context,
    \Magento\Framework\View\Asset\Repository $assetRepository,
    \Magento\Framework\App\Filesystem\DirectoryList $directoryList
) {
    parent::__construct($context);
    $this->_assetRepo = $assetRepository;
    $this->_directoryList = $directoryList;
}

public function getImagePath($image)
{
    return $this->_directoryList->getPath(DirectoryList::STATIC_VIEW) .
        '/' .
        $this->_assetRepo->getStaticViewFileContext()->getPath() .
        '/' .
        $image;
}

Is there any built-in Magento function which handles this, so I do not have to create my own helper?


texts: quote.shippingAddress() is getting null/with no values , just after adding new billing address

texts:
quote.shippingAddress() gets blank/with no values in object , while adding to new billing address
in Magento_Checkout/js/view/shipping-address/address-renderer  in initObservable() method in default.js file.

Any help appreciated


texts: How to get all layered navigation filters available

texts:
I have been looking a way to get all the layered navigation filters available, i dont know if this is per category or if i cant get all of them, because i need them on the admin side to choose in each category which ones  i want to use, but currently i have been just able to get them in the front end when a category is selected by this line:

 $appliedFilters = Mage::getSingleton('Mage_Catalog_Block_Layer_State')->getActiveFilters();


texts: Make discount rules for bundled products

texts:
What I am trying to do is applying discount ONLY to bundled product according to the quantity of the selections it has.My Bundled products have one option, checkbox with multiple simple products and you can choose the quantity of each.So if a customer buys more than ten I want to apply a 25% discount.
The idea is get the bundle product,count the individual products,if more than ten apply the discount.

I have an observer for checkout_cart_product_add_after and with that code I am trying to get the price and change it accordingly:

public function applyDiscount(Varien_Event_Observer $observer) {

        /* @var $item Mage_Sales_Model_Quote_Item */
        $item = $observer->getQuoteItem ();
        if ($item->getParentItem ()) {
            $item = $item->getParentItem ();
        }

        // Discounted 25% off
        $percentDiscount = 0.25;

        // This makes sure the discount isn't applied over and over when refreshing
        $specialPrice = $item->getOriginalPrice() - ($item->getOriginalPrice() * $percentDiscount);
        Zend_Debug::dump($item->getOriginalPrice());
        die('price ');
        // Make sure we don't have a negative
        if ($specialPrice > 0) {
            $item->setCustomPrice ( $specialPrice );
            $item->setOriginalCustomPrice ( $specialPrice );
            $item->getProduct ()->setIsSuperMode ( true );
        }

    }

1) The problem is that the price comes with 0.

2) Also even if I manually put a number to $specialPrice it still doesn't change the cost on the cart.

The product is bundled and the price is dynamic.

Any other idea how to implement that discount that I need is welcome.
Thanks


texts: When user click write a product review then user stay product details page and review section show under product details. I want product review in different page there I show only product name and review information not show product other information


texts: Apply discount on Shipping Price - Magento 2.3

texts:
I searched a lot and i didn't find a way to to it.
I need to create a coupon code that when it's applied gives a 100% discount based on Shipping Price selected.

I don't want to change the price of the shipping to $0.   I want to give a discount in the same price of selected shipping method.

Example of Shopping Cart:

Products = $100
Shipping = $15
Discount (COUPON FREESHIPPING) = -$15

Final Price = $100

That way i can control how much the company spends with free shipping.

How can i do that ?


texts: Custom product choices with shopping cart rules

texts:
I'm running Magento 1.8 Community edition.
I have a product with one custom choice.

So I add the choices and give them SKU
NO INSTALLATION
with SKU:TILLV000
INSTALLATION
with SKU: TILLV001
SUPER INSTALLATION
with SKU: TILLV002

Now IF you choose any of the custom choices with SKU: TILLV001 OR TILLV002. Rhen I would like to enable free shopping.

I added that as a shopping cart rule

If ALL  of these conditions are TRUE :
If an item is FOUND  in the cart with ANY  of these conditions true:
SKU  is  TILLV001, TILLV002

It doesnt apply? What have I done wrong?


texts:
Magento 2 installation stuck at 71%

I installed many times but still installation stuck at 71%...have some one help me?

Current PHP version:  7.1
allow_url_fopen On
date.timezone UTC
display_errors Off
error_reporting E_ALL
file_uploads On
include_path .:/opt/alt/php71/usr/share/pear
log_errors On
mail.force_extra_parameters no value
max_execution_time 18000
max_input_time -1
max_input_vars 8000
memory_limit 768M
open_basedir no value
post_max_size 128M
session.save_path /tmp
short_open_tag On
upload_max_filesize 1G


texts: How to convert Magento 1.9 extension into Magento 2

texts:
Is any tools/scripts that can convert magento 1.9 version to magento 2. version?

I need it for magento 2.2.3 community edition.


texts: How can I replace the "Add to Cart" text (In some cases the action also) depending on a custom product attribute?


texts: Maximum and minimum quantity of a product

texts:
Good Morning!
I need to create an API that returns the maximum and minimum quantity of a product.
What methods can I use?


texts: Filter Product Collection by BOTH multiple catgeories

texts:
In my magento store i need to filter my product collection by 2 categories.

I have searched online and found ways of doing this (see existing code below) but they filter multiple categories using an OR condition – is there any way to do this with an AND condition so the products have to be found in BOTH categories not just any of them?

I am currently using the code below:

$_productCollection = Mage::getModel('catalog/product')
    ->getCollection()
    ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
    ->addAttributeToSelect('*')
    ->addAttributeToFilter('category_id', array(
        array('finset' => '26'),
        array('finset' => '63'))
    )
    ->addAttributeToSort('created_at', 'desc');

    foreach($_productCollection as $_product){
        echo $_product->getName()."<br/>";
    };

My product/category setup is:

products:

category 1 (ID 26)
category 2 (ID 63)

product A - found in category 1
product B - found in category 1 & 2
product C - found in category 1 & 2

So my current code below would output all 3 products where as i want it to only show products B and C


texts:
After recently upgrading to 2.4.1 CE, the following exception shows up only on the contact us page. Could you please direct me in the right approach to fix this? Already existing answers to the same question don't seem to help fix it.
Exception #0 (InvalidArgumentException): Unable to serialize value. Error: Malformed UTF-8 characters, possibly incorrectly encoded


texts: Magento Enterprise showing wrong result to show dynamic data in product listing page for FPC

texts:
Magento showing wrong result for dynamic data in product listing page due to FPC.

If I disable full page cache its showing perfect. I am facing problem to show the wishlist icon on the product listing page. Please suggest me how can I fix that issue, I have tried to fix that issue using magento hole-punching , but unfortunately it did not work.

Same issue I am facing in product details page as well for wishlist icon. If user clicks on the 'add to wish list' button after refreshing that page its again showing the same button instead of 'added to wishlist' due to page cache.


texts: Magento2- In Checkout Page Not Display Payment Instruction

texts:
JS File path : Test\Demo\view\frontend\web\js\view\payment\method-renderer\Webpay-method.js

define(
[
    'jquery',
    'Magento_Checkout/js/view/payment/default',
    'Magento_Checkout/js/action/place-order',
    'Magento_Checkout/js/action/select-payment-method',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/checkout-data',
    'Magento_Checkout/js/model/payment/additional-validators',
    'mage/url',
],
function (
    $,
    Component,
    placeOrderAction,
    selectPaymentMethodAction,
    customer,
    checkoutData,
    additionalValidators,
    url) {
        'use strict';

        return Component.extend({
            defaults: {
                template: 'Test_Demo/payment/webpay'
            },
            placeOrder: function (data, event) {
                if (event) {
                    event.preventDefault();
                }

            getInstructions: function () {
                console.log(method);
                return window.checkoutConfig.payment.instructions[this.item.method];
            },
            afterPlaceOrder: function () {
                window.location.replace(url.build('demo/checkout/redirect/'));
            },
            /** Returns send check to info */
            getMailingAddress: function() {
                return window.checkoutConfig.payment.checkmo.mailingAddress;
            }
        });
    }
);

Method Html Path : Test\Demo\view\frontend\web\template\payment\webpay.html

        <input type="radio"
               name="payment[method]"
               class="radio"
               data-bind="attr: {'id': getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()"/>

                <button class="action primary checkout"
                        type="submit"
                        data-bind="
                        click: placeOrder,
                        attr: {title: $t('Place Order')},
                        css: {disabled: !isPlaceOrderActionAllowed()},
                        enable: (getCode() == isChecked())
                        "
                        disabled>

                </button>


texts: Add/edit combo box type field on Magento 2 admin form

texts:
I need to add a select box with a text box so if any data present then admin can select else can type at the same time like below:

plus(+) symbol will override select box to a textbox.


texts: Magento 2: Translate subject email "Your personal data has been anonymized" from GDPR?

texts:
I have GDPR on Magento 2 store, I have tested the anonymization, and I have received an email with English content that I have to translate.
I can translate the email content in file app/design/../Amasty_Gdpr/email/amasty_gdpr_anonymisation_notification_template.html

But how do I translate the subject of the email, "Your personal data has been anonymized"?
Thank you!


texts: admin not opening after installing extension Magento2

texts:
This is what I am getting:

  {"0":"Specified invalid parent id
  (Magewares_MWParent::parent)","1":"#0
  /home/oesinter/public_html/magento/vendor/magento/framework/Interception/Interceptor.php(58):
  Magento\Backend\Model\Menu\Builder->getResult(Object(Magento\Backend\Model\Menu))\n#1
  /home/oesinter/public_html/magento/vendor/magento/framework/Interception/Interceptor.php(138):
  Magento\Backend\Model\Menu\Builder\Interceptor->___callParent('getResult',
  Array)\n#2......

Can anyone guide me how to solve it.


texts: Magento2: Best practice to modify css files

texts:
I want to modify css file pub/static/frontend/Magento/luma/en_US/css/styles-l.css.
Initially this file is not present in pub/static folder and it's present in

vendor/magento/theme-frontend-blank/web/css/styles-l.less (it's styles-l.less)

When I deply static contents using php bin/magento setup:static-content:deploy , 2 files are created in pub/static related to it.
1. pub/static/frontend/Magento/luma/en_US/css/styles-l.less
2. pub/static/frontend/Magento/luma/en_US/css/styles-l.css
I'm a backed developer and while developing modules I tend to delete whatever is present in pub/static (except .htaccess).
So to me it doesn't seem to be the best option to directly modify pub/static/frontend/Magento/luma/en_US/css/styles-l.css.

In that case what's the best practice to modify above css file?
1. Shall I modify pub/static/frontend/Magento/luma/en_US/css/styles-l.less or
2. My understanding is wrong that I can delete everything from pub/static (during development) and I should modify pub/static/frontend/Magento/luma/en_US/css/styles-l.css and never delete it.


texts: Magento 2 disable column in order grid if order have certain status

texts:
I want to remove Column Action from orders grid if order have certain status, how can I accomplish such behavior?

Or if it will be easier I would be happy if I could delete this View hyperlink :)

Thanks in advance :)


texts: Magento 1.9.1 Order emails not sent - cron checked - stuck in core_email_queue

texts:
I've got a Magento 1.9.1 implementation and am having issues sending out order related emails.

I have checked cron jobs and AOE Scheduler reports core_email_queue_sendall and core_email_queue_cleanup are enabled and running.

I've setup system cron to run cron.php every 5 minutes.

But I'm still not receiving emails.

Upon checking the database tables, I actually see that all the order related emails (new orders, etc) are in core_email_queue. The 'processed_at' column has a value, indicating that the email has been processed.

Why don't I see the emails? Does having a 'processed_at' value indicate that the emails had already been sent out?


texts: I want to customise RSS Feed xml. I am using magento 2.2. I want to show image in rss feed. I am not able to trace the file where I can update my code to show the image in RSS xml. Please help me to find out the file where I can update my code to show the image in RSS xml.


texts: Issue when attempting to edit/change SKU for one of my products

texts:
Whenever I try editing my products and changing or editing the SKU, I keep getting this.

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webadmin_exc2_legacy.autosuggest_batch' doesn't exist, query was: SELECT COUNT(*) FROM `autosuggest_batch` AS `main_table` WHERE (`product_id` = '33') AND (`store_id` = '0')

Can anyone help?


texts: Magento 2 payment methods based on billing address or shipping addrress

texts:
I have one small question, please suggest the correct answer.

In Magento 2 payment methods  are based on billing address or shipping address

Thanks in advance


texts: Magento Custom head content for Individual pages

texts:
Google Webmaster Tools and marketing suppliers, pricecomparision suppliers, Google Analytics, Facebook Ads etc. etc.... all wants their individual codes inplemented on convertion pages. Not on all pages, but on surtain pages, typically the order succes page.

And they all want their code in the HEAD tag of individual pages... and THIS is the challenge...

Also surtain pages in magento do not have title tags, example /rss/ and /sales/guest/form/ so google webmaster tools are complaining about it... It´s the same issue... = code in the individual head of the individual page...

How is that possible, to implement individual code to head (not header) -content, on individual pages in magento ?

Thanks in advance...


texts: Magento is not tracking most popular products

texts:
Not Getting most popular products .I have category in which most popular product will list down. What i did

Create a CMS Block

{{block type="catalog/product_mostviewed" template="catalog/product/viewed.phtml"}}

Then in MANAGE CATEGORY sections -> DISPLAY SETTING

viewed.phtml

<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>

<?php echo $this->__('These Products Are Popular Right Now!') ?>

<?php $_collectionSize = 5;//count($_products->getItems()); echo $_collectionSize; ?>

<?php $i=1; foreach ($_products->getItems() as $_product): ?>
    <li id="td_<?php echo $i;?>" <?php if($i%5==0 or $i==$_collectionSize){echo 'class="last"';} ?> >
        <div id="cont_<?php echo $i;?>">
            <a class="product-image" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>">
                <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(135); ?>" width="135" height="135" alt="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" title="<?php echo $this->htmlEscape($this->getImageLabel($_product, 'small_image')) ?>" />

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?>

                <?php if($_product->getRatingSummary()): ?>
                    <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
                <?php endif; ?>
                <?php echo $this->getPriceHtml($_product, true) ?>
                <?php if($_product->isSaleable()): ?>
                    <button class="button" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Add to Cart') ?></button>

                <?php else: ?>

<?php echo $this->__('Out of stock') ?>

                <?php endif; ?>

                    <?php if ($this->helper('wishlist')->isAllow()) : ?>

<a href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>"><?php echo $this->__('Add to Wishlist') ?>

                    <?php endif; ?>
                    <?php if($_compareUrl=$this->getAddToCompareUrl($_product)): ?>

| <a href="<?php echo $_compareUrl ?>"><?php echo $this->__('Add to Compare') ?>

                    <?php endif; ?>

<?php $i++; endforeach; $kol = $_collectionSize; ?>

<?php endif; ?>


texts: Product URL is not saving in URL Rewrite?

texts:
Product URL is not saving in URL Rewrites and i am getting product URL is like this

https://vitalticks.in/catalog/product/view/id/3688/s/meta-paper-points-color-coded-and-length-marked/category/292/

Thanks
Somu N


texts: How to override template files in a module

texts:
I have two template files that I need to override in a custom module. Those files are

app/design/frontend/<current-theme>/template/catalogue/category/view.phtml
app/design/frontend/<your-theme>/template/catalogue/product/view.phtml

Since I'm very new to Magento I have no idea of how to do that. Please help me on this.


texts:
I'm trying to create an archive ( like search results page) containing specific products.
As an example let's say we prepare a collection of products using a form as the input.
With the submit of the form, i get the post and create a product collection using the given attributes.
I want to pass this collection and create an archive of products, with pagination etc.
Which is the best way to implement something like this? Maybe a custom search results page?


texts: Magento 1 : Customers can't login, cookie issue

texts:
Some customers report that they can't log in on the frontend, even with a correct password. I've seen it happen sometimes, the page just reloads with no error messages.
Deleting the cookies solves the problem, but as you can guess I can't ask to do that to everyone.

My current Session Cookie Management settings are:

Cookie lifetime: 86400
Cookie path: /
Cookie domain: .domain.com
Use HTTP Only: Yes
Cookie Restriction Mode: No

Any tips?


texts: Get several items using registry.js (uiRegistry)

texts:
I have several elements inside Ui form with default param (each):

'dependsOn' => 'assign_type'

and I want to get all that items inside the another js component of my form.

I try to use the uiRegistry (vendor/magento/module-ui/view/base/web/js/lib/registry/registry.js) like this:

uiRegistry.get('dependsOn = assign_type');

but in this case the registry ($p variable is uiRegistry object) returns only the first element:

This example from the documentation does not help:

* @example Requesting multiple elements.
*      registry.set('second', {index: 'test2'});
*      registry.get(['first', 'second'], function (first, second) {});

Result, got one item (first item) three times:

Question is: How to receive several similar elements using the registry? Perhaps somebody knows other way?


texts: How to Get country name from country code in Magento 2?

texts:
i want to get country name from country code, i got the country code from the data order like this :

$data = $order->getShippingAddress()->getData();
$countryCode = $data['country_id'];
echo $countryCode;

it will print 'US' or any other country code, is there a way to get the country name from this country code?


texts: Magento 2.2 : How To Specify External Library/Dependency In Your Custom Magento Module Deployed under the app/code folder

texts:
I have a (Not Open-Source) custom Magento 2.2x module that I'm working on, that has a dependency on an external composer package (bugsnag/bugsnag)

Here's how my project is currently structured:

Current Project Structure

File - module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Gsd_Test" setup_version="0.1.0">
    </module>
</config>

File - composer.json

{
    "name": "gsd/test",
    "description": "",
    "require": {
        "php": "7.*",
        "bugsnag/bugsnag":"^3.0"
    },
    "suggest": {

    },
    "type": "magento2-module",
    "version": "0.1.0",
    "license": [

    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "Gsd\\Test\\": "",
            "Bugsnag\\" : "vendor/bugsnag/bugsnag/src/"
        }
    },
    "extra": {
        "map": [
            [
                "*",
                "Gsd/Test"
            ]
        ]
    }
}

Controller - Gsd\Test\Controller\Adminhtml\Index\Index.php

<?php

namespace Gsd\Test\Controller\Adminhtml\Index;

class Index extends \Magento\Backend\App\Action
{
    protected $_publicActions = ['index'];

    public function execute()
    {
        echo "Hello World";
        $bugsnag = \Bugsnag\Client::make('XXXXXX');
        \Bugsnag\Handler::register($bugsnag);

        $bugsnag->notifyException("Testing ");
    }

}

Registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Gsd_Test',
    __DIR__
);

BUT, attempting to access that Controller (http://m22.localhost.net/admin/gsdtest/index/index) results in the following error:

Looks like, for whatever reason, the Autoloader ignores the content within the app/code/Gsd/Test/vendor/bugsnag/bugsnag/src folder at run-time.

(Ironically, PhpStorm doesn't report any error during development per se)

Now, if I add "bugsnag/bugsnag" as a composer dependency at the MAGENTO_HOME folder level, i.e, if I run the following commands:

cd $MAGENTO_HOME
composer require bugsnag/bugsnag 3.*
composer update
composer dump-autoload

then my controller works just fine.

So, my questions are:

I recall this used to work on Magento 2.1x (i.e. having the composer dependency inside the module specific composer.json) about 2 - 3 months back. But, it no longer works on Magento 2.1x or Magento 2.2x ... What changed??
Is there a way to specify module specific composer.json dependencies? If not - how can one "ship" a custom-module - that has dependencies on 3rd party libraries - so that it can be deployed directly into the app/code folder?
( Requiring customers deploy the module using composer may not work for all businesses/situations )


texts: How Can I Bulk Unchecked Categories Check Box for Selected Products

texts: Mistakenly i imported products with irrelevant categories, how can i Bulk unchecked categories check box for selected products by csv or anything.


texts:
In a list of cookies I can see "frontend", "adminhtml" and "external_no_cache" cookie name.
I need to write a list of all cookies, their purpose and expiration date.
Can anyone help me? What are these cookies for? Where can I get more information?

Another thing, when I use an online cookie checker (for example http://www.cookie-checker.com/), the resoult I get is: the only cookie on my site is "frontend".


texts: Can anyone advise on an accordion for the left nav on the category pages? Is there a possibility to do this purely using CSS? Or do I need jquery?


texts: Catalog Price Rules "Apply Rule" button not showing

texts:
We have tried to create catalog rules with category condition and it's not working. Also, we are unable to see Apply Rule button.

Please help


texts: Nginx + Varnish does not redirect domain to https

texts:
I performed the installation of magento2.2.6 with varnish and redis
I am in trouble when I try to access the site through the domain (emporiobit.com.br) Error 503 error occurs Backend fetch failed
When you access the site by https://www.emporiobit.com.br or https://emporiobit.com.br everything works correctly without error.

Follow the doors:
Varnish - 80
Nginx - 81
Ngnix - 443

Before I simply typed the domain and opened the site in https, now it's not happening anymore.

Follow configuration of my nginx


texts: adminhtml, how update data in grid table without page reload

texts:
how is it possible to update data in a table without opening a new tab and so on?
I wrote my own JS for this implementation

maybe tell me how it is possible to implement using magento?


texts: What is the default magento admin username and password?

texts: I installed a fresh magento. What is the default admin user and password so I can login to the backend?


texts: How to change position of attribute added on Product description page?

texts:
I made an attribute of text area type and  when I upload an image using it, image appear in product tabs like this in More information.
But I want it to appear before tabs. I added these lines in catalog_product_view.xml file.

<referenceContainer name="product.info.main">
        <block class="Magento\Catalog\Block\Product\View\Attributes" template="Magento_Catalog::product/view/topattributes.phtml" name="product.info.topattribute" after="-"/>
</referenceContainer>


texts: magento 2.2.3 how to add a new cms block or new phtml to product page

texts:
I want to add a new cms block or PHTML to the product page.
I have the following files composer.json, etc/module.xml, and registration.php
I have view/frontend/layout/catalog_product_view.xml

    <?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <referenceBlock name="product.info.main">
           <block class="Magento\Framework\View\Element\Template" name="staticblock" template="module_name::staticblock.phtml">
            </block>
        </referenceBlock>

</page>

I have the .phtml template file ->

TEST BLOCK DID IT WORK

I want this to be appearing after the product info detailed (tabs) like at the bottom


texts: Magento 2 - discount depend on Payment Method and discount price stored in custom product attribute

texts: In check/moneyorder payment method i need to give discout with custom attribut value


texts: Magento2: Create Module without Controller

texts: How to create a simple module like HelloWorld in Magento2 without controller


texts: sql query to get Products price, sku, product_id, description and url to picture

texts:
I have found separate queries that get me some things on their own, but the problem is that the sku order they each have is different, at a given row it changes so I cannot paste the results into a single document. The export tool for Products in magento gives horrendous mixed up rows, it is completely useless. So, since I dont know how the php syntax for magento and its folder architecture is, I cant do it that way, I only am familiar with SQL but not so much with magento tables EAV.

For example the query for price gets me these results

product_id   price
1             45
2             56
3             98
etc

but the query for description gets them so

product_id   description
3             this is description for item 3
1             this is description for item 1
2             as you see, we cant match up all results

For price I have found in SO

SELECT `e`.*, `price_index`.`price`, `price_index`.`tax_class_id`,

`price_index`.`final_price`,  `price_index`.`min_price`, `price_index`.`max_price`,
`price_index`.`tier_price` FROM `cp8_catalog_product_entity` AS `e` INNER JOIN
`catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND
 price_index.website_id = '1' AND price_index.customer_group_id = 0

for Description

SELECT e.entity_id, e.sku, eav.value AS 'description'
FROM cp8_catalog_product_entity e
JOIN cp8_catalog_product_entity_text eav
  ON e.entity_id = eav.entity_id
JOIN cp8_eav_attribute ea
  ON eav.attribute_id = ea.attribute_id
WHERE ea.attribute_code = 'description'

So, I am strugling to get one complete result that contains:

product_id, name, description, price, url to the image, meta keywords, etc


texts: Get collection of orders excluding cancelled order in Magento 2

texts:
I have got order collection with the following code:

$orders = $objectManager->create('Magento\Sales\Model\Order')->getCollection();

Which is working fine. Problem is that it returns all types of orders including 'processing', 'cancelled' etc. I don't want the cancelled order in this collection.

I don't know how to exclude cancelled order in the above code.

Hope somebody helps.


texts: Migrating data from Magento 2.1 to Magento 2.3 on a new server

texts:
I want to migrate customer, order and product information from Magento 2.1 site (old server) to a brand new install of a Magento 2.3 site (new server).

What is the easiest and most effective way to go about doing this?


texts: Magento 2 Installation: css/js/images not loading

texts:
I am trying to install Magento2(0.1.0-alpha107 ) in my localhost powered by OSX 10.10 + brew installed php-fpm + mysql + nginx.
Steps that I followed for installation:

mkdir /path/to/magento2 && cd /path/to/magento2
git clone git@github.com:magento/magento2.git .
composer install
cd setup
composer install
php -f index.php install --base_url=http://magento2alpha.dev/ --backend_frontname=admin --db_host=localhost --db_name=magento2alpha --db_user=root --db_pass=root --admin_firstname=Raj --admin_lastname=KB --admin_email=magepsycho@gmail.com --admin_username=admin --admin_password=pass123 --language=en_US --currency=USD --timezone=America/Chicago

So far everything worked great. But when you load the frontend: http://magento2alpha.dev/
it's showing plain text only (i.e. css/images/js are missing).
View source gives you the path like http://magento2alpha.dev/pub/static/frontend/Magento/blank/en_US/[css/images]/[css/images file] which led to the 404 page
My nginx conf file looks like:

server {
    listen 80;
    server_name magento2alpha.dev;
    root /Users/Raj/Sites/magento/magento2alpha;

    location /setup {
        try_files $uri $uri/ @setuphandler;
    }

    # Rewrite Setup's Internal Requests
    location @setuphandler {
        rewrite /setup /magento/magento2alpha/setup/index.php;
    }

    location / {
        index index.php index.html;
        try_files $uri $uri/ @handler;
    }

     # Rewrite Internal Requests
     location @handler {
        rewrite / /magento/magento2alpha/index.php;
     }

     # Rewrite magento2 static files
     #location /pub/static {
     #   rewrite ^/pub/static/(.*)$ /magento/magento2alpha/pub/static.php?resource=$1? last;
     #}

     location /pub/static {
          try_files $uri $uri/ @static;
     }

     location @static {
           rewrite ^/pub/static/(.*)$ /magento/magento2alpha/pub/static.php?resource=$1? last;
     }

     #location ~ .php/ {
     #    rewrite ^(.*.php)/ $1 last;
     #}

    location ~ \.php$ { ## Execute PHP scripts
        try_files $uri =404;
        expires        off;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_read_timeout 900s;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;

        ## Magento 2 Developer mode
        fastcgi_param MAGE_MODE "developer";
    }
}

I guess the issue lies in the static files rewrite. But this is what I followed from the github which is not working.
Is there any workaround?


texts: Adding code to the shipment print action?

texts:
Magento 2.3.3
I am trying to add some code to the print action which is available in a created shipment. Where would I find the code for that, or is there another way of adding code?
I want to send the shipment mail to the customer when the print button is clicked from inside the shipment.
Thanks!


texts:
Is it possible to develop an extension that calls an external URL with some information about an order, let's say when an order is fulfilled/sent. Its because we want to integrate with another system, that sends out customer review request emails.

So we want to "ping" their system when order status changes, and then in the other system we can then choose the sending delays, so that the other system sends the review request 4-5 days after order is sent.


texts:
My website run with the version 2.1.2
I created two views. one for switzerland and one other for France.

So, i would like to get two VAT different.
8% for switzerland and 20% for France.

But impossible to Put in place this rules.
However i created my taxe in Stores > Zones and tax rates.
And my rule in System in Stores > Tax rules.

Then, In Stores > Configuration > Sales > Taxes i changed the default country for each views in Estimated default tax.

Nothing there does not work.
Regardless of the view, the rate is maintained at 8%.

I know what to do, I tried everything.Hoping someone would have an idea?
Thanks


texts: Can two people log in at the same time in Admin?

texts: Can two or more people log in to a Magento e-commerce site at the same time? Can one person process sales while another updates products?


texts: Is it possible to use same theme for second store?

texts:
I have 2 stores, is it possible that can I alter my same theme for the second store?

Note :      Taken Symbolic (symlinks) link of my file such as,

            app,skin,includes,errors,lib,media,var


texts: What is the "static" backend type in EAV attribute Magento 2?

texts:
In the "eav_attribute" table I discovered that some attributes have the backend type set to "static".

Example, attribute_code = 'telephone' & entity_type_id = 2
 resulted in a "static" backend type. Furthermore, most of the attributes entity_type_id = 2 are set to 'static'. (in my db id 2 is for address attributes)

What type does this value represent? Should I use it instead of using 'varchar' for similar attributes?


texts: How to detect a change in data inside the tab in custom admin module

texts:
While editing the elements in the custom admin form, how can I check whether the form has been edited to the last saved data of the form? Is there any way I can check this using any inbuilt Magento functions or should I write the validation for every field in the form for changes? I have multiple tabs in my form for further notice.

Thanks in advance.


texts:
I've installing Magento 2 on my server but i've got below message error :

{{$state.current.noMenu ? $state.current.title : titles[$state.current.type]}}

See screenshot :

Any Solution please?


texts: How do I load JavaScript function inside KnockoutJS html?

texts:
I am making changes to my Magento 2 cart.

I want to run a particular JavaScript function once the registration.html file is loaded

My file:

/app/design/frontend/mytheme/default/Magento_Checkout/web/template/registration.html

My code:

        :

    <form method="post" data-bind="submit: createAccount">
        <input type="submit" class="action primary" data-bind="value: $t('Create Account'), disable: creationStarted" />
    </form>

I want it so that once that file is loaded via AJAX it runs the alert.. I have tried just using


texts: How to get column such as that By collection

texts:
I want to get a column like (datetime % 3600) / 60 as minute，But I use

$collection->columns('(datetime%3600)/60 as minute')

But I got SQL is `main_table`.`datetime%3600/60` AS `minute`

How I fixed It?


texts: Programatically update customer address by its entity id

texts:
I am working on script where i display all address with respected design. Now i want to update address of user by its entity id, i have multiple array of address like this

Array
(
    [0] => Array
        (
            [address_line2] =>
            [postal_code] => 123456
            [web_site_id] => 18
            [country] => US
            [updated_at] =>
            [address_line1] => 45,123 apna
            [local_id] =>
            [store_id] => 20
            [customer_id] => 974
            [city] => ALBESTA
            [resource_type] =>
            [state] => Alabama
            [id] => 992
            [is_active] => 1
            [email] => test@test.com
            [phone_number] =>
            [device_model] =>
            [is_sync] => 0
            [created_at] =>
            [is_deleted] => 0
        )
)

In above array "id" is entity of address field. And i want to update other records of array.


texts: Magento 2 : Get current_category is cached and shows wrong IDs on category submenu

texts:
I have created a module to avoid an objectManager. In this I have

public function getCurrentCategory()
{
    return $this->_registry->registry('current_category');
}

On my phtml file I call

$myBlock->getCurrentCategory()->getId();

I have full page cache enabled and created a custom submenu on the left sidebar. I want to make the font of the current category bold.

Everything works fine except when I click on an other category the category ID is not refreshed and the visited category remains selected until I manually clean the cache. How can I avoid caching from my function and make sure that each time the getCurrentCategory is refreshed properly?


texts: Messages are not showing on frontend magento 2.1.7

texts:
This question might be asked here before. I have checked many threads
  but couldn't find a solution for my problem. I have a custom Magento
  2.1.7 theme. In my website the success/error messages not showing. Initially, I thought it would be the issue of my custom theme. Then
  I switched the design to default 'luma' theme. Now also the
  success/error message not showing. Can any one help me to sort it
  out?

Edit *

I could find that message wrapper is loading, but the message texts are not fetching. I am here attaching the out put html of message wrapper


texts:
I am getting below error in system.log file.

  main.CRITICAL: Bucket does not exist [] []

My Main issue is in category list page and search result page I have 50 products inside the category and results. All are listed in the page. Even though pager is set to 12.

  The pagination is not working correctly.

I hope the problem is because of above error. How this can be resolved.

Can anyone please help me with this?


texts: On Adding items in cart for guest user using Postman getting error

texts:
I have successfully run two REST API's but on running the third one
http://127.0.0.1/mag/rest/V1/guest-carts/81/items
{
"cart_item": {
    "quoteId": 81,
    "sku": "test",
    "qty": 1,
    "quote_id": "HWgMbh8XAVWzsakhskakjsassaas"
}
}

with this param
it will still give me this error
{
        "message": "\"%fieldName\" is required. Enter and try again.",
        "parameters": {
            "fieldName": "quoteId"
        },
        "trace": "#0 /var/www/html/reg-dealers/vendor/magento/module-quote/Model/GuestCart/GuestCartItemRepository.php(66): Magento\\Quote\\Model\\Quote\\Item\\Repository->save(Object(Magento\\Quote\\Model\\Quote\\Item))\n#1 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Quote\\Model\\GuestCart\\GuestCartItemRepository->save(Object(Magento\\Quote\\Model\\Quote\\Item))\n#2 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Quote\\Model\\GuestCart\\GuestCartItemRepository\\Interceptor->___callParent('save', Array)\n#3 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Quote\\Model\\GuestCart\\GuestCartItemRepository\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Quote\\Model\\Quote\\Item))\n#4 /var/www/html/reg-dealers/generated/code/Magento/Quote/Model/GuestCart/GuestCartItemRepository/Interceptor.php(26): Magento\\Quote\\Model\\GuestCart\\GuestCartItemRepository\\Interceptor->___callPlugins('save', Array, Array)\n#5 [internal function]: Magento\\Quote\\Model\\GuestCart\\GuestCartItemRepository\\Interceptor->save(Object(Magento\\Quote\\Model\\Quote\\Item))\n#6 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)\n#7 /var/www/html/reg-dealers/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#8 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#9 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(138): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callParent('dispatch', Array)\n#10 /var/www/html/reg-dealers/vendor/magento/framework/Interception/Interceptor.php(153): Magento\\Webapi\\Controller\\Rest\\Interceptor->Magento\\Framework\\Interception\\{closure}(Object(Magento\\Framework\\App\\Request\\Http))\n#11 /var/www/html/reg-dealers/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\\Webapi\\Controller\\Rest\\Interceptor->___callPlugins('dispatch', Array, Array)\n#12 /var/www/html/reg-dealers/vendor/magento/framework/App/Http.php(116): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#13 /var/www/html/reg-dealers/vendor/magento/framework/App/Bootstrap.php(263): Magento\\Framework\\App\\Http->launch()\n#14 /var/www/html/reg-dealers/index.php(42): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http\\Interceptor))\n#15 {main}"
    }

Any idea i have added that key but still give me this error.
Any help is appriciated.


texts: Cost attribute not displaying for some products

texts:
I have a strange situation where the cost attribute is being displayed in the product edit form for some products but not others. There doesn't seem to be any correlation between the products that it works for and the products that it doesn't.

By looking in the database I can see that the cost is being saved but when you load the edit product -> price form it is blank in the input field.

Anyone have any ideas about where to look to debug this?


texts:
It seems there are several performance extensions for Magento 2 but none of them mention Closure Compiler which still yields the best results compared to the current minifier.

The extensions which I have found:

https://www.mageplaza.com/blog/magento-2-performance-optimization/
https://amasty.com/google-page-speed-optimizer-for-magento-2.html
https://potatocommerce.com/performance-optimization-tool.html
https://mirasvit.com/magento-2-extensions/full-page-cache-warmer.html


texts: Magento 2 - How to show amount "save $100 considering custom options also on detail page?

texts:
How to show "YOU SAVE $XXX.XX" amount considering custom options (type RADIO/CHECKBOX) also on the product detail page when changing different option based on customer selection?

I have a simple product with two custom options.

CHECKBOX and RADIO type, both having 'Fixed' as Price Type without option level SKU.

For price and sale price, I have a code as follows.

This seems to be working fine.

<?php
$objectManager   = \Magento\Framework\App\ObjectManager::getInstance();
$helper = $this->helper('Magento\Catalog\Helper\Data');
$youSave = 0.00;
$proOrgPrice = $helper->getTaxPrice($_product,$_product->getPrice(),true);
$finalPrice = $helper->getTaxPrice($_product,$_product->getFinalPrice(),true);
$youSave     = $proOrgPrice - $finalPrice;
$price     = $objectManager->create('Magento\Framework\Pricing\Helper\Data');
if( $youSave > 0):
echo 'YOU ARE SAVING:';
echo $price->currency($youSave, true, false); endif;
 ?>

Require to show price depends on changing of custom options at frontend.


texts: Removing Magento Recently Viewed Product from all pages except of Product view page

texts:
I'm trying to remove the "Recently Viewed Products" from all pages using local.xml but show it only of Product View page.

I display "Recently Viewed Products" on Product View Page using:

<catalog_product_view translate="label">
    <reference name="content">
        <block type="reports/product_viewed" name="right.reports.product.viewed" as="recently_viewed" template="reports/product_viewed.phtml" />
    </reference>
</catalog_product_view>

Now to hide it from all the other pages I use following code:

<default>
<reference name="right">
    <remove name="right.reports.product.viewed" />
</reference>
</default>

But than it disappears also from Product View page!

How can I achieve that Recently Viewed Product is hidden on all pages except of the Product View Page?

Thanks


texts:
Recently, after checking out the develop branch from Magento 2's github and running composer install, the composer installer ended with the following messages

start magento deploy via deployManager
jump over deployLibraries as no Magento libraryPath is set

Does anyone know what the deployManager these methods refer to is?


texts: Dont allow two specific products to be in cart at the same time

texts:
I have two different types of products in my shop.

One type is for subscriptions - the other one for single deliveries

It should not be possible to buy products of this two types at the same time in the same cart. At best if one type is in cart you shouldnt be able to add a product with the other type to the cart.

Any suggestions would be much appreciated.


texts:
I have a problem with an ajax call.
In my site I have 2 types of clients configured, with one client working correctly and with the other type of client the call returns me <doctype html> , in summary it returns html code.

I have a controller that receives the ajax call and the only thing I'm doing in the execute function is echo 'hello';, it only works on the first type of client.

The code of Controller is this:

This is the ajax call:

Any idea why this is happening?


texts: Split Order with two different shipping method in Magento 2

texts:
I am using Magento2. I want to do with Split Order with two different Shipping Methods.

Buyers should select two shipping methods.

One should be comes from External API and other should comes from Magento admin

How can I achieve this??

Thanks in advance.


texts: Add "Total number order" & "Revenue" column to customer grid

texts:
I want to add 2 columns to customer gird:
- Total number orders customer made.
- Total price of these orders.

Can anyone help me please ?


texts:
I am using Custom order status While changing it send a mail. It's working fine

$order->sendOrderUpdateEmail(true, null);

How to send custom email template(New Template) per status?

public function shipementorderAction(){
                $id = $this->getRequest()->getParam('id');

                $order = Mage::getModel('sales/order')->load($id);
                $order->setData('state', 'shipement');
                $order->setStatus('shipement');
                $history = $order->addStatusHistoryComment('', false);
                $history->setIsCustomerNotified(false);
                $order->save();

                $order->sendOrderUpdateEmail(true, null);

                $this->_getSession()->addSuccess(
                    $this->__('The order state has been changed.')
                );
                //$this->_redirect('mpshippingmanager/shipping/index');
                Mage::getSingleton('core/session') ->addSuccess('Order Updated Successfully'); $this->_redirectReferer();

                }


texts: Display Product Id & Name of Order in custom page

texts:
we are displaying all the order related information in custom page : www.1234.com/php/site6/orders.php

if we login as admin , than we can see all order informations.

if we login as Designer ,

1) Product name & Product Id are not displaying. but i want to display

Here Order id, Order Date are fetching from "sales_flat_order" table.

Product Id, Product name are fetching from "sales_flat_order_item" table

but only Designer column is fetching from custom database [ table : tbl_users , column: name ]

function getDesignerCollection()
    {
    $user_home = new USER();
    require_once '../../app/Mage.php';

    Mage::app();
    $stmts = $user_home->runQuery("SELECT * FROM tbl_users WHERE userID=:uid");
    $stmts->execute(array(
        ":uid" => $_SESSION['userSession']
    ));
    $rows = $stmts->fetch(PDO::FETCH_ASSOC);

    $accountType = $rows['type'];
    if ($accountType == "admin")
        {
        $order = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('designer_id', array(
            'nin' => '0'
        ));
        }
      else
        {
        $order = Mage::getModel('sales/order')->getCollection()->addAttributeToFilter('designer_id', array(
            'like' => '%' . $_SESSION['userSession'] . '%'
        ))
                ->addAttributeToSelect('created_at')
                ->addAttributeToSelect('increment_id')  // order id
                ->addAttributeToSelect('status')
                ->addAttributeToSelect('grand_total')
                ->addAttributeToSelect('customer_email')
                ->addAttributeToSelect('state');
        }

    $i = 0;
    foreach($order as $orderData)
        {
        $orderitems = $orderData['dproduct_id'];
        $orderitemsarray = explode(",", $orderitems);
        $k = 0;
        $oDate = new DateTime($orderData['created_at']);
        $sDate = $oDate->format("Y-m-d");
        while ($k < count($orderitemsarray))
            {
            if ($orderitemsarray[$k] != '0')
                {
                $stmtorders = $user_home->runQuery("SELECT * FROM order_details WHERE designerorder_id=:designerorder_id");
                $stmtorders->execute(array(
                    ":designerorder_id" => $orderData['entity_id']
                ));
                $roworders = $stmtorders->fetch(PDO::FETCH_ASSOC);

                $productdetail = Mage::getModel('catalog/product')->load($orderitemsarray[$k]);
                $designerName = getDesignerName($productdetail->getDesignerID()) . " -(" . $productdetail->getDesignerID() . ")";
                $responce[] = array(
                    $orderData->getIncrementId() ,
                    $orderData->getIncrementId() ,
                    $orderitemsarray[$k],
                    $productdetail->getName() ,
                    $designerName,
                    $orderData['status'],
                    $orderData['grand_total'],
                    $orderData['customer_email'],
                    $commission,
                    $dorderStatus,
                    $sDate
                );
                }

            $k++;
            $i++;
            }
        }

    echo json_encode($responce);
    }


texts: how to get product details in admin grid?

texts:
here is my prepareCollection from this how to get product name and price and status

protected function _prepareCollection()
{
    $store = $this->_getStore();
    $collection = Mage::getModel('catalog/product_link')
                       ->getCollection()
                       ->addFieldToFilter('product_id',$this->_getProductId())
                       ->addFieldToFilter('link_type_id','1');
    $this->setCollection($collection);
    return parent::_prepareCollection();
}


texts:
hi this is my xml file from app/etc/modules/Attila2_ModulTest.xml :

<config>
    <modules>
        <Attila2_ModulTest>
            <active>true</active>
            <codePool>local</codePool>
        </Attila2_ModulTest>
    </modules>
</config>

this is the config.xml from app/code/local/Attila2/ModulTest/etc/config.xml

      <?xml version="1.0"?>
<config>
    <modules>
        <Attila2_ModulTest>
            <version>0.1.0</version>
        </Attila2_ModulTest>
    </modules>
    <frontend>
        <routers>
            <modultest>
                <use>standard</use>
                <args>
                    <module>Attila2_ModulTest</module>
                    <frontName>ModulTest</frontName>
                </args>
            </modultest>
        </routers>
    </frontend>
</config>

and this is the IndexController.php code from app/code/local/Attila2/ModulTest/controllers/IndexController.php

<?php
class Attila2_ModulTest_IndexController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
        echo "test";
    }
}

I cleared the caches.
When i access the http://attin.netlogiq.info/magento/index.php/modultest , I get the 404 errors instead of my string "test". why ?


texts: Magento2 Override 2 classes in single plugin di.xml

texts:
I am making a custom module for displaying attributes in Minicart and cart page and I have changed two core classes

vendor/magento/module-checkout/CustomerData/DefaultItem.php

vendor/magento/module-checkout/model/DefaultConfigProvider.php

and some views files

vendor/magento/module-checkout/view/frontend/web/template/minicart/item/default.phtml

Module is working fine but as I have changed core classes so its not good because when upgrade it will lost.I want to override both classes

vendor/magento/module-checkout/CustomerData/DefaultItem.php

vendor/magento/module-checkout/model/DefaultConfigProvider.php

In custom module but I don't have any idea that we can do this.If we try to do this by plugin so can I override two classes in single di.xml?

Or what will be best approach to achieve this.
Please help me anybody.


texts: Magento 2 Main Price Updated when select associated Product and update dynamic price

texts:
On Bundle Product :

When Select Associated products from Bundle Product Price updated

This Things are default functionality of magento but I want to update same price with main Price which shows on Top price box section as per below :

Any Idea how to update price "from - to" Price?


texts: magento do not update cart items if custom parameter do not match

texts:
i have added custom drop down parameter on product detail page.

custom drop down : say with value A,B,C

Now when user adds product with value dropdown A, next time when he adds same product with value B, Product should not get updated if value of custom parameter are same then only its should get updated .

what observer should i use or else to make it works

what i did (i want cart to be updated iff value of custom_id is same)

i am able to save value of custom id in database:

 <sales_quote_add_item>
            <observers>
                <addextraid>
                    <type>singleton</type>
                    <class>Mour_Customgroup_Model_Observer</class>
                    <method>addextraparameter</method>
                </addextraid>
            </observers>
</sales_quote_add_item>

observer.php

public function addextraparameter($observer) {
    $item = $observer->getEvent()->getQuoteItem();
    $item->setCustomId(Mage::app()->getRequest()->getParam('custom_id'));
}

i am also able to get value of custom id using below code

$item->getCustomId()

please guide what needed to be done

Below is what i am trying to do

1: For product say washing machine i have added simple dropdown or say text box in my product detail page

i am able to save value of this in tables sales_flat_quote_item,sales_flat_order_item

and also get value of this parameter in cart detail page using belwo code:

$_item->getCustomId()

now problem is when user adds washing machine to cart with value of custom attribute as A , and when he add same product with option B

same product get updated to cart , But i do not want to update cart if value of custom id is not same.

Please guide


texts: Magento2 : Protected function override with di:compile issue

texts:
I want to override block protected function _prepareLayout() function from \Magento\Sales\Block\Adminhtml\Order\View\History

I have created di.xml file for same

<preference for="Magento\Sales\Block\Adminhtml\Order\View\History"
            type="Namespace\Modulename\Block\Adminhtml\Order\Orderhistory"/>

Block File: Orderhistory.php

<?php

  namespace Namespace\Modulename\Block\Adminhtml\Order;

 class Orderhistory extends \Magento\Sales\Block\Adminhtml\Order\View\History

{

protected $_coreRegistry = null;

protected $_salesData = null;

private $adminHelper;

/**
 * @param \Magento\Backend\Block\Template\Context $context
 * @param \Magento\Sales\Helper\Data $salesData
 * @param \Magento\Framework\Registry $registry
 * @param \Magento\Sales\Helper\Admin $adminHelper
 * @param array $data
 */
public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    \Magento\Sales\Helper\Data $salesData,
    \Magento\Framework\Registry $registry,
    \Magento\Sales\Helper\Admin $adminHelper,
    array $data = []
) {
    $this->_coreRegistry = $registry;
    $this->_salesData = $salesData;
    parent::__construct($context, $data);
    $this->adminHelper = $adminHelper;
}
/**
* @Override Buttton
*/
protected function _prepareLayout()
{
    $onclick = "historyValidate.validation('" . $this->getSubmitUrl() . "');";
    $button = $this->getLayout()->createBlock(
        \Magento\Backend\Block\Widget\Button::class
    )->setData(
        ['label' => __('Submit Comment'), 'class' => 'action-save action-secondary', 'onclick' => $onclick]
    );
    $this->setChild('order_history_button', $button);
    return parent::_prepareLayout();
}
/**
 * Get stat uses
 *
 * @return array
 */
public function getStatuses()
{
    $state = $this->getOrder()->getState();
    $statuses = $this->getOrder()->getConfig()->getStateStatuses($state);
    return $statuses;
}

/**
 * Check allow to send order comment email
 *
 * @return bool
 */
public function canSendCommentEmail()
{
    return $this->_salesData->canSendOrderCommentEmail($this->getOrder()->getStore()->getId());
}

/**
 * Retrieve order model
 *
 * @return \Magento\Sales\Model\Order
 */
public function getOrder()
{
    return $this->_coreRegistry->registry('sales_order');
}

/**
 * Check allow to add comment
 *
 * @return bool
 */
public function canAddComment()
{
    return $this->_authorization->isAllowed('Magento_Sales::comment') && $this->getOrder()->canComment();
}

/**
 * Submit URL getter
 *
 * @return string
 */
public function getSubmitUrl()
{
    return $this->getUrl('sales/*/addComment', ['order_id' => $this->getOrder()->getId()]);
}

/**
 * Customer Notification Applicable check method
 *
 * @param  \Magento\Sales\Model\Order\Status\History $history
 * @return bool
 */
public function isCustomerNotificationNotApplicable(\Magento\Sales\Model\Order\Status\History $history)
{
    return $history->isCustomerNotificationNotApplicable();
}

/**
 * Replace links in string
 *
 * @param array|string $data
 * @param null|array $allowedTags
 * @return string
 */
 public function escapeHtml($data, $allowedTags = null)
 {
    return $this->adminHelper->escapeHtmlWithLinks($data, $allowedTags);
 }
 }

While i am doing di:compile we are getting below error??

If anyone know how we can resolved this issue???


texts: M2 - How to avoid element auto hiding after moving element to catalog.topnav section?

texts:
I followed the link for customer account links drop down, https://bsscommerce.com/confluence/step-by-step-tutorial-to-customize-layout-illustrations/
After move the element to catalog.topnav

During refresh the page the element showing, after complete page refresh the element hide like display:none
Any help thanks.


texts: How to define the order status after creating an invoice

texts:
I have searched a lot with google but somehow I'm using the wrong search terms or there is no answer to my specific problem yet.

In Magento I'd like to have the following procedure:
Customer creates an order, I generate an invoice (Status switches to payment_review or something like that), I send out the order (Status switches to completed).

Currently after creating the invoice the status automatically switches to completed.

So how do I say what status is used after generating the invoice?

Thanks for suggestions


texts: Disable Coupon code for specific category in magento 1.9

texts: How to restrict coupon code functionality for specific category of products in magento 1.9?


texts: How to disable the minicart popup function completely in Magento2

texts: What would be the best method to disable the minicart popup/hover function completely without interrupting the ajax functions that are included?


texts: How can I add a field in admin panel > system > configuration > General Tab?

texts:
How can I add a field in admin panel > system > configuration > General Tab ?

Please specify Path for file in Magento 1.9

I am using code below but no success:

<sections>
    <custom translate="label" module="custom">
        Custom
        <tab>general</tab>
        <sort_order>60</sort_order>
        <show_in_default>1</show_in_default>
        <show_in_website>1</show_in_website>
        <show_in_store>1</show_in_store>
    <groups>
        <store_number translate="label">
                Store Customer Care Number
                <frontend_type>text</frontend_type>
                <sort_order>100</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <contact_info translate="label">
                        Store Customer Care Number
                        <frontend_type>text</frontend_type>
                        <sort_order>2</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </contact_info>
                </fields>
         </store_number>
    </groups>
    </custom>
</sections>


texts: Magento 2.2.5 Mini cart not showing items or subtotal

texts:
Magento 2.2.5 - upgraded from 2.1.5 last week but not sure it was working on 2.1.5

Site is under development. The mini cart in the header is not working properly. When you add something to the cart it says, 1 item available, that part is correct. However the subtotal is not appearing at all and the items are not appearing

The following error is in the console:

 knockout.js:3012 Uncaught TypeError: Unable to process binding "foreach: function(){return $parent.getRegion($parent.getItemRenderer(item.product_type)) }"

    Message: Cannot read property 'simple' of undefined

at UiClass.getItemRenderer (minicart.js:140)

which refers to these lines in minicart.js

getItemRenderer: function (productType) {

return this.itemRenderer[productType] || 'defaultRenderer';

//return 'defaultRenderer';

},

Console log shows "simple" for productType

If I comment out the return line and just return "defaultRenderer" it gives no errors but just no items.

This was using a custom Theme, not made by me but even reverting to Default Blank theme still gives the same error.

"itemRenderer" is in vendor/magento/magento-checkout/view/frontend/layout/checkout_car_sidebar_item_renderers.xml and other similar questions seem to imply that there is an issue in the XML but I can't see anything wrong with it. Any ideas?

ETA-----------

I am still struggling with this. I installed 2.2.5 locally and took the vendor/magento/magento-checkout files and put them in this site, just in case, and deleted the module-checkout files from the app/design theme folder and it's still giving the same error. I have deployed static files, cleared cache etc etc. Is there anything else I could be trying?


texts: Owl Carousel randomly not loading magento2.4

texts:
on my Magento2.4 I have an issue where owl-carousel will randomly not load.
Here is my default_head_blocks.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
     <link rel="stylesheet" type="text/css" src="https://fonts.googleapis.com/css?family=Roboto+Slab%3A400%2C700%7CCinzel%3A400%2C700%7COswald%3A400%2C500%2C600%2C700&#038;subset=latin%2Clatin-ext&#038;ver=5.5" src_type="url" />
    <font src="fonts/Luma-Icons.woff2"/>
    <css src="css/bootstrap.min.css"/>
    <css src="css/owl.carousel.min.css"/>
    <css src="css/custom.css" media="all"/>
    <link src="js/custom.js"/>

    <!-- MailMunch.com code -->
    <script src="//a.mailmunch.co/app/v1/site.js" id="mailmunch-script" data-mailmunch-site-id="431303" async="async" src_type="url"></script>
</head>

and here is my custom.js file
require(['jquery','js/owlcarousel.min'],
  function($){
    $(document).ready(function() {
        $('.owl-carousel').owlCarousel({
            loop:true,
            nav:false,
            items:1,
            dots:true,
            autoplay:true,
            autoplayTimeout:3000
        })

        $(".homepagevid").hide();
        $('.homepagevidclick').click(function ()
        {
           $('.homepagevid').show();
           $('.homepagevid').attr('src', 'https://player.vimeo.com/video/379262940?autoplay=1');
           $('.homepagevidclick').hide();
           $('.fa.fa-play-circle').hide();
        });
        $('.cms-home .fa.fa-play-circle').click(function ()
        {
           $('.homepagevid').show();
           $('.homepagevid').attr('src', 'https://player.vimeo.com/video/379262940?autoplay=1');
           $('.homepagevidclick').hide();
           $('.fa.fa-play-circle').hide();
        });

        $(".action.subscribe.primary").click( function() {
            $(window).scrollTop(0);
        });

        $(".messages").fadeOut("slow");

        function startAnimations() {
        $("#toplefttxtscroller li").hide();

          function loop() {
              var $li = $("#toplefttxtscroller li:first-child").fadeIn(3000, function () {
                  $li.fadeOut(400, function () {
                      $li.appendTo('#toplefttxtscroller');
                      loop()
                  })
              });
          }
          loop()
        }
        startAnimations();
    });
 });


texts: Programmatically add shipping cost to the quote

texts:
I have the following code and I have searched and searched and can not find the answer. Everything I find on these forums tell me to do what  I have already done but the shipping cost will just not save on the quote.

Here is how I call the quote,

$quote = Mage::getModel('sales/quote')->load($QID);

I then add all my items and customer details etc and then I add the shipping details like so,

$delCost = 10 //// I set this as a variable
$delTitle = 'MY CUSTOM TITLE' //// I set this as a variable

    $quote->getShippingAddress()->setShippingDescription($delTitle); /// THIS IS WORKING
    $quote->getShippingAddress()->setShippingAmount($delCost);
    $quote->getShippingAddress()->setBaseShippingAmount($delCost);
    $quote->getShippingAddress()->setData('price',$delCost);
    $quote->getShippingAddress()->setRate($delCost);
    $quote->getShippingAddress()->setCost($delCost);
    $quote->getShippingAddress()->setCountry('GB');
    $quote->save();

When I retrieve the quote I can see it has saved the shipping description but it doesn't save the cost .

This is stand alone code that I am using where I create a quote programmatically for a point of sale system I am creating. Any help would be most appreciated as I have followed every tutorial I can find and I know its probably something simple I am missing.


texts: Is it possible to bring all goods where the value of the "name" attribute begins particular letter, for example "". (without assigning additional attributes). Maybe there is a ready solution?


texts: OWL Carrousel Not Showing Images - WeltPixel Extension

texts:
I was wondering if anyone can help. I recently installed the OwlCarrouselSlider from WeltPixel and after upgrading to 2.3 the images within sliders for related and upsell products have stopped showing.
I have checked all the folder permissions and indexers and they look fine.
Did anyone else had the same issue before or could please come up with any other solution?


texts: Magento2: show price for out of stock configurable products

texts:
Following this guide Magento 2 : How To Show Price of "out of stock" Products

I successfully managed to show price for out of stock products. But this applies only to simple products. For configurable out of stock products the price printed is always 0,00 while I would like to show the lowest price of simple products composing its parent.

How can I do it?


texts: Cannot Assign Param Value in Model Collection. Magento 2

texts:
I'm currently Facing a really strange Issue I'm applying filter on my custom table data in grid by adding function

Vendor/Module/Model/ResourceModel/Withdrawal/Grid/Collection.php

protected function _renderFiltersBefore() {
        $id = (int)$this->request->getParam('id');
        // echo $id;
        // print_r($id);exit;
        $this->getSelect()->where('main_table.seller_id ='. $id);
        parent::_renderFiltersBefore();
    }

Now the filter is working Fine when I apply the value Hard coded... like $this->getSelect()->where('main_table.seller_id = 2'); it works fine even if I assign variable a hard coded value like $id=2 then it also works fine... but when I get the value by Param then it do not return any data while as you can see in my code that I've echo the ID n it is returning the proper value but when I assign it to Query then it is not working... what is the issue n how to sort this thanks.


texts: Add quantity box with product everywhere

texts:
I want to add quantity box with each product, now the quantity box is only at product detail page. but i want it every where on category page or in any block.

http://gayd.yantu.in/

i tried to add the same code which was on detail page, but on clicking add to cart the page gets redirected to cart. which should not be the case, it should fly and get added as per the theme effect.

the theme i am using is mt yoming


texts:
I've been looking through guides and other questions, but I simply can't get the finalPrice formatted as I want.
I would like to display the price with the chosen currency first and then the price with two decimals, e.g. as;

$4.00

Im retreiving the price with the following line;

echo $product->getFinalPrice();

This simply displays on the front-end as;

4

I've also tried using the following line;

echo $formattedPrice = Mage::helper('core')->currency($finalPrice, true, false);

This gives me the right formatting, but doesn't retreive the actual price of the product. It display as;

€0.00

The one gets the actual price and the other formats it the way I want, so I guess I have to combine these in some way?


texts: Magento 2 FancyBox Implementation for youtube videos

texts:
Am implementing fancybox in magento 2, which has been implemented in magento 1 but in M2.2x shows a require js implementation and I have done that so but still the issue persist.

  NOTE : The issue after implementing external i.e., fancybox js there is error in console stating that require jquery.
  Blockquote

Guide me to implement fancybox for youtube videos


texts: Magento 2: How to override Block file Configurable.php?

texts:
In magento 2, using Preference Configurable.php file is not simply override, Is this is magento 2 bug?

I have override simply using preference method inside di.xml file but its not override.

I want to override function getJsonConfig() from file. Using only Simply override method of magento 2.
Code for di.xml file

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\ConfigurableProduct\Block\Product\View\Type\Configurable" type="Package\Configurable\Block\Product\View\Type\Configurable"/>
</config>

Is there any trick or method to override Configurable.php file?

Thanks.


texts: How to add options in Attribute in magento 1.9 programmatically?

texts:
I want to add options in an attributes programmatically like in Size attribute i want S,M,L,XL as an option . My code is creating attribute but i want options with attributes.

require_once '../app/Mage.php';
Mage::app();

// Attribute basic data
$attributeName = 'Sizes'; // Name of the attribute
$attributeCode = 'Sizes'; // Code of the attribute
//$attributeGroup = 'Custom Group'; // Group to add the attribute to
// Attribute configuration data
$data = array(
'type' => 'varchar', // Attribute type
'input' => 'select', // Input type
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL, // Attribute scope
'required' => true, // Is this attribute required?
'user_defined' => false,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
'used_in_product_listing' => true,
// Adding basic data
'label' => $attributeName,
);

$data['value']['any_option_name'][0] = 'S';

// Installer code to create attribute with new installer class (can be used in non-EAV setup)
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();
$installer->addAttribute('catalog_product', $attributeCode, $data);

// Notice: Default Attribute Set have ID 4

// Add the attribute to the all attribute proper sets and proper groups:
$entity = Mage_Catalog_Model_Product::ENTITY;
$attributeSetIds = $installer->getAllAttributeSetIds($entity);
foreach($attributeSetIds as $attributeSetId)
{
$installer->addAttributeToGroup('catalog_product', $attributeSetId, $attributeCode);
}

$installer->endSetup();


texts:
I'm attempting to override the core navigation module in Magento with my plugin however, it is not working as it should. The plugin runs however an error is thrown.

2015-01-19T06:43:13+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: VNav_Catalog_Block_Navigation' in C:\wamp\www\magento\app\Mage.php:595
Stack trace:
#0 C:\wamp\www\magento\includes\src\__default.php(28016): Mage::throwException('Invalid block t...')
#1 C:\wamp\www\magento\includes\src\__default.php(27958): Mage_Core_Model_Layout->_getBlockInstance('catalog/navigat...', Array)
#2 C:\wamp\www\magento\includes\src\__default.php(27993): Mage_Core_Model_Layout->createBlock('catalog/navigat...', 'catalog.leftnav')
#3 C:\wamp\www\magento\includes\src\__default.php(27760): Mage_Core_Model_Layout->addBlock('catalog/navigat...', 'catalog.leftnav')
#4 C:\wamp\www\magento\includes\src\__default.php(27726): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 C:\wamp\www\magento\includes\src\__default.php(27731): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 C:\wamp\www\magento\includes\src\__default.php(13941): Mage_Core_Model_Layout->generateBlocks()
#7 C:\wamp\www\magento\app\code\core\Mage\Catalog\controllers\CategoryController.php(148): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 C:\wamp\www\magento\includes\src\__default.php(14015): Mage_Catalog_CategoryController->viewAction()
#9 C:\wamp\www\magento\includes\src\__default.php(18399): Mage_Core_Controller_Varien_Action->dispatch('view')
#10 C:\wamp\www\magento\includes\src\__default.php(17933): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 C:\wamp\www\magento\includes\src\__default.php(20705): Mage_Core_Controller_Varien_Front->dispatch()
#12 C:\wamp\www\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#13 C:\wamp\www\magento\index.php(85): Mage::run('', 'store')
#14 {main}

Plugins files:

C:\wamp\www\magento\app\code\local\VNav\Catalog\etc\config.xml

<?xml version="1.0"?>
<config>
<modules>
    <VNav_Catalog>
        <version>0.1.0</version>
    </VNav_Catalog>
</modules>

<global>
    <blocks>
        <catalog>
            <rewrite>
                <navigation>VNav_Catalog_Block_Navigation</navigation>
            </rewrite>
        </catalog>
    </blocks>
</global>
</config>

C:\wamp\www\magento\app\code\local\VNav\Catalog\Block\Navigation.php:

class VNav_Catalog_Block_Navigation extends Mage_Catalog_Block_Navigation{}

C:\wamp\www\magento\app\etc\modules\VNav_Catalog.xml:

<?xml version="1.0"?>
<config>
<modules>
    <VNav_Catalog>
        <active>true</active>
        <codePool>local</codePool>
        <depends />
    </VNav_Catalog>
</modules>
</config>

Any ideas why? Thanks!


texts: Magento 2. How to Hide Price for multi Price products

texts:
I'm Hiding Price using Plugin. the Plugin is Hiding price for every product except the multi value products. My code is

  Vender/Module/Plugin/Price.php

<?php

namespace Vender\Module\Plugin;

class Price
{
function afterToHtml(\Magento\Catalog\Pricing\Render\FinalPriceBox $subject, $result)
 {
return " ";
}
}

  Vender/Module/etc/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">

        <type name="Magento\Catalog\Pricing\Render\FinalPriceBox">
            <plugin name="price_hide" type="Vender\Module\Plugin\Price"/>
        </type>
</config>

For other Product it shows like

and for the Multi Price Products it shows like

Now How to hide price of multi price product using Plugin.. Thanks in Advance


texts: I need custom php file and upload to magento

texts:
example myconnect.php

<?php
$servername = "localhost";
$username = "";
$password = "";
try {
    $conn = new PDO("mysql:host=$servername;dbname=meigee", $username, $password);
    //set the PDO error mode to exception
    $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    echo "Connected successfully";
} catch(PDOException $e) {
    echo "Connection failed: " . $e->getMessage();
}
echo "<br>";
echo "PHP on Magento";
?>

how to upload file mycon.php?
Magento1.9.4.3


texts: Change backups folder outside magento root folder

texts: Im using magento and i want write script to automatically backup so i want store the outside the magento 2 root directory is it possible and how can i do it.