texts:
I am trying to change Image on Hover in all product. Any help regarding this.It's not about product placeholder. Problem is that I am not able to get another type of image. product_page_large_image and product_base_image is same output but when I am trying with product_small_image, it's not working.

All thing oK, I have to get another image from the backend. For example, product Have two Image one is default show and one is showing after hover.

<?php foreach ($_productCollection as $_product): ?>
<?php echo($iterator++ == 1) ? '
' : '

' ?>

    <?php // Product Image    ?>
    <a href="<?php echo $_product->getProductUrl() ?>" class="product photo product-item-photo" tabindex="-1">

                                <?php
                                $imageUrl = $this->helper('Magento\Catalog\Helper\Image')
                                    ->init($_product, 'product_page_image_large')
                                    ->keepAspectRatio(TRUE)
                                    ->keepFrame(FALSE)
                                    ->resize(270, 404)
                                    ->getUrl();

                                $imageUr2 = $this->helper('Magento\Catalog\Helper\Image')
                                    ->init($_product, 'product_base_image')
                                    ->keepAspectRatio(TRUE)
                                    ->keepFrame(FALSE)
                                    ->resize(270, 404)
                                    ->getUrl();
                                ?>
                                <img src="<?php echo $imageUrl; ?>" onmouseover="this.src='<?php echo $imageUr2; ?>';" onmouseout="this.src='<?php echo $imageUrl; ?>';"/>

    <?php endforeach; ?>


texts: Why increment id changes by large value?

texts: I have used increment id for loading and saving orders in my magento stores since long. I've seen it change it's value from 124 to 2000000004 between two consecutive orders. What I do not understand is why is there a need to jump it's value by so much?


texts: When we look at an eavSetup what values are available for type and input?

texts:
When creating an install script for Magento 2 what values are available for the type and input parts of eavSetup->addAttribute()?  Or where could I look to find out?

$eavSetup->addAttribute(
    \Magento\Catalog\Model\Product::ENTITY,
    'some_attr',
    [
        'type' => '',
        'backend' => '',
        'frontend' => '',
        'label' => 'Test Attribute',
        'input' => '',
        'class' => '',
        'source' => '',
        'global' => \Magento\Catalog\Model\Resource\Eav\Attribute::SCOPE_GLOBAL,
        'visible' => true,
        'required' => false,
        'user_defined' => false,
        'default' => 0,
        'searchable' => false,
        'filterable' => false,
        'comparable' => false,
        'visible_on_front' => false,
        'used_in_product_listing' => true,
        'unique' => false,
        'apply_to' => ''
    ]
);


texts:
Hello  everyone how can I Move Order Total Incl. Tax Order after the Total Excl. Tax in Order Summary in magento2 checkout page .

Any help will be appreciated


texts: How to remove custom top link magento by code

texts:
In my module I add a top link by edit layout.xml

 <reference name="top.links">
        <action method="addLink" translate="label title" module="mymodule">
            <label>mymodule</label>
            <url helper="mymodule/getModuleUrl"/>
            <title>mymodule</title>
            <prepare/>
            <urlParams/>
            <position>10</position>
        </action>
    </reference>

How can I remove it by Code ??? please help :D


texts: Magento 2: How to get shipment collection on phtml?

texts:
I'm trying to get the shippment collection on popup.pthml, but not able to get.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$shipmentCollection = $objectManager->get('Magento\Sales\Model\ResourceModel\Order\Shipment\Collection');
$shipmentCollection->loadByIncrementId($shipId);
echo "<pre>";print_r($shipmentCollection->getData());die;


texts: Display a product attribute on orders page in admin

texts:
I am using this custom module https://bitbucket.org/vovsky/adding-custom-product-attribute-to-quote-and-order-items-in/downloads related article https://www.atwix.com/magento/custom-product-attribute-quote-order-item/

which allows a custom attribute to be added when adding products

when this product is purchased it stores the numerical data entered in this attribute to mage_sales_flat_order

Unfortunately it doesnt show up anywhere on the order info?
How would I display this on the admin panel order summary page or on the individual order page?


texts: How to extend Bundle product type in Magento 2

texts:
When I create new product type and extend Bundle, I don`t have "Bundle Items" tab, how I can get the same functionality in my custom product type like in Bundle product?

product_type.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_types.xsd">
<type name="super_bundle" label="Super Bundle Product" modelInstance="Vendor\Module\Model\Product\Type" composite='true' indexPriority="40" sortOrder="50">
    <priceModel instance="Magento\Bundle\Model\Product\Price" />
    <indexerModel instance="Magento\Bundle\Model\ResourceModel\Indexer\Price" />
    <stockIndexerModel instance="Magento\Bundle\Model\ResourceModel\Indexer\Stock" />
    <allowedSelectionTypes>
        <type name="virtual" />
    </allowedSelectionTypes>
    <customAttributes>
        <attribute name="refundable" value="true"/>
    </customAttributes>
</type>
</config>

When I use


texts: Magento2: How to get the text box value in paste event in ko template

texts:
I want to get the otp value after paste event.

                    Enter OTP

                        <input type="text" name="otp" id="otp"  maxlength="6" class="input-text input-otp" data-bind="value:otp,disable:isDisabled,valueUpdate:'keyup,paste',event:{keyup:verifyOtp,paste:verifyOtp},hasFocus:isFocused">

In js:

verifyOtp: function (value) { console.log(this.otp());
            var otp = this.otp(), self = this, payload;
            if (otp.length == 6) {}}

But not working.

Thanks.


texts: Configure Magento CE 2.3.2 message queue to use db instead of amqp

texts:
I've just recently upgraded from M2.2.8 to M2.3.2 and now I'm getting errors in system.log every minute or so that say.

main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp []

I have read through similar questions on here but I can't find an answer to the problem.

I can see the job is running in a cron group by using the command "php bin/magento queue:consumers:list" but there's nothing configured in env,PHP as I don't use RabbitMQ

If I trigger a bulk product edit in the admin, I get a message added to the queued alert and when I go to system->bulk actions I can see that the job completed. That indicates to me that for some actions, it is using the DB for the message queue, not amqp.

However, the job "async.operations.all" which I think is the Bulk Cleanup job in the cron seems to only want to use the amqp connection and not the DB.
That job, I think, is in

vendor/magento/module-asynchronous-operations/Cron/BulkCleanup.php

but there isn't anywhere in that that sets it to amqp.

I've had just found that it's mentioned in

vendor/magento/module-asynchronous-operations

amqp is mentioned in 2 files

module-asynchronous-operations\etc\di.xml (Line 90)

module-asynchronous-operations\Model\ConfigInterface.php (Line 28)

but changing those to db didn't fix it.

I'm simply trying to stop system.log filling up all the time and use the DB message queue for all messages but I'm struggling with it and would appreciate your help everyone.


texts: How to change porto Theme Product image to change on Hover

texts:
I'm new to Magento 2. I'm having some question related to the product page and product list. I have attached a screenshot to be clearer.

Thanks


texts: Magento 2: getPost and getPostValue methods on the request object

texts:
I see that everywhere where the request is involved in Magento 2, the request is an implementation of \Magento\Framework\App\RequestInterface.
This interface does not contain the methods getPost (used in \Magento\Catalog\Controller\Adminhtml\Category\Widget\CategoriesJson) and getPostValue (used in \Magento\Catalog\Controller\Adminhtml\Product\Save) but they are still called.
Is it OK to assume that these methods are always going to be there for http requests?
or should I use something else in my modules to get the $_POST data?


texts: Trigger custom js script by using Magento observer

texts:
I need to trigger some custom js script in Magento for following actions,

1) customer account creation (customer_register_success)

2) Add to cart action (checkout_cart_product_add_after)

3) Remove a product from cart

4) Successful checkout

For now, I have created a module to observe customer_register_success and checkout_cart_product_add_after events and it is working as expected.

But, I am struggling to trigger the custom script on the particular event, please let me know suggestions to trigger the script.

Thanks in advance!


texts: Display dropdown attribute on order page at backend

texts:
How to display drop down attribute on order page at back end?
Tried editing the file grid.php.. it is diplaying the ID of a dropdown attribute but i want a value


texts:
I have a custom module that creates a sql table/collection with data added either by admin or users.

On certain pages this one collection is called a few times with specific filters to output specific data.
See example below how i fetch/display the data.

$my_collection_set_A = Mage::getModel('collection/collection')->getCollection();
$my_collection_set_A->addFieldToFilter('created_time', array('gt' => date("Y-m-d H:i:s", strtotime('-1 day'))));
foreach($my_collection_set_A as $set_A_item){
echo $set_A_item->getId();
}

$my_collection_set_B = Mage::getModel('collection/collection')->getCollection();
$my_collection_set_B->addFieldToFilter('created_time', array('gt' => date("Y-m-d H:i:s", strtotime('-1 week'))));
foreach($my_collection_set_B as $set_B_item){
echo $set_B_item->getId();
}

$my_collection_set_C = Mage::getModel('collection/collection')->getCollection();
$my_collection_set_C->addFieldToFilter('created_time', array('gt' => date("Y-m-d H:i:s", strtotime('-1 month'))));
foreach($my_collection_set_C as $set_C_item){
echo $set_C_item->getId();
}

As you can see this is just simple collection filtering but is there a way just to call the collection once and filter later down the track (multiple times, different filters);

//Top of Page code (only call once)
$collection = Mage::getModel('collection/collection')->getCollection();
...
...
...
...
//called later down
$collection->addFieldToFilter('created_time', array('gt' => date("Y-m-d H:i:s", strtotime('-1 month'))));
foreach($collection as $item){
echo $item->getId();
}
...
...
...

//called again later down
$collection->addFieldToFilter('created_time', array('gt' => date("Y-m-d H:i:s", strtotime('-1 day'))));
foreach($collection as $item){
echo $item->getId();
}
...
...
etc

Surely this is possible as this would save alot of overheads (not calling the same collection multiple times, only once) especially as Ive got a lot of data to filter/output from the same collection on one page.


texts:
From the following script below, I dynamically add evaluations on the products, however I am not able to set the creation date from $review->setCreatedAt($data_avaliacao);. I already researched the subject, I saw several types of suggestions, but none with success. Thanks in advance!

while($array = mysqli_fetch_assoc($result)){
        if (($array['sugestao_nps'] != "") && ($array['sugestao_nps'] != NULL) && ($array['score_nps'] >= 7)) {
            $product_sku = $array['SKU'];
            $product_id = Mage::getModel("catalog/product")->getIdBySku($product_sku);
            $nome_cliente = utf8_encode($array['nome_cliente']);
            $data_avaliacao = strtotime($array['data_nps']." ".Mage::getModel('core/date')->gmtDate('H:i:s'));
            echo $array['score_nps']." - ".$nome_cliente." - ".$product_id." - ".$array['order_id']." - ".$data_avaliacao." - ".utf8_encode($array['sugestao_nps'])."<br />";
            if (($array['score_nps'] == 10) || ($array['score_nps'] == 9)) {
                $rating_id = 3;
                $rating_value = 15;
            } else if(($array['score_nps'] == 8) || ($array['score_nps'] == 7)){
                $rating_id = 3;
                $rating_value = 14;
            }
            $review = Mage::getModel('review/review');
            $review->setEntityPkValue($product_id);//product id
            $review->setStatusId(1);
            $review->setDetail(utf8_encode($array['sugestao_nps']));
            $review->setEntityId(1);
            $review->setStoreId(0);
            $review->setTitle("");
            $review->setStatusId(1); //approved
            $review->setCustomerId(null);
            $review->setNickname($nome_cliente);
            $review->setCreatedAt($data_avaliacao);
            $review->setReviewId($review->getId());
            $review->setStores(array(Mage::app()->getStore()->getId()));
            $review->save();
            Mage::getModel('rating/rating')
                ->setRatingId($rating_id)
                ->setReviewId($review->getId())
                ->addOptionVote($rating_value,$product_id);
            $review->aggregate();
        }


texts: Getting constant values from another controller inside my own controller

texts:
I would like to be able to access the constants defined in:

app/code/core/Mage/Contacts/controllers/IndexController.php

const XML_PATH_EMAIL_RECIPIENT  = 'contacts/email/recipient_email';
const XML_PATH_EMAIL_SENDER     = 'contacts/email/sender_email_identity';
const XML_PATH_EMAIL_TEMPLATE   = 'contacts/email/email_template';
const XML_PATH_ENABLED          = 'contacts/contacts/enabled';

I want to be able to get these values to use in my own controller. How would I go about this?

I have already created my custom controller in my extension. It works fine.

require_once(Mage::getModuleDir('controllers','Mage_Contacts').DS.'IndexController.php');

class Cti_Enhancedform_EnhancedformController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {

    }
 }


texts: what are the tables being inserted when import product in Magento2?

texts:
I want to know what are the tables being inserted while import product in magento2.

or
what are the main table to be inserted for showing products in home page( don't think big. just to display in UI)

I have 1 Million of data, and I can't upload a file which is more than 2mb.

It is not possible to split my file and insert.

I can create insert into ... query from csv file if I know the table names and its relations.

can anyone know, please answer me


texts: Confirmation pop-up when specific products are added to cart

texts:
I need to be able to display a popup dialog (or something similar and very obvious to the end user) when specific products are added to a customers shopping basket.

Can someone point the way for what to search for to get more information on how to do this please?


texts: Is their any Way to create client token for braintree with api in magento 2

texts:
I would like to generate a client token for brain tree paypal payment as a

response,How can i solve,please any idea.any help would be appreciated.


texts: How to get applied cart price rule in magento add to cart observer checkout_cart_product_add_after?

texts: How to get applied cart price rule in magento add to cart observer ?


texts:
What is the bootstrap object?
How Magento initializes an application using the Bootstrap object.


texts: How to get discount value round up in magento

texts:
I need to show round value of discount coupon, like if i have apply 10% discount on cart and after apply if 99.90 value is deducted from subtotal then if need to show 99.90 value round off and then deduct price from subtotal.
Is this possible to round off only discount price on cart?


texts:
I'm trying to get the email address in the email sent from Sales > Orders > Send Email.

I use this code and it works as long as the customer in making an order:

<?php
$websiteId = Mage::app()->getWebsite()->getId();
$email = Mage::getSingleton('checkout/session')->getQuote()->getCustomerEmail();
$encoded = base64_encode($email);
?>

But when I send the email from Admin in Sales > Orders > Send Email the above code fails to work.

How can I get something that will work basically everywhere?

Thanks


texts: Show layer navigation on search result 2-column-right.phtml page in Magento

texts:
I am working on custom Magento theme.On search result page when i set root template = page/2columns-right.phtml then layer navigation not showing when i changed it page/2columns-left.phtml then layer navigation showing.
Layer navigation showing on category page but not showing on search result page.
any solution ??


texts:
I have a custom template and in the beginning there is this line

<form action="<?php echo $this->getFormAction(); ?>" id="contactForm" method="post">

My installation is something_me/... and the getFormAction() returns something/..., so I wanted to check the function (because probably the URL is hardcoded and I want to change that). But the module (a custom one) does not have a controller and the block of that template does not have a getFormatAction() function.

By debugging I tried going to the function but it only leads me to the __call() function and then back to the template.

So how can I see where is that action implemented and change the behaviour of acquiring the URL?


texts: Magento Export Message: “Message is added to queue, wait to get your file soon”

texts:
I export the product - SKU only, but the csv file does not shown up...
Wanted to run this command, but don't know where to run it:
-bin/magento queue:consumers:start exportProcessor


texts: Find out the "name" for a referenceBlock in Magento 2

texts:
I want to remove some blocks from my page. Say for example that I want to remove the container for the logo.

Then I create /app/design/frontend/MYVENDORNAME/MYTHEMENAME/Magento_Theme/layout/default.xml with the following code:

<page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="logo" remove="true"/>
</page>

In this case I managed to find out the name (name="logo") of this reference block by searching through the files in the Base Theme.

The question is: Is there a better way to find out the names of blocks. I figure there must be a list of all names used in the XMl files in Magento? Or some kind of reference?

Say for example that I would like to remove the menu (
...
). How do I find out the name of that


texts: How do I change the welcome message in Magento 1.9+ the proper way?

texts:
I would like to change the welcome message to just show initials. Clearly I can do something in the template, however, I would like to extend/over-ride Mage_Page_Block_Html_Welcome to do this 'the proper way'.

I have tried doing this however I cannot get it to work - I just get a blank line. I am expecting the normal line with 'TEST' written in there too:

Here is my config.xml entry:

<global>
    <blocks>
        <page>
            <rewrite>
                <html_welcome>MyCompany_Mymodule_Page_Block_Html_Welcome</html_welcome>
            </rewrite>
        </page>
    </blocks>

My code, just copied from the original file with a small change for test porpoises:

app/code/local/MyCompany/Mymodule/Block/Page/Html/Welcome.php

<?php class MyCompany_Mymodule_Page_Block_Html_Welcome extends Mage_Page_Block_Html_Welcome {

    /**
     * Get block messsage
     *
     * @return string
     */
    protected function _toHtml()
    {
        if (empty($this->_data['welcome'])) {
            if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) {
                $this->_data['welcome'] = $this->__('TEST Welcome, %s!', $this->escapeHtml(Mage::getSingleton('customer/session')->getCustomer()->getName()));
            } else {
                $this->_data['welcome'] = Mage::getStoreConfig('design/header/welcome');
            }
        }

        return $this->_data['welcome'];
    }

    /**
     * Get tags array for saving cache
     *
     * @return array
     */
    public function getCacheTags()
    {
        if (Mage::getSingleton('customer/session')->isLoggedIn()) {
            $this->addModelTags(Mage::getSingleton('customer/session')->getCustomer());
        }

        return parent::getCacheTags();
    }
}


texts: Magento 2 Pixel Order Tracking on Success Page

texts:
I am trying to integrate the code below on Success page via either a block or by , but after placing an order, the page will be displayed without CSS and the tracking code is not receiving data.

<?php
//-------------------------------------------
// START TAG TRACKING CODE
//-------------------------------------------
$customerId = Mage::getSingleton('customer/session')->getCustomerId();
$lastOrderId = Mage::getSingleton(‘checkout/session’)->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$orderData = $order->getData();
$orderAmount = $order->getSubtotal();
$items = $order->getAllItems();
$currency = $order->getOrderCurrency()->getCode();
$items_string = "";

foreach ($items as $item) {
    //loop through all the items
    //get item category code, quantity & amount in 3 variables and append in thee below string
    $items_string += "&CAT=" + $itemCategoryCode + "," + $itemQty + "," + $itemAmount;
}

?>

Could someone please help?

Thanks in advance!


texts:
When the cart total is less than some specific mentioned amount, I want to disable Cash on Delivery option from payment methods in magento 1.9x.
Kindly help me to resolve this issue.


texts: How to Upload image on Frontend using custom module?

texts:
I am trying to upload an image in the frontend. my controller is

public function execute()
{
    /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
    $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
    if (!$this->formKeyValidator->validate($this->getRequest())) {
        $resultRedirect->setUrl($this->_redirect->getRefererUrl());
        return $resultRedirect;
    }

    $data = $this->reviewSession->getFormData(true);
    if ($data) {
        $rating = [];
        if (isset($data['ratings']) && is_array($data['ratings'])) {
            $rating = $data['ratings'];
        }
    } else {
        $data = $this->getRequest()->getPostValue();
        $rating = $this->getRequest()->getParam('ratings', []);
    }
    if (($product = $this->initProduct()) && !empty($data)) {
        /** @var \Magento\Review\Model\Review $review */
        $pathurl = $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . 'review_module/';
        $mediaDir = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)->getAbsolutePath();
        $mediapath = $this->_mediaBaseDirectory = rtrim($mediaDir, '/');
        $files = $this->getRequest()->getFiles();
        if (isset($data['image']))
        {
          $uploader = $this->_fileUploaderFactory->create(['fileId' => 'image']);
          $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);
          $uploader->setAllowRenameFiles(true);
          $path = $mediapath . '/review_module/';
          $data['image'] = $files['image']['name'];
            $result = $uploader->save($path);
        }
        $review = $this->reviewFactory->create()->setData($data);
        $review->unsetData('review_id');

        $validate = $review->validate();
        if ($validate === true) {
            try {
                $review->setEntityId($review->getEntityIdByCode(Review::ENTITY_PRODUCT_CODE))
                    ->setEntityPkValue($product->getId())
                    ->setStatusId(Review::STATUS_PENDING)
                    ->setCustomerId($this->customerSession->getCustomerId())
                    ->setStoreId($this->storeManager->getStore()->getId())
                    ->setStores([$this->storeManager->getStore()->getId()])
                    ->save();

                foreach ($rating as $ratingId => $optionId) {
                    $this->ratingFactory->create()
                        ->setRatingId($ratingId)
                        ->setReviewId($review->getId())
                        ->setCustomerId($this->customerSession->getCustomerId())
                        ->addOptionVote($optionId, $product->getId());
                }

                $review->aggregate();
                $this->messageManager->addSuccess(__('You submitted your review for moderation.'));
            } catch (\Exception $e) {
                $this->reviewSession->setFormData($data);
                $this->messageManager->addError(__('We can\'t post your review right now.'));
            }
        } else {
            $this->reviewSession->setFormData($data);
            if (is_array($validate)) {
                foreach ($validate as $errorMessage) {
                    $this->messageManager->addError($errorMessage);
                }
            } else {
                $this->messageManager->addError(__('We can\'t post your review right now.'));
            }
        }
    }
    $redirectUrl = $this->reviewSession->getRedirectUrl(true);
    $resultRedirect->setUrl($redirectUrl ?: $this->_redirect->getRedirectUrl());
    return $resultRedirect;
}

i am getting this error


texts: Magento 1.9 loads page twice on every page

texts:
My site is built in Magento 1.9 and, starting from today, every page is loading twice. For instance I choose a page, it fully loads, then in 2 seconds makes another GET request (takes everything from cache) and stops. If I press the browser back button, then it makes the second GET again.

I didn't make any changes in JS or backend.

This is the browser back button pressed

Please help :)

UPDATE!!!

There was a script from surveyplanet that did this.


texts: How to get Attribute Text depending on storeId in magento2

texts: I want to get attributeText of product depending on  what storeId is passed.


texts: Module throwing error after enable, setup:upgrade

texts:
This question has been asked a
few
times but no excepted answers, and none of the suggestions worked for me. Here is the error:

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Dope_CustomModule data: current version - none, required version - 1.0.0

Seems simple and the error says to run setup:upgrade. Of course I already did that when I installed my module.

I originally had a typo in my registration.php where I put Dopes_CustomModule instead of Dope_CustomModule. Magento 2 seems to hate when I rename themes and modules and so I suspect the typo may have caused this problem to persist. The setup:upgrade process still went through without error (the error shows up on page load to be clear).

I've cleared pub/static/*, var/di/* var/generation/*, var/cache/* and I've triple checked for typos in the code. I enabled/re-enabled several times, I recompiled. Nothing.

I've tried a few times and I notice that the data_version column in my setup_module is always NULL, resulting in the above error. If I change the NULL value of the data_version column in the DB from anything but NULL, including an empty string, my page loads. I did check into this any further, it should be obvious that this "fix" is not really a fix and I'd like something that doesn't require digging into the db, but maybe that helps answer the question.

So why is data_version NULL and why am I getting the above error?

# 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="Dope_CustomModule" setup_version="1.0.0"/>
</config>

developer mode Running Magento 2.1.0 CE locally


texts:
I have dynamic page on my site and would like to hide an element if another element is active on page. My code below and it is not working for me.

HTML code

        Sample Text

        $5

        <fieldset>

                    *Warehouse Pick-up

                        <textarea id="ordercomment-comment" class="input-text required-entry" name="ordercomment[comment]" title="Order Comment" rows="1" cols="10" style="width:400px" placeholder="Enter Name"></textarea>

        </fieldset>

Javascript code

if($("tr.sample.details").length) $("ul.wpu").hide();

Thank you

Fiddle example


texts: file_get_contents: failed to open stream

texts:
I'm trying to read a txt file with a controller that i've set up.  However, I'm unsure where to place this file and how to call it correctly.  Everything i've tried has resulted in the following error:

  2015-01-21T13:57:02+00:00 ERR (3): Warning:
  file_get_contents(youtube_videos_only_hash.txt): failed to open
  stream: No such file or directory  in
  /opt/magento/app/code/local/namespace/module/controllers/IndexController.php
  on line 9

Any help would be appreciated.

The error in question is related to the filepath:

    $filepath = 'images/youtube_videos_only_hash.txt';
    $hashes2 = file_get_contents($filepath);


texts:
Is there a way to downgrade from Magento 2.1.8 to 2.1.8?

I can use composer to downgrade the files. But what about the database?


texts: CAPTCHA is not showing on registration page

texts:
I have turned on the CAPTCHA for the register page on Magento 1.9 Community Edition.

But the text-box for the CAPTCHA don't show up. When I click register I got an error of 'Incorrect CAPTCHA'


texts: How to log data about the order and its backtrace by saving

texts:
My orders are automatically closed, I want to find the reason.
I wrote a plugin that saves the save order data, but it doesn't work, tell me why
<type name="Magento\Sales\Model\Order">
    <plugin name="red-after-save-order" type="Red\MyPlugins\Plugins\Model\Order" />
</type>

public function afterSave(\Magento\Sales\Model\Order $subject, $result) {
    $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/Order_data.log');
    $logger = new \Zend\Log\Logger();
    $backTrace = \Magento\Framework\Debug::backtrace(true, false, false);

    $logger->addWriter($writer);
    $logger->info(print_r($subject->getIncrementId(), true));
    $logger->info(print_r($subject->getId(), true));
    $logger->info(print_r($backTrace, true));

    return $result;
}


texts:
I need to understand how magento handles vertex tax calculations.
I want to know how does magento send request to vertex and what are the parameters needed.


texts: How to move my store from localhost to motifz.com.pk

texts:
I have completed the development process now I want to move my Magento store files from local-host (local) to (live) www.motifz.com.pk but I don't know what changes should need to made in database and Magento files.

Also could you guide me on what is the best way to add products to the store on local and on live?


texts: Magento 2.3: How to attach a pdf file with new order mail?

texts: I am using magento 2.3.1 I need to send a pdf with new order mail, I have already done that for magento 2.2.6 but that is not working with 2.3. Can any one help me with this?


texts: Magento 1.8 static block in widget not showing?

texts:
I have created simple static block and trying to show it through widget inside Left Column but its not showing. In fact any static block is not working through widget. I have created magento theme in 1.9 with static blocks it was working fine now I'm deploying it to magento 1.8 any reasons ?

I'm attaching it in Left Column,

  cms->widgets creating new instance

  type:cms static block;

  design: customTheme/default (i have also tried with base/default,
  default/default )

  Widget Instance Title:left-block

  Assign to Store Views: All Store Views;

  sort order:1

  Add Layout Update:

  Display On:Non-Anchor Categories

  Block Reference:Left Column

  widget option: Left Block


texts: Magento2 : Show form field if checkbox selected

texts:
Need to display password field if check-box selected in admin form.

Thanks


texts: Sending order email when pragmatically updating an order

texts:
I am building a custom payment gateway for my Magento EE 1.14.0.1 website. My issue is on the payment processing page I need to be able to have Magento send the customer the sales order confirmation email. However my php code does not seem to work meaning it is not sending any email out. Although it is doing everything else I need it to do.

Below is my code

$order = Mage::getModel('sales/order');
$order->loadByIncrementId($orderId);
$order->addStatusHistoryComment("Credit Card approved transaction ID $gatetranid")
    ->setIsVisibleOnFront(false)
    ->setIsCustomerNotified(true);

$order->sendNewOrderEmail();
//$order->setEmailSent(true);
$order->save();
$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice();
$invoice->setRequestedCaptureCase(Mage_Sales_Model_Order_Invoice::CAPTURE_ONLINE);
$invoice->register();
$transactionSave = Mage::getModel('core/resource_transaction')
                                            ->addObject($invoice)
                                            ->addObject($invoice->getOrder());

 $transactionSave->save();
 $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)->save();

  Mage::getSingleton('checkout/session')->unsQuoteId();
  Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/success', array('_secure'=>true));

The above code makes a comment on the order creates an invoice and marks it as paid all which work well. the only part that does not seem to be working is the
$order->sendNewOrderEmail(); code??

Email is working as I put a simple php mail() line of code on the page and it sent me an email. I also changed the ->setIsCustomerNotified(false); to be ->setIsCustomerNotified(true);

however still not able to receive the sales order confirmation email.
Any other suggestions?
I looked at the system and exceptions logs in var/log and that did not show any errors?

However I am thinking the section of code I might have wrong is

   $order = Mage::getModel('sales/order');
   $order->loadByIncrementId($orderId);
   $order->addStatusHistoryComment("Credit Card approved transaction ID $gatetranid")
      ->setIsVisibleOnFront(false)
      ->setIsCustomerNotified(true);
   $order->sendNewOrderEmail();


texts: How to create a scheduler for existing cart price rule in Magento 2?

texts: I would like to create a programmatically scheduler for cart price rule/s and content changes in Magento 2 Enterprise. Can anyone guide me?


texts: Password Requirements Complexity - Magento

texts:
I would like to increase password security for customer and admin accounts in Magento. In addition to minimum password length, contain uppercase, lowercase, special characters, and digits.

I found the JavaScript file that controls the validation. Path:js/prototype/validation.js (Screenshot and code attached)
What is the appropriate code to be added?

 ['validate-password', 'Please enter 8 or more characters. Leading or trailing spaces will be ignored.', function(v) {
            var pass=v.strip(); /*strip leading and trailing spaces*/
            return !(pass.length>0 && pass.length < 8);
        }],
['validate-admin-password', 'Please enter 7 or more characters. Password should contain both numeric and alphabetic characters.', function(v) {
            var pass=v.strip();
            if (0 == pass.length) {
                return true;
            }
            if (!(/[a-z]/i.test(v)) || !(/[0-9]/.test(v))) {
                return false;
            }
            return !(pass.length < 7);
        }],

Thank you in advance for your help.


texts: Magento2 Add block to theme for custom phtml file

texts:
I have a custom phtml file which I am calling on a page, and I would like to display the products from the site in this block. I'm doing a migration from m1 and in the original file the following code was used:

$products = Mage::getModel('catalog/category')->load(4)
        ->getProductCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('status', 1)
        ->addAttributeToFilter('visibility', 4);

I have seen using a block is the best way to go, avoiding object manager, such as the following:

use Magento\Catalog\Model\ProductFactory;
use Magento\Framework\View\Element\Template\Context;

protected $_productFactory;

public function __construct(
   Context $context,
   ProductFactory $productFactory,
   array $data = array()
) {
   $this->_productFactory   = $productFactory;
   parent::__construct($context, $data);
}

public function getProductCollection() {
   $productCollection = $this->_productFactory->create()->getCollection();
   return $productCollection;
}

However I don't know how to add a block to a theme, only an extension/module.

Can you add a block to a theme or do I need to make an extension just to allow products? If it is possible how does the structure for the theme then work?

Update:

(Note just using Vendor as an example) I created a new extension in:

app/code/Vendor/ProductDisplay

I created a new class of ProductDisplay in

app/code/Vendor/ProductDisplay/ProductDisplay.php

I created a new templated in

app/code/Vendor/ProductDisplay/view/frontend/templates/productdisplay.phtml

I'm calling it in my cms page with:

{{block class="Vendor\Productdisplay\Block\ProductDisplay"  template="Vendor_ProductDisplay::productdisplay.phtml"}}


texts:
How can we export group price and tier price in magento 1.9?

Currently I am using profiler to export product price but I didn't get group price in exported csv file. Group price column shows blank for all products in csv.


texts: Magento 404 Error in Frontend and Admin When "Use Web Server Rewrites : YES"

texts:
I am Using Magento 1.9.2.2 to my site.Getting index.php every url in Front end and Admin When trying to Remove index.php using Option "Use Web Server Rewrites : YES" Then in Front Url Structure Getting without index.php but when trying to open without index.php getting 404 Error.

i have downloaded fresh .htaccess from magento and uploaded to my Magento Root Directory But Not Working.Please Help me to Solve it Out


texts: For online payments, how to create invoice for each product separately

texts: I have different vendors for each product in my magento store. When I receive an order, I need to create individual invoices for each product in the order so that the invoice can be sent to that product's vendor. Please help in achieving that. At present, magento auto generates one single invoice for the whole order since payment is online using a third party payment module.


texts: 1.9.2.1 wrong Paypal Pro payment when discount applied

texts:
I just upgrade from 1.8, where this used to work.
Now when a cart discount is applied to an order, Magento 1.9.2.1 shows the right prices, taxes and discount in the order, but it passes different values to Paypal which results in a different payment and an IPN of suspected fraud.

This is a shop with VAT=22%.

The tax configuration:

Order with right amounts but Paypal charges a different amount 76.32€ vs 79.92€ and Magento reports a suspected fraud

and this are the values that were passed by Magento (omitting the non relevant ones):

[url] => https://api-3t.paypal.com/nvp
[BMCreateButton] => Array
    (
        [METHOD] => BMCreateButton
        [BUTTONCODE] => TOKEN
        [BUTTONTYPE] => PAYMENT
        [L_BUTTONVAR0] => subtotal=81.89
        [L_BUTTONVAR1] => tax=14.41
        [L_BUTTONVAR2] => shipping=0.00

        [L_BUTTONVAR7] => discount=19.98

        [VERSION] => 72.0

        [BUTTONSOURCE] => Magento_Cart_Community
    )

Can you please help to fix this?


texts:
I've a mega menu extension which I feel is quite slow. It seems to add about 2 seconds on load time for each page.

As this menu does not change between pages I was wondering how to cache a block? I want it generated just once on the first-page load after a cache flush so that each page can just load the cached block rather than having to repeat for each page on site.

The pages are cached and am not talking about the FPC here as page load is fine when cached but over 15,000 odd pages warming up a cache will save roughly 30,000 seconds if this is not repeated constantly.


texts: How display success message after submit the form particular product catalog?

texts:
I want to create success message after submit the checkout form but i need only particular category product like "made in india" category option in my website.
/var/www/html/app/design/frontend/base/default/template/checkout/success.phhtml

    __('Your order has been received.') ?>

getMessagesBlock()->toHtml() ?>
__('Thank you for your purchase!') ?>

getOrderId()):?>
getCanViewOrder()) :?>
__('Your order # is: %s.', sprintf('%s', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?>

    __('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?>

    __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?>
getCanViewOrder() && $this->getCanPrintOrder()) :?>

        __('Click here to print a copy of your order confirmation.', $this->getPrintUrl()) ?>
        getChildHtml() ?>

getAgreementRefId()): ?>
    __('Your billing agreement # is: %s.', sprintf('%s', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?>

getRecurringProfiles()):?>
__('Your recurring payment profiles:'); ?>

getCanViewProfiles() ? sprintf('%s', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
    __('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?>

    quoteEscape($this->__('Continue Shopping')) ?>" onclick="window.location='getUrl() ?>'">__('Continue Shopping') ?>

This is my code but one want to update this code. When customer preaches "made in india" category product then we want after submit checkout form success message will be ("Time check 16:01 PM to next day 15:59 PM. The product will be delivered next day. User can check this by entering the pincode in the text box. For e.g., I ordered one product at 23:31 PM on 21th August 2016, then user should be notified "Purchase now to get the parcel tomorrow. To check your eligibility please enter your pin code in the text box".") But only particular this category other category product some success message as my code already

Please help me....


texts: Magento 2: How to remove decimal points from the price

texts:
I need to remove the two decimals from product prices on the frontend. For example, if the price is $49.00 it should be displayed as $49.

Since my products have no floating points it is ok to remove decimals in my case. On the product page, it seems like the price is loaded using JavaScript, so it is hard to do it by changing price/amount/default.phtml. Can someone suggest a proper method?


texts:
I need to confirm either my is validated or not.My form is

 <form action="<?php echo Mage::getUrl('abc_checkout/cart/placeorder'); ?>" method="post" id="confirm_order_form" class="info-static" onsubmit="return submitOrder();">


texts: Any freely available Magento 2 theme's that demonstrate current best practices?

texts:
Any freely available Magento 2 theme's that demonstrate the 2.3 best practices?

https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/theme-best-practice.html

Ideally a theme that modifies the header, footer, and navigation, but even one of those done properly might help.

Just to clarify, that means a theme that inherits from blank.


texts: Programatically add a new bundled item to an existing bundled product?

texts:
I have a bundled product that I would like to add a new bundled item into a specific selection, so I tried the following:
// Load existing bundled product
$productCheck = Mage::getModel('catalog/product')->load($bundled_product_id);

// Get option data
$options = $productCheck->getTypeInstance(true)->getOptionsCollection($productCheck);

// Set selection data
foreach ($options as $option) {
    if ($option->getTitle() == $data['bundled_title']) {
        $selection = new Mage_Bundle_Model_Selection();
        $selection->addData(array(
            'entity_id' => $productCheck->getId(),
            'product_id' => $new_bundled_item_id,
            'selection_qty' => 1,
            'selection_can_change_qty' => 0,
            'position' => 0,
            'is_default' => 1,
            'selection_id' => '',
            'selection_price_type' => 0,
            'selection_price_value' => 0.0,
            'option_id' => $option->getId(),
            'delete' => ''
        ));
        $option->setStoreId($data['store_id']);
        $option->addSelection($selection);
        $option->save();
        $selection->save();
    }
}
$productCheck->save();

This does not apear to be throwing an error, at the same time, nothing seems to be changing with the bundled product. The new item is not getting added.
Any ideas? I have already checked; $new_bundled_item_id is correct and the option title does match.

Edit
I tried to solve it like this: http://pastebin.com/hQbxQHak - when the code runs, it appears to be creating a new empty option but my 2nd selection does appear to be added. it looks like this:

This is not quite right, but if I re-ran the script again, this is what happens:

I am not sure what's happening, can anyone see anything wrong with my code? Or am I doing this completely wrong?


texts: Magento 1.9.2 - store view in multiple domain

texts:
I have a unique website with two store views for two languages (Italian and English). For store view of the first language I would like to keep it in the address www.mysite.it while the second one I want to call it from external domain with the address www.mysite.com.

My question is: To recall the second store view from the external domain (www.mysite.com), is it sufficient to modify the index.php file in the root of the site or do we also need to modify the .htaccess file?

Thanks


texts: How to add Details field for Custom option in magento admin?

texts: For the custom options of simple prodcusts i have to add one text field for value of color. How to add it.


texts:
I need to show labels(BACK ON STOCK) on product when they back to stock,
for this I have added a observer

    <global>
       <events>
       <catalog_product_save_commit_after>
         <observers>
           <Name_StockLabel_Model_Observer>
             <type>singleton</type>
             <class>Name_StockLabel_Model_Observer</class>
             <method>backInStock</method>
            </Name_StockLabel_Model_Observer>
         </observers>
       </catalog_product_save_commit_after>
     </events>
   </global>

and in observer am adding trying to add block

 public function backInStock(Varien_Event_Observer $observer)
    {
        $product = $observer->getEvent()->getProduct();
        $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId());
        $stockItem = $product->getStockItem();
        if ($stockItem->getCanBackInStock() && $stockItem->getQty() > $stockItem->getMinQty() && $stockItem->getIsInStock()){

            WANT TO ADD BLOCK HERE THAT WILL DISPLAY ON PRODUCT IN FRONTEND

        }
  }

Can anyone here advise me how can I add I block here


texts: How to add phtml file content after the form content in backend

texts: I have added form in the backend. At the end of the form I need to include a phtml content using it's block. How can we include phtml file after the form content?


texts: Get customer account data in shipment PDF

texts:
In the Invoice PDF I can get (logged in) customer account data with the following code:

$customer_email = $order->getCustomerEmail();
$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->loadByEmail($customer_email);

If I try to use this code in the shipment PDF (Mage/Sales/Model/Order/Pdf/Shipment.pdf), the customer data remains empty.

Given the customer email in $order, how can I get the account data in the shipment PDF?


texts:
Anybody have a very simple sample(with minimum code) of magento's admin module with form, that can add/edit/delete some stuff?

Cause i have some problems while using existing code, included in engine or from int's solutions.


texts: Get custom HTML variable from email template

texts:
I had this issue:

I have created a custom mail where I send a list of products.
For this in my controller i concatenated a variable like this:

foreach (.....){
    $orderItems .= "

" . $productSku . "

" .  $differanceQty . "

";
}

When I tried to send this variable from my controller to the email template in my email I received the HTML code instead of only the value.
So my custom email doesn't interpret my variable in the right way.

So I started looking for an answer and I didn't find anything related to this issue so that's why I posted this, maybe this will help someone.

the solution is to use the variable like this in the mail :

{{var order}} insead of  {{htmlescape var=$order}}


texts: Is there a way to add customer Grid in product edit page?

texts:
I m trying to add customer grid to magento admin product detail page.but it didn't display.I had googed and try but i can't find any resource for the same.Please some one can help to achieve this.

It would be great if someone can help on this topic.


texts: How can I do license key with Magento 2 extension?

texts:
I want to know how can I use the license key for the magento 2 extension, like Its only used on the one domain, If customer can not copy that if they want to use in another site they have to buy the license key or purchase it.

Can you please know how I can do that

Thanks


texts: Setting Customer number equal to Mobile number at registration

texts:
I'm redoing an existing shop in Magento, the client is requesting that when customers register, their customer number gets set to their mobile number (which is required, and asked for at registration). Now I personally don't think this is good practice, but it's something they're set on having. I'm looking into a proper way to do this. I am not quite sure what to override or where to start, as I've never altered registration before.

Is this possible? And if so, could you help point me in the right direction on how to accomplish this.


texts: Ups shipping rate variation in magento website and UPS website calculation

texts:
I have configured the UPS shipping method in magento with correct details.
During checkout, the UPS shipping rates are displayed.
But when I compared those shipping rates(Which displayed during checkout) with the UPS site(Calculate Time and Cost) Shipping rate. It varies.

It has been configured correctly. But dont know what makes the variation.


texts:
while submit the review its getting "We can't post your review right now"  instead of "You submitted your review for moderation".Why it is showing .

Is it backend setting?


texts: Magento 2: How to pass "form data" Rest API in create product postman

texts:
I have created product api and passed form-data in postman but i have faced issue in pass category_ids and image.
Any have idea how to pass category_ids and image in postman while creating product API.
API: {baseurl}/rest/V1/products
Method: POST
Body:
form-data
product[sku]:lenova
product[name]:lenova
product[attribute_set_id]:4
product[price]:300
product[status]:1
product[custom_attributes][age]:232
product[custom_attributes][description]:Lorem Ipsum is simply dummy text of the printing and typesetting industry.
product[custom_attributes][category_ids]:["41","42","43"]
product[custom_attributes][image]:test.jpg

Error:

"message": "Error occurred during "custom_attributes" processing.
Attribute "category_ids" has invalid value. The "string" value's
type is invalid. The "int[]" type was expected. Verify and try
again."

Any help would be appreciated.


texts: Magento 2 - Exclude block from fpc without ajax

texts:
I want to insert custom block on PDP.

I can use cacheable="false" for this block or mark it as _isScopePrivate". But in the first solutions the whole page will not be cached.

Drawback of the second solutions is this block will be downloaded via ajax. But it's noticeable on the page. I can see first the old content then new one loaded.

Can I exclude block from fpc without ajax? Something like magento 1 implements?


texts: I setup my html theme into magento 2.1.0, Css and Js file not loading

texts:
I am very new to Magento 2.1.0. but want to install HTML theme (theme integration). When I deploy static content and also in pub folder I can see my .css file under css/source folder.

My theme Structure: <VendorName>/<themeName>/web/css/source.

and after that include my CSS and JS files into the Magento_Theme/layout/default_head_blocks.xml file. Below is my code:

**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 charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <css src="css/source/bootstrap.min.css" />
        <css src="css/source/font-awesome.min.css"/>
        <css src="css/source/slick.css"/>
        <css src="css/source/style.css"/>

        <script src="js/bootstrap.min.js"></script>
        <script src="js/jquery.min.js"></script>
        <script src="js/scripts.js"></script>
        <script src="js/slick.min.js"></script>

    </head>
</page>

I flush the cache, deploy the static content but when I see view source in the browser I am not able to my CSS and js file.

So can anyone help me?

Magento ver:2.1.0

Any kind of help will appreciative.


texts:
We are trying to create our product with a clean version of Magento. But we need to transfer our database. Based on our research we have a couple of choices.

Transfer important tables as Mysql dump.
Transfer with pre-made modules
Transfer the whole database and then clean data in the new version.

Anyone who has the similar experience, please consult me to a best practice


texts: Magento 2 not minifying JS, CSS or HTML in Production Mode

texts:
I am running a magento 2.2.5 CE in production mode with two storefronts setup.

The settings in admin are as follows:

Minify Html: Yes
Merge JavaScript Files: Yes
Enable JavaScript Bundling: Yes
Minify JavaScript Files: Yes
Merge CSS Files: Yes
Minify CSS Files: Yes

Nothing is being minified, not the CSS, JS or HTML.
The JS and CSS are atleast bundled into a single merged file, but with no minification.

All caches have been cleared and static files deployed probably a 1000 times since we've set the minification to true.

I've tried setting everything VIA CLI also and we are running in production so everything should be minified, but is not.

Please let me know if there's anything else I can try to get the default magento 2 minification to work.


texts: Magento 1.9.2.2 {{store url}} link not working

texts:
I'm trying to insert a link to the My Account page into a static block. I'm using the following format:

My account

While in previous versions of Magento this works fine, as of 1.9.2.2 this doesn't work anymore.

After checking the release notes I have added the static block ('cms/block') in System > Permissions > Blocks. I have also added every combination of 'store', 'url' and 'store/url' in System > Permissions > Blocks.

I have searched extensively to try and find a solution, but I'm probably using the wrong keywords (luckily the 'store' keyword isn't very common in combination with 'Magento'...). What do I have to do to make links work in static blocks in Magento 1.9.2.2?


texts: I got hacked - Magento 1.7.0.1 problem when applying patch

texts:
I have a store running magento 1.7.0.1 and I got hacked. Someone accessed the admin page - and added a paypal account, probably using an XSS vulnerability. I applied the patches SUPEE-1533, SUPEE-5344, SUPEE-5994, SUPEE-6285 and SUPEE-6482 with no problems (I think), but when I try to install SUPEE-6788 and SUPEE-7405 all the products disappear from the front page. (I have a backup)

I don't have SSH access and for that reason I followed this tutorial.

I was wondering, what patches to install for magento 1.7.0.1 in order to solve the vulnerabilities?


texts: magento admin prepare custom filter string for product grid

texts:
I am trying to add category filter in my admin product grid.
which i have added successfully but i am facing problem while pagination, for that i need to implement custom filter string for product grid, please provide some clue for preparing custom filter string. I have even tried below to set Default filter

$cat_ids = array(17,18);

$this->setDefaultFilter(array('category_id' => $cat_ids));


texts:
Replace App And Pub Folder of Theme In Magento2.
After that Run Following Command :

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento cache:clean

After that Using Admin Panel-> CONTENT -> Configuration Select new default theme. But in front NOt Display.

display only "CMS homepage content goes here."


texts:
I face with problem that Magento's Catalog rules daily update doesn't work. This means that there are no products price changes when catalog rule's expire date comes, so I have to press rule apply button in Admin.
Cron is configured and working. It seems that catalogrule/observer::dailyCatalogUpdate method should check and apply rules automatically every day, but it doesn't (also I've tried to launch it manually).
Here is Magento core code:

<!--file: app/code/core/Mage/CatalogRule/etc/config.xml-->
<crontab>
    <jobs>
        <catalogrule_apply_all>
            <schedule>
                <cron_expr>*/1 * * * *</cron_expr>
            </schedule>
            <run>
                <model>catalogrule/observer::dailyCatalogUpdate</model>
            </run>
        </catalogrule_apply_all>
    </jobs>
    ...
</crontab>

Observer:

/*file app/code/core/Mage/CatalogRule/Model/Observer.php*/
public function dailyCatalogUpdate($observer)
{
    Mage::getResourceSingleton('catalogrule/rule')->applyAllRulesForDateRange();

    return $this;
}

I had a success modifying observer method as below:

/*file app/code/core/Mage/CatalogRule/Model/Observer.php*/
public function dailyCatalogUpdate($observer)
{
    Mage::getModel('catalogrule/rule')->getResourceCollection()
                  ->walk(array(
                         Mage::getResourceSingleton('catalogrule/rule'),
                         'updateRuleProductData'
                  ));
    Mage::getResourceSingleton('catalogrule/rule')->applyAllRulesForDateRange();

    return $this;
}

This way rules are checked and applied every day and products prices are being changed if rule expire.
I don't believe that it is a bug of Magento. Please, advise  what is the problem that rules are not being checked and applied automatically?


texts: Adding a block to CMS page is not working

texts:
I am trying to add a new block to the CMS home page. Only this particular block I need to do it in the content tab, and not the layout tab( which works).

So in the content tab I have(Does not work):

{{block type="dailydeal/list" name="product_list_deals" template="dailydeal/slider.phtml" }}

But if I do it in the layout tab(Works fine):

<reference name="content">
            <block type="dailydeal/list" name="product_list" after="home_slider_cruisercorps" template="dailydeal/slider.phtml" />
</reference>

I am not sure what is missing in the content tab, causing the block not to be loaded.

Using magento version 1.9.2.4


texts: Magento 2.x: add column to sales order history page (FO)

texts:
What are methods for add a column to sales_order_history page? without edite  view/frontend/templates/order/history.phtml

can help me please ?


texts: Only display products with images in related products block

texts:
The following code is from the related.phtml file and I believe this is what needs to be modified to filter out products without images:

<?php if(!$_item->isComposite() && $_item->isSaleable()): ?>

How do I extend the above code to show products with images only in the related products block?


texts:
I'm having an issue with Magento 1.9.2.4 trying to  make a join on my collection, here's the problem:

Actually I've got a custom table named product_banner which I'm getting by:

$collection = Mage::getModel('mymodule_productbanner/productbanner')->getCollection();

But I need to join this table with catalog_category_entity_varchar, I've tried solution:

    $catalogTable = Mage::getSingleton('core/resource')->getTableName('catalog/category');

    $collection = Mage::getModel('exablack_productbanner/productbanner')->getCollection()->getSelect()->join(array('category' => $catalogTable),
        'main_table.category_id = category.entity_id AND category.attribute_id = 41');

But for no avail...
The pure sql query I need to run to get my desired result would be:

    select catalog_category_entity_varchar.value, product_banner.banner_url,
    product_banner.text from product_banner inner join catalog_category_entity_varchar
    on product_banner.category_id = catalog_category_entity_varchar.entity_id and
    catalog_category_entity_varchar.attribute_id = 41;

How can I achieve this with magento collections?


texts: Not able to edit search engine robots from admin

texts:
I am trying to edit search engine robots from content and theme configuration but no option to edit.

I am trying to enable the same section for my theme.

I am using v2.2.6

Is there any backend setting from the configuration that I am missing?

Please guide on this...  I am trying to edit under theme Magenest cf


texts:
When I override the Mage_Catalog_Model_Layer I get this error:

Mage registry key "_singleton/catalog/layer" already exists

How to debug this?


texts: How to show default payment method as checked at checkout page in Magento 2

texts:
When customer go to checkout page default payment method should be shown checked which is Paypal.

What is the possible way to do this. Please help guys


texts: How can I generate an Admin grid programmatically in Magento 2

texts:
I can add a form to an Admin page using the code below in a Block:

$form = $this->formFactory->create();
    $this->setForm($form);
    $item = $this->registry->registry('current_item');

    $fieldset = $form->addFieldset('score_fieldset', ['legend' => __('Stuff')]);
    if ($item->getId()) {
        $fieldset->addField('item_id', 'hidden', [
            'name' => 'item_id',
            'value' => $item->getId(),
        ]);
    }
    $fieldset->addField('entries_num', 'text', [
        'label' => __('Number of Entries'),
        'name' => 'entries_num',
        'value' => $item->getEntriesNum(),

    ]);
    $fieldset->addField('score', 'text', [
        'label' => __('Score'),
        'name' => 'score',
        'value' => round($item->getScore(), 1),

    ]);

    return parent::_prepareForm();
}

However, I would like to add the form as an editable grid of all the scores/entries. Is this possible?


texts:
I want to to extend the core model class Mage_Sales_Model_Quote_Item located in Mage/Sales/Model/Quote/Item.php I created this directory local/Lemerge/Sales/Model/Quote/Item.php

And I created the config.xml file in local/Lemerge/Sales/etc folder

<?xml version="1.0"?>
<config>
<modules>
    <Lemerge_Sales>
        <version>1.0.1</version>
    </Lemerge_Sales>
</modules>
<global>
   <models>
    <sales>
      <rewrite>
        <quote_item>Lemerge_Sales_Model_Quote_Item</quote_item>
      </rewrite>
    </sales>
   </models>
</global>
</config>

In app/etc/modules I created Lemerge_Sales.xml I don't know even if it necessary

<?xml version="1.0"?>
<config>
<modules>
    <Lemerge_Sales>
        <active>true</active>
        <codepool>local</codepool>
    </Lemerge_Sales>
</modules>
</config>

Then I override the setProudct() in Item.php

<?php
class Lemerge_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item
{
   public function setProduct($product)
   {
     //code
   }
}

But it does not work magento is using the core file instead of the overrided file


texts:
We are displaying Products in My account section . now we are trying to delete the product once we click on "Delete" button.

I used 2 ways to find solution :

1st way : After using below code, once i  click on "Delete" button, all products are deleting instead of one product :

<?php $collections = $this->getCollection(); ?>
       <?php $_product = $this->getProduct(); ?>

        <?php foreach ($collections as $key => $product)
        {
        echo $product->getName().'
';
        $_product = Mage::getModel('catalog/product')->load($product->getId());

        ?>

    <form
    action="<?php
    Mage::register('isSecureArea', true);
    $_product = Mage::getModel('catalog/product')->load($product->getId());
    try
     {
    $product->delete();
    Mage::unregister('isSecureArea');
    }
    catch(Exception $e) { }

    ?>" method="post">

    <button type="submit">Delete</button>

    </form>

   <?php
        }
    ?>

update

2nd way : using controller to delete product , now onclick button, its redirect to url : sitename.com/example/amasty/deleteproduct?itemId= but not deleting product.

public function deleteproductAction()
    {

        $itemId = $this->getRequest()->getParam('itemId');
        if($itemId)
        {
            Mage::helper('checkout/cart')->getCart()->removeItem($itemId)->save();
           $this->_redirectReferer();
        }

    }

html

<?php $_product = Mage::getModel('catalog/product')->load($product->getId());
 ?>
<a href="#" onclick="return deleteItem('<?php $_product; ?>');">Delete

script

function deleteItem(itemId) {
        if(confirm('Are you sure you want to delete this item?')) {
           window.location = '<?php echo $this->getUrl();?>example/amasty/deleteproduct?itemId=' + itemId;
        }
        return false;
    }


texts: customer quote get inactive automatically in magento 2

texts:
i am using magento 2.3.4 and my quote is getting inactive automatically after some time.
in
Stores > Configuration > Sales > Checkout > Shopping Cart
Quote Lifetime set as 30 days. but quote get inactive before 30 days only.
what are all the scenario to make it inactive?


texts: Redirect to correct store view by customer browser language

texts:
I've added this code to the index.php:

$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
switch ($lang) {
    case "it":
        session_start();
        $_SESSION['first'] = "si";
        $params = $_SERVER;
        $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
        = 'italian';
        $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE]
        = 'store';
        $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
        $app = $bootstrap->createApplication('Magento\Framework\App\Http');
        $bootstrap->run($app);
        break;
    default:
        $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
        $app = $bootstrap->createApplication('Magento\Framework\App\Http');
        $bootstrap->run($app);
    break;
}

This code detects and redirects properly but whenever I try to switch
to English storeview it redirects back to Italian. So, I need
something that redirects only on first time page loading.

I've tried to use sessions with object manager but it gives the following error:

  Object manager not initialized


texts: CMS WYSIWYG editor When I try to upload an image via WYSIWYG editor it automatically logs out from the admin panel

texts: CMS page WYSIWYG editor. When I try to upload an image via WYSIWYG editor, it automatically logs out from the admin panel


texts:
I have tax rules for 1 US state in my Magento store configured. If shipping goes within our state, then the tax will be applied, for all other states the tax will not be applied.

The problem is when I add a product to the cart as a guest, it displays and includes the tax by default.

When I select a state other than our state and click on Get a Quote in Estimate Shipping & Tax section, only then it removes the tax details from the cart.

This is a huge problem and misconception, because many potential customers get the idea that they will be charged sales tax even though they live in another state and would usually not be charged any tax.

That causes probably 50% of all potential customers to go shop somewhere else where they don't get to see the tax before they even entered their shipping address.

I see tons of potential customers with full carts leaving right on the cart page.

I need by default, that there will be no tax displayed and included in the grand total of the cart page. Only when a customer selects our state and clicks on Get a Quote it should display the tax details on cart total.

If this is not possible, then the tax and grand total needs to be removed from the cart page.

In the admin, I have Include Tax In Grand Total, Display Full Tax Summary, Display Zero Tax Subtotal, etc all set to No.

I read somewhere that this is a long standing design flaw / bug. Was this ever fixed? Or is this an issue caused by my theme? How can I finally fix this major issue?

Theme is a very well known and free package: Pagayo Theme Electronics Online.


texts: How to test a Magento SOAP API call using Postman

texts: Does anyone have a step by step tutorial on how to post and test a soap v1 api call using Postman?


texts:
I have a php code for creating a product feed XML, including all the additional attributes of the products. It worked fine until I upgraded from 1.9.3.1 to 1.9.3.4.

After the upgrade my script gives this error:

PHP Fatal error:  Call to a member function getAttributes() on null in /www/new/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php on line 58.

My codepart which takes care of extracting the additional attributes:

        $_helper = Mage::helper('catalog/output');
        $add = new Mage_Catalog_Block_Product_View_Attributes();
        $add->setProduct($productId);
        $_additional = $add->getAdditionalData();

        $_product = Mage::getModel('catalog/product');
        $_product->setStoreId($storeId);
        $_product->load($productId);

        foreach ($_additional as $_data):

        $_attribute = $_product->getResource()->getAttribute($_data['code']);
            if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) !='') && (!is_null($_data['label'])) && (!is_null($_data['value'])))
        {
        $produs->appendChild($xml->createElement(str_replace(" ","_", preg_replace("/[^A-Za-z0-9_ ]/", "",$_data['label'])), str_replace($replace_from, $replace_to, strip_tags($_helper->productAttribute($_product, $_data['value'], $_data['code'])))));
        }
        endforeach;

What has changed between the two versions and what should I modify in my code to make it work again?


texts: Magento 2 dynamically add image to email template

texts:
I am creating a custom module, In my requirement, I've to add a custom image a, the image available under the Namespace/Moduelname/view/frontent/web/images/image.jpg.

The below code I've added image, the config variable goes to the email template.

$config['image'] = $this->assetRepo->getUrl("Magesen_ReviewReminder::images/reminder.jpg");

In .HTML file I am binding the value as follows.

<img width="600" src="{{view url='{{trans "%image" image=$image}}'}}" alt="Review Reminder"/>

But unfortunately, I am unable to see the image in email, for your further reference I've attached the email images(Review Reminder image is not showing).

What is the right way to show the image to an email template?


texts: Magento 2 using postfix relay to Ofiice365 recipient issue

texts:
I am unsure if this post belongs here or on Server Fault as I cannot say for sure if this is a Magento 2 issue or a Postfix issue.

Environment
Magento 2.1.2
Postfix 2.11.0
Ubuntu 14.04.5 LTS Trusty Tahr

First to skip the obvious questions:
Magento 2 configuration checks:

Stores --> Configuration --> Sales --> Sales Emails --> All are enabled (Not that it matters as I am clicking on the send button of an existing order)
Stores --> Configuration --> Advanced --> System --> Mail Sending Settings --> Disable Email Communications = No

To ensure that Magento is providing the correct details I added some logging statements into {magento_root}/vendor/magento/framework/Mail/Transport.php
to spit out the contents of \Magento\Framework\Mail\MessageInterface $message and confirmed that the "To" value in the headers, the "to" and the "recipient" address were all correct.

Postfix settings:
main.cf

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = localhost.mydomain.co.uk, , localhost
myhostname = mydomain.co.uk
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.office365.com]:587
sender_canonical_maps = regexp:/etc/postfix/sender_canonical

# SMTP
smtp_always_send_ehlo = yes
smtp_generic_maps = hash:/etc/postfix/generic
smtp_send_dummy_mail_auth = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_password_map
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes

# TLS
smtp_tls_cert_file = /opt/bitnami/apache2/conf/www_mydomain_co_uk.pem
smtp_tls_key_file = /opt/bitnami/apache2/conf/www_mydomain_co_uk.key
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_tls_cert_file = /opt/bitnami/apache2/conf/www_mydomain_co_uk.pem
smtpd_tls_key_file = /opt/bitnami/apache2/conf/www_mydomain_co_uk.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

generic

root@localdomain customerservices@mydomain.co.uk
@localdomain customerservices@mydomain.co.uk

sender_canonical

/.+/ customerservices@mydomain.co.uk

smpt_sasl_password_map

[smtp.office365.com]:587        customerservices@mydomain.co.uk:somepassword

tls_policy

smtp.office365.com      encrypt

Now the output I'm seeing in /var/log/mail.log is:

May 10 16:23:01 mydomain postfix/pickup[11549]: 4D66124427: uid=1000 from=<bitnami>
May 10 16:23:01 mydomain postfix/cleanup[11580]: 4D66124427: message-id=<xxxxxxxxxxxxxx.xxxxxxxxxx@mydomain.co.uk>
May 10 16:23:01 mydomain postfix/qmgr[11550]: 4D66124427: from=<customerservices@mydomain.co.uk>, size=682, nrcpt=1 (queue active)
May 10 16:23:05 mydomain postfix/smtp[11582]: 4D66124427: to=<adminuser@mydomain.co.uk>, orig_to=<adminuser>, relay=smtp.office365.com[40.101.72.226]:587, delay=4.6, delays=0.02/0/4.2/0.37, dsn=2.6.0, status=sent (250 2.6.0 <20170510162301.$
May 10 16:23:05 mydomain postfix/qmgr[11550]: 4D66124427: removed

The to= is the admin username appended to the domain name and not the customers email in Magento.

The reason I am not sure if this is a Magento or Postfix issue is because sending a test email with:

echo "Test Message" | mail -s "Test Subject" someone@someemail.com

works fine!

Anyone have any ideas?


texts: Magento 2 override Third party module installed with Composer

texts:
I have installed the WebShopApps module with composer hence it is installed in the Vendor folder. Now I want to override model in my custom theme. As we know we can't directly modify in vendor folder since changes will be gone once when we upgrade module.

Please let us know how to override the Model folder.

The file path is that want to override in my theme is

  vendor/webshopapps/module-matrixrate/src/Model/Carrier/Matrixrate.php

Please help me.


texts:
When I go to catalog->google sitemap and Add Sitemap. The sitemap is generated succesfully.

But when I want to generate the same sitemap again it is not overriden. Or if I generate new sitemap with the same name its not updating sitemap. File is not updated. It is as it is created first time.

I think there is an override problem. Do you have any solution for this problem?

Magento V1.9


texts: Magento : How to apply Percentage in Final Price with Custom options?

texts:
We can easily create custom options and add price on product price accordingly custom options.

now, i have one challenge how we can apply percentage price on final price.. default magento can apply on product price (base price).

here, Product price = 10, i have created 2 custom options Test and Other.

While we are select Other Option with Value one it will apply on Product price + Test custom options Price (if selected)

If any one know than please let us know


texts: Magmi Special charactars not allowing to upload

texts:
I am facing an issue when uploading Products with Magmi only when excel sheet contains  special charactars so, I followed link & tried saving with `Libre Office Calc with UTF-8', but that didn't work for me.

Or is I need to change in Database to accept utf8mb4 instead of UTF-8 to accept special characters as mentioned in link....


texts: Magento1.9 : How to remove cart tabs from customer view tab in admin panel

texts:
I want to remove Carts tab coming in Customer View tab in magento admin panel for Manage Customer with a custom condition. As shown in below figure :

Which block or template file should I override for this?

EDIT - I want to remove this when a certain condition match, I have created a module for User role if the condition meet only then want to remove these tabs.


texts: Magento changing A4 pdf invoice to foldable a6 showing address in 1 corner quarter of the paper

texts:
How can I: Change the A4 pdf invoice to foldable a6 showing address in 1 corner quadrant of the paper. Is there an extension that can do this?

Hi, it took some time thinking of a good title. I will try to explain

Current method
Now we print the default Magento invoice on A4 paper. Top left address, company info on the right. Then a table with products.

New method
What we would like is using one quarter of the A4 (A6 size) to print the address and showing all the other order details below the middle fold. This way when we fold the A4: the address is shown in the top left corner.

Why?
Currently we print an invoice. We use it for order picking. Then we take a pen and write the address on a sticker (faster than dymo). The disadvantages of this process adre:

Writing or printing the address costs extra time
Writing or printing the address can cause typing mistakes
Sometimes stickers and orders are mismatched (wrong address on order pick)
We believe in LEAN operation: information transfer and split processed cause mistakes (and this does sometimes happen)

Below I have added an example

CONCEPT

BEFORE

AFTER - SOMETHING LIKE THIS


texts: In Magento 2, can I reduce the logging for my production site?


texts: When i am adding products to cart from website they are not shown in web application

texts:
In Magento2 When I'm adding products in cart from website they are not shown in web application. I'm using magento rest API in react-native application.

How to resolve this issue.


texts: How to customize admin sales order grid collection?

texts:
I have to add a custom where clause to the query that retrieve data to fill sales order in the relative admin grid.
I know that it is defined here \vendor\magento\module-sales\etc\di.xml as virtualType

<virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
    <arguments>
        <argument name="mainTable" xsi:type="string">sales_order_grid</argument>
        <argument name="resourceModel" xsi:type="string">Magento\Sales\Model\ResourceModel\Order</argument>
    </arguments>
</virtualType>

and \vendor\magento\framework\View\Element\UiComponent\DataProvider\DataProvider.php is used to retrieve data, but where and how could i use _initSelect() or _renderFiltersBefore() discussed here How to join order grid collection to custom table in Magento2? to change query?

In magento 1 i did it with the filter_condition_callback option for addColumn() in customized grid file.


texts: How to setup "Cancel Order" option to a customer in customer's My Account section?

texts:
I want to allow customers to cancel their pending orders in "My Account" section.
I tried this tutorial, but it doesn't show 'cancel order' link in customer "My Orders" page.
How can I do this in Magento ?
Any assistance will be helpful.


texts:
So I have fixed my form key validation issues but my admin is still showing an error message.

Important: Formkey validation on checkout disabled. This may expose security risks. We strongly recommend to Enable Form Key Validation On Checkout in Admin / Security Section, for protect your own checkout process.

Does anyone know how i can get rid of this error? What file is this text on?


texts: Magento2 Configurable showing add ot cart button when product is set out of stock

texts:
For configurable product - when I set option Out Of stock to main
product it is showing that's fine.
But also add to cart button showing is not expected as it is out of
stock now.
When I try to add to cart item. I'm showing message product is out of
stock.
Button should not display when main product is set to out of stock


texts: Magento 2.3 EE Bulk Asynchronous API Operations using RabbitMQ

texts:
We are currently testing the Bulk Asynchronous API Operations in Magento 2.3 EE (clean installation) with RabbitMQ.  The issue we are finding is whilst creating configurable and simple products.  It appears something is being cached preventing the different payloads from being successfully received by Magento.
The payloads in question are:

rest/async/bulk/V1/products (used to create the simple and configurable products)
rest/async/bulk/V1/configurable-products/bySku/options (used to create the configurable product options)
rest/async/bulk/V1/configurable-products/bySku/child (used to link the child SKU to the parent)

The issues we are seeing are as follows:
If a payload hasn't been received for a few minutes the 1st item in the array never gets processed. The bulk status endpoint (rest/V1/bulk/:bulkuuid/detailed-status) shows a status of 4 (pending).  Submitting the payload again processes the missed item.
Creating the configurable options (rest/async/bulk/V1/configurable-products/bySku/options) returns "An error occurred while saving the option. Please try to save again".
The only way we can get this to work is if we force a close on the connection in RabbitMQ (via the Management Plugin) in between each payload.  Everything then completes successfully. e.g.

Close the connection in RabbitMQ (wait for the connection to come alive again)
Send the create products payload (rest/async/bulk/V1/products) - All items processed successfully
Close the connection in RabbitMQ (wait for the connection to come alive again)
Send the create configurable product options payload (rest/async/bulk/V1/configurable-products/bySku/options)
Close the connection in RabbitMQ (wait for the connection to come alive again)
Send the link child to parent payload (rest/async/bulk/V1/configurable-products/bySku/child)

We are struggling to understand whether this is a configuration issue in RabbitMQ, Magento or a bug with the bulk API framework.
As mentioned this is a clean installation of Magento 2.3 EE

RabbitMQ version = 3.7.9
Erlang version = 21.2.4

Any suggestions?


texts: Add System Configuration To Existing Tab

texts:
I have been following another excellent article by Mr Storm: http://alanstorm.com/custom_magento_system_configuration

However, I've hit a snag. In the admin system config, I have an existing tab that is part of a local module I created.

The tab is created with the following code (app/code/local/Jongosi/Adminhtml/etc/system.xml):

<config>
    <tabs>
        <jongosi module="adminhtml">
            Jongosi
            <sort_order>999</sort_order>
        </jongosi>
    </tabs>
</config>

In subsequent modules that I create locally, I would like to add items to the existing (jongosi) tab.

I'm using the following code (app/code/local/Jongosi/Module/etc/system.xml):

<config>
    <sections>
        <jongosi_module_options translate="label" module="jongosi_module">
            Jongosi Module Options
            <tab>jongosi</tab>
            <frontend_type>text</frontend_type>
            <sort_order>1000</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <module translate="label">
                    Module Options
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <brands translate="label">
                            Brands Enabled
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <comment>Enable or disable brands.</comment>
                        </brands>
                    </fields>
                </module>
            </groups>
        </jongosi_module_options>
    </sections>
</config>

The tab shows up fine with the items listed one below another, but clicking the links ends in a 404. I have cleared the cache many times (rm -rf var/cache/*) , re-indexed and logged out and in again.

My ACL code looks as follows (app/code/local/Jongosi/Module/etc/adminhtml.xml):

<config>
    <adminhtml>
        <acl>
            <resources>
                <admin>
                    <children>
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <jongosi_module_options>
                                            <title>Jongosi Module</title>
                                        </jongosi_module_options>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>
</config>

How can I get this to work? Thanks!


texts: On addition of new products , Payment page is not working magento 1.9

texts:
My Magento store was working perfectly until I added a few new products recently. On addition of new products, the payment stopped functioning properly. I have CCaveneue payment gateway although payments are successful post-checkout when the page redirects back to show a successful payment received i get a 500 internal server error.
I switched on developer mode to understand the error
The error received was
Fatal error: Uncaught Error: Call to a member function getMethodInstance() on boolean in
/var/www/magento/app/code/core/Mage/Payment/Model/Observer.php:46 Stack trace: #0
/var/www/magento/app/code/core/Mage/Core/Model/App.php(1358): Mage_Payment_Model_Observer-
salesOrderBeforeSave(Object(Varien_Event_Observer)) #1
/var/www/magento/app/code/core/Mage/Core/Model/App.php(1337):
Mage_Core_Model_App->_callObserverMethod(Object(Mage_Payment_Model_Observer), 'salesOrderBefor...',
Object(Varien_Event_Observer)) #2 /var/www/magento/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('sales_order_sav...', Array) #3
/var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(391):
Mage::dispatchEvent('sales_order_sav...', Array) #4
/var/www/magento/app/code/core/Mage/Sales/Model/Order.php(2117): Mage_Core_Model_Abstract->_beforeSave()
#5 /var/www/magento/app/code/core/Mage/Core/Model/Abstract.php(316): Mage_Sales_Model_Order-
_beforeSave() #6 /var/www/magento/app/code/local/Mage/Ccavenuepay/controllers/CcavenuepayController.php(2
in /var/www/magento/app/code/core/Mage/Payment/Model/Observer.php on line 46

Why is this error coming suddenly and how can I fix it, I have tried clearing Magento cache and reindexing data but it doesn't help.


texts: Magento2 Display widget data & modified under app/design custom theme in PWA

texts:
Magento2.3 - I am creating a PWA & Magento site. For adding some data in frontend I used widgets & made changes under app/design. But none of this changes are displayed in PWA.
Can anyone let me know whether the changes which I make under app/design & the data displayed via widget will they be displayed in PWA?


texts:
I have been trying to over-ride my customer module in magento 2. I need to Add an icon to 'Sign In' on header link. I have copied

  vendor/magento/module-customer/Block/Account/AuthorizationLink.php

and pasted to

  app/code/Test/Customer/Account/Block/Account

, and simple changed 'Sign In' text to 'Sign In2'. And then created

  app/code/Test/Customer/etc/di.xml

. And I have added the following codes there.

<?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\Customer\Block\Account" type="Test\Customer\Block\Account" />
</config>

After that I have run the following commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento cache:clean

And it doesn't seems to be working. Can anyone please help me?


texts:
I've just installed Magento but when I go to /sales (I'm french so I think it's the right path) I have an error:

Payment model name is not provided in config

How do I fix that?

Thanks


texts: Validating composer.json in magento giving me the following error

texts:
Updating through the command line and with market place took

1) Once you have packaged your extension in .zip file move it to a directory.

2) Download the validation script and extract it to the directory mentioned on the first step.

3) Run the following command.

php validate_m2_package.php  <your_package_name.zip>

If no errors are there in the packaging and coding standards. No error will be visible on the console.
If errors are there those will be listed on the console.

when doing this the following error showing up

"mytheme.zip" alternate folder structure is currently not supported

all of my 3 files in mytheme.zip

1- composer.json

2- theme.xml

3- registration.php

any HELP!!


texts: Fatal error: Class 'Codeception\Platform\Extension' not found. Issue occurred after magento 2.3.0 upgrade to 2.3.1

texts:
Preconditions (*)

1.Magento 2.3.1 upgraded from Magento 2.3.0
Php 7.2.15
OS : Ubuntu 18.04 Bionic
Phpstorm 2019.1.1
Evnironemnt : Magento development

Steps to reproduce (*)

Issue appears after upgrading magento from 2.3.0 to 2.3.1 and run below commands.
bin/magento dev:tests:run unit
vendor/phpunit/phpunit/phpunit -c dev/tests/unit/phpunit.xml.dist.
Above commands will work if version 2.3.0 is installed directly and also for 2.3.1 if installed directly.

These commands should run unit test on entire magento project not just on one mdoule.

Error (*)

  Fatal error: Class 'Codeception\Platform\Extension' not found in
  /var/www/html/magento23demo/vendor/allure-framework/allure-codeception/src/Yandex/Allure/Adapter/AllureAdapter.php
  on line 49

Please note I can't find Platform\Extension codeception library in vendor folder.


texts: Magento Commerce 2.3 remove register-link B2B in layout.xml

texts:
In my B2C store I removed the register-link in my theme.

I achieved this removing it in the Magento_Theme default.xml with the following directive: <referenceBlock name="register-link" remove="true" />

In my B2B store I use the same directive in my default.xml but it does not work. There it still shows the register link in the frontend.

Perhaps the register-link is different here because you can create also a company account and not "just" a personal account.

Can anybody tell how to remove the register-link for B2B?


texts: Magento 2: Layered Navigation Price Filter Not Working After Applied Custom Product Discount

texts:
I working on a product discount module. I did it via plugin and observer. it's working fine on product page and list page. But price filter is not working according to the updated product price.

Here is my code which I am using to customise price.

  VendorName/ModuleName/etc/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Pricing\Price\FinalPrice">
        <plugin name="custom_discount_catalog_pricing_price_finalprice" type="VendorName\ModuleName\Plugin\FinalPrice" />
    </type>
</config>

  VendorName/ModuleName/etc/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <event name='catalog_product_get_final_price'>
        <observer name='customdiscount_finalprice' instance='VendorName\ModuleName\Observer\ProcessFinalPrice'/>
    </event>
</config>

  VendorName/ModuleName/Observer/ProcessFinalPrice.php

<?php

namespace VendorName\ModuleName\Observer;

use Magento\Framework\Event\ObserverInterface;

class ProcessFinalPrice implements ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $product = $observer->getEvent()->getProduct();
        $old = $product->getData('final_price');
        $discountedPrice = $old - ($old * 0.20);
        $product->setData('final_price',$discountedPrice);
    }
}

  VendorName/ModuleName/Plugin/FinalPrice.php

<?php

namespace VendorName\ModuleName\Plugin;

class FinalPrice
{
    public function afterGetValue(\Magento\Catalog\Pricing\Price\FinalPrice $subject, $result)
    {
        $discountedPrice = $result - ($result * 0.20);
        return $discountedPrice;
    }
}

Note: The discounted price is on customer level


texts: Magento 2 : knockout data-bind:click not working

texts:
I added phtml file using ajax response. There are two buttons available in that phtml file.

Buttons.phtml :

    <button type="submit" title="Select" class="action primary" id="rh-select-btn" data-bind="click:addCustomOptions()">
        Select
    </button>
    <button type="button" title="Cancel" class="action" id="rh-cancel-btn" data-bind="click:addCustomOptions()">
        Cancel
    </button>

MainFile.phtml :

This Buttons.phtml file added in

 using ajax response.

Now, when click on Select Button then addCustomOptions() function call should be call. But, it's not working.

EDIT :

knock.js

define(
[
    'jquery',
    'uiComponent',
    'ko',
    'RH_Custom/js/kotemplate'
],
function($,Component,ko,kotemplate) {
    'use strict';
     return Component.extend({
        initialize: function () {
            alert("knock call");
            self = this;
            this._super();
            // kotemplate.addCustomOptions();
        },
        addCustomOptions : function()
        {
            console.log('knock custom options');
        }
    });
});

alert call successfully on above file. But, kotemplate.addCustomOptions() is not working. It returns error :

  Uncaught TypeError: kotemplate.addCustomOptions is not a function

Where I do mistake?

Please help me.

Thanks.


texts: Magento 2: Display manufacturer on product view

texts:
I have my custom "sidebar_brand.phtml" in "catalog_product_view.xml".

<container name="right.product.container" as="rightProductContainer" label="Right Product Container" htmlTag="div" htmlClass="col-md-3 text-sm-center" >
    <block class="Magento\Catalog\Block\Product\View\Attributes" name="product.info.sidebarbrands" template="Magento_Catalog::product/view/sidebar-brand.phtml" after="product.info.main"/>
</container>

I have tried many different ways but I can not find out how to display the manufacturer attribute in this file.

Should I do it from the XML file or the phtml file?

I have seen different solutions, but nothing works. I am using Magento 2.2.3, how do I get the '$_product->getAttributeText('manufacturer');' working?

Sources:
https://www.dckap.com/blog/display-custom-attribute-value-product-viewlist-page-magento-2/

https://stackoverflow.com/questions/37305107/how-do-i-display-an-attribute-on-product-view-page-in-magento-2

I am failing all the time! Can someone please show me how it should be in my Magento version?

The phtml file sidebar_brand.phtml works fine, but I am not able to show the product attribute.

Thank you in advance.