texts: Magento upgrade: help with this error message

texts:
My upgrade won't conclude. Can you help me "translating" to a simpler sentence this error message?

Error message

  Integrity constraint violation: 1452 Cannot add or update a child row:
  a foreign key constraint fails
  (DATABASE-incremental.salesrule_coupon_usage, CONSTRAINT
  FK_SALESRULE_COUPON_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY FOREIGN KEY
  (customer_id) REFERENCES customer_entity (entity_id)
  O)";i:1;s:1228:"#0
  /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/Resource/Setup.php(390):
  Mage::exception('Mage_Core', 'Error in file: ...')

So far I understand that a child table ("salesrule_coupon_usage") has a constraint ("FK_SALESRULE_COUPON_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY") that makes Magento compare to the parent table ("customer_entity") where there are some values ("entity_id") that aren't on the child table ("customer_id").

I'm ok removing values and I'd like to know if I have to remove them from the parent table.

Complete error

a:5:{i:0;s:477:"Error in file: "/is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php" - SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`DATABASE-incremental`.`salesrule_coupon_usage`, CONSTRAINT `FK_SALESRULE_COUPON_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) O)";i:1;s:1228:"#0 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/Resource/Setup.php(390): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/Resource/Setup.php(289): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '0.7.12', '1.4.0.0.6')
#2 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/Resource/Setup.php(233): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('0.7.12', '1.4.0.0.6')
#3 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/Resource/Setup.php(161): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/App.php(363): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /is/htdocs/wpSERVER/www/clonsite-incremental/app/code/core/Mage/Core/Model/App.php(295): Mage_Core_Model_App->_initModules()
#6 /is/htdocs/wpSERVER/www/clonsite-incremental/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#7 /is/htdocs/wpSERVER/www/clonsite-incremental/index.php(80): Mage::run('', 'store')
#8 {main}";s:3:"url";s:27:"/clonsite-incremental/admin";s:11:"script_name";s:31:"/clonsite-incremental/index.php";s:4:"skin";s:7:"default";}

Thank you!


texts: Product Details Page is blank Magento 2.3.2

texts: Fatal error: Uncaught Error: Call to a member function getDefaultPlaceholderUrl() on null in /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml:29 Stack trace: #0 /var/www/html/vendor/magento/framework/View/TemplateEngine/Php.php(59): include() #1 /var/www/html/vendor/magento/framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Catalog\Block\Product\View\Gallery\Interceptor), '/var/www/html/v...', Array) #2 /var/www/html/vendor/magento/framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/var/www/html/v...') #3 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1094): Magento\Framework\View\Element\Template->_toHtml() #4 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(1098): Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element{closure}() #5 /var/www/html/vendor/magento/framework/View/Element/AbstractBlock.php(671): Magen in /var/www/html/vendor/magento/module-catalog/view/frontend/templates/product/view/gallery.phtml on line 29


texts: How to remove image url from sitemap.xml Magento 2?

texts:
I have created sitemap.xml in the website. In which, Image URL coming with cdn link.

I have change setting from admin but still is showing.

I don't want to use CDN URL in the sitemap.

How to remove product image URLs from the sitemap.xml?


texts: Url category of products not showing correct products

texts:
If the category opened from menu
kategori/bordslopare
then It does not show correct number of products
but if a filter like this  is added then It shows correct number of products
?handla_cat=9807
At the back backend in CATALOG > Categories the category is tablecloth is having product count of 19

but at the front end when we click on menu category Table cloth then only one product is shown
but in actual there are 19 products to be shown

also if at the front end in menu if choose a category Table runner then
two categories are shown in layered navigation filter but instead only one should be shown only table runner should be shown

Here is the code for layered navigation
<?php if ($block->canShowBlock()): ?>

        <?php $filtered = count($block->getLayer()->getState()->getFilters()) ?>
        <div class="block-title filter-title" data-count="<?php /* @escapeNotVerified */ echo $filtered; ?>">
            <?php /* @escapeNotVerified */ echo __('Shop By') ?>

            <?php if ($block->getLayer()->getState()->getFilters()): ?>

                    <?php echo $block->getChildHtml('state') ?>

                        <a href="<?php /* @escapeNotVerified */
                        echo $block->getClearUrl() ?>"
                           class="action clear filter-clear"><?php /* @escapeNotVerified */
                                echo __('Clear All') ?>

            <?php endif; ?>

            <?php $accItems = 0; $openItems = '0'; ?>
            <?php foreach ($block->getFilters() as $filter): ?>
                <?php $accItems++; ?>
                <?php $openItems .= ' '. $accItems; ?>
            <?php endforeach; ?>

            <?php $wrapOptions = false; ?>
            <?php foreach ($block->getFilters() as $filter): ?>
    <?php  if($filter->getName() != __('Category')) { ?>
        <?php if ($filter->getItemsCount()): ?>
        <?php if (!$wrapOptions): ?>
            <?php /* @escapeNotVerified */ echo __('Shopping Options') ?>
            <div class="filter-options " id="narrow-by-list" data-mage-init='{"accordion":{"openedState": "active", "collapsible": true, "animate": 200, "active": "<?php echo $openItems; ?>", "multipleCollapsible": true}}'>
                <?php  $wrapOptions = true; endif; ?>

<?php /* @escapeNotVerified */ echo __($filter->getName()) ?>

<?php /* @escapeNotVerified */ echo $block->getChildBlock('renderer')->render($filter); ?>

                <?php endif; ?>
               <?php } ?>
                <?php endforeach; ?>
                <?php if ($wrapOptions): ?>

        <?php else: ?>


texts: Hide/disable standard shipping when qualified for free shipping

texts:
I have read the other suggestions for similar problems but I have not solved my issue yet.

I'm using standard shipping (with tablerates.csv) and free shipping on orders over $50 plus a flat rate for customers that want express post.

The problem is that when a customer qualifies for free shipping the standard shipping still shows up as an option. (It should just disappear and only leave "Free" and "Express" as the 2 options.)

I am not using a "Shopping Cart Price Rule" for free shipping as this introduces a different set problems.

Can someone suggest the simplest way to stop Magento from displaying the Standard/Table rates once the free shipping threshold has been reached.

(Or even suggest an extension that solves the issue or clarify answers given to Hide other shipping methods when free shipping is enabled)

Any help would be greatly appreciated.


texts:
Magento 1.9.0.1

Created category home

Added to homepage:

{{block type="catalog/product_list" name="product_list" category_id="3" template="catalog/product/list.phtml"}}

Following happened:

Added 4 products from category 1 to category home - working fine

Added 6 products from category 2 to category home - working fine

Removed 4 products from category 1 from category home - no products on homepage - category 1 shows only the 4 products that used to be on homepage, not all 105 products - category 2 shows all products but not the 6 that suppose to be on home page


texts: Controller ignoring _forward when compiler is on - is that desired behaviour?

texts:
Simple example tested on magento 1.7.0.2

Created overloaded controller for Mage_Cms_IndexController

<routers>
  <cms>
<args>
  <modules>
    <My_Extension before="Mage_Cms">My_Extension</My_Extension>
  </modules>
</args>
  </cms>
</routers>

In my controller I have two methods

testOneAction and testTwoAction

I can confirm that they work my just going into /cms/index/testOne and /cms/index/testTwo

Now the fun part

Created third method

public function testThirdAction() {
    $this->_forward('testOne');
}

When compiler is DISABLED going into /cms/index/testThird I can see data from testOne

When compiler is ENABLED - got blank page

Even with display_errors, developer mode, full error reporting, there is absolutely nothing in magento logs, web server logs or php error logs.

Tried xdebug and it pointed me into direction that request is not marked as dispatched and then it dies silently.

What I found so far:
In includes/src/Varien_Autoload.php

/**
 * Register autoload scope
 * This process allow include scope file which can contain classes
 * definition which are used for this scope
 *
 * @param string $code scope code
 */
static public function registerScope($code)
{
    self::$_scope = $code;
    if (defined('COMPILER_INCLUDE_PATH')) {
        @include COMPILER_INCLUDE_PATH . DIRECTORY_SEPARATOR . self::SCOPE_FILE_PREFIX.$code.'.php';
    }
}

Looks like @ makes it to die silently, if I change it to include_once, everything works great

Anyone can help?


texts: Magento2.3 - Form messages not displaying

texts:
In my Magento website, no Success/Error message is displayed after submitting Registration/Contact form.

I have tested this both on my custom theme and default luma theme.

Message block exists in page html.

How can I fix this or find what causes it?


texts: How to use custom variable in magento custom module

texts:
I have created a custom module for send SMS at the time of order place, I have created a observer for this which works and send SMS to customer.
I have provide message field in system configration and want to send this message to customer but I don't know how to create and use custom variable {order_id} in sms configration setting.

System configration setting figure as below :

As shown in above figure I want to use custom variable in message input field and want to send order_id from observer when message send.


texts: Magento 2: When should I run which commands?

texts:
I have been working with Magento 2 for 2 months now. I realized that I am using bin/magento setup:upgrade way too much. I think I do not know when I have to run that command.

Here are the situations that I run the aforementioned command.

When I create a new Module,
When I add something to Setup directory,
When I edit etc/module.xml,
When I edit etc/di.xml,
When I edit etc/webapi.xml,
When I edit etc/adminhtml/system.xml

Question: In which situations is it absolutely necessary to run bin/magento setup:upgrade command?

(The reason I am asking is that it takes some time finish that command. I believe that it can really improve the productivity if I stop using it unnecessarily.)


texts: Magento 2 : custom controller with multiple functions (actions)

texts:
i need index controller file in that i need to write addaction,deleteaction,getinfo,updateaction, like this place code multiple functions.same as like magento 1
after thaif i want add data can call add action if want update data i will directly to update action like this i am asking


texts:
When we click on stores setting configuration then coming this error?

  Notice: Undefined index: id in
  /home/213836.cloudwaysapps.com/ehanwfcbkq/public_html/app/code/Magento/Config/Model/Config/Structure/Element/Iterator.php
  on line 63

Error log record number: 200541276044


texts: How to get the product id and SKU code of the product selected

texts:
I am using a plugin to enable notify me (Out of stock) feature, the plugin is working properly but the problem is it is taking the core product id and storing it in the backend, even after I select a different color and size.

For example, if I have Product with the product id 82 and SKU code GEN26, even if I select a product with color green and size medium with SKU code GEN26GRMED and product id 84 and click on notify me button it is still storing the old product id 82 in the backend.

For now, I can see they are echoing the id using $_product->getId(), how can I dynamically get the product id of the product of the color and size I have selected so that I can know for which particular product customer have clicked notify me button.


texts: Checkout page error 'Email template '' is not defined'

texts: On checkout page I am getting error 'Email template '' is not defined'. I would like to know how can I debug this error to find out which email template is not defined.


texts: How can I disable all the payment options, when the cart value is 0 in Magento 1.9

texts:
How can I disable all the payment options, when the cart value is 0. I heard about zero subtotal checkout, but when the cart value is 0, all the payment methods appear along with the zero subtotal checkout and if someone clicks on any other payment options, error comes.

So is there any way where I can disable all the payment options when the cart value comes to zero. please tell step by step as I am super new in Magento.


texts:
I need help with checkout customization.
Can someone give me some links to resourses with information about Magento 2 checkout customization?  I am all ready readed developer guide and docs, but i still dont understand how to show additional parameters depending on the chosen shipment method.


texts:
I have a slide that I call through a static block

<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('slider_cartao')->toHtml(); ?>

in the inline.phtml file. It is displayed as follows:

And inspecting the code with the slider in this place to get an idea, it looks like this:

However I had to change this file slider, calling it the same way, but only now in the onestep.phtml file and it is displayed as follows totally unformatted none:

And inspecting the code with the slider already changed to the file onestep.phtml to get an idea, it looks like this:

With these examples you can get an idea of how the difference is even in the div's that contains the slider.

I do not know why this is happening because js and css are already loaded at the top of the page and I just changed the block slider, I did not change any code contained in the files. All help will be very good life.

Thanks in advance


texts: How can I add custom discount amount for specific quote Item/s?

texts:
What I know.

What I have seen on my searches till now is that we can add custom discount to the quote and split the discount among the quote Items based on ratio calculated.

What I want.

But I want to give specific discount on some line Items(quote items) , say a Gift Item included with a product. As it's a gift Item, I want to give the line item 100% discount, such that my row total will be zero and subtotal have the grand total will have the subtotal - discount amount.

The same line item added individually will be a regular product with no discount.

The Problem

I'm not able to give discount amount to the quote item with out making issue existing calculation.

How can I achieve such a scenario in Magento 1.x programatically? Any Ideas? I have tried using the sales_quote_collect_totals_after and sales_quote_address_discount_item observers with no luck.


texts: customer email field 1st step one page check out

texts:
I'd like to capture customers email address on the 1st step of the one  page checkout.

They'd have the option to login, or continue as a guest by supplying their email address. this should also remove the required email from billing address entry.

Any ideas?


texts: Magento 2: database error customer_grid_flat doesn't exist

texts: We could not reindex customer_grid_flat nor we can open Customer menu at the left side in Magento 2 admin. It gives an error. Looking around i found this similar issue Then we tried to open DB table Customer_grid_flat but it says table is empty. Anyone an idea?


texts: Magento 2: "Empty option" for programmatically populated select attribute

texts:
I have a product attribute dropdown select box that I populate via a source model.

The population works fine, but I want the first option in the list to be "Select one...". I've used the following code:

$options[] = array(
  'label' => 'Select one...',
  'value' => '',
);

But the result is as follows:

With the rendered HTML:

<select>
  <option value="">Select one...</option>
  <option data-title="Select one..." value="">Select one...</option>

What am I doing wrong?


texts: Magento Module Install Script not even running

texts:
I have an issue with my Magento setup - where no modules that I install, are actually installing the MySQL tables. This isn't just custom ones, these are MySQL tables that we've purchased, from various different places.

I can't believe that all of them would be wrong, so was wondering what the best way to go about debugging this would be.

There are currently no errors when developer mode is turned on, including when deleting the record out of the core_resource table and refreshing (hence doing the "reinstall"), the cache is turned off, I've tried to fix this multiple times, but every time I've just resorted to manually building the tables.

I've looked at various different answers, both on the Magento Stack Exchange, and on Stack Overflow - and none of the answers on those have worked.

We're running Magento 1.9.2.0.

Any help would be greatly appreciated - and if you need to see specific parts of code, just comment below and I'll add it in here.

Cheers.


texts: Magento2.1: How to create multiple websites with different domains

texts:
I deployed Magento 2.1 on console.google
Is there anybody who succeded to deploy multiple websites with different domains?
Magento2: How to create multiple storefronts
does not works for Magento 2.1

I am sure many people suffer the same issue?

There is not any answer to similar question for Magento 2.1 on link
How to setup another domain/website on the same Magento 2.1.0 installation? (updated)


texts:
i want to override helper class method

private function _getGeneralFromAttributeSets(array $attributeSetIds)
i use this code and create helper in my module folder

<preference for="Test\Test\Helper\Magento\Attribute" type="Abc\Def\Helper\Magento\Attribute" />

class Attribute extends \Test\TestHelper\Magento\Attribute
{

    private function _getGeneralFromAttributeSets(array $attributeSetIds)
    {}

but not working i dont know my be the fucntion is private is that issue


texts: Tabel is not creating While install custom module

texts:
I have created a custom module. But When Install it does not create any table. And It does not show any error.  But It makes a link in admin panel. When I click on it, It shows error like

  'custom_magento.cm_fabric_icons' doesn't exist

.

sql setup file.

$installer = $this;
$table = $installer->getConnection()
    ->newTable($installer->getTable('fabric_icons/icons'))
    ->addColumn('icons_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'unsigned' => true,
        'identity' => true,
        'nullable' => false,
        'primary'  => true,
    ), 'Entity id')
    ->addColumn("title", Varien_Db_Ddl_Table::TYPE_TEXT, null, array( 'nullable' => true),"Title")
    ->addColumn("slim_fit_title", Varien_Db_Ddl_Table::TYPE_TEXT, null, array( 'nullable' => true),"Slim Fit Title")
    ->addColumn("slim_fit_image", Varien_Db_Ddl_Table::TYPE_TEXT, null, array( 'nullable' => true),"Slim Fit Image")
    ->addColumn("normal_fit_title", Varien_Db_Ddl_Table::TYPE_TEXT, null, array( 'nullable' => true),"Normal Fit Title")
    ->addColumn("normal_fit_image", Varien_Db_Ddl_Table::TYPE_TEXT, null, array( 'nullable' => true),"Normal Fit Image")
    ->setComment("Fabric Icons");
$installer->getConnection()->createTable($table);

data setup file,

$installer = $this;
$model = Mage::getModel('fabric_icons/icons');
$dataRows = array(
                                array(
                                "icons_id" => "1"
                                ,"title" => "Tool Design Icons"
                                ,"slim_fit_title" => "Slim Fit"
                                ,"slim_fit_image" => "m_normal.png"
                                ,"normal_fit_title" => "Normal Fit"
                                ,"normal_fit_image" => "m_normal_1.png"
                                )
              );
foreach ($dataRows as $data) {
    $model->setData($data)->setOrigData()->save();
}


texts:
$model = Mage::getResourceModel('test/test')
                    ->addAttributeToSelect(array('title'))
                    -> array('like' => $_POST['data'].' %')
                    ->getCollection();


texts:
Hi I'm creating column/field for Customer Activate which is option column/field. it's created from eva_attribute and showing customer admin grid also when I click on edit particular customer record it's returning an error.

Error is:
Source model "customer/source_option" not found for attribute "customeractivate"

my code is:

C:\xampp\htdocs\magento\app\code\local\Easylife\Customattribute\sql\customattribute_setup\upgrade-0.1.1-0.1.2.php

<?php
$installer = $this;
$installer->startSetup();
$setup = new Mage_Eav_Model_Entity_Setup('core_setup');
$entityTypeId     = $setup->getEntityTypeId('customer');
$attributeSetId   = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);
$setup->addAttribute('customer', 'customeractivate', array(
    'label'             => 'Customer Activate',
    'type'              => 'int',
    'input'             => 'select',
    'backend'           => 'eav/entity_attribute_backend_array',
    'frontend'          => '',
    'source'            => 'customer/group_collection',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible'           => true,
    'required'          => true,
    'user_defined'      => true,
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'option'            => array ('value' => array('optionone' => array('Yes'),
                                                   'optiontwo' => array('No'),)),
    'visible_on_front'  => false,
    'visible_in_advanced_search' => false,
    'unique'            => false
));
$setup   = Mage::getSingleton("eav/config")->getAttribute("customer", "customeractivate");
$used_in_forms=array();

$used_in_forms[]="adminhtml_customer";
$setup->setData("used_in_forms", $used_in_forms)
    ->setData("is_used_for_customer_segment", true)
    ->setData("is_system", 0)
    ->setData("is_user_defined", 1)
    ->setData("is_visible", 1)
    ->setData("sort_order", 100)
;
$setup->save();
$installer->endSetup();

C:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\Customer\Grid.php

<?php
class Mage_Adminhtml_Block_Customer_Grid extends Mage_Adminhtml_Block_Widget_Grid
{
...
 protected function _prepareColumns()
    {
 $this->addColumn('customeractivate',
            array(
                'header'=> Mage::helper('customer')->__('Customer Active'),
                'width' => '70px',
                'index' => 'status',
                'type'  => 'options',
                'options' => Mage::getResourceModel('customer/group_collection')->getOptionArray(),
            ));
     }
..
}

C:\xampp\htdocs\magento\app\code\core\Mage\Customer\Model\Resource\Group\Collection.php

<?php

class Mage_Customer_Model_Resource_Group_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
{

    const STATUS_ENABLED    = 1;
    const STATUS_DISABLED   = 2;

...
  static public function getOptionArray()
    {
        return array(
            self::STATUS_ENABLED    => Mage::helper('customer')->__('Yes'),
            self::STATUS_DISABLED   => Mage::helper('customer')->__('No')
        );
    }
...
}

Can you please tell me where I went wrong?

thanks in advance.


texts: Having trouble exporting products from Magento 2.x. Fatal error: Uncaught Error: Call to a member function getName()

texts:
Having trouble exporting products from Magento 2.x.

When I do an export from System > Export and select Entity Type of Products I'm receiving a Fatal Error.

  Fatal error: Uncaught Error: Call to a member function getName() on
  null in
  C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php:442
  Stack trace: #0
  C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php(410):
  Magento\CatalogImportExport\Model\Export\Product->initCategories() #1
  C:\Web\gpp-magento2\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(111):
  Magento\CatalogImportExport\Model\Export\Product->__construct(Object(Magento\Framework\Stdlib\DateTime\Timezone),
  Object(Magento\Eav\Model\Config),
  Object(Magento\Framework\App\ResourceConnection),
  Object(Magento\Store\Model\StoreManager),
  Object(Magento\Framework\Logger\Monolog),
  Object(Magento\Catalog\Model\ResourceModel\Product\CollectionFactory),
  Object(Magento\ImportExport\Model\Export\Config),
  Object(Magento\Catalog\Model\ResourceModel\ProductFactory),
  Object(Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory),
  Object(Magento\Catalog\Model\ResourceModel\Category in
  C:\Web\gpp-magento2\vendor\magento\module-catalog-import-export\Model\Export\Product.php
  on line 442

A little background about this magento2 project, we are in the slow process of moving away from our Mage 1.9 store. We have been through the migration process and tying up some loose ends. Today I ran into the above while attempting an export to test the functionality of exporting products and reimporting them to observe changes.


texts: Magento 1.9 rounding error on promotions

texts:
There seems to be a very odd rounding error on promotions; this order has a 20% discount applied on two lines - both tax-exempt food items:

Line 1: (1 * ((13.99 / 100) * 20)) = 2.798 which rounds to 2.8
Line 3: (2 * ((8.49 / 100) * 20)) = 3.396 should round to 3.4 not 3.39

Why is 2.798 getting rounded up yet 3.396 getting rounded down?

I'm sure it has something to do with the Qty - like a rounding error doubled - but I can't find where that calculation is actually done in the code...


texts: Referencing a template outside your current theme

texts: I have an extension that conditionally loads the default nav menu, at /app/design/frontend/base/default/template/catalog/navigation/top.phtml. However, I am in the default magento rwd/default theme, and the base nav menu is not loading properly with the reference call. The extension calls: type="catalog/navigation" template="catalog/navigation/top.phtml". How would I adjust this call so that it properly loads the template at /base/default/template/catalog/navigation/top.phtml.


texts: cannot connect to mysql on remote server

texts:
I am trying to migrate data from magento 1 to maganto 2. Both sites are on different server. So when I try to migrate by below command :

  sudo php /var/www/m2.gocleaning.nl/bin/magento migrate:settings -r
  /var/www/siteurl/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml

it is showing error in the image.

FYI : I also can't connect to mysql remotely by using

mysql -u remote -h 176.9.9.14 -p

It is also giving connection timed out error.
Tried this solution : Link

One thing I want to confirm should I have to grant privleges on remote database or on local database?

Please help me to sort out this issue ASAP.


texts: URL key for specified store already exists in category in Magento 2.1.1

texts:
I am receiving the following error:

URL key for specified store already exists in category

How to fix this error when i want to update my Magento version 2.1.1 category.This error not update it.Anyone has good suggestion for it?


texts: Scheduled/Automatic Backups in Magento 2

texts:
How to make Scheduled Backups work in Magento 2?

After setting up "Scheduled Backups" in..

  Magento > Shops > Configuration > Advanced > System > Settings for
  scheduled Backup (translated)

.. and waiting.
The result is no backup has been created.

Do I need anything extra for this? Cronjobs?
Where will the backup be saved?
Is the backup functionality working for you? Want to make sure it is in case something is going wrong.

I am using Magento 2.1.3.


texts:
I installed 7405 patch but its getting error

            sh PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh
PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 14: PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 127: not found
PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 14: PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 127: not found
PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 25: PATCH_SUPEE-7405_CE_1.9.1.1_v1.1-2016-02-23-07-41-06.sh: 0: not found
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

checking file app/code/core/Mage/Adminhtml/Helper/Sales.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Core/Model/Config.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 505.
1 out of 1 hunk FAILED
checking file lib/Varien/File/Uploader.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored

patch not applied


texts: Magento 1.9.0.1 add a product to the cart by URL from external site?

texts: I need to add multiple products from an external site to a Magento store. The stores sells cake decorations and they wan't to create recipes in their Wordpress blog, and with a simple press of a button all the ingredients to be added to the cart in Magento. I found in other questions that in order for this to work we need a formkey, but how can I generate the form key from outside of Magento?


texts: Magento2 Multiples fileds for the AbstractModel

texts:
How can I add more than one field in the load method of the \Magento\Framework\Model\AbstractModel

$consumptionCollection = $this->_consumptionFactory->create()->load($iccid, 'iccid');

I want to filter the model collection for more than one field


texts: Fail to import product with product images at Magento 2

texts:
I've placed a image file in the folder "pub/media/import" for product image, and run the below script, but I got an error message.

$fullImagePath = "pub/media/import/icn_status.png";
echo $fullImagePath;
if (file_exists($fullImagePath)) {
    try {

        $simple_product->addImageToMediaGallery($fullImagePath, array('image'), false);
    } catch (Exception $e) {
        echo $e->getMessage();
    }
} else {
    echo 'Can not find image';
}

ERROR:

[Magento\Framework\Exception\LocalizedException]

The image does not exist.


texts: Configurable Product Price not displaying

texts:
I have created configurable product with associated simple products.

In that, I want a product A with size unit 100g , price 150 and special price 140 and Product B with size unit 50g , price 80 and special price 75. How I will do this?

I have given price and special price for the simple product..
But it is not displaying the price..


texts: magento not installing showing just a black screen

texts:
What should I do?

I got this error after Magento installation.

my magento version Magento-CE-2.1.16-2018-11-15-12-33-41


texts: How to add typed text in magento 2 using typed.js?

texts:
I have tried to add on typed text animation in my Magento 2 cms page. I am using typed.js

Does anyone have an idea of how to use typed.js in Magento2?


texts: Magento2 getting - Error filtering template error after add custom attribute value programmatically

texts:
Getting this error when reload page after adding value programmatically in a custom attribute. And when i delete that value which i added programmatically then its working fine.

Error filtering template: Notice: Undefined offset: 1 in
/home/tunxxx/public_html/xxxxxx.com/app/design/frontend/Etheme/yourstore/Nwdthemes_Revslider/templates/revslider.phtml on line 87

i am using below given code for addding attribute value programatically.

<?php
//  $attribute_model = $this->_objectManager->create('Magento\Eav\Model\Entity\Attribute');

    $objectManager1 = \Magento\Framework\App\ObjectManager::getInstance();

    $attribute_model = $objectManager1->create('Magento\Eav\Model\Entity\Attribute');

    $attribute_code = $attribute_model->getIdByCode('catalog_product', 'ymmk_model');
    $attribute = $attribute_model->load($attribute_code);
    $value[0] = array('rrrrrrrrrfrrr','');
    $result = array('value' => $value);
    $attribute->setData('option',$result);
    $attribute->save();
?>


texts:
In my store I sell hats. Main hat is Cap. When I use category bar I pick Hats-->Cap. Browser goes to hats/cap.html
And there is descripcion and other stuff.

But on my homepage I also have all hats (products). When I click on Cap, browser goes to cap.html and there is 404 error.

How can I rewrite product url? When I click on product on my homepage I want to get hats/cap.html (because there is the stuff from category)


texts: productCollection Filter with layer navigation

texts:
I am writing a new product collection in the list.phtml

I want new products to show up on the productlist.. but when i make a new product filter the navigation disappear..

I tried to differents productscollection but still it removes the layer.

this is the code that im using. it works fine but only the layer navigation

<?php
    $link = $this->getLayer()->getCurrentCategory()->getName();

    if($link == "New-In"):
        echo "JA";

        $category = Mage::registry('current_category')->getParentId();
        $todayDate  = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

        $_productCollection = Mage::getResourceModel('catalog/product_collection')
            ->joinField('category_id','catalog/category_product','category_id','product_id=entity_id',null,'left')
            ->addAttributeToFilter('category_id', array('in' => $category))
            ->addAttributeToFilter('news_from_date', array('date'=>true, 'to'=> $todayDate))
            ->addAttributeToFilter(array(array('attribute'=>'news_to_date', 'date'=>true, 'from'=>$todayDate), array('attribute'=>'news_to_date', 'is' => new Zend_Db_Expr('null'))),'','left')
            ->addAttributeToSort('news_from_date','desc')
            ->addAttributeToSelect('*');

        //$_productCollection=$this->getLoadedProductCollection();
        $_helper = $this->helper('catalog/output');
    else:
        $_productCollection=$this->getLoadedProductCollection();
        $_helper = $this->helper('catalog/output');
    endif;
?>


texts: Mahento 2 : How to associate more simple products with an existing configurable product programatically?

texts:
I am trying to update a configurable product programmatically but when i am running the script i am getting "Option values are not specified." exception. I am not sure whats wrong i am doing. Here is code that i am using

    $superAttribute = [151,152];
    configurableProductId =10;
    $sku = "B510";

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); // instance of object manager
    $productFactory = $objectManager->create('\Magento\Catalog\Model\Product');
    $configurableProduct = $productFactory->load($configurableProductId);

    $simpleProductIds = [1,2,3,4,5,6];

    $objectManager->create('Magento\ConfigurableProduct\Model\Product\Type\Configurable')->setUsedProductAttributeIds($superAttribute, $configurableProduct);
    $configurableProduct->setAssociatedProductIds($simpleProductIds);// Setting Associated Products
    $configurableProduct->setCanSaveConfigurableAttributes(true);
    $configurableProduct->save();

    $output->writeln($sku.' configurable product updated');

Note: We need to update already created configurable products not to create new configurable product. Also, please ignore the use of object manager. I am aware that the use of the object manager is not recommended.


texts: Magmi - problem with importing html description

texts:
I am using magmi datapump (Magmi version 0.7.18) to import products into Magento 1.7 from an xml feed, and I have a problem with product descriptions.
The product descriptions in the xml feed contain html tags (example below)

Design-ul carcasei Procell      TPU Dual Bubbles este gandit atat pentru aspect, cat si pentru protectia impotriva loviturilor puternice. Canalele circulare din interiorul carcasei preiau socul loviturii, protejand astfel spatele iPhone-ului cu eficienta

The relevant line for the description in my import script is:

'description' => base64_decode($record->Descriere)), // decodes the full description from xml feed

When I run the import script, the product descriptions are correctly imported into Magento and show up in the product description field (with html tags). However, on the frontend the html tags are not parsed, so the description shows up with html tags. I have checked the description attribute and both Allow Html tags on fronted and Enable WYSIWYG are enabled. I've also checked the template files and the htmlspecialchars function is removed from the product description.

The weird thing is that if I edit a product in the admin interface and save it manually, the html in the description renders correctly on the frontend, but I can't manually save every product. I've checked the database values for the description attribute on a product before and after saving manually and there were no changes.

Furthermore, I've imported the same html descriptions with Magento Dataflow and the html renders correctly on the frontend (without needing to save the product manually), so I guess there is a problem with the way Magmi handles html in descriptions, or there is a bug in Magento.

I've also tested on Magento 1.8 and the behaviour is the same.

Any help will be greatly appreciated.
Thank you


texts: Can i move/mount all media files to S3 bucket (or other) for saving space in my web hosting storage?

texts:
Since my web hosting is not scale-able  and have not sufficient space for storing further images, i want to move all media files to external storage, is it possible?

i have read this thread

Magento Media Assets in Amazon S3

anyone had tried above solution and made it succuessfully?


texts: calling sidebar for product detail page only

texts:
i want to call my custom siderbar on product detail page only below is code i am using in admin > categroy > custom design

<reference name="left">
      <block type="core/template" name="Designer Sidebar"  template="page/design/sidebar.phtml"/>
</reference>

but it add sidebar on all pages how to restrict it for product detail page only as now my custom sidebar also show on product listing page i do not want it there

based marius answer i update my code to below:in admin > category > custom design

<catalog_product_view>
<reference name="left">
      <block type="core/template" name="Designer Sidebar"  template="page/design/sidebar.phtml"/>
</reference>
</catalog_product_view>

but after that i do not see sidebar.phtml there


texts:
Is it possible to add custom JS to Magento 2, without RequireJS while avoiding render-blocking problems?
This error keeps coming: http://requirejs.org/docs/errors.html#mismatch

That error creates render-blocking which means that 50% of page loads are missing the navigation menu and cart


texts: Magento 2 Product stock alert wrong price sent over email

texts:
One customer who is set up in the GENERAL group was on a product detail page of a product with no inventory and clicked "Notify me when back in stock". Once the product was back in stock they received an email but it showed the WHOLESALE pricing rather than the GENERAL pricing. Why did the email send the wrong pricing to this user? How can we fix this?

Magento version: 2.2.4


texts: Unable to override ListProduct block in magento 2.2.5

texts:
I'm trying to override product list page but changes are not getting reflected in front end as it still referring to the core block.

Following is the code,

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="Magento\Catalog\Block\Product\ListProduct"
            type="TestApp\Blog\Block\Rewrite\Product\ListProduct" />
</config>

ListProduct.php

<?php
namespace TestApp\Blog\Block\Rewrite\Product;
use Magento\Framework\View\Element\Template;
class ListProduct extends \Magento\Catalog\Block\Product\ListProduct{
    protected function _getProductCollection()
    {
        return null;
    }
}


texts: Multiple CSV Automation - Distributors product feeds for ecommerce importing

texts:
I am looking for a way to merge / automate 3 CSV files which each have different headings, i need to import these files automatically into Magento but they need to be mapped to attributes that Magento understands. At the moment this seems like an impossible task for me and i would hate the process of doing this every day or ever few hours to update stock etc.

My distributors generate the feeds every few hours and then it’s uploaded to my server. I need to find a way to achieve the above and to also get the file to import every few hours.

The only solution i have found at the moment is to use paid software like magento store manager but i do not need any of it just the one solution.


texts: Magento 2: How do I add attributes to a custom EAV model collection?

texts:
Using Magento 2.1.3: I want to display custom EAV attributes in a admin grid, but can't figure out how to properly add them to the data provider collection. I would assume this would work, but it's throwing an undefined method error on addAttributeToSelect:

namespace Vendor\Namespace\Ui\Component\Listing\DataProviders\Namespace\Obj;

class Grid extends \Magento\Ui\DataProvider\AbstractDataProvider
{
public function __construct(
    $name,
    $primaryFieldName,
    $requestFieldName,
    \Vendor\Namespace\Model\ResourceModel\Obj\CollectionFactory $collectionFactory,
    array $meta = [],
    array $data = []
) {
    parent::__construct($name, $primaryFieldName, $requestFieldName, $meta, $data);
    $this->collection = $collectionFactory->create();
    $this->collection->addAttributeToSelect('*');
    $this->collection->load();
}
}

My \Vendor\Namespace\Model\ResourceModel\Obj\Collection class extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection

I have also now tried loading the product model, then getting the collection, and still no luck, however loading a obj directly contains the attributes:

....
_construct(
    ....
    \Vendor\Namespace\Model\ObjFactory $objFactory,
     ....
) {
   $obj = $objFactory->create()->load([id]);
   var_dump($obj->getData()); // has attributes
   $objCollection = $obj->getCollection();
   foreach ($objCollection as $cObj) {
        var_dump($cObj->getData()); // no attributes
   }
}


texts: I am new to SOAP Web Service API's and Magento.  Can someone show me an example of SOAP API request to return information about a product?


texts:
i am trying to get customer id of a logged in customer but its does not seems to be working
in my block
<?php
namespace Vendor\Module\Block;
use Magento\Framework\View\Element\Template;
use Magento\Backend\Block\Template\Context;

class Rfq extends \Magento\Framework\View\Element\Template
{
    protected $_customerSession;
    public function __construct(Context $context,
        \Magento\Customer\Model\Session $customerSession,

        array $data = [])
    {
        parent::__construct($context, $data);
        $this->_customerSession = $customerSession;
    }

            public function getCustomerId()
                    {
                         if($this->_customerSession->isLoggedIn()):
                              return $this->_customerSession->getCustomer()->getId();
                         endif;
                    }

            public function execute()
            {

                $this->_view->loadLayout();
                $this->_view->getLayout()->initMessages();
                $this->_view->renderLayout();
            }
        }

Now in phtml file
<?php
$customerId = $customer->getCustomerId();
?>

any suggestion or issue in code
thankss
Update controller
<?php
namespace Vendor\Module\Controller\Index;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\App\RequestInterface;
use Magento\Framework\View\Result\PageFactory;

class Customer extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;

    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }
    public function execute()
    {

        return $this->resultPageFactory->create();
        $this->_view->loadLayout();
        $this->_view->renderLayout();
    }

}


texts: Error Class not found before deleting generated folder

texts:
I have created a preference to override a class but constantly getting error "Class not found" before deleting "generated" folder content:

Error:

Fatal error: Uncaught Error: Class 'Vendor\Module\Plugin\Firebear\Loader' not found in /var/www/html/Dr/Project/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111 Stack trace: #0 /var/www/html/Dr/Project/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject

Created Preference:

<preference for="Magento\ConfigurableProduct\Model\Product\ReadHandler" type="Vendor\Module\Plugin\FireBear\ReadHandler" />

Preference Class:

namespace Vendor\Module\Plugin\FireBear;

use Magento\Catalog\Api\Data\ProductInterface;
use Vendor\Module\Plugin\FireBear\Loader;
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
use Magento\Framework\EntityManager\Operation\ExtensionInterface;
{
class ReadHandler implements ExtensionInterface
/**
 * @var Loader
 */
private $optionLoader;

/**
 * ReadHandler constructor
 *
 * @param Loader $optionLoader
 */
public function __construct(Loader $optionLoader)
{
    $this->optionLoader = $optionLoader;
}

After running :

bin/magento s:up
bin/magento s:d:c
bin/magento c:f

This error is coming but after deleting generated/* this error seems resolved.

Then again this error comes after every bin/magento s:up && bin/magento s:d:c && bin/magento c:f


texts: Override parent templates from custom module page

texts:
I created a custom landing page module for our store.

app/code/<Company>/Landing

It has the following directory structure, but I am having a really hard time figuring out how to integrate it into the overall site.

For example, how am I supposed to apply a theme to the pages served by this module?

Most importantly though, how do I modify the layout of this page? I have tried using the <referenceBlock name="name" remove="true"/> pattern but cannot figure out where to put. A lot of posts mention default.xml, but where would I locate this file in the directory structure?

For example, I want to remove these templates from the page. It would seem that they are located in the <referenceContainer name="header.container"> tag, so I have tried adding: <referenceContainer name="header.container" remove="true"> tag but to no avail.


texts: Datepicker Options in Knockout JS Binding is not working

texts:
In my HTML frontend form, I have included a date picker using Knockout JS data binding. But the date picker options is not loading. I want my date format should be like "02-Dec-1991". I gave my HTML element like this:

<input class="input-text" type="text" id="customer-dob" name="dob" value="" data-validate="{'required-entry':true}" data-bind="value: dob,datepicker: dob,datePickeroptions: {
                    dateFormat: 'dd/M/yy',
                    changeMonth: true,
                    changeYear: true,
                    maxDate: new Date(),
                    datePickerPlaceholder: 'dd/M/yy'
                    }"/>

Please suggest me how to make this work?


texts:
I'm fairly new to Magento API (REST) and am trying to create a cart for an existing customer via admin API, update the cart and apply a discount coupon.

So far I've hit two major issues:

1) I can't figure out how to get a clear shopping cart for the user. I'm using the admin API to call POST /all/V1/carts/mine with {"customer_id": 4} (for example) in the body. This returns 8, which is great and calling GET /all/V1/carts/8 or GET /all/V1/carts/mine?customer_id=4 will get me the cart. The issue is that the cart may already contain some items. Is there a quick way to clear the cart? The obvious thing is to call DELETE on all the items in the cart, but one needs to also remember to clear shipping, coupons, etc. This seems to be a similar issue to https://github.com/magento/magento2/issues/7107 There doesn't seem to be a way to delete the entire cart and start over - is there?

2) Having the cart, how do I change the store_id of the cart? I've tried virtually everything (PUT request onto /all/V1/carts/8 with {"store_id": 1} and various variations, most of them ending in error that the request is missing customer_id and with customer_id an error The customer can't be assigned to the cart because the cart isn't anonymous.), but it still says store_id: 0. The issue is that when I try to add a coupon to that cart using PUT /all/V1/carts/8/coupons/20OFF, I get an error Cart isn't assigned to correct store. This happens for all the coupons. The scope of the coupon is the website.

Anyone any ideas what I'm doing wrong?


texts:
I am using Magento version. 2.2.6. When I navigate to add product and select specific attribute set "Test"

I am getting error

  main.ERROR: The configuration parameter "componentType" is a required
  for "" component. [] []

  Note: I am not getting this error by selecting other attribute sets. Please help.


texts: OnePageCheckout doesn't place order after update

texts:
I've updated my Magento environment from 1.7.0.2 to 1.9.2.3. As usual, I stumbled across a few problems. Most of those problems I'm able to fix after a while, but I've discovered a very strange problem that I just can't seem to wrap my head around.

I'm using OnePageCheckout for logged in users to pay their products (OneStepCheckout works fine). I can go through every step, but when I push the "Submit Order" button, nothing happens. I don't have any JavaScript or PHP errors.

At first I thought my form needed a form key, since that's necessary for newer Magento versions. So I added this line of code:

review = new Review('<?php echo $this->getUrl('checkout/onepage/saveOrder', array('form_key' => Mage::getSingleton('core/session')->getFormKey())) ?>', '<?php echo $this->getUrl('checkout/onepage/success') ?>', $('checkout-agreements'));

This didn't fix it.

I tried to echo the saveOrder URL with it's form key and check what happened when I went directly to that URL. The link told me that nothing happened because I didn't check the Terms of Agreements box (which I did).
So obviously I wanted to know what would happen when I turned the terms of agreements off in my Magento backend.
It gave me the following error:

Fatal error: Call to undefined method Mage_Customer_Helper_Data::getFullCustomerName() in /home/users/tetesftp/xxxxx/app/code/core/Mage/Checkout/Helper/Data.php on line 238

I'm stuck right now. Where do I look? Usually it's a template problem as well, but now all the other templates (like RWD) aren't working either.

I hope someone can help me with  this! Thanks in advance!


texts: Show custom grid and chooser inside product edit UI form

texts:
I want to show a grid inside product edit UI form under a fieldset Related Blog Post. This section would allow choosing a list of related blog posts for a product. I am using a custom module for blog page.
Just need some guidance on loading data custom collection inside product edit UI form with mass blog selector(similar to how we select related/upsell products).
Below is a reference image

Has anyone done anything similar?


texts: Deprecation Notice - Elasticsearch - Magento 2.3.0

texts:
I have installed version 2.3.0 of Magento and I have received this notification:

  Deprecation Notice

  Catalog Search is currently configured to use the MySQL engine, which
  has been deprecated. Consider migrating to one of the Elasticsearch
  engines now to ensure there are no service interruptions during your
  next upgrade.

My system is:

Ubuntu 18.04
Nginx 1.14.0
MySQL 5.7.25

What should I do with this? It is important?


texts:
Importing blank columns using "Replace" action does not result in deletion of attribute values.
Magento 1.5, 1.7

E.g. a csv containing a list of skus whose sale end date has passed to try to delete those dates and sale prices from the db does not work.

sku   | special_price | special_price_to_date
MX300 |               |
MX301 |               |
MX302 |               |

etc...

Blank columns do not effect any change. So how do I delete values for a product attribute using import?


texts: How to obtain template hints in admin panel?

texts: I want to ask that how to turn on template hints and template hint links in admin panel?


texts:
my working site got down last day.
I found this problem in reports.
I believe there must be a quick fix of this issue.
I would highly appreciate any kind of help, clue, hint to fix this issue. Thanks.

a:5:{i:0;s:79:"You cannot define a correlation name 'enable_googlecheckout_idx' more than once";i:1;s:3056:"#0 /var/www/lib/Varien/Db/Select.php(281): Zend_Db_Select->_join('inner join', Array, 'enable_googlech...', Array, NULL)
#1 /var/www/lib/Zend/Db/Select.php(336): Varien_Db_Select->_join('inner join', Array, 'enable_googlech...', Array, NULL)
#2 /var/www/lib/Zend/Db/Select.php(315): Zend_Db_Select->joinInner(Array, 'enable_googlech...', Array, NULL)
#3 /var/www/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php(70): Zend_Db_Select->join(Array, 'enable_googlech...', Array)
#4 /var/www/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php(94): Mage_Catalog_Model_Resource_Layer_Filter_Attribute->applyFilterToCollection(Object(Mage_CatalogSearch_Model_Layer_Filter_Attribute), '1')
#5 /var/www/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(91): Mage_Catalog_Model_Layer_Filter_Attribute->apply(Object(Mage_Core_Controller_Request_Http), Object(Mage_CatalogSearch_Block_Layer_Filter_Attribute))
#6 /var/www/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php(73): Mage_Catalog_Block_Layer_Filter_Abstract->_initFilter()
#7 /var/www/app/code/core/Mage/Catalog/Block/Layer/View.php(136): Mage_Catalog_Block_Layer_Filter_Abstract->init()
#8 /var/www/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Catalog_Block_Layer_View->_prepareLayout()
#9 /var/www/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 /var/www/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('catalogsearch/l...', 'catalogsearch.l...')
#11 /var/www/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('catalogsearch/l...', 'catalogsearch.l...')
#12 /var/www/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#13 /var/www/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#14 /var/www/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#15 /var/www/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#16 /var/www/app/code/core/Mage/CatalogSearch/controllers/ResultController.php(77): Mage_Core_Controller_Varien_Action->loadLayout()
#17 /var/www/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_CatalogSearch_ResultController->indexAction()
#18 /var/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#19 /var/www/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /var/www/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#21 /var/www/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#22 /var/www/index.php(87): Mage::run('website_dk', 'website')
#23 {main}";s:3:"url";s:114:"/catalogsearch/result/index/?dir=asc&enable_googlecheckout=1&mode=list&order=relevance&price=600-700&q=clip+on+tes";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:6:"danish";}


texts:
I was working in my backend saving new custom block while my session expires out very much earlier than expected.
I checked my session timeout limit. And Tried once more to work on custom block, and same issue happening each time.
Question is, Why session is expiring sooner than session timeout limit ???


texts:
tried below script but it is not applied discount for first Order. Any suggestions?

Magento 2: How to implement First Order Discount?


texts: Magento 2: Charge international customers import duty taxes upfront

texts:
Does anyone know of extension for Magento 2 that calculates import duty tax for international sales?

Or a service that provides this, similar to duty calculator, that I can build extension that connects to it?


texts: How to add products in cart using REST API in Magento 2?

texts:
I want to add products in cart in Magento 2 using Rest API
I have created a controller and using this code.
<?php

    $userData = array("username" => "admin", "password" => "password");
    $ch = curl_init("http://127.0.0.1/mag/index.php/rest/V1/integration/admin/token");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));

    $token = curl_exec($ch);

    $customerData = [
        'customer_id' => 12
    ];
    $ch = curl_init("http://127.0.0.1/mag/index.php/rest/V1/carts/mine");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($customerData));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

    $result = curl_exec($ch);

    $quote_id = json_decode($result, 1);
    echo '<pre>';var_dump($quote_id);

    $productData = [
        'cart_item' => [
            'quote_id' => $quote_id,
            'sku' => 'test',
            'qty' => 1
        ]
    ];
    $ch = curl_init("http://127.0.0.1/mag/index.php/rest//V1/carts/mine/items");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($productData));
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

    $result = curl_exec($ch);

    $result = json_decode($result, 1);
    echo '<pre>';var_dump($result);

    $ch = curl_init("http://127.0.0.1/mag/index.php/rest//V1/carts/".$quote_id);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

    $result = curl_exec($ch);

    $result = json_decode($result, 1);
    echo '<pre>';var_dump($result);

It doesn't show any error but it doesn't add that product in cart i have checked customer id
$customerData = [
        'customer_id' => 12
    ];

for my current logged in user from Database 'customer_entity' table and 'entity_id' row.
Any one know how to add that and view it from fronted.
Any help is appreciated.


texts: How can I know which country code should be used for translation file?

texts:
I want to translate store to Serbian language and in official Serbian translation there are 2 types Alphabet and Cirilic letters:

sr_SP.csv
sr_CS.csv

But there is only one Serbian in localisation options on admin panel.

P.S.
To further investigate this can I add made up language and make it appear in localisation options as an option?


texts:
I want to configure a multistore shop like this:

domain1

http://www.domain1.com/nl/ -> website 1, store view 1
http://www.domain1.com/en/ -> website 1, store view 2
http://www.domain1.com/de/ -> website 1, store view 3
http://www.domain1.com/fr/ -> website 1, store view 4

domain2

http://www.domain2.com/nl/ -> website 2, store view 1
http://www.domain2.com/en/ -> website 2, store view 2
http://www.domain2.com/de/ -> website 2, store view 3
http://www.domain2.com/fr/ -> website 2, store view 4

The store code approach is not possible because we need to have the same store code multiple times.

What would be the best way to achieve this with nginx?

My configuration:
Ubuntu 16.04LTS, PHP7.1(FPM), nginx/1.10.3, Magento 2.2.2 CE


texts: After update from Magento 2.1 to 2.2.5, categories are not displayed because is_active is missing

texts:
After an update to 2.2.5 it turned out, that all categories are not shown anymore.

Debugging the issue revealed, that $category->isActive() just is null. Debugging further showed that catalog_category_int does not have any entries for the attribute is_active (in my case attribute_id = 46)


texts:
I had to restore from back up meaning that some orders after the backup was taken have been lost. I have the order details but want to restore them so the customer can see them.

How do I manually create orders ?


texts: magento 2: images are not saving for configurable variations after saving through admin

texts:
I have a magento (v2.2.3) website and using "thaiphan/magento2-s3" extension for uploading images to s3. Now I am facing an issue with configurable product images uploading.

For configurable variations, the image is only saving for only one size. I have attached the step by step with images. In the last step the images are hidden.

  Step1 : Selected two attributes for color and size.

  Step2 : Selected two color and two size options for variations

  Step3 : Selected 'Apply unique images by attribute to each SKU' and uploaded images for color attribute for two variations

  Step4: Two images are applied for 4 variations. ie two colors for each sizes. Everything is fine. Then clicked "Generate products"

  Step5: Generated products are successfully showing with correct images and sizes. Then I clicked "Save"

  Step6: Here is the issue. when I saved the product only two images are showing. That is the images are only available for first two sizes. That is for size 40.

  I think it is actually saving but not showing. Because when I try to edit that configurable variation, that image place holder is there.

Any idea for this issue. It is working perfectly when upload images to the same server. Only s3 has this issue.


texts:
I found that all knockout JS config data are coming from window.checkoutConfig.

Then I check onepage.phtml and found that they used this code to store data in window.checkoutConfig

window.checkoutConfig = <?php /* @escapeNotVerified */ echo \Zend_Json::encode($block->getCheckoutConfig()); ?>;

So my question is that how we add our custom data in window.checkoutConfig and use in checkout knockout js like this

var customData = window.checkoutConfig.myCustomData;

alert(customData);


texts:
Recently I have applied patches on one of my Magento Website CE Version 1.7.0.2 till SUPEE 9652, Everything is running fine except a Custom Extension which I am using for inner page banners. It is giving me the error

  {"error":"File was not uploaded.","errorcode":666}

While file uploading, I have checked the Permissions and all, Product image upload is running perfectly fine, It was also running file till the Patch Application, Code skips TRY block on the first line and shows the error from Catch Block.

Here is my Upload Code:

public function uploadAction() {
    try {
        $uploader = new Mage_Core_Model_File_Uploader('image');
        $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'));
        $uploader->setAllowRenameFiles(true);
        $uploader->setFilesDispersion(true);
        $result = $uploader->save(
                        Mage::getSingleton('qbanner/config')->getBaseTmpMediaPath()
        );

        $result['tmp_name'] = str_replace(DS, "/", $result['tmp_name']);
        $result['path'] = str_replace(DS, "/", $result['path']);

        $result['url'] = Mage::getSingleton('qbanner/config')->getTmpMediaUrl($result['file']);
        $result['cookie'] = array(
            'name' => session_name(),
            'value' => $this->_getSession()->getSessionId(),
            'lifetime' => $this->_getSession()->getCookieLifetime(),
            'path' => $this->_getSession()->getCookiePath(),
            'domain' => $this->_getSession()->getCookieDomain()
        );
    } catch (Exception $e) {
        $result = array(
            'error' => $e->getMessage(),
            'errorcode' => $e->getCode());
    }
    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}

Please guide me on this issue, Thanks


texts:
I want to move the sidebars you can see on the image to the left side.

How can I do that?

I have absolutely no idea about Magento Layouts.


texts: Bulk Action Finished with Failure in Magento 2

texts:
When uploading the attributes for multiple products it fails each time. Kindly help me to solve this problem. My Magento version is 2.3.2

Bulk action is not even starting.


texts: Magento 2.1: Letter Case for Controller Actions URL Route

texts:
I tried to create a custom payment gateway by creating a custom module based on Paypal module, specically Paypal Express Checkout.

I was able to replicate the route for controller actions: Start, Return, Cancel, and PlaceHolder. I tried to create my own controller action (let's say "NotificationHandler") by copy the Start action, rename the class name, and remove everything in execute() and put echo "hello world";. For some reason, I ran into some weird issue where it expects me to have the first letter of the action to be capital letter (..\ {routeID}\ {controllername}\ Notificationhandler). The site will throw error 404 if I put in the lower case (..\ {routeID}\ {controllername}\ notificationhandler).

Here are some follow up questions:

Is there some config file that determine the exact case of the controller action URL?
Why is it that the ReturnAction use the URL ...{routeId}{controllername}\return instead of ...{routeId}{controllername}\returnaction

Thank you,


texts: Magneto 2.4 - Remove Blank-Theme-Icons/Blank-Theme-Icons.woff2

texts:
In our Magento 2.4 we created our own theme based on the Luma theme.
Now we found out that every page loads the Blank Theme Icons font. /fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2
How can we remove this?
We already tried the following in /Magento_Theme/layout/default_head_blocks.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <remove src="fonts/Blank-Theme-Icons/Blank-Theme-Icons.woff2"/>
    </head>
</page>

But still the file is loaded. What are we missing here?


texts: Get Price of Configurable Product options

texts:
I need to export all products with prices from Magento 1.7.

For simple products this is no problem, but for configurable products I have this problem:
The price exported is the price set for the associated simple product!
As you know, Magento ignores this price and uses the price of the configurable product plus adjustments for the selected options.

I can get the price of the parent product, but how do I calculate the difference depending on the selected options?

My code looks something like this:

foreach($products as $p)
   {
    $price = $p->getPrice();
            // I save it somewhere

    // check if the item is sold in second shop
    if (in_array($otherShopId, $p->getStoreIds()))
     {
      $otherConfProd = Mage::getModel('catalog/product')->setStoreId($otherShopId)->load($p->getId());
      $otherPrice = $b2cConfProd->getPrice();
      // I save it somewhere
      unset($otherPrice);
     }

    if ($p->getTypeId() == "configurable"):
      $_associatedProducts = $p->getTypeInstance()->getUsedProducts();
      if (count($_associatedProducts))
       {
        foreach($_associatedProducts as $prod)
         {
                            $p->getPrice(); //WRONG PRICE!!
                            // I save it somewhere
                        $size $prod->getAttributeText('size');
                        // I save it somewhere

          if (in_array($otherShopId, $prod->getStoreIds()))
           {
            $otherProd = Mage::getModel('catalog/product')->setStoreId($otherShopId)->load($prod->getId());

            $otherPrice = $otherProd->getPrice(); //WRONG PRICE!!
                            // I save it somewhere
            unset($otherPrice);
            $otherProd->clearInstance();
            unset($otherProd);
           }
         }
                     if(isset($otherConfProd)) {
                         $otherConfProd->clearInstance();
                            unset($otherConfProd);
                        }
       }

      unset($_associatedProducts);
    endif;
  }


texts: Getting error in catalog product price indexing

texts:
I am facing below error while running indexing for catalog product price.

Command:

  php bin/magento indexer:reindex catalog_product_price

Error:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (m2ec_oct.catalog_product_index_price, CONSTRAINT
  CAT_PRD_IDX_PRICE_ENTT_ID_SEQUENCE_PRD_SEQUENCE_VAL FOREIGN KEY
  (entity_id) REFERENCES sequence_product (sequence_value) ON
  DELETE ), query was: INSERT INTO catalog_product_index_price
  (entity_id, customer_group_id, website_id, tax_class_id,
  price, final_price, min_price, max_price, tier_price) SELECT
  catalog_product_index_price_idx.entity_id,
  catalog_product_index_price_idx.customer_group_id,
  catalog_product_index_price_idx.website_id,
  catalog_product_index_price_idx.tax_class_id,
  catalog_product_index_price_idx.price,
  catalog_product_index_price_idx.final_price,
  catalog_product_index_price_idx.min_price,
  catalog_product_index_price_idx.max_price,
  catalog_product_index_price_idx.tier_price FROM
  catalog_product_index_price_idx ON DUPLICATE KEY UPDATE entity_id
  = VALUES(entity_id), customer_group_id = VALUES(customer_group_id), website_id = VALUES(website_id),
  tax_class_id = VALUES(tax_class_id), price = VALUES(price),
  final_price = VALUES(final_price), min_price =
  VALUES(min_price), max_price = VALUES(max_price), tier_price =
  VALUES(tier_price)

Please let me know if anyone has faced this issue before.

Thanks in advance.


texts: Magento 2 - Programatically adding product to cart adds item with price of zero

texts:
When adding a product to the cart programatically, the product is added with a price of zero. Having read other questions on here with similar requests, I have added in $this->quote->collectTotals(); which doesn't appear to fix anything.

Without doing this as an observer, or using $this->cart->save(); (which is now deprecated), how can this be resolved? My code is below.

$this->quote->addProduct($this->product);
$this->quote->collectTotals();
$this->quoteResourceModel->save($this->quote);

Thanks!


texts: Magento Shopping cart price rule with free shipping and discount

texts:
I'm trying to set up a shopping cart price rule to create a customer coupon code that accomplishes two goals:

IF customer apply coupon code then

  1) 20% off all customer

and

  2) free shipping(only if quantity is less than 12)

If you buy more than 12 item,then free shipping will NOT be available,but 20% off will be there.

If total items quantity is less than or equal to 12, then 20% off and free shipping will be there(both).


texts: best way to implement observer for invoiced Order in 1.7+

texts:
After 2 years of experiments in Magento, This is my first attempt to create an Observer.I had written everything in place, But iam confused with the events that i should observer for!

What i need is :

if the purchase is invoiced after successful payment
  do something
if the invoice is from Admin Panel
  do the same thing

Current event is checkout_submit_all_after
after referencing mage 1x events: i found lot of other events that can be triggered.

with different modules like :

sales_order_place_after
sales_order_invoice_pay

Somebody please guide me in right direction..


texts: Magento 2 add conditional mass action in sales order grid

texts:
I want to add conditional mass action in sales order grid. I want to use my system configuration values to show the mass action. like we use in block layout ifconfig="contact/contact/enabled"

<massaction name="listing_massaction">
            <action name="test">
                <argument name="data" xsi:type="array" >
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">test</item>
                        <item name="label" xsi:type="string" translate="true">test</item>
                        <item name="url" xsi:type="url" path="test/test/test"/>
                        <item name="confirm" xsi:type="array">
                            <item name="title" xsi:type="string" translate="true">test Order(s)</item>
                            <item name="message" xsi:type="string" translate="true">Are you sure you wan't test selected items?</item>
                        </item>
                    </item>
                </argument>
            </action>
        </massaction>


texts: Swatch images on Magmi imported products removed when viewing product

texts:
Our products were imported using Magmi and the swatch images set using the media_gallery field of the Magmi CSV file. After the import completes, the swatch images are seen correctly in the product catalog. When viewing the product in the public site of the site, the swatches are not show. When going back to see the product catalog, the swatch images have disappeared.

If we add the swatch images manually through the product catalog the swatch images remain as expected.

After the import is complete the product looks like this from the admin page:

Then going to the public view page we see this:

Going back to the product catalog page we see that the swatch images have been removed:

Example CSV:

sku,media_gallery
Configurable623,/variant/large/12288.jpg::Dog-swatch;/variant/large/12289.jpg::Monkey-swatch;/variant/large/12290.jpg::Owl-swatch;/variant/large/15355.jpg::Bee-swatch;/variant/large/12291.jpg::Ladybug-swatch

Refreshing or not refreshing Magento index has no affect either way. All caches are turned off.

Magmi image import settings are:


texts: magento 2 get child product image thumbnail

texts:
How to get child product image thumbnail in sales order view in Back-end ?

my Magento is 2.1.6

This code working but i need to get order current image not configurable image all the time if i created order from the backend and select the configurable product and choosing another color instead of default.

 $_item = $block->getItem();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$product = $objectManager->create('Magento\Catalog\Model\Product')->load($_item->getProduct()->getId());
$thitem = $_item->getProduct()->getThumbnail();

Also How to get image url by sku if possible?


texts: magento 2 grunt less don't see changes in few files

texts: I have problem with Grunt watch. All works good but for example for _theme.css, but don't see any changes after I changing _extend.less what can be wrong?


texts:
How would one go about adding additional banner types to Magento?

Currently there are 5, but I'd like to add a couple custom ones

Thanks!


texts: Get a list of all the colors labels from color attribute that are currently not assigned to any products

texts: How can I get a list of colors label from the color attribute that are currently not assigned to any products in my site?


texts: How to manage Downloadable Product storage location in Magento

texts: I have a Magento store hosting mp3/mp4 as Downloadable Products. The storage capacity for the location of these products media\downloadable\files\links\ is limited and because of the amount of space that these files take, the drive is outgrowing substantially. My question, can the location of this files be linked to an attached storage, disk drive, or network drive other than the default location set by the Magento store? And if yes, what configuration/modules needs to be modified or is there an extension that can handle it? Thanks a lot for the help!


texts: Magento 1.9.2 exception.log throwing up erros continously

texts:
Sites been slow and many people are unable to access to the site. The exception.logs been throwing up an an invalid block error and i cant find where this error is cropping up from. The error is mainly in the PRODUCT.INFO.UPSELL block and i tried searching through the layout xml files but i couldnt find anything. Can someone help please.

The error is as follows

    exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /home/*******/public_html/app/Mage.php:595
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'product.info.up...')
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'product.info.up...')
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
/home/*******/public_html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
/home/*******/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
/home/*******/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
/home/*******/public_html/app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(Mage_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
/home/*******/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(28, Object(Mage_Catalog_ProductController), Object(Varien_Object))
/home/*******/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
/home/*******/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
/home/*******/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
/home/*******/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
/home/*******/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
/home/*******/p

I tried the following solution,
https://stackoverflow.com/questions/21217215/magento-illegal-block-type
which says - It looks like something to do with your upsell block on the product view page. Check your template files (catalog.xml) and ensure you have a block type set for the block definition with name product.info.upsell. To establish if this is where you error originates you could comment out the line getChildHtml('upsell_products'); ?> in view.phtml and the xml definitions for the block mentioned above.

So i went to the following destination on my magento installation -

/home/xxxxxxxxxx/public_html/app/design/frontend/megatron/default/template/catalog/product/view.phtml

and applied the above mentioned solution but still no success


texts: I have got 255 302 redirect pages on Magento

texts: I was trying to add https to my website but after adding https, found out that the website didn't have SSL certificate. Then I removed the https from the website using cpanel. Now after I did the site audit, it shows me that there are 257 pages have temporary redirects and 1119 images don't have alt attributes. Can someone please help me on how to solve this problem.


texts:
I have created three websites within a single Magento instance.

  All three store is showing in configuration it means are enable and active.

I have put Magento version 2.3.3 with sample data.

When I Create/Edit product admin show only one website view which is a default.

Why there is only one website?
How can I create products within two remain websites?


texts: How to get quote_id in "checkout_cart_product_add_after" event

texts:
I have added checkout_cart_product_add_after event in my custom module like :

<checkout_cart_product_add_after>
    <observers>
        <custom_detect_product_changes>
            <type>singleton</type>
            <class>custom/observer</class>
            <method>customFunction</method>
        </custom_detect_product_changes>
    </observers>
</checkout_cart_product_add_after>

And in Observer.php I want to get quote_id like :

...
public function customFunction(Varien_Event_Observer $observer)
{
    // here I want to get quote_id

}
...

How to get quote_id in customFunction?


texts: Magento 1.9: Print variable value in Mage::Log

texts:
My observer :

   public function checkproductinorder($Observer)
    {
        $order = $Observer->getEvent()->getOrder();
        $items = $order->getAllItems();
        foreach ($items as $item)
        {
          if($item->getSku() == '600' || '800')
            {
              Mage::log('The selected product list available in order', null, 'matchorder.log');
            }
        }

If the SKU's 600 or 800 order how can I print the SKU value in Mage::Log like,

  The selected product list available in order. SKU list : 600, 800


texts: How to add multiple videos on fotorama gallery in Magento2?

texts:
I have to add multiple videos for each product on fotorama gallery. I am using this code, and it is working fine for a single video.

<script>
require(['jquery'],  function($) {
$(document).on('gallery:loaded', function () {
    var $fotorama = jQuery('div.gallery-placeholder > div.fotorama');
    var fotorama = $fotorama.data('fotorama');
    var video = '<?php echo $video_set[$i]; ?>';
    $fotorama.on('fotorama:load', function fotorama_onLoad(e, fotorama, extra) {
        if (extra.frame.type === 'iframe') {
            extra.frame.$stageFrame.html('<iframe align="middle" type="text/html" width="100%" height="100%" src="' + extra.frame.src + '" frameborder="0" scrolling="no" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>');
        }
    });
    fotorama.push({ thumb: 'http://127.0.0.1/Magentonew/pub/media/file-MrylO8jADD.png', 'src': video, type: 'iframe',caption: 'SET CAPTION',class: 'prod-video' });
});
});
</script>

The problem is only last video is playing when click on thumb image. other videos are showing only its thumb image.

Can anyone please help me to fix this issue.
Thanks in advance..


texts: Add a Custom Order Attribute to API Response

texts:
I am trying to add a custom attributes to Magento API service. I did some research and follow this link
https://meetanshi.com/blog/get-value-of-custom-attribute-on-magento-2-rest-api/
However, my API respond not showing the custom attribute, what did I do it wrong? I had a custom field inside the sales_quote table. Is it just works like a modulo? do I need to create registration.php to set this up as well? or do you have any other recommendation that I can foloow?


texts: Magento 1.9 :- How to add Area value dynamically

texts: I want to add custom text area value when product added to cart


texts: Overriding \Magento\Quote\Model\ShippingMethodManagement not successful

texts:
I've created a module to override

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="Magento\Quote\Model\ShippingMethodManagement" type="Custom\FixShippingMethod\Model\ShippingMethodManagement"/>
</config>

class:

namespace Custom\FixShippingMethod\Model;

    class ShippingMethodManagement extends \Magento\Quote\Model\ShippingMethodManagement
    {
        /**
         * Get list of available shipping methods
         *
         * @param \Magento\Quote\Model\Quote $quote
         * @param \Magento\Framework\Api\ExtensibleDataInterface $address
         * @return \Magento\Quote\Api\Data\ShippingMethodInterface[]
         */
        public function getShippingMethods(Quote $quote, $address)
        {

            $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/shippingmethodmanagement.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
            $logger->info('test test test');

            $output = [];
            $shippingAddress = $quote->getShippingAddress();
            //Patch for Magento issue #26682
            /** @see https://github.com/magento/magento2/issues/26682 */
            $addressData = $this->extractAddressData($address);
            if (array_key_exists('extension_attributes', $addressData)) {
                unset($addressData['extension_attributes']);
            }
            $shippingAddress->addData($addressData);
            //End patch
            $shippingAddress->setCollectShippingRates(true);

            $this->totalsCollector->collectAddressTotals($quote, $shippingAddress);
            $shippingRates = $shippingAddress->getGroupedAllShippingRates();
            foreach ($shippingRates as $carrierRates) {
                foreach ($carrierRates as $rate) {
                    $output[] = $this->converter->modelToDataObject($rate, $quote->getQuoteCurrencyCode());
                }
            }
            return $output;
        }

The method didn't run, anyone know what is the problem?


texts:
I want to get order total of the month January 2019 for complete orders

I need to know tables related to this query, or if someone can share query that would be great.


texts: newsletter setup type in different module upgrade script

texts:
what is the resource type to use in an upgrade script to do as explained here Multiple setup types in same module but for the newsletter subscriber table
i've tried
$installer =  Mage::getModel('newsletter/resource_subscriber', 'newsletter_setup'); and doesn't work. What i'm doing wrong or missing?

UPDATE:

the code i've used is:

 {$installer = $this; $installer->startSetup(); $conn = $installer->getConnection(); $subscriberTable = $installer->getTable('newsletter/subscriber'); $conn->addColumn($subscriberTable, 'rjm_utm_source', array( 'type' => 'varchar', 'default' => '', 'nullable' => true, 'comment' => '__utmz::utmcsr'));}

the error i've received is: Invalid column definition

this because doesn't accept as type 'varchar'. the acceptable type are:

protected $_ddlColumnTypes      = array(
    Varien_Db_Ddl_Table::TYPE_BOOLEAN       => 'bool',
    Varien_Db_Ddl_Table::TYPE_SMALLINT      => 'smallint',
    Varien_Db_Ddl_Table::TYPE_INTEGER       => 'int',
    Varien_Db_Ddl_Table::TYPE_BIGINT        => 'bigint',
    Varien_Db_Ddl_Table::TYPE_FLOAT         => 'float',
    Varien_Db_Ddl_Table::TYPE_DECIMAL       => 'decimal',
    Varien_Db_Ddl_Table::TYPE_NUMERIC       => 'decimal',
    Varien_Db_Ddl_Table::TYPE_DATE          => 'date',
    Varien_Db_Ddl_Table::TYPE_TIMESTAMP     => 'timestamp',
    Varien_Db_Ddl_Table::TYPE_DATETIME      => 'datetime',
    Varien_Db_Ddl_Table::TYPE_TEXT          => 'text',
    Varien_Db_Ddl_Table::TYPE_BLOB          => 'blob',
    Varien_Db_Ddl_Table::TYPE_VARBINARY     => 'blob'
);

and varchar is deprecated :

// Deprecated column types, support is left only in MySQL adapter.
const TYPE_TINYINT          = 'tinyint';        // Internally converted to TYPE_SMALLINT
const TYPE_CHAR             = 'char';           // Internally converted to TYPE_TEXT
const TYPE_VARCHAR          = 'varchar';        // Internally converted to TYPE_TEXT
const TYPE_LONGVARCHAR      = 'longvarchar';    // Internally converted to TYPE_TEXT
const TYPE_CLOB             = 'cblob';          // Internally converted to TYPE_TEXT
const TYPE_DOUBLE           = 'double';         // Internally converted to TYPE_FLOAT
const TYPE_REAL             = 'real';           // Internally converted to TYPE_FLOAT
const TYPE_TIME             = 'time';           // Internally converted to TYPE_TIMESTAMP
const TYPE_BINARY           = 'binary';         // Internally converted to TYPE_BLOB
const TYPE_LONGVARBINARY    = 'longvarbinary';  // Internally converted to TYPE_BLOB


texts: Creating new theme translate.csv files but with a different naming convention

texts:
I am on magento 1.9.
So if I understand magento, you add theme translations to app/design/frontend/{site}/{theme}/locale/{locale}/translate.csv. My translate CSV has over several thousand lines which is quite unmanageable. When I try to add new translate csv with a different name it doesn't work. I.E. translate-two.csv.

Does anyone understand how to add a second one or how to better handle these large translate.csv files?


texts: Cannot load and execute third party .js in .phtml

texts:
I use Magento 2.3.2
Added into header.phtml

And

=> Not load js from sdk.js, and cannot create iframe.

It working in html
https://codepen.io/huuquyasb/pen/yLBvGbr
http://prntscr.com/p3oi2a

Hopefully somebody can help.
Thanks for reading this.


texts: Is it possible to prevent store admins from ordering products that are out of stock?

texts:
Even with System > Config > Inventory > Backorders set to No Backorders, it seems to allow admins to place orders for items that are out of stock, but it gives an error message in red.

I think in general it probably makes sense to allow admins to override the stock level and place the order, so I can see why it's working like this.

But I'm wondering if there's a config option to enforce the No Backorders rule for admins as well.  It seems like there isn't based on this check for $quoteItem->getQuote()->getIsSuperMode()
https://github.com/LokeyCoding/magento-mirror/blob/magento-1.8/app/code/core/Mage/CatalogInventory/Model/Observer.php#L302


texts: After applying SUPEE-10415 Magento 1.9.3.3 404s but works fine if redis is removed from the local.xml

texts:
As the subject says, after applying the SUPEE-10415 patch, all seems fine until "redis-cli flushall" then we get the annoying "404 error: Page not found." on everything.
After a process of elimination, disabling extensions as magento devdocs suggested, nothing seemed to change until we removed the cache tags from the local.xml file.

Curious if anyone has any "ah hah" idea why everything works fine without redis but 404s when it's enabled.

If it's any significance here is the code that I have that only works when removed from the local.xml after patching.

    <cache>
      <backend>Mage_Cache_Backend_Redis</backend>
      <backend_options>
        <server>127.0.0.1</server>
        <port>6379</port>
        <persistent></persistent>
        <database>0</database>
        <password></password>
        <force_standalone>0</force_standalone>
        <connect_retries>1</connect_retries>
        <read_timeout>10</read_timeout>
        <automatic_cleaning_factor>0</automatic_cleaning_factor>
        <compress_data>1</compress_data>
        <compress_tags>1</compress_tags>
        <compress_threshold>20480</compress_threshold>
        <compression_lib>gzip</compression_lib>
      </backend_options>
    </cache>


texts: Magento 2.1, when i override product detail layout i.e catalog_product_view.xml, video does not play

texts: Using Magento 2.1, when i override catalog_product_view.xml layout for custom theme. Product video does not play and it shows as a image. Thanks


texts: How to separate backend code in Magento 2?

texts: I have multiple clients that need their stores to behave differently i.e. additional fields for orders, different ways of saving data etc. etc. Is it possible with Magento 2 to write for example a different controller for submitting the order within 2 storefronts? So client A and client B have have their own CheckoutController? Is that level of code separation available in Magento 2.x or do you need to have a different codebase for each client?


texts: Using filters in REST API doesn't show results

texts:
I'm trying to use REST API with filters but apparently it doesn't work.

With http://192.168.10.99/api/rest/products/2 I get the following result:

<magento_api>
  <entity_id>2</entity_id>
  <type_id>simple</type_id>
  <sku>2</sku>
  <name>Borsa Gucci</name>
  <meta_title/>
  <meta_description/>
  <size_intl>16</size_intl>
  <description>borsa gucci</description>
  <short_description>borsetta</short_description>
  <meta_keyword/>
  <tier_price/>
  <is_in_stock>0</is_in_stock>
  <regular_price_with_tax>1000</regular_price_with_tax>
  <regular_price_without_tax>1000</regular_price_without_tax>
  <final_price_with_tax>1000</final_price_with_tax>
  <final_price_without_tax>1000</final_price_without_tax>
  <is_saleable>0</is_saleable>
  <image_url>http://192.168.10.99/media/catalog/product/cache/0/image/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/image.jpg</image_url>
  <url>http://192.168.10.99/index.php/catalog/product/view/id/2/s/borsa-gucci/</url>
  <buy_now_url>http://192.168.10.99/index.php/checkout/cart/add/uenc/aHR0cDovLzE5Mi4xNjguMTAuOTkvYXBpL3Jlc3QvcHJvZHVjdHMvMg,,/product/2/form_key/wbRnSbkWsgjNy7KT/</buy_now_url>
  <total_reviews_count>0</total_reviews_count>
  <has_custom_options/>
</magento_api>

If then I try http://192.168.10.99/api/rest/products?filter[0][attribute]=entity_id&filter[0][in]=2 I get the following result:

*This XML file does not appear to have any style information associated with it.
The document tree is shown below.

<magento_api/>*

Where I'm doing wrong?

Thanks
Alexio


texts: display custom attribute in related product related.phtml

texts:
Below is code in list.phtml showing products on category pages. I am looking to use the attributes (RatingSummary, ReviewsSummary) in related.phtml

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?>

                **<?php if($_product->getRatingSummary()): ?>
                <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
                <?php endif; ?>**

                <?php echo $this->getPriceHtml($_product, true) ?>

I found the below code on the web that might be a step in the right direction but does anybody understand how I can adapt it or something different so (RatingSummary, ReviewsSummary) will work in related.phtml

 foreach($this->getItems() as $_item) {
         $product = Mage::getModel('catalog/product')->load($_item->getId());
         echo $this->htmlEscape($product->getDescription());
}

I would like to use the (RatingSummary, ReviewsSummary) attributes inside the related.phtml Below is the current related.phtml code:

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

                <?php echo $this->getPriceHtml($_item, true) ?>
                        <?php
                            $listHelper = Mage::helper('colorswatchproductlist');
                            $listHelper->showSwatches($_item); ?>