texts: compare images from catalog_product_entity_media_gallery with actual presence on server

texts:
So, In our catalog_product_entity_media_gallery table in the Magento 2.3.1. database are around 25.000 lines. Like:

18963,90,/_/_/__1_3.jpg,image,0
18965,90,/_/_/__1_4.jpg,image,0
10815,90,/_/_/__1.jpg,image,0
31586,90,/_/_/__12_1_1.jpg,image,0

Now some images mentioned in the table are not actually any longer on the server:

Example
public_html/pub/media/catalog/product/_/_/__1_3.jpg,image,0

So when you run command  php bin/magento catalog:image:resize

It will fail. We need to reupload image or delete from table. The run command again.

This is extremely timeconsuming.
What I want.

Compare contents of catalog_product_entity_media_gallery with what is actually on our server.
So we see at once what is missing. Then we can upload those at once and run command again.

All help how to do this comparison is welcome.


texts: Magento 2 : How to pre-fill the value of a textarea (XML)

texts:
Here is my text area (admin side) code :

<field id="description" type="textarea" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
     <label>Enter description here</label>
     <comment>here is comment</comment>
     <validate>required-entry validate-length minimum-length-1 maximum-length-160</validate>
     <tooltip>enter a valid description</tooltip>
    <depends><field id="pepend_id">1</field></depends>
</field>

This text area is working as expected but i want to prefill some data (not place-holder, actual text) in this text area.

I have searched across search-engines and stackexchange before posting answer and tried to use  tag and few more similar tags but did not work. Can you suggest.


texts: Skip same product data migration tool Magento 2

texts:
How we can skip the same product data migration?

Any reference would be helpful

Thanks.


texts:
There are plain strings i.e. in view/adminhtml/ui_component/product_listing.xml and I am wondering how they get translated into other languages.
Also what is the correct way of using translations in PHP code (Blocks, Models etc.) or template files? In Magento 1 it was like $this->__('asd');.


texts:
I created a module as per the steps described in the accepted answer from the following question:

Adding custom layouts for CMS and Category use with custom module trouble

However, the block updates that should be applied to the left section of the page as defined in isn_layouts.xml do not get applied.

Even if I change the template filename to a non-existent file it still does not produce an error which suggests to me that Magento is not seeing the layout updates in the app/design/frontend/base/default/layout/isn_layouts.xml file.

The code for the module is as follows:

app/etc/modules/ISN_Layouts.xml:

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

app/code/local/ISN/Layouts/etc/config.xml:

<?xml version="1.0"?>
<config>
  <modules>
    <ISN_Layouts>
      <version>0.0.1</version>
    </ISN_Layouts>
  </modules>
  <global>
    <page>
      <layouts>
        <noanchor module="page" translate="label">
          Anchor Override
          <template>page/3columns.phtml</template>
          <layout_handle>noanchor</layout_handle>
        </noanchor>
      </layouts>
    </page>
  </global>
  <frontend>
    <layout>
      <updates>
        <isn_layouts>
          <file>isn_layouts.xml</file>
        </isn_layouts>
      </updates>
    </layout>
  </frontend>
</config>

app/design/frontend/base/default/layout/isn_layouts.xml:

<?xml version="1.0"?>
<layout>
  <noanchor translate="label">
    Anchor Override
    <reference name="root">
      <action method="setTemplate"><template>page/3columns.phtml</template></action>
      <action method="setIsHandle"><applied>1</applied></action>
    </reference>
    <reference name="left">
      <action method="unsetChild"><name>catalog.leftnav</name></action>
      <block type="catalog/navigation" name="catalog.leftnav" after="currency" template="catalog/navigation/left.phtml"/>
    </reference>
  </noanchor>
</layout>

What am I doing wrong?


texts: How to show quote_id in response of /carts/mine/totals API in magento-2.1?

texts: I want to show quote_id in response of /carts/mine/totals API in magento-2.1. Anybody guide me.


texts: Grand total update on billing information save in onepage checkout ---Magento

texts:
I have created a custom module to update grand total but I need to update grand total only after filling address information on one page checkout because I have to check particular postal/zip code that user added and based on that have to update grand total.Here is my config file code

   <checkout_onepage_savePayment>
        <observers>
        <magepal_mycheckout_order_observer>
        <type>singleton</type>
        <class>MagePal_MyCheckout_Model_Observer</class>
        <method>sendemail</method>
        </magepal_mycheckout_order_observer>
        </observers>
    </checkout_onepage_savePayment>

Observer.php code

$quote = $observer->getEvent()->getQuote();
    $grandTotal = $quote->getGrandTotal();
    $baseGrandTotal = $quote->getBaseGrandTotal();
    $partialPrice = $grandTotal + 10;
    $basePartialPrice = $baseGrandTotal + 10;
    $quote->setGrandTotal($partialPrice);
    $quote->setBaseGrandTotal($basePartialPrice);
    $quote->save();

I have tried several other events but when I reach to review order step,no change to grand total.

Can anybody please point me out where I did wrong ?


texts:
I have a custom attribute called 'Color', which is a select box,

I have a instance of the product, and I want to get the selected value of my field 'Color'. The problem is when I try to do it its always returning null.

This is my code:

$product->getCustomAttribute('prj_color')

This is always null. But if I try to get a different field, which is not a multivalued field, a textbox for example, I can get the value normally.

I'm using Magento 2.1.5. Someone know whats going on?


texts: Magento remove media folder outside magento

texts:
I have one folder inside media and in that folder we are storing customer related files with the order id. I want to make the folder secure from outside. That's why I want to check every time is customer logged in or not before accessing from anywhere.

Please give me some suggestions so that I can proceed.


texts: add custom banner on specific product view page

texts:
I tried to add a banner for a specific product but when I looked for the options,
I can add in the content of the product, but I need the banner on the top of the specific product view page.

Is there's any way to add the banner or the html content on the top of the specific product view page?


texts: Transfering demo magento shop to old magento and connect with the database

texts:
I am working on a magento website from client and I am not a coder, this is my first magento website. I know it sounds confusing just by looking at the title, so let me elaborate you on this.

I got a new theme installed on my website (http://design.inpro.com.my), I have done all required and its time to migrate it.
My client wanted me to migrate the new theme from my website to their existing website (http://gogoonline.com.my).
They already have a website running on magento with all the orders and customers data.

What they want is, migrate the new theme to their website, but link the existing customer and order/ products database to this new theme.
How can I do this? Is there any step by step tutorial available online?


texts: Magento CE 1.9 Patch for PHP 7.2 - puzzle

texts:
we're planning to upgrade PHP from 5.6.30 to PHP 7.2

I've downloaded this patch from the Magento site
PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2

I haven't seen that extension .2_v2 before and google couldn't help either.
(tars and .sh are more familiar for patches)
Can anyone tell me what I need to do in order to run it?
I can actually open it and read it with a text editor.
It looks like Unix shell script.

should I just run it as follows after we've upgraded PHP to 7.2?

  sh PATCH-1.9.3.1-1.9.3.9_PHP7-2018-09-13-08-01-43.2_v2

Another question we actually have Magento 1.9.3.10 installed and this patch are for 1.9.3.9, there isn't one for my version. Is this likely to be OK?


texts: Magento SOAP API Slow Response need Solution?

texts:
I use my localhost response time is  30sec++ (about 2min.i need 30sec)

$client = new SoapClient('http://localhost/magento/api/v2_soap/?wsdl');

// If some stuff requires api authentification,
// then get a session token
$session = $client->login('cats', 'cats@123');
$complexFilter = array(
    'complex_filter' => array(
        array(
            'key' => 'type',
            'value' => array('key' => 'in', 'value' => 'simple,configurable')
        )
    )
);
$result = $client->catalogProductList($session, $complexFilter);

    // Product List here...
    echo '
';

    for($i=0; $i<count($result); $i++){
    echo  '
'.$result[$i]->sku.'
'.$result[$i]->name.'
';
    }
    echo '
';
    //var_dump ($result);


texts: How do I make the country field unrequired?

texts:
In the addressbook I already made the telephone field unrequired by setting the field is_required to 0 for attribute with the attribute_code "telephone" in the eva_attribute table. I searched for an attribute with the attribute code "country" but I just found "country_id".

(Yea and I already copied the abstract.php into the local code folder and commented out the two if-s in the function _basicCheck(). And I removed the class="required" in edit.phtml and shipping.phtml)

The reason I want to make it not required is because it is blank and even when I found a solution and it showed countries and I pressed "Save Address" the error poped up that "Country is a required field". So a soltuion for making the country drop down work would also be very nice.


texts:
I'd like to add mouseover function like this html code.

And this is my header.phtml code

<img src="<?php echo $this->getSkinUrl('images/twitter.png'); ?>">

Can I add mouseover function to header.phtml?


texts: Get random products from category in magento 2

texts:
I have a class that returns 3 products from a category, these products are ordered by entity id and always returns the same 3 products from category X. I want to randomise them. in magento 1 you could do something like $collection->getSelect()->order('RAND()');, but this does not work in magento 2 anymore.

This is code that gets 3 products from category X.

protected $categoryFactory;

public function __construct(
    \Magento\Catalog\Model\CategoryFactory $categoryFactory
)
{
    $this->categoryFactory = $categoryFactory;
}

public function getCategory($id)
{
    $category = $this->categoryFactory->create()->load($id);
    return $category;
}

public function getProductsCollection($id)
{
    $r = array();
    $products = $this
        ->getCategory($id)
        ->getProductCollection()
        ->addAttributeToSelect('*')
        ->setPageSize(3)
        ->getItems();

    foreach ($products as $product) {
        $r[] = $product->getData();
    }
    return $r;
}


texts: Magento 2 custom attribute and show product if attribute YES

texts:
its very Urgent

I have an attribute called 'show_product'  (in the backend of Magento) with two outcomes 'yes' or 'no'. At the moment I'm just echoing the product name on the frontend. However, ideally I'd like to show all product name the attribute value. For example, if 'yes' then show all product, if 'no' then No product.

Can anyone please help me.

I tried some this

     $objectManager = \Magento\Framework\App\objectManager::getInstance();

            $product = $objectManager->create('Magento\Catalog\Model\Product')->load($singleproductdata['entity_id']);
            $attributes = $product->getAttributes('show_product');
           foreach ($attributes as $attribute) {

                    echo $attribute->getAttributeCode();
                    echo $attribute->getFrontend()->getValue($product);

            }


texts: Invalid argument supplied for foreach()?

texts:
I'm trying to show data in sale_order table.
I follow this guide: enter link description here

And I got the error is:

My files are:

And:

Can anyone help?? Thanks!


texts: I have Magento 1.9.4.4, can I use php 7.1 and no specific patch except those required for security

texts: Is Magento 1.9.4.4 compatible with php 7.1 ?


texts: Magento 2 How to Setup (Amazon CloudFront CDN) Alternative Domain Name in Magento 2

texts: How to setup Alternative Domain Name in CDN setup Using AWS(Amazon)?


texts: AjaxCart not deleting bundle items in Magento cartSidebar

texts:
I have a strange problem that I have been trying to debug to a couple of hours now. I am using AjaxCart extension to add products to the shopping cart but for some reason I have an issue when trying to delete bundle items from the shopping cart sidebar I get a redirect to a blank page with the following:

{"hasOptions":true,"redirectUrl":"http://mysite.com/catalog/product/view/id/187/"}

Has anyone come across this before and know how to resolve it?

I can successfully remove items from shopping cart page using Ajax without any issues.


texts: How to remove the price decimal from Front end price display only on the category and product pages ?


texts:
I know that in magento you can turn on path hints to find out which file you want to edit in order to edit the template, however, right now I work with a website that has a lot of users on the website all the time, so wondered if it is possible to turn on the path hints for admin only. Is this doable?
Because it is no good to show customers the path hints as well as it is also not secure


texts: what is the best permissions scheme for 1.9.3 after upgrade with magento connect (which requires 777)

texts:
I will be using Magento Connect to upgrade to 1.9.3 via the server. It is a shared server so the "www-data" user does not have owner privileges on our files.

Many threads recommend setting all files and directories to 777. But afterwards how should I reset permissions. I found a fairly good looking script at

https://community.bitnami.com/t/correct-folder-and-files-permission/25282

which suggests: Set the correct group and owner to the htdocs folder:

  sudo chown -R bitnami:daemon /opt/bitnami/apps/magento/htdocs

Set the correct permissions to file and folders:

  sudo find /opt/bitnami/apps/magento/htdocs -type d -exec chmod 755 {}\;

  sudo find /opt/bitnami/apps/magento/htdocs -type f -exec chmod 644
   {} \;

Set the correct permissions to the mage directory files:

  sudo find /opt/bitnami/apps/magento/htdocs/mage -type f -exec chmod
  755 {} \;

Set the correct permissions to other writable folders:

  sudo find /opt/bitnami/apps/magento/htdocs/media/ -type d -exec chmod
  775 {} \;

  sudo find /opt/bitnami/apps/magento/htdocs/media/ -type -f -exec chmod
  664 {} \;

  sudo find /opt/bitnami/apps/magento/htdocs/var/ -type d -exec chmod
  775 {} \;

  sudo find /opt/bitnami/apps/magento/htdocs/var/ -type -f -exec chmod
  664 {} \;

  sudo find /opt/bitnami/apps/magento/htdocs/app/etc/ -type d -exec
  chmod 775 {} \;

  sudo find /opt/bitnami/apps/magento/htdocs/app/etc/ -type -f -exec
  chmod 664 {} \;

but looking at our permissions with:

find . -printf "%h,%f,%CY-%Cm-%Cd,%u,%g,%m\n" > ~/files.csv

and going through in excel it seems more complicated than that.

is there a definitive script to set the permissions correctly after upgrade from 1.9.2.2 to 1.9.3 ?

Thanks in advance,

Al


texts: Set Default limit of per page in custom grid

texts: How to set Default limit per page in custom grid in magento 2?


texts: Magento2.3.0 :When merge and minify js and css after set production mode not working my admin panel and frontend css lacking

texts: I am using Magento2.3.0 community version  When merge and minify js and css after set production mode not working my admin panel and front end css lacking if any one know what is actual issue reply me .I apply all command in our production side.


texts: Customer Authentication between EE and CE

texts:
I have a client asking to down grade from EE to CE. I have everything working except the client passwords. The admin passwords work fine but the client must reset their password.

Down anyone know if there is customer account login difference between EE 1.12 and CE 1.7?

I have confirmed my key is the same in the Local.xml


texts: I have to show customers three recent orders in My Account page in Dashboard section in Magento 2. How will I achieve this?


texts: I am currently looking for a Magento extension on importing and exporting tracking numbers. That being said I've come across many extension for this, and need help/recommendations on which one might suit me best? (this is for large bulk tracking import and exports) p.s i am currently using Magento 1.9


texts: How to shipping charges in magento invoice page?

texts:
I have a invoice and I want to show shipping charges of particular product on that invoice please tell me which code I have to add. below is the code.`

                    Product Details
                    Qty
                    Amount

                <?php
                $items = $this->getorderitems();
                $total = 0;
                foreach ($items as $item) {
                 $product = $this->loadproduct($item->getProductId());
                 ?>

<?php echo $item->getName(); ?>

                    SKU : <?php echo $item->getSku(); ?>
Order No.: #
                <?php if ($this->getNoUseOrderLink()): ?>
                    <?php echo $_order->getRealOrderId(); ?>
                <?php else: ?>
                    <?php echo $_order->getRealOrderId(); ?>
                <?php endif; ?>

                    <?php echo round($item->getQtyOrdered()); ?>
                    <?php
                    echo Mage::helper('core')->currency($item->getBaseRowTotalInclTax(), true, false);
                    $amount = $item->getBaseRowTotalInclTax();
                     $total = $total + $amount;
                      ?>

                <?php }

                 ?>

                  Total :

                  <?php echo Mage::helper('core')->currency($total, true, false) ?>

`


texts: What is the replacement for 'require_once' in PHP for Magento2 to resolve CodeSniffer test issue in Magento store?

texts:
I'm a beginner at PHP and Magento have developed a Magento2 extension and used this line code in it:

require_once '/../knownuserv3/KnownUser.php';

But when I tried to put my extension in Magento Store, I got a series of test failure from Code Sniffer, which I solved all but for this one couldn't find any solution until now.
knownuser is a class in another library includes a static method which I need to call it.
this is the error text from Code Sniffer:


texts: Magento 2.3.x: Data Migration - product show out of stock after migration

texts: After migration all product showing out of stock


texts: I need to convert all the products of my ecommerce (about 1600) from simple to configurable. Is there a a way that doesn't involve adding from scratch all the products and, preferably, without editing the db tables?


texts: Computop Module - in DB eav_attribute & sales_order_status remains after uninstall - how to remove?

texts:
I have found that under the admin/customer/edit -> Address the bottom field is called computop_checked_address_hash and is required.

However, the Module - Official Computop Payment Module - is not installed, but it must have been at some point in the past before I had to manage the store.

I've tried to reinstall and deinstall the module, but the field remains. I've not found any occurrences of `computop´ in the files (using a grep search), but in the db it is in two tables:

eav_attribute - 2 fields - computop_risk_check & computop_checked_address_hash
sales_order_status - 3 fields - ready_computop_capture, waiting_auth_computop_note & waiting_capture_computop_note

How can I get rid of this? Is it safe to remove without breaking the store?

I'm running Magento CE 1.8.1

Any help would be greatly appreciated.


texts: Magento community edition 1.9.1 to 1.9.2 upgrade?

texts: At what point does the database upgrade happen? If I unzip the downloaded magento image over my current installation, will that also upgrades database changes if any?


texts: 2.2.6 - Email address is now required. Why?

texts:
Create New Order -> Create New Customer -> Email field is now required.

Why has this been implemented and why is it not noted on the Release Notes for 2.2.6? How do I make it a non-required field again.

I was told on the magento2 github that this is expected behavior.

My response: It was not required in 2.2.5. I don't understand why the change has not been documented. Please point me to a commit or discussion that explains the reason for this change. Or why this is not a feature you can turn on/off. Not everyone in the world has email addresses or sometimes they prefer not to give it out. Now we have to try and makeup a different dummy address every time because if it matches another email the order will not be created.

The email address has never been a required field even going back to magento1

Thanks!

** EDIT **


texts: Debugging custom module - content not displaying

texts:
I am practicing Magento, So I develop a new custom module . The module is working fine but I have a problem with my layout file. This is what i have got in my layout file.

<?xml version="1.0" encoding="UTF-8"?>

<layout >

    <ias_myslideshow_index_index>

        <reference name="root">
            <action method="setTemplate">
                <template>page/1column.phtml</template>
            </action>
        </reference>

        <reference name="content">
            <block type="ias/myslideshow_slideshow" name="ias.myslideshow.slideshow" template="IAS/slideshow.phtml" output="toHtml" />
        </reference>

    </ias_myslideshow_index_index>

</layout>

In the block type if I write

block type="core/template"

Then every static content that I have written in the pthml is displayed but if I try to call a function written in my block it throws an error for not finding the method. If I change  block type to

block type="ias/myslideshow_slideshow"

             OR

block type="ias/slideshow"

Nothing is display. No static content, no error.

I will really appreciate if some one can let me know what the wrong I am doing. below is my block and config file

public function myMessage(){

    return “I am Iyngaran, This is my module.”;

}

}

    public function myMessage(){

        return “I am Iyngaran, This is my module.”;

    }
}

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

    <global>

        <helpers>
        <IAS_MySlideshow>
            <class>IAS_MySlideshow_Helper</class>
        </IAS_MySlideshow>
    </helpers>

        <blocks>
            <IAS_MySlideshow>
                <class>IAS_MySlideshow_Block</class>
            </IAS_MySlideshow>
        </blocks>

        <models>
            <IAS_MySlideshow>
                <resourceModel>ias_myslideshow_resource</resourceModel>
            </IAS_MySlideshow>

            <ias_myslideshow_resource>
                <entities>
                    <slideshow>

ias_myslideshow_slideshow

                    </slideshow>
                </entities>
            </ias_myslideshow_resource>
        </models>

        <resources>
            <myslideshow_setup>
                <setup>
                    <module>IAS_MySlideshow</module>
                </setup>
            </myslideshow_setup>
        </resources>

    </global>

    <frontend>
        <routers>
            <IAS_MySlideshow>
                <use>standard</use>
                <args>
                    <module>IAS_MySlideshow</module>
                    <frontName>slideshow</frontName>
                </args>
            </IAS_MySlideshow>
        </routers>

        <layout>
            <updates>
                <IAS_MySlideshow>

                    <file>slide-show.xml</file>
                </IAS_MySlideshow>
            </updates>
        </layout>
    </frontend>

    <admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <IAS_MySlideshow before="Mage_Adminhtml">IAS_MySlideshow_Adminhtml</IAS_MySlideshow>
                </modules>
            </args>
        </adminhtml>
    </routers>
    </admin>

</config>


texts:
I want to override the form container in import section of admin. here is my config.xml :

<global>
     <blocks>
         <editimport>
             <class>Company_Editimport_Block</class>
         </editimport>
         <adminhtml>
             <rewrite>
                 <import_edit>Company_Editimport_Block_Adminhtml_Import_Edit</import_edit>
             </rewrite>
         </adminhtml>
     </blocks>
 </global>

and also in Company/Editimport/Block/Adminhtml/Import/Edit.php I have:

 class Company_Editimport_Block_Adminhtml_Import_Edit extends
 Mage_ImportExport_Block_Adminhtml_Import_Edit {
     public function getHeaderText()
     { // changing the header of page
         return Mage::helper('importexport')->__('check if it changes');
     }
 }

It does not work, I checked all things for thousand times, What am I missing here?


texts:
I need a new custom option type which extends from select/dropdown, so I can preload my options from a database dynamically. I did not find any tutorial or documentation how I would do something like that. Can anybody help me out?

EDIT:

My backend template doesn't get loaded properly. Although I can select my option type, the template paper.phtml does not appear.
What I got so far:

  MyVendor/MyModule/etc/product-options.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/product_options.xsd">
    <option name="MyOptions" label="MyOptions" renderer="MyVendor\MyModule\Block\Adminhtml\Product\Edit\Tab\Options\Type\Paper">
        <inputType name="Paper" label="Paper" />
    </option>
</config>

  MyVendor\MyModule\Block\Adminhtml\Product\Edit\Tab\Options\Type\Paper.php

<?php

namespace MyVendor\MyModule\Block\Adminhtml\Product\Edit\Tab\Options\Type;

class Paper extends \Magento\Catalog\Block\Adminhtml\Product\Edit\Tab\Options\Type\Select
{

    protected $_template = 'MyVendor_MyModule::catalog/product/edit/options/type/paper.phtml';

    /**
     * Class constructor
     *
     * @return void
     */
    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate($_template);

    }

}

  MyVendor/MyModule/view/adminhtml/templates/catalog/product/edit/options/type/paper.phtml

which is a exact copy of magento/catalog/view/adminhtml/templates/catalog/products/edit/options/type/select.phtml


texts: Magento 2 zend error BarcodeRenderer.php

texts:
Has anybody encountered this error before? I'm not even using temando nor is it enabled. I did try enabling it to see if that would fix it but no luck.

Fatal error: Class 'Zend\Barcode\Renderer\AbstractRenderer' not found in /srv/public_html/vendor/temando/module-shipping-m2/Model/Pickup/Pdf/BarcodeRenderer.php on line 22


texts: Removing Comments Timestamp and order status from Order PDF

texts:
I have a client who has the comments history printed on his order pdf.
  I think we use Fooman Print order?

  He uses this to pass on information to couriers like "please leave at
  back door" however with the full-time stamp and order status on it
  this often splits over 2 lines.

  For example, we are talking about this line from comment history which
  is on our pdf:

  11/10/2017 | Pending Payment Comment by customer: Please leave at back
  door

  Is there a way to either REMOVE the timestamp | Order Status (
  11/10/2017 | Pending Payment Comment by customer:)  or put a LINE
  BREAK after "Comment by customer" so the comment itself appears on its
  own line?

  Thanks for your help Denise


texts: magento1.9 : Integarion violation database error in admin

texts:
While updating bundle product in admin it is throwing error like SQL
   SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'selection price type' cannot be null, query was: INSERT INTO `catalog_product_bundle_selection_price` (`selection_id`,`website_id`,`selection_price_type`,`selection_price_value`) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE `selection_price_type` = VALUES(`selection_price_type`), `selection_price_value` = VALUES(`selection_price_value`)

Help me


texts: Order Tracking not showing up in shipment email

texts:
Our site is sending shipment emails, but the email contains no tracking info.  I've created a new template based off of the default one and added {{block type='core/template' area='frontend' template='email/order/shipment/track.phtml' shipment=$shipment order=$order}} but that part of the email is empty.  When I click "Track Shipment" in the admin panel, it brings up the tracking number and a link to UPS,

We have a UPS API integrated to create shipments directly from Magento.  It appears that the shipment email is being sent before the tracking number comes back.  There is also a green status message that says "The shipment has been created." before any of the information like weight and dimensions are entered.

Looks like I get to dig through some code and move some things around.

What could I be missing?
Any help would be great here.


texts: Error filtering template: Area code is not set

texts:
I already create a custom email templates for magento. Everything works fine then this error appear in the email header.

here is my code
<?php

namespace  Test\PaymentReminder\Console\Command;

use Magento\Framework\App\ObjectManager\ConfigLoader;
use Magento\Store\Model\StoreManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CancelPendingOrder extends Command
{
    protected $objectManager;
    protected $cancelorder;
    protected $orderInterface;
    protected $creditmemoService;

    public function __construct(
        \Magento\Framework\App\ObjectManagerFactory $objectManagerFactory,
        \Magento\Framework\App\State $state,
        \Magento\Sales\Api\Data\OrderInterfaceFactory $orderInterfaceFactory, // <-- this
        \Magento\Sales\Model\Service\CreditmemoServiceFactory $creditmemoServiceFactory, // <-- and this
        \Icube\PaymentReminder\Helper\CancelOrder $cancelorder
    ){
        $this->state = $state;
        $params = $_SERVER;
        $params[StoreManager::PARAM_RUN_CODE] = 'admin';
        $params[StoreManager::PARAM_RUN_TYPE] = 'store';
        $this->objectManager = $objectManagerFactory->create($params);
        $this->cancelorder = $cancelorder;
        $this->orderInterface = $orderInterfaceFactory->create(); // <-- here
        $this->creditmemoService = $creditmemoServiceFactory->create(); // <-- and here
        parent::__construct();
    }

    protected function configure()
    {
        $this->setName('icube:paymentreminder:cancel')
            ->setDescription('Cancel all expired pending order');
        parent::configure();
    }

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML);
        $output->writeln('<info>Getting All Pending Order</info>');
        $registry = $this->objectManager->get('\Magento\Framework\Registry');
        $registry->register('isSecureArea', true);
        $this->cancelorder->checkPendingOrder();
        $output->writeln('<info>Finish</info>');
        return 0;
    }
}


texts: Magento 2 Custom Attribute Multi select without specific options

texts:
What can be the solution on Magento 2 to have a Customer Attribute multi-select where the customer can save custom values on the fly?

For example:

Add your five favorite movies

Is there some JSON attribute save solution for Magento 2?

Thanks in advance..!


texts: Magento 2.1.4: Order Summary Modal on Checkout Breakpoint

texts:
I'm trying to get the Order Summary slide-in Modal (id="opc-sidebar") on the Checkout Page stay in for landscape tablet (up to 1024px).

At the moment it changes to be in the right hand column at 768px.
I can't find the file where this is set. It seems like quite a stupid question, however when I was doing the same for the off canvas menu it was quite simple with there being the _toggleMobileMode, _toggleDesktopMode and the mediaCheck in the menu.js.

I've taken a look at the devDocs, and feel like I've looked in every file in the module-checkout folder but I've had no luck.

Any suggestions would be appreciated!


texts: Insert widget in CMS page using the id of widget?

texts: It's able to insert a widget in any CMS page using insert widget button. How can we insert an already created widget using its id in CMS page. I googled a lot...but not able to find this one.


texts:
For mobile app , after payment is instantiated , which method we should use to check success and failure response from 3rd party . And send order confirmation mail .

mobile order success action  is which method for mobile app?


texts: How to keep session data on order success page so that you can work on it in magento2?

texts:
In mage1 there was $session->clear() but cannot find where it is done in magento2?

I thought it was $this->checkoutSession->clearQuote()->clearStorage(); in

vendor/magento/module-checkout/Observer/UnsetAllObserver.php

but it's not.


texts: Magento 2.3.0 How to add review form in custom module?

texts:
I would like to add a review form in my custom module front end page. On this page, I have displayed several selected products.

I want to display a review form in front of each product each review form on my custom page.

Please see the below attached screenshot for better understand.

How can I achieve these things? Make sure each product have a separate review form and it should be default Magento review form.

Edit :

  app/code/Namespace/ModuleName/view/frontend/templates/form.phtml

     <?php echo $block->getLayout()->createBlock("Magento\Review\Block\Form")->setTemplate('Namespace_ModuleName::form.phtml')->toHtml(); ?>

Using create a block and set template method I am able to display review form. but I am getting trouble in submitting the form. because In my custom review page form action parameter is not passing the product ID.

The current review form action is like

  /review/product/post/

What actually review form action (It should be like below).

  /review/product/post/id/14/

Why ID is not passing in the form action. Is it a wrong method to display review form? or is there any other way to display review form?

Update :

After creating a custom block and extend my block to \Magento\Review\Block\Form(default) then I am able to see product ID in form action URL.

  app/code/Namespace/ModuleName/view/frontend/templates/form.phtml

     <?php echo $block->getLayout()->createBlock("Namespace\ModuleName\Block\ReviewForm")->setTemplate('Namespace_ModuleName::form.phtml')->toHtml(); ?>

Now I can see separate review form for a separate product. But in console, I am getting an error like below.

  Uncaught SyntaxError: Unexpected token u in JSON at position 0

Because of the above error, I am not able to submit a review for all product. can anyone help me to solve out this problem?

Any help would be appreciated!


texts: "Create Shipping Label" for free shipping

texts:
Magento 2 offers the "create shipping label" functionality only for orders where the customer selected a shipping method that supports shipping labels through its API. So, if they for instance use the "free shipping" method, there is no backend option for creating labels.

Is there a way, via configuration or extension module, that the backend administrator can create a shipping label with a carrier of their choice?

Basically, our client wants to offer free shipping and then choose which carrier they ship with based on the order contents and destination.


texts:
First of all I want to give some screen shots to  understand my issue.

Now I want to add related code here.

etc/frontend/di.xml

 <?xml version="1.0"?>
    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
        <type name="Magento\Checkout\Model\CompositeConfigProvider">
            <arguments>
                <argument name="configProviders" xsi:type="array">
                    <item name="checkout_deliverysign_block" xsi:type="object">Kensium\DeliverySign\Model\DeliverySignConfigProvider</item>
                </argument>
            </arguments>
        </type>
    </config>

DeliverySignConfigProvider

<?php
namespace Kensium\DeliverySign\Model;

use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Store\Model\ScopeInterface;

class DeliverySignConfigProvider implements ConfigProviderInterface
{
    /**
     * @var \Magento\Framework\App\Config\ScopeConfigInterface
     */
    protected $scopeConfiguration;

    protected $checkoutSession;

    protected $logger;

    /**
     * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration
     * @codeCoverageIgnore
     */
    public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfiguration,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Psr\Log\LoggerInterface $logger

    )
    {
        $this->scopeConfiguration = $scopeConfiguration;
        $this->checkoutSession=$checkoutSession;
        $this->logger=$logger;
    }

    /**
     * {@inheritdoc}
     */
    public function getConfig()
    {
        $deliverySignConfig = [];
        $enabled = $this->scopeConfiguration->getValue('deliverysign/deliverysign/status', ScopeInterface::SCOPE_STORE);
        $minimumOrderAmount = $this->scopeConfiguration->getValue('deliverysign/deliverysign/minimum_order_amount', ScopeInterface::SCOPE_STORE);
        $quote=$this->checkoutSession->getQuote();
        $subtotal=$quote->getSubtotal();
        $this->logger->addDebug($subtotal);
        $deliverySignConfig['delivery_sign_amount'] = $this->scopeConfiguration->getValue('deliverysign/deliverysign/deliverysign_amount', ScopeInterface::SCOPE_STORE);
        $deliverySignConfig['show_hide_deliverysign_block'] = ($enabled && ($minimumOrderAmount<$subtotal) && $quote->getFee()) ? true : false;
        $deliverySignConfig['show_hide_deliverysign_shipblock'] = ($enabled && ($minimumOrderAmount<$subtotal)) ? true : false;
        return $deliverySignConfig;
    }
}

Please find below for more details

https://github.com/sivajik34/Delivery-Signature-Magento2

My observation is DeliverySignConfigProvider object is not calling when you click next button,only its calling when you are reloading the page.
Can you anyone help me on this?


texts: How to get sms automatically after place an order?

texts:
I have developed one magento website.
In this, Client requirement is the customer have to get the sms after place the order.
How can i do that?


texts: {{block class="" name="" template="" }} - Get phtml template script partially working on CMS page

texts:
If i using sinlge script in cms pahe it is working,
{{block class="Amasty\Storelocator\Block\Location" name="location.block.home" template="Zero_Storelocator::home-page-mobile1.phtml" }}

If i add two more script in cms page it is not working,
{{block class="Amasty\Storelocator\Block\Location" name="location.block.address" template="Zero_Storelocator::home-page-mobile1.phtml" }}
{{block class="Amasty\Storelocator\Block\Location" name="location.block.mobile" template="Zero_Storelocator::home-page-mobile2.phtml" }}
{{block class="Amasty\Storelocator\Block\Location" name="location.block.hours" template="Zero_Storelocator::home-page-mobile3.phtml" }}

Each script working when i call individually, if i call all the script at the same time first line of the script only working, the remaining script not working.
Code:
         if (response && _.isArray(response.items) && self.options.homeHeader && self.options.commonBlock && self.options.homePage && self.options.homeMobile && self.options.homeHours) {
            response.items = [_.first(response.items)];
            response.totalRecords = 1;
        }

    ..............
    ..............
    ..............

    if (self.options.homePage) {
        var homeAddress = '';
        var firstStore = _.first(locations.items);
        if (firstStore.distance) {

            homeAddress = '
' + firstStore.address + ',' + firstStore.state + ' ' + firstStore.zip + '
';

        }
        console.log(homeAddress);
        self.storeListIdentifier.html(homeAddress);
    }

    if (self.options.homeMobile) {
        var homeMobileaddress = '';
        var firstStore = _.first(locations.items);
        if (firstStore.distance) {

                homeMobileaddress = '
' + firstStore.phone + '
';

        }
        console.log(homeMobileaddress);
        self.storeListIdentifier.html(homeMobileaddress);
    }

    if (self.options.homeHours) {
        var homeHoursstore = '';
        var firstStore = _.first(locations.items);
        if (firstStore.distance) {

                homeHoursstore = '
' + firstStore.store_hours_weekdays +' ,' +firstStore.store_hours_weekend_days+ '
';

        }
        console.log(homeHoursstore);
        self.storeListIdentifier.html(homeHoursstore);
    }


texts: Using different address template for billing and shipping

texts:
One of my customer need to have on the invoice two different address template.

We need to "remove" from billing the "lastname name" like the following example

Billing to:

company name

address

postcode, ....

Shipping to:

lastname name

company name

address

postcode, ....

In the magento admin section I found only one template for address that is used for both shipping and billing.

Is there a way to differentiate it ?


texts:
I am working on Magento 2.2.5, need to validate CSV file for import.

How to skip row? like I don't want to save any data of row 2, then
how to skip that row.
I am using only one attribute set, so I don't want to fill that in CSV, so how will i make it default from program. Please any one help me.


texts: Automatically mark the order status to complete - Digital Download product

texts:
I am using Magento 2.0.4 and finding a way to automatically mark the order status to 'Complete' once the payment is complete.

At the moment what is happening is once the payment is complete the order status is marked as 'Processing' and once the admin opens the order and provide some comments and submit the order becomes 'Complete'

I do not want admin to do this manually.  How can I complete the order as soon as the customer complete their payment.


texts:
I have question to our respective community related to Authorize.net. I am not sure it related to Magento or nor, but if you have some experience, please, guide me.
We have changed our Authorize.net account's business name and bank account, and also we are going to switch to new Authorize.net account. But here problem is that we don't know how our previous payments will be handled. Our store uses refunding payments actively. If we switch to new account, will it affect to previous account payment refunds? Or is there some extension or functionality of Magento which handles this situation? Any help will be appreciated. Thanks.


texts: Magento 1: How cron jobs works in magento?

texts:
I am little bit confused with the Magento 1 cron jobs. I am creating a custom module and I need to sync data in third party API with cron. Firstly I set up a cron job on my server like this:

*/5 * * * * /bin/bash /path/to/magento/cron.sh

According to me this cron will run in every 5 min and will read/schedule magento crons from my custom module config file.

Here is the code of my custom module config file for cron:

<crontab>
    <jobs>
        <Namespace_ModuleName_sync_abandon_cart>
            <schedule>
                <cron_expr>*/1 * * * *</cron_expr>
            </schedule>
            <run>
                <model>abandon/observer::syncAbandonCart</model>
            </run>
        </Namespace_ModuleName_sync_abandon_cart>
    </jobs>
<crontab>

After setting up cron in config file for my module, I can see there in magento admin configuration. I have cronjob settings like this:

Now, I am confused from above three cron settings that when my custom module cron will run? I actually want some clarity for the cron job setup in magento 1.

Thanks in advance.


texts: how to use magento defined blocks in our defined new block as inner block

texts:
i have tried to use block as inner block which is defined in the same layout xml file using "as" in block tag and getchildhtml("as name") in phtml.
test.php(layout file)

<block name="name1" type="modulename/blockfilename" template="file1.phtml">
  <block name="name2" type=modulename1/blockfilename1" template="file2.phtml" as="display"></block>
</block>

file1.phtml

<?php $this->getChildhtml("display") ?>

similarly how can we use the magento defined blocks as inner blocks in our blocks
for example magento defined
Now i want to use as="left" in my block as inner block

If possible can you please let me know with example for better understanding.

Thanks in advance


texts: Check billing / shipping address in onepage checkout from observer

texts:
I'm trying to check billing / shipping address and break onepage checkout with an error, if the addresses do not meet some conditions of the quote (e.g. some products should only be shipped to the country XY).

Approach

Make use of the event controller_action_postdispatch_checkout_onepage_saveBilling and controller_action_postdispatch_checkout_onepage_saveShipping, the observer code is something like:

    public function checkBillingAddress(Varien_Event_Observer $observer) {

    /** @var $quote Mage_Sales_Model_Quote */
    $quote = Mage::getSingleton('checkout/session')->getQuote();

    $special_products = 0;
    foreach($items as $item) {
        $sku = $item->getData('sku');
        $isGuaranteeredProduct = $helper->isGuaranteeredProduct($sku);
        $special_products++;
    }
    if($special_products > 0) {
        Mage::getSingleton('core/session')->addError(Mage::helper('core')->__('Orders with special products can only be shipped to XY!'));
    }
}

Problem

How can I return the error via AJAX and break checkout in a right way?

Thank you for your ideas.


texts:
My di.xml file is

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
   <preference for="Magento\Sales\Model\Order\Email\Sender\OrderSender" type="ABC\Listrak\Model\Order\Email\Sender\OrderSender" />
</config>

My class

namespace ABC\Listrak\Model\Order\Email\Sender;

class OrderSender extends \Magento\Sales\Model\Order\Email\Sender\OrderSender
{
    public function __construct(
            \Psr\Log\LoggerInterface $logger
    )
    {
        $this->logger = $logger;
    }

    public function send(Order $order, $forceSyncMode = false)
    {
        $order->setSendEmail(true);

        if (!$this->globalConfig->getValue('sales_email/general/async_sending') || $forceSyncMode) {
            if ($this->checkAndSend($order)) {
                $order->setEmailSent(true);
                $this->orderResource->saveAttribute($order, ['send_email', 'email_sent']);
                return true;
            }
        }

        $this->orderResource->saveAttribute($order, 'send_email');

        return false;
    }

}

But i get Error

Warning: Declaration of ABC\Listrak\Model\Order\Email\Sender\OrderSender::send(ABC\Listrak\Model\Order\Email\Sender\Order $order, $forceSyncMode = false) should be compatible with Magento\Sales\Model\Order\Email\Sender\OrderSender::send(Magento\Sales\Model\Order $order, $forceSyncMode = false) in C:\wamp64\www\huf\app\code\ABC\Listrak\Model\Order\Email\Sender\OrderSender.php on line 41

If someone can help with this
Thanks


texts: Analyse existing codebase for localization readiness

texts:
I have a recollection of seeing a tool or script that could analyse a legacy Magento project (custom theme and modules) to check for non-i18n code.

The concept of a regex to find strings that are not double-underscore wrapped __('abc') crosses my mind but seems likely to get a lot of false positives.

Any other suggestions?


texts: How to access Magento 2 shipping & cart total in custom sidebar?

texts:
I am building a custom Magento 2 right sidebar module. It will bring sidebar panel from right when a new item is added.

I can access all cart items data from default js modules except Shipping Total & Grant Total in my phtml file.

You can go through my code shared on GitHub by visiting this URL:

  https://github.com/biswajitpaul01/mage2-cart-sidebar

Can anyone suggest how can I get those in my view/frontend/templates/cart/sidebar-minicart.phtml file?

Thanks in advanced.


texts:
I notice on Magento 1.7.0.2 and 1.9.2.4, some customer accounts which are duplicated.

However one is defined on the default store view (id: 1 => "Default Store View") and the second one is defined on "Admin" (id: 0 => "Admin").

The store view "Admin" is not visible from magento backend but exist in database.

What is this?
How it possible?
What does this means?


texts: magento 2 - add max length for input fields in Review & Payments/billing form

texts:
I am trying to limit number of allowed characters on Firstname input field in my payment methods on Review & Payments area. I am using the magento default check/money order payment method.

Basically this is the area that customers can indicate that their billing address is different from their shipping address.

To achieve this, I am extending Layoutprocessor.php file in my custom module.
I have tried the following code, but it seems it is not working.

<?php
namespace MY_MODULE\Block\Checkout;

class LayoutProcessor extends \Magento\Framework\View\Element\AbstractBlock implements \Magento\Checkout\Block\Checkout\LayoutProcessorInterface
{
    public function process($jsLayout) {

        $jsLayout['components']
        ['checkout']['children']
        ['steps']['children']
        ['billing-step']['children']
        ['payment']['children']
        ['payments-list']['children']
        ['checkmo-form']['children']
        ['form-fields']['children']
        ['firstname']['max_text_length'] = 15;

        return $jsLayout;
    }

}

the max_text_length is available in the following file.
magento2-2.1.6/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js.
https://github.com/magento/magento2/blob/2.1.6/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js#L56

I am using Magento 2.1.6 version.Please let me know if anyone knows a fix for it.


texts: Magento 2 TnC checkbox value not getting passed in custom payment method which redirects

texts:
I have created a custom payment gateway extension for CC and redirect both, the code for which can be found here.

Enabled TnC checkbox from the backend but unable to pass it's value to the set-payment-information from the custom payment method which I created to redirect the user to the payment gateway.

  Please review the code and let me know what needs to be done to improve
  the extension.


texts: Can i reuse license of Magento Enterprise?

texts: I have a source code of Magento Enterprise, it is belong to my friend, can i reuse the source code to update to my server? I want to ask if i upload source code Magento Enterprise to my server, any have reflect to license of my friend? or i can use this source but can't get support of Magento?


texts: Magento 2.2: How can I load the content of a table with Knockout JS when the page is rendered

texts:
I have created a custom page where customer accounts that belong to the same company are listed.

The table content is based on an observable array so that it updates automatically when an account is edited or added.

I am not able to populate the table directly when the page is rendered. For testing I placed a click binding on the table header. When I click on the header the table is populated. But I want that the function is called directly when the page is rendered. I have already tried serveral things, but I am not able to get it to work.

            Prefix
            Firstname
            Lastname
            Email
            Authorization Level
            Created At
            Status
            Actions

Javascript:

define([
    'ko',
    'uiComponent',
    'mage/url',
    'mage/storage',
    ],
    function (ko, Component, urlBuilder, storage)
    {
        'use strict';
        return Component.extend({
            defaults: {template: 'Test_Account/userlist',},
            userList: ko.observableArray([]),
            errorMessage : ko.observable(),
            getUser: function () {
                var self = this;
                var serviceUrl = urlBuilder.build('account/useraccounts/user');
                return storage.post(serviceUrl,''
                ).done(function (response) {
                    self.userList.removeAll();
                    response.forEach(function(element) {
                        self.userList.push(element);
                    });
                }
                ).fail(function (response) {
                    self.errorMessage = response;});
            },
        });
    }
);


texts: Magento 2.1.8 dev site catalog search and products listing redirecting to live site

texts:
I have setup my magento 2.1.8 EE live site on staging for development. The homepage, admin and cms pages are working fine. But my prduct pages are redirecting to live site and catalog search also redirects to live site.

Please provide a solution.

Thanks.


texts: Plugin recommendation for product surcharges?

texts:
For certain products we need to charge an additional surcharge. It should be possible to set this amount individually for every product.
The surcharge should be displayed as detailed as possible everywhere the totals are shown (cart, checkout, order confirmation email, etc.). So pretty much like a tax, but configurable individually on the product level.
Does anybody have a recommendation for an extension? The ones I found via Google did not satisfy my requirements as described above. :(


texts: Paypal - accept Terms & Conditions not working

texts:
This is a problem reported several times with many possible solutions.

Customer is redirected from Paypal back to website
https://www.example_website.com/paypal/express/review/ page. He has to check that he agrees with terms & conditions. But after checking that and clicking "Place Order" button, he's redirected back to the same page with message "You need to accept Terms & Conditions in order to proceed" or "Order payment Failed. Please try again later..."

I have tried

changing skin/frontend/base/default/js/checkout/review.js file (Place Order Button disabled with Virtual Products, PayPal Express, and Terms and Conditions)
changing app/design/frontend/base/default/template/paypal/express/review.phtml file (https://community.magento.com/t5/Magento-1-x-Technical-Issues/Payment-process-failed-because-checkboxes-button-does-not-work/m-p/33826#M3194)
installing this extension (https://github.com/magento-hackathon/Sandfox_RemovePaypalExpressReviewStep)
installing this extension (https://github.com/thinklikeamage/Stabilis_PaypalExpressRedirect)

and other numerous solutions I cannot recall, but nothing really worked.

Does anybody know the source of this issue? It started as soon as I enabled Terms and Agreements in checkout. Before that, all payments through Paypal were completed normally.


texts: klarna merchant_checkbox_text is disable

texts:
I am using klarna m2 module in klarna checkout I want to unable merchant checkbox under
sales->checkout->klarna
checkout option.

I am able to make it active but when I tried to change its text this merchant_checkbox_text is disable.

I checked in code visibility is depend on merchant_checkbox and I make it active but still its inactive


texts: Limit concurrent users with a queue / wait page

texts:
For a special day where we expect up to 10x more orders in one hour as normal we would like to implement a user queue / wait page* like it is common for tickets shops if you have a heavy peak.

Any suggestions to implement it?

Our first try:

Route all request via htacces to a Magento independent queue.php to handle and calculate max users and their sessions.
If max users not reached route to index.php
If max users reached show queue page with a countdown to reload and numbers of users "in front" of queue.

It would work without varnish but with this caching mechanism queue page is also cached and shown to users.

Maybe the logic has to be implemented into varnish?

Our stack is:

load balancers with varnish
Magento frontend server with PHP and Redis on dedicated servers
dedicated database servers, master and slave
dedicated file server

Btw. More hardware is no option, we can handle 1000 orders per hour but not 10.000.

Sorry I have no better words than "user queue / wait page"


texts: Backend issue with uploader after SUPEE-8788 (CE 1.7.0.2)

texts:
I got an issue on backend, */catalog_product/edit after applying successfully the patch SUPEE-8788.

The error "Uncaught ReferenceError: Uploader is not defined" is returned.

The uploader buttons are displayed but don't work (because of this JS error I guess).

Is someone got the same error?
If yes, how did you fixed it?

EDIT: This initial issue is now fixed.

No js merge is disabled (I'm working locally).

But I've found the problem.
The cause was: me ':)

I ran the PATCH on my distant server, then retrieve all the updated ressources locally.

I've just forgot to take the folder /js/mage/adminhtml/uploader

So now the uploader is opening the windows for file selecting.

BUT, when I click on "upload files", the uploader seems working fine, "complete" message is displayed.

BUT no image seems really uploaded (the file is not added  to the product images list).


texts: Why prototype.js causing jquery slider to not working in ie 9 and ie8?

texts:
In my product detail page i have integrated a slider for related products. It works well in all browser except ie 9 and ie 8, works in ie 10.

When i removed prototype.js from page.xml it works well in all browsers. Why this issue occuring any solution to this problem?

I am not getting any error in browser console.

The plugin i used is caroufredsel.
In my related.phtml file used following code,

<script  src="<?php echo $this->getSkinUrl('js/jquery.carouFredSel-6.2.1.js');?>"></script>

<script type="text/javascript">
jQuery(document).ready(function() {
    jQuery('#block-related').carouFredSel({
    circular: false,
    infinite: false,
    auto    : false,
    prev    : {button: "#foo2_prev",key: "left"},
    next    : { button: "#foo2_next",key:"right"
        }
    });
});
</script>


texts: Magento 2 + custom eav field value store in array

texts:
I have a custom eav structure and there is store_id save in array format in the database field.

I need to filer collection with addFieldToFilter with store_id.

$collection = $this->xyzCollectionFactory->create();
$collection->addFieldToFilter('store_id', ['in' => $this->storeManager->getStore()->getId()]);

Datastore in the database below format

["1","2","8","3","4","5"]

this filter is not working, anyone has an idea how can I do that?


texts: How to change text "sign in" to "Login" in top header

texts:
I want to rename text "Sign in" to "Login" in my header top.

Please refer attached file.


texts: Google Analytics Shopping Behavior Analysis Missing Data

texts:
i've created an ecommerce store and created the analytics for this store,
On Magento2 backend i've placed the Tracking Code and i start to check that the data is being sent into GA.
The enhanced eCommerce is already enabled and collecting order data.
The issue is the Shopping Analysis Behavior that is missing data on some steps

Sessions with Product Views
Sessions with Add to Cart
Sessions with Checkout

I've attached a printscreen of this.

Regards


texts: Special Price with Configurable Products in Magento 2

texts:
We have been converted some Configurable products from Downloadable products. But have an issue in there, we can't be set Special Price(link open the modal set Advancing Pricing is hidden) and very strange, Magento is automatically set Special Price for them.

E.g: A product have price is $200, it's automatically set to $150 when to convert to Configurable Products. We will seem it in frontend or via getFinalPrice() function. Before, we had config special price for the old downloadable product.

My Question:

  How to Magento ignore set Special Price or we will control the special
  price for the configurable product?

Any help would be greatly appreciated!

We are using the Magento version 2.1.1


texts: Magento 1.9 - How to set PCI Compliance script integrity check for merged js file

texts:
I had scan the site with PCI scan. But it is failed and its score is 7.8. Following are the scan results of PCI scan:

Title:
Script Src Integrity Check

Synopsis:
Report external script resources not using integrity.

Impact:
The remote host may be vulnerable to payment entry data exfiltration
due to javascript included from potentially untrusted and unverified third
parties script src. If the host is controlled by a 3rd party, ensure that the 3rd party is PCI DSS compliant.

Resolution:
Set script integrity checking on target script or remove target script.

Data recieved:
example.com/media/js/90a8720cd608ccab8eaf40398
728caf8.js Attributes : - type : text/javascript - src :

I can generate the integrity hash for single script by running following command:
cat jquery.js | openssl dgst -sha384 -binary | openssl base64 -A

My question is - How I can set the script integrity for the merged file like below:
example.com/media/js/90a8720cd608ccab8eaf40398
728caf8.js

I have merged the JS and CSS files in Magento. I want to set the script integrity for the merged js file.

Thank you.


texts: How can i get customer data from observer after successful login?

texts: I have made a custom module in which I have an observer file. I need to display all information about the logged in user.


texts: Mage::app()->getLayout()->createBlock()->toHtml() taking much load time

texts:
I am calling a block method of another module in one of the .phtml file using below code--

Mage::app()->getLayout()->createBlock('tablisting/list')->toHtml();

this code works but it takes too much time in loading (approx.- 12 sec).
When I dig it deeper I found toHtml() function which calling  $this->renderView() in Mage_Core_Block_Template file. This line of code taking much time in loading.

Block file List.php -

protected function _toHtml(){
        if(!$this->getConfig('isenabled')) return;
        $is_ajax = Mage::app()->getRequest()->getParam('is_ajax');
        if( $is_ajax ){
            $cat_id    = Mage::app()->getRequest()->getParam('tab_cat_id');
            $order_id  = Mage::app()->getRequest()->getParam('order_id');
            $type      = Mage::app()->getRequest()->getParam('data_type');
            if( $type == 'order' ){
                $child_items = $this->getProductsOrder($order_id);
            } else {
                $child_items = $this->getProducts($cat_id);
            }
            $template_file = 'sm/tablisting/default_items.phtml';
        }else{
            $template_file = 'sm/tablisting/default.phtml';
        }
        $this->setTemplate($template_file);
        return parent::_toHtml();
    }

Is there any other way to call that block method in my template file ?
How can reduce loading time ? Please help me. Thanks in Advance.


texts: How to redirect after successful import via DataFlow import in magento 1.9.2.4

texts:
I am using System->Import/Export->Dataflow-Advanced Profiles for importing products to store.

I have inherited Mage_Adminhtml_System_Convert_ProfileController class. Using this it allows me to import profile in popup window.
I have found that is uses ajax for that.
At the end it uses

  Finished profile execution.

To represent the import is done.

Now , how can i redirect from successful import of products to somewhere in my store?

Thanks


texts:
How do I get meta title, meta description and optional keywords from category via the REST API in Magento 2.2?

https://localhost/rest/V1/categories/123

https://localhost/rest/V1/categories/list?searchCriteria[filterGroups][0][filters][0][field]=name&searchCriteria[filterGroups][0][filters][0][value]=news&searchCriteria[filterGroups][0][filters][0][conditionType]=eq

Above API calls Will get me the category just without the fields I need.


texts: Magento 1 Redirect Error web/url/redirect_to_base Not in Database

texts: After installing Magento 1 I am getting a redirect error when I try to access the front end or the admin panel. I looked at some older documentation and I found I need to set the value of web/url/redirect_to_base to 0. Although I am not finding it in the database. I am looking in the core_config_data table.


texts:
One of the configurable attributes on the product details page is date. Currently these are displayed in the order which they are found in the database.

I need for these to display on the product page in an ascending sorted order. So far I've gotten as far as this file

Mage/Catalog/Model/Product/Type/Configurable.php

The attributes seem to be called by this method

getConfigurableAttributeCollection($product = null)

which is called from

getConfigurableAttributes($product = null)
 {
    Varien_Profiler::start('CONFIGURABLE:'.__METHOD__);
    if (!$this->getProduct($product)->hasData($this->_configurableAttributes)) {
        $configurableAttributes = $this->getConfigurableAttributeCollection($product)
            ->orderByPosition()
            ->load();
        $this->getProduct($product)->setData($this->_configurableAttributes, $configurableAttributes);
    }
    Varien_Profiler::stop('CONFIGURABLE:'.__METHOD__);
    return $this->getProduct($product)->getData($this->_configurableAttributes);
}

I've done various var_dumps() at different points but I am still unsure about where exactly I can or should sort these dates.


texts:
I have follow this link to  knows about RabbitMq is used in Magento2EE. for Instead of Mysql+cron Process in Magento2CE.

I annualized about some drawbacks while using Mysql+Cron in Magento 2 CE. follow this link

  Disadvantages if compared to real queue-solutions: first off, cron is running as a cycle so you are not able to immediately react on adding of a record into the queue. Secondly, using such a scheme makes it quite difficult to parallel a queue. Magento 2.0 EE gives you the possibility to use queues not only on the basis of Mysql+cron, but also on the basis of RabbitMq.

I need to overcome these drawback, I saw this statement magento2 devdocs link

  RabbitMQ must be installed and configured after Magento Community Edition and before Magento Enterprise Edition.

so I install and integrate rabbitmq in magento2 CE. follow this install rabbitmq and Integrate to magento 2CE after follow this guide to working samples to use Rabbitmq.

Next I Have configured rabbitmq to magento2CE

add my env.php like this:

   'queue' => [
            'amqp' => [
                'host' => 'hostip',
                'port' => '5672',
                'user' => 'user1',
                'password' => 'userpass',
                'virtualhost' => '/',
                'ssl' => ''
            ]
        ]

Next I create a queue.xml in custom module:

Vendor/Module/etc/queue.xml:

    <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework-message-queue:etc/queue.xsd">
        <publisher name="test-publisher-1" connection="rabbitmq" exchange="magento"/>
        <topic name="customer.created" schema="Magento\Customer\Api\Data\CustomerInterface" publisher="test-publisher-1"/>
        <consumer name="customerCreatedListener" queue="test-queue-1" connection="rabbitmq" class="vendor\RabbitMq\Block\Testing" method="processMessage"/>
        <bind queue="test-queue-1" exchange="magento" topic="customer.created" />
    </config>

Consumer Class:

vendor/Module/Block/Testing:

    <?php
      namespace Vendor\Module\Block;

    require_once  '/var/www/public/vendor/autoload.php';
    use PhpAmqpLib\Connection\AMQPStreamConnection;

    class Testing //extends \Magento\Framework\View\Element\Template
    {

      public function processMessage($argv)
      {
              $connection = new AMQPStreamConnection('hostip', 5672, 'user1', 'userpass');
              $channel = $connection->channel();

              $channel->exchange_declare('magento', 'topic', false, false, false);

              list($queue_name, ,) = $channel->queue_declare("test-queue-1", false, false, true, false);

              $binding_keys = array_slice($argv, 0);
              if( empty($binding_keys )) {
                  file_put_contents('php://stderr', "Usage: $argv[0] [binding_key]\n");
                  exit(1);
              }

              foreach($binding_keys as $binding_key) {
                  $channel->queue_bind($queue_name, 'magento', $binding_key);
              }

              echo ' [*] Waiting for logs. To exit press CTRL+C', "\n";

              $callback = function($msg){
                  echo ' [x] ',$msg->delivery_info['routing_key'], ':', $msg->body, "\n";
              };

              $channel->basic_consume($queue_name, '', false, true, false, false, $callback);

              while(count($channel->callbacks)) {
                  $channel->wait();
              }

              $channel->close();
              $connection->close();

      }

    }

    $test = new Testing();
    $arr =array("customer.*");
    $test->processMessage($arr);

I have listen customerCreatedListener, after Configured , I try to create one new customer, But NO queue added in rabbit mq,

Reference:

Suggest Me

Can we use Rabbitmq in magento2 CE?
If use  Rabbitmq in magento2 CE, what I miss in my Configuration.
How to use Rabbitmq instead of Mysql+Cron in Magento2 CE


texts: Magento 2: How to Prevent item's quantity from being added

texts:
Does anybody have clue how to force Magento 2 to not merge into one CartItem the same product on adding to cart?

Let's say I would like to sell ropes and my clients might want to order exactly the same rope but with few different lengths (length is defined by quantity). I would like Magento to add certain products (for example by attribute) always as new CartItem without checking if the same product is actually in cart.

Does anybody struggle with that problem?


texts: How to download the folders of installed extension from magento

texts:
I want to download all the folders and files for my installed extension.
I think there is a url in Magento from where we can download the extension.
can anyone help please?


texts:
I want to add active class in top links?

  \app\design\frontend\default\default\template\page\template\links.phtml

<?php $_links = $this->getLinks(); ?>
<?php if (count($_links) > 0): ?>
    <ul class="links"<?php if ($this->getName()): ?> id="<?php echo $this->getName() ?>"<?php endif; ?>>
        <?php foreach ($_links as $_link): ?>
            <?php if ($_link instanceof Mage_Core_Block_Abstract): ?>
                <?php echo $_link->toHtml() ?>
            <?php else: ?>
                <li<?php if ($_link->getIsFirst() || $_link->getIsLast()): ?> class="<?php if ($_link->getIsFirst()): ?>first<?php endif; ?><?php if ($_link->getIsLast()): ?> last<?php endif; ?>"<?php endif; ?> <?php echo $_link->getLiParams() ?>><?php echo $_link->getBeforeText() ?><a href="<?php echo $_link->getUrl() ?>" title="<?php echo $_link->getTitle() ?>" <?php echo $_link->getAParams() ?>><?php echo $_link->getLabel() ?><?php echo $_link->getAfterText() ?>

                <?php endif; ?>
            <?php endforeach; ?>

<?php endif; ?>


texts: POST is not creating a Tax class in Magento2 API

texts:
Unable to create a new Tax Class using POST call
end point -> http://magentohost/rest/default/V1/taxClasses

While creating a new Tax class using API /V1/taxClasses under taxTaxClassRepositoryV1 from the link http://devdocs.magento.com/swagger/index.html#/

The request which I am sending has a header with Content-Type and Authorization and body as below in JSON format,

{
  "taxClass": {
    "class_id": 6,
    "class_name": "newcustomer",
    "class_type": "CUSTOMER",
    "extension_attributes": {}
  }
}

The response which I get is

{
  "message": "No such entity with %fieldName = %fieldValue",
  "parameters": {
  "fieldName": "class_id",
  "fieldValue": 6
  }
}


texts: after filing in the address information on one page checkout it redirects to the failure url i.e., back to the shopping cart

texts:
i have magento 1.9 installed and when i checkout and try to register it directs me back to the shopping cart page the error log reads :
client denied by server configuration: public_html/skin/frontend/rwd/default/scss/ on onepagecheckout page


texts: Create Custom API with multiple values of a parameter magento 2

texts:
I am trying to create a new API which calls the existing methods to get products data inside my custom method

I wanted to accept multiple values of a parameter (comma separated)
eg. parameters

 key           value

 id              1,2,3

How can I pass comma separated values as parameters

CustomAPI/Product/etc/webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/details" method="POST">
        <service class="CustomAPI\Product\Api\DetailsInterface" method="prizeId"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

CustomAPI/Product/etc/di.xml

<?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="CustomAPI\Product\Api\DetailsInterface"
                type="CustomAPI\Product\Model\Details" />
</config>

CustomAPI/Product/Api/DetailsInterface.php

<?php
namespace CustomAPI\Product\Api;

interface DetailsInterface
{
    /**
     *
     * @api
     * @param int[] $id Prize Id.
     * @return array Products data.
     */
    public function prizeId($id);
}

CustomAPI/Product/Model/Details.php

<?php
namespace CustomAPI\Product\Model;
use CustomAPI\Product\Api\DetailsInterface;

class Details implements DetailsInterface
{

    /**
     *
     * @api
     * @param int[] $id Prize Id.
     * @return array Products data.
     */
    public function prizeId($id) {
       return $id;
    }
}


texts: How to check if the current shopping cart has met the conditions of a specific Shopping Cart Price Rule

texts:
I have a specific shopping cart rule that checks weather 3 items or greater of products from certain categories have been added to the cart, and then gives a discount on a specific Item ( I will call it "Y" in this case).

Magento will only apply the discount on Item Y if it has been added to the cart.

What I am trying to do is display the option to add the product "Y" on the cart page (cart.phtml) if the user has not yet added it to the basket.


texts: Magento 2 - Event after customer edit account and address

texts:
I need to add some custom logic in my extension after

Edit Account Information
Change Password
Edit Address

The customer_save_after_data_object event can be used for case 1. How about 2 & 3?


texts: I can't change place of custom button in product page magento 2

texts:
I have created Custom Button  using following Code at addtocart.phtml

<?php if($_product->getCustom_button()){ //yes or no button?>
        <button type="button"
                            title="<?php echo $_product->getCustom_button_name() ;?>"
                            class="action primary tocart"
                            onclick="window.open('<?php echo $_product->getCustom_button_url() ;?>')"><?php echo $_product->getCustom_button_name() ;?></button>
        <?php } ?>

my custom button is below of add to cart button. I can't move custom button right side of custom button.


texts: Getting product attribute not correct Magento 2

texts:
I am trying to get an attribute value to fill in to prefix on some mini cart items if the custom attribute value is filled in. However I am getting a value for previous cart items in the same shopping cart. The following is the code for getting the attribute and adding it to the item data that is used to fill the mini cart:

    public function aroundGetItemData(AbstractItem $abstractItem, \Closure $result, Item $item)
{
    $returnedArray = $result($item);
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $product = $objectManager->get('Magento\Catalog\Model\Product')->load($item->getProduct()->getId());

    error_log($item->getSku() . " - " . $product->getSku() . " - " . $product->getCustomAttribute());
    return \array_merge(
        ['product_sku' => $item->getSku(), 'product_custom_attribute' => $product->getCustomAttribute()],
        $returnedArray
    );
}

When I log the values out I get:

[23-Aug-2016 00:35:01 UTC] BC6CANL - BC6CANL - custom attribute text
[23-Aug-2016 00:35:01 UTC] BCIIA2F14 - BCIIA2F14 - custom attribute text

The text of the first log entry is correct for SKU 123456, but the text for 654321 should be empty as that attribute is blank for that product. Any ideas?


texts: Which form file is being used currently? Registration doesn't work

texts:
After a heavy upgrade to 1.9.2.2 and re-downloading all modules, running supee-6788-toolbox and downloading a new version of the theme, I still run into problems.

In the renderd registration page I can't find form_key at all.
So I thought I simply add:
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />
to the file app/design/frontend/default/em0121/template/customer/form/register.phtml since it didn't contain the form key.

Then deleting cache, reloading page but the formkey is still not showing up in the HTML code.

A search for sudo grep -r -i 'customer.form.register.newsletter' only yielded two findings and the default version contains the form_key already.

  app/design/frontend/default/em0121/template/customer/form/register.phtml:                    getChildHtml('customer.form.register.newsletter')?>
  app/design/frontend/base/default/template/customer/form/register.phtml:                    getChildHtml('customer.form.register.newsletter')?>

Is it possible that my theme doesn't use the register.phtml if someone clicks on register?
How can I find out which form phtml file is currently used on a page I'm looking at?


texts: Magento 2.2.1 Changing the store Currency hides the product

texts:
Can someone help me with Magento 2 Currency switcher issue in Magento 2.2.1?
I've setup the different currencies in my store.when I set the currency Rates field for any currency more than 5 and Change the currency while in the Category page then all the products inside that category are removed,the 'list.phtml' file is also not called.
and if I open the product and then change the currency then the Rates are disappeared for that product but when I'm able to add that product in the cart and price is showing in the cart page.


texts: how magento stores product details in multiple websie store?

texts:
how the product details are stored for each store and website?

is magento clones product details for every store, websites separately OR

it done by field values of the product tables.

because we can change almost all the details in each stores , so it is easy to clone a product and store the data related to each store/website as a separate entity


texts:
I am creating a module that clears invalidated cache,
I am trying to get invalidated cache types in controller, so i can clear cache for only cache types which are invalidated.
How to invalidated cache types in controller ?


texts: Add custom data with order email content magento

texts: I want to add custom data in order confirmation email. I have vehicle information that are attached to the order email to show to customer their vehicle make, model, year. These values are attached with order_id.


texts: Magento2 : Vat Field Validation on checkout page

texts:
Condition is this.

VAT textfield  -  require field validation off  when country selected is USA

VAT textfield  -  require field validation on  when country selected is other than USA


texts:
i'm creating a menu in this way:

<block type="page/template_links" name="footer_links2" as="footer_links2" template="page/template/links.phtml">
    <action method="setTitle"><title>Main menu</title></action>
    <action method="addLink" translate="label title" module="catalogsearch">
        About us
        <url helper="cms/page/getPageUrl"><pageId>3</pageId></url>
        <title>About us</title>
    </action>
    <action method="addLink" translate="label title" module="catalogsearch">
        Contact us
        <url helper="cms/page/getPageUrl"><pageId>4</pageId></url>
        <title>Contact us</title>
    </action>

</block>

and it works, but i want that the same menu appears in a different part of the page too with the same content. Is there a way to duplicate the output of that block so that i can show it without duplicating the code?


texts: In Magento two which phtml file contains the 'My Account' top nav link?


texts: how to get magento admin users from magento 1.9

texts: I want to get magento admin users and assign them a mobile number, from each particular agent panel, agent can able make a call from that number.


texts: Magento 2 Customer review report search Bug in all 2.1.x, 2.2

texts:
Steps to reproduce

Go to Reports -> By Customers
Enter customer name in search box
Click on search

It will show

  Fatal Error: Column not found: 1054 Unknown column 'customer_name' in
  'where clause', query was: SELECT COUNT(DISTINCT detail.customer_id)
  FROM review AS main_table

I have found this bug in all Magento 2.1.x. And posted issue on github

https://github.com/magento/magento2/issues/10301

Have anyone idea about this?

EDIT:

This issue still continues in Magento 2.1.8, 2.2 and 2.2 EE


texts: Some of my customers have second email address as customer attribute. I would like to send an copy of every transactional email to customer second email address. I wonder - if magento have event which firing during transactional email sending?


texts:
I changed the admin URL path and I need to change it back, but I no longer have access to the admin panel, because I changed the admin URL. :(
I forget exactly what the input form looked like, so I'm not sure exactly what I did, but as soon as I hit "save" I lost my access to the admin panel.
How can I get into the admin panel?


texts: Is there any way, when pressing delete product button. Check if the number of items is 1 and there is only 1 item left, the defective item cannot be retrieved and returned. If there are 2 items of the same quantity, you can leave the rest in magento 2


texts: Adminhtml how to get current scope in ajax controller

texts:
I need following if in admin i click on button i need to write some system values based on the current scope.

/** @var \Magento\Config\Model\ResourceModel\Config $resourceConfig */
$resourceConfig->saveConfig('path/to/field', $value, $scope, $scopeId);

so the question is how to get the scope?


texts: Only display Free Shipping on qualifying orders at checkout

texts:
On the cart page, when a sale qualifies for free shipping it displays all shipping options in addition to the "free shipping" option.

Is there a way to show only the free shipping option when a sale applies for it?


texts:
I have create the custom pagination with Magento(1.9), see the below code for the pagination.

code in block

public function getPagerHtml()
 {
    return $this->getChildHtml('pager');
 }

protected function _prepareLayout()
 {
        parent::_prepareLayout();
        $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
        $pager->setAvailableLimit(array(5=>5,10=>10,20=>20,'all'=>'all'));
        $pager->setCollection($this->getCollection());
        $this->setChild('pager', $pager);
        $this->getCollection()->load();
        return $this;
  }

by default it list the first 5 list, i need to list only 4. how and where i need to work for this changes.

FYI i attached screen will better help you.


texts: Remove thousand separator from all price display- Magento 2

texts:
I want to display the price without ','.
 My current format is : ر.س. 1٬105.00
But I need : ر.س. 1105.00

I tried to remove from locale. But not working.


texts: Update Order status on action of place order?

texts:
I've got a custom payment module.
How can I update the order status to complete on the action of place order?
 If the order is placed choosing the custom payment method.

Thanks in advance!


texts: Adding Product To Cart Leads To Infinite Loop

texts:
I have an observer set up to listen for 'checkout_cart_product_update_after', 'checkout_cart_product_add_after', 'sales_quote_remove_item', and 'checkout_cart_update_items_after'.

The goal for my observer is to check to see if groups of SKUs have been added in a sufficient quantity to qualify for bonus and price reduction.  For example:

If there are 20 items from group X there would be Y bonus items added.  My problem is that the adding of the bonus items triggers "checkout_cart_product_add_after" and I'm getting an infinite loop.  Attached is the code:

<?php
class Test_ManageCart_Model_Observer
{
    private $_debug = true;
    private $_skus = array(
      array("1002S","1CYOS",18210,15510,1002)
    );
    private $_steps = array(
      array(50, 80, 100, 200, 300, 400)
    );
    private $_rates = array(
      array(56.92, 55.87, 54.79, 52.70, 49.85, 46.80, 39.60)
    );
    // we use our constructor/destructor just to make it easier to spot output in the     log file
    function __construct () {
      $this->log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
    }
    function __destruct () {
      $this->log("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
    }
    public function manageCart($observer)
    {
      $cart = Mage::getModel('checkout/cart')->getQuote();
      // variable to keep track of counts for various sku groupings we've set in     $_sku
      $counts = array();
      foreach ($cart->getAllItems() as $item) {
        // reset prices
    $this->resetRate($item);
        // loop through all our sku rules to see if this one matches any
        foreach ($this->_skus as $index=>$skus) {
          // if so, add to the cumulative count
          if (in_array($item->getSku(), $skus)) {
            $counts[$index] += $item->getQty();
          }
        }
      }
      $this->log(print_r($counts, true));
      // loop through thresholds to see if any have been met
      for ($i = 0; $i < count($this->_skus); $i++) {
        // base threshold is used to keep track of the last one we passed, we have to     loop through
        // to make sure we're acknowledging the highest one
        $baseThreshold = -1;
        foreach ($this->_steps[$i] as $index=>$step) {
          if ($counts[$i] >= $step) {
            $baseThreshold = $index;
          }
        }
        // if we've met a threshold, loop through the products again and give the
        // necessary discount
        if ($baseThreshold != -1) {
          foreach ($cart->getAllItems() as $item) {
            if (in_array($item->getSku(), $this->_skus[$i])) {
              $this->setRate($item, $this->_rates[$i][$baseThreshold]);
            }
          }
        }
      }
    }
    public function resetRate($item) {
      $item->setCustomPrice($item->getProduct()->getPrice());
      $item->setOriginalCustomPrice($item->getProduct()->getPrice());
      $item->getProduct()->setIsSuperMode(false);
    }
    public function setRate($item, $price) {
      $item->setCustomPrice($price);
      $item->setOriginalCustomPrice($price);
      $item->getProduct()->setIsSuperMode(true);
    }
    public function log($string) {
      if ($this->_debug) {
        Mage::log($string);
      }
    }
}

I feel like the solution lies somewhere in setting a meta value for the cart, but so far I haven't found a good way to deal with this.  Is there a built in Magento way of keeping track of the fact that I've already added the items?


texts: Estimate shipping block not showing on cart page

texts:
I am not able to see estimate shipping on cart page. In console getting these three errors

I cannot find the problem where the issue exist.
Please help me and thanks in advance.


texts: Magento Import products Internal Server Error

texts:
I just clicked on Check data for imported file I have inserted
It keeps on loading there is in infinite Please wait
and sometimes shows
500

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at you@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

My value for phpinfo is attached


texts: How to translate title attribute in acl.xml

texts:
I have this code in acl.xml:

 <resource id="Magento_Paypal::use" title="Place Order Using Billing Agreements" translate="title" sortOrder="15" />

and I already added this string in ar_SA.csv like that:

     "Place Order Using Billing Agreements","translation here"

but the translation doesn't appear yet. Did I miss something?

I've updated the translation file, flushed the cache but it didn't help.


texts:
After a full migration to the production server I noticed that some filenames of the swatch colors wasn't matching with their respective color attribute name (a code in the filename was in lowercase instead being the opposite), so I took the decision to capitalize the whole filename (except the filename extension) and the attribute value for every color.

As anybody would guess, I renamed all the files in the folder using a Bash script and the attribute values using a SQL update statement, but now none of the swatch images shows up (but the swatches display the attribute name in uppercase as it should be, even in the Admin Panel). The swatch folder (media/catalog/swatches) is gone. The IMG tag is not being created. The source swatch folder (media/wysiwyg/swatches) where the files are uploaded, is OK.

I flushed the swatch image cache (then the whole cache) and reindexed the Product Attributes index (then all the indexes). Exception.log says nothing about the issue.

Seems like something is broken but I don't know what.


texts: Magento2 : Filtering product list by extension attribute

texts:
I added a new extension attribute extensionattribute1 to

  Magento\Catalog\Api\Data\ProductInterface.

<attribute code="extensionattribute1" type="string">
  <join reference_table="training_extensionattributes_values" reference_field="product_id" join_on_field="entity_id">
    <field column="extensionattribute1">extensionattribute1</field>
  </join>
</attribute>

That worked all right and the extension attribute is shining up in the collection gathered over the rest api.

Now I would like to filter the product list returned by

  Magento\Catalog\Api\ProductRepositoryInterface

programmatically via the SearchCriteriaBuilder (without passing the params via rest api). In concrete: I want to return it all products where extensionattribute1 is set to the value '20'.

What I tried was to build a filter like that:

   $filter=$this->filterBuilder
        ->setField('extensionattribute1')
        ->setValue('20')
        ->create();

But that did not work (Invalid attribute name Error). Same with

   $filter=$this->filterBuilder
        ->setField('extension_attributes[extensionattribute1]')
        ->setValue('20')
        ->create();

Thanks for giving me a hint on how to reach my goal.


texts: Include javascript from module in magento 2

texts:
I had been created module magento 2 with this sample : URL:
https://www.ashsmith.io/2014/12/simple-magento2-controller-module/

I have spent more time review default module of magento 2 and research "Include javascript from module to magento 2.
I have tried:
layout/default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="authentication-popup">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="hello" xsi:type="array">
                        <item name="component" xsi:type="string">ABC_Hello/js/hello</item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

view/frontend/requirejs-config.js

/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

var config = {
    map: {
        '*': {
            captcha: 'ABC_Hello/hello'
        }
    }
};

frontend/web/hello.js or frontend/hello.js

define([
    "jquery"
], function($) {
    "use strict";

    $(document).ready(function(){
        alert('Test JS');
    });
});

but it not work.

Thanks any tips??

Update
Resolved
My Layout: hello_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
        <title>Hello magento 2</title>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="ABC\Hello\Block\Hello" name="hello" template="ABC_Hello::hello.phtml" />
        </referenceContainer>
    </body>
</page>

default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="authentication-popup">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="hello" xsi:type="array">
                            <item name="component" xsi:type="string">ABC_Hello/js/hello</item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

layout/web/hello.js
Code javascript


texts: QuoteValidationRuleInterface does not exist Magento 2.2.6

texts:
I am suddenly getting below error in my working Magento 2.2.6 project.

  Class Magento\Quote\Model\ValidationRules\QuoteValidationRuleInterface does not exist

This file does not exist in my project from the beginning and it was working without any error.

Still i tried with removing Magento_Quote from vendor directory and reinstalling with composer install command but that new Quote module also does not include QuoteValidationRuleInterface file.

What can be the issue?


texts: Magento Product Addtocart go to Checkout Page by skip Cart Page

texts:
In Magento,
when the AddtoCart button is clicked the product should go straight to checkout page instead of cart page, i dont need to add the product to cart page, is it possible?

Any ideas?
Thanks.


texts: Magento2: How do i generate Remove from cart Url for a product?

texts:
I want to cart item remove in minicart using custom URL.

Below code in magento1 I want to magento2 code

/**
 * Get item delete url
 *
 * @return string
 */
public function getDeleteUrl()
{
    return $this->getUrl(
        'checkout/cart/delete',
        array(
            'id'=>$this->getItem()->getId(),
            Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->helper('core/url')->getEncodedUrl()
        )
    );
}

You can find the call to this in template/checkout/cart/item/default.phtml:

<a href="<?php echo $this->getDeleteUrl()?>" title="<?php echo $this->__('Remove item')?>" class="btn-remove btn-remove2">
<?php echo $this->__('Remove item')?>

How can I achieve that?


texts: How to get currency symbol by currency code?

texts: I can get the currency code from the order object. How can I derive currency symbol by using it? Any suggestions will be appreciated.


texts: How to create Dependent Product Attributes

texts:
I have created 3 Product Attributes, I want to make Start Date and End Date attribute to depend on Enable Attribute.

When i make Enable to Yes both the Date Attribute should be displayed how can i do that?

I have created a modifier class but no luck!


texts: How to get category design style from search?

texts:
My magento shop has 3 main categories, each of them having 4 sub-categories

My 3 categories are 3 kinds of products : let's say Fruits, Cars, Clothes. They each have a general colour theme Fruits => Green, Cars => blue, Clothes=> red. this colour is used as page background. I do that by having 3 different layouts that extend the 1column default layout.

In my sub-category listing, I have used pictures in JPG (for lower file size), they then have a background that matches the colour theme of their category. The pictures do not fill the product cell in the category view and the rest of the cell has matching background colour.

Now, in search results page, I use similar layout as sub-category, I might have search results that yield products from all 3 main categories. I would like the background of the product cell to match the colour of the category it belongs to (and the colour of the JPG image background).

How can I fetch the "design" attribute of the category the products belongs to? (I will then apply CSS classes accordingly)

Magento 2.1.0


texts:
I want to add splash screen which includes choice to select pincode required by user,, then it displays homepage. I want details how and where to add code in magento files.. I don want to use any extension. Please guide me correct path.
reference: http://www.awesomeji.com/cadbury-s/
Reloading page should appear as below link
https://ihatetomatoes.net/create-custom-preloading-screen/