texts: Moving top.menu to its own structural reference via local.xml

texts:
Does anyone known if it is possible to move top.menu to its own structural reference through local.xml ?

By default it is inserted in header.phtml

I have removed the callout from header.phtml and inserted it in the page layout files (1column,3columns etc) directly below the header call.

   <?php echo $this->getChildHtml('topMenu') ?>

In local.xml i have then added

    <reference name="header">
        <action method="unsetChild"><name>topMenu</name></action>
    </reference>

I would usually then add the reference name where i want it to go but as top.menu resided within header by default it does not have its own structural reference.

I tried adding it as topMenu but ofcourse this failed as the reference doesnt exist.

    <reference name="topMenu">
        <action method="insert"><blockName>top.menu</blockName></action>
    </reference>

Would anyone know a solution to this.

p.s. i am using magento 1.8.1.0


texts: Any way to add block on only enterprise editions?

texts:
I understand how to add blocks via layout xml. But i have a situation where i want to add a few of these blocks on only enterprise edition. On other edition it should work as if that block has not even been added in the xml.

I know that there is an attribute called ifconfig but is it reliable for determining the enterprise edition? If so, what could be the configuration node i could check?

Another way for achieving the above, i was thinking of listening to an appropriate event & add a new layout handle (or maybe a new layout xml file?) for enterprise editions & add my new blocks in that. Am i doing it right or is there any better/easier way?

Also i would prefer if i do not have to do it via php code as that code will get very lengthy with the number of blocks & also because all the blocks that are added on community edition are being added via xml


texts: Magento2 : How to show custom tables fields to system configuration drop down

texts:
I am developing custom module, I want to display tables fields to system configuration drop down.

How to get all tables fields and set it to in drop down for system configuration.

Thanks


texts: Magento 2 without user login add to cart ajax not working with redis session

texts:
I have Issue with Magento version. 2.2.0 with integration of redis session.

In my magento 2.2.0 Redis Session is enabled , Now when user is not logged in(Guest User) to the system and try to add the product to cart , its not working.

Ajax add to cart call successfully without any error but product is not adding cart.

Any clue for this issue? Your help will be appreciated.


texts: Magento 1.9: Form Key is generating on each refresh

texts:
some items in cart having different form_key & others having different keys. Because of that items having old key can not delete from cart & form_key is generating on every refresh.

I found that if we add one specific product type 'giftcards' then products after giftcards having new key & products before the 'giftcards' type having incorrect(old) key.

Still finding the cause for regeneration the form_key because of new product type. Anyone have idea on that?


texts:
I'm using magento 2 , and everytime when I do compile command , and I reload my website , it misses some files , getting several errors like this one
http://mywebsite/pub/static/frontend/Venustheme/yume/en_GB/js/countdown-home/jquery-migrate.js Failed to load resource: the server responded with a status of 404 (Not Found)

and the page is all a mess because of that..

I try to do deploy.. but the page doesn't change.. any suggestion ?


texts: Magento 2 Tabs widget - unbind arrow keys

texts:
I am wondering if there is any clean way to unbind keyboard (left and right arrows) from mage/tabs widget? This is how I init tabs in my custom-script.js:

`var tabs = $('#element').tabs({
     "openedState": "active"
 });`

This is tabs source code

But both tabs.unbind('keydown'); and tabs.unbind('_keydown'); don't work.

edit:
Solved, "openOnFocus": false disable keyboard navigation.


texts:
Without editing the core file, I want to add some code to minicart.js so I tried overriding the minicart.js file in my theme by this:

  var/www/animals/app/design/frontend/Dogs/husky/Magento_Checkout/web/js/view/minicart.js

But it did not work? Am I doing something wrong?

THANKS!


texts: interceptor not generate for \Magento\Catalog\Block\Product\ListProduct

texts:
I'm trying to create plugin for getProductPrice but \Magento\Catalog\Block\Product\ListProduct Block Class not generate Interceptor Class like Magento\Catalog\Block\Product\ListProduct\Interceptor.

My di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Catalog\Block\Product\ListProduct">
        <plugin name="addSimplePriceUnit" type="MagArs\PriceUnit\Plugin\Product\Simple"/>
    </type>
</config>

My plugin Class

namespace MagArs\PriceUnit\Plugin\Product;
    class Simple {
        public function beforeGetProductPrice(\Magento\Catalog\Block\Product\ListProduct $subject, $result){
            return $result;
        }
    }

moduel.xml file

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

I am using magento enterprise version 2.2.5


texts: Magento 2: How can customer Sign-In/registraion form in checkout page

texts:
While a user who is not logged in, clicks Proceed to checkout, I want them to be taken to the login page. Then, after they've logged in or registered, they should be taken back to the checkout page.
in Magento-1 it's possible  app/design/frontend/base/default/template/checkout/onepage.phtml.

<?php
          if (!$this->helper('customer')->isLoggedIn()) {
                 header("Location: /customer/account/login/");
                 exit();
          }
   ?>

how can  I do same  task in Magento2.


texts:
I would like to know the below 2 locations of Magento 1 in Magento 2.  Where can I find these 2 locations in Magento 2 Admin Panel ?

First location

Second location


texts: Magento2 - How to get Order Id before placing an order?

texts:
I want to get Order Increment Id on checkout page before click on Place order button.

I need it to pass in my payment method's parameters to third party link.

Can anyone help me getting this ?


texts: Magento setup resources not working in magento 1.8.1

texts:
Personal I'm trying to create an installation script for magento module, but the problem is that he's not running my script and not save the core_resource table, anyone have any idea why that is?

I followed the following tutorial
Magento – Install, install upgrade, data and data upgrade scripts

Config:

<?xml version="1.0"?>
<config>
    <modules>
        <Inchoo_DBScript>
            <version>3.1.5.6</version>
        </Inchoo_DBScript>
    </modules>
    <global>
        <models>
            <inchoo_dbscript>
                <class>Inchoo_DBScript_Model</class>
                <resourceModel>inchoo_dbscript_resource</resourceModel>
            </inchoo_dbscript>
            <inchoo_dbscript_resource>
                <class>Inchoo_DBScript_Model_Resource</class>
                <entities>
                    <ticket>

inchoo_dbscript_ticket

                    </ticket>
                    <comment>

inchoo_dbscript_comment

                    </comment>
                </entities>
            </inchoo_dbscript_resource>
        </models>
        <resources>
            <inchoo_dbscript_setup>
                <setup>
                    <module>Inchoo_DBScript</module>
                </setup>
            </inchoo_dbscript_setup>
        </resources>
    </global>
</config>

sql\inchoo_dbscript_setup\install-3.1.5.6.php:

$installer = $this;
$installer->startSetup();
$table = $installer->getConnection()
    ->newTable($installer->getTable('inchoo_dbscript/ticket'))
    ->addColumn('ticket_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'identity'  => true,
        'unsigned'  => true,
        'nullable'  => false,
        'primary'   => true,
    ), 'Id')
    ->addColumn('title', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
        'nullable'  => false,
    ), 'Title')
    ->addColumn('description', Varien_Db_Ddl_Table::TYPE_TEXT, null, array(
        'nullable'  => false,
    ), 'Description');
$installer->getConnection()->createTable($table);
$table = $installer->getConnection()
    ->newTable($installer->getTable('inchoo_dbscript/comment'))
    ->addColumn('comment_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
        'identity'  => true,
        'unsigned'  => true,
        'nullable'  => false,
        'primary'   => true,
    ), 'Id')
    ->addColumn('comment', Varien_Db_Ddl_Table::TYPE_VARCHAR, null, array(
        'nullable'  => false,
    ), 'Comment');
$installer->getConnection()->createTable($table);
$installer->endSetup();

app\etc\modules\Inchoo_DBScript.xml:

<config>
    <modules>
        <Inchoo_DBScript>
            <active>true</active>
            <codePool>community</codePool>
        </Inchoo_DBScript>
    </modules>
</config>


texts: Redirect URL while updating product status dynamically

texts:
I am making a custom module like market place, anyone can become seller and he will have facility in his account to add products and sell them. And he will be able to see all the related functionality in the same account, to manage this i have used Customer Group and created a customer under that group.

Now, in admin panel admin will see all the products uploaded by all the sellers, he will review those products and click on approve/Unapprove accordingly.

To achieve this, i have used ajax to make approve/Unapprove work properly.

The problem i am facing:
I want admin to redirect on products edit mode when he clicks on approve link. After that he will edit whatever he wants to and then click on save, so as he clicks on same i want product status to be enabled.

I am attaching a screenshot of my product grid.


texts: Changing/deleting cache causes system crash?

texts:
this is not my first post about this issue, but i've finally found what could be the cause of my problems.
It seems that deleting or "changing" my magento cache causes my site to crash.

I've deleted my cache, from backend and var/cache, and in both case
the site crashes. Furthermore even only looking at the cache page in
the backend (not changing a thing, but only accessing at that page)
causes the error.
Saving anything on configuration page causes the    crash too, once
i've restored the site i noticed that i can see my    changing in
backend, but not on frontend, so i suppose this is    another cache
issue.
Tried to delete an extension many times and in    many ways, same
result, site crashes.

I thought to a permissions error, but both to me and my server provider everything seems ok, i've also a test site (cloned by this one), in the same server on a different subdomain, the permissions are the same, but there's no error there.


texts: Search a comma separated string within an ->addAttributeToFilter()

texts:
I am using a content management plugin that lets you create posts and assign them related categories.

My issue is that if I create a post that is relevant to two categories then the realted categories are stored in an array style e.g.

Categories: 3,5

If I then am on a product and want to pull in posts related to this category I use an ->addAttributeToFilter(); on my collection as below:

$catid = 5
->addAttributeToFilter('linked_categories', $catid);

But obviously the "linked_categories" array is 3,5 so my variable doesn't match!

How can I say "If the linked_categories array contains my $catid"?


texts: Fatal error: Class 'Linksture_Faqs_Helper_Data' not found in public_html/app/Mage.php on line 546

texts:
So I installed an add on for a FAQ template, but encountered a problem while doing so. It didn't install correctly, so I attempted to just remove all the files. In doing so, I was hit with this error when trying to access my admin control panel and am completely unable to access anything in it now because of this error.

I'm assuming there's a database value that's wrong, but am unsure where to look and what to change it to.  Any help would be great to avoid having to upload a back up.


texts: How to set default value for configuration field with type time

texts:
How can I set a default value for a field from system.xml with type time?

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>

        Checkout
        <tab>my_tab</tab>
        <resource>My_Checkout::config</resource>
        <group id="cut_off_time" translate="label" sortOrder="90" showInDefault="1" showInWebsite="1" showInStore="1">
            Delivery Cut-off Time
            <field id="cut_off_time_start" type="time" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                Start Time
            </field>
        </group>

</system>

For field "cut_off_time_start" with type TIME.


texts: How to add custom block under payment method(admin order invoice)


texts: Magento 2: 500 error on save products in admin

texts:
I am experiencing the 500 error on product save. Previously it shows me the memory exhausted error in log but after increasing memory limit I am seeing error in exception log like below.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '16358-0-1' for key 'PRIMARY'

I have found one answer here but in my case i don't know which duplicate value i should search for.


texts:
I working with Quotations in CMS, when I submit Qoute in my mail I have Subtotal and Grand total, the only difference is Grand total get plus with Shipping (Qquoteadv module). If customer has discount both of totals already get minus this discount.

How to make subtotal without discount?

Thanks


texts: I can not move to checkout page magento 2

texts:
I click on "add to cart" but can't move to checkout page, only move to this page. Product is not going to the cart.

Anyone can help me solve this problem?


texts: I am going to work on Magento2(version 2.3.4), I want to create custom theme from scratch so, anyone tell me that how i can apply css,js,images,icons,fonts as well as what is the folder structure of theme.


texts: Magento Onepage keeps redirecting to cart until I reload php-fpm

texts:
I have a Magento site on an nginx server with PHP-fpm. I came into this project recently with the server already set up, albeit poorly. Right now, when a user is in onepage checkout and tries to move from Billing Information to Shipping Information, or directly to Shipping Method, it just redirects him back to the cart. The cart page now has the 'estimate shipping and tax' box open but other than that no change. If you try to checkout again, its the same issue. The only way I was able to resolve the issue was by reloading php-fpm.

In addition to this, I get random 502 errors on my site from different customers. They too only get fixed with a php-fpm reload.

I would like to disable the php-fpm caching as its causing a lot of headaches for our store, but I am not familiar enough with nginx and php-fpm to know where I would go about disabling this to help stop this problem.


texts:
I am upgrading magento 2.2.8 store to 2.3.2. I have change version in composer.json  "magento/product-community-edition": "2.3.2", and run command composer update then get error

  Problem 1 - Installation request for magento/product-community-edition
  2.3.2 -> satisfiable by magento/product-community-edition[2.3.2]. - magento/product-community-edition 2.3.2 requires
  dotmailer/dotmailer-magento2-extension 3.1.2 -> satisfiable by
  dotmailer/dotmailer-magento2-extension[3.1.2] but these conflict with
  your requirements or minimum-stability.

How can getout from this error?
Thanks


texts: Is this an attempt to mess with the shop?

texts:
when i check in backend, customers online, is see an ip address viewing the site with a url that is strange

The url structure is:

https://www.mydomain.com/nl/category/page.html

but i see someone using

/nl/catalog/product_compare and nl/catalog/category/view/id/6

i do not use the word catalog...

Is this something to worry about and if so, how to prevent it?


texts:
I thought I was quite familiar now with plugins and preferences to override built-in behavior of Magento 2.

However it seems not, and I have a question, is there some particular technical limitations with overriding by preference (on top of that provided in the official documentation) ?. Or any tips?

My example: I created a custom category attribute. As there is some treatment to process before displaying it, I created a Category model in my module, make it inherit the original one, defined my getter for the custom attribute, defined the preference in di.xml.

However, this time it's not working. Instead of preference on the category interface I have to make preference on the model to make it work. Is there a particular technical reason?

My example is when the user access to a category page in the front office.

Thanks.!

EDIT :

So, according to your recommendation, I set the di.xml in front end, without success. Hence, there is my code:

etc/module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="1.0.2">
    <sequence>
        <module name="Magento_Catalog"/>
    </sequence>
</module>

etc/frontend/di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Catalog\Api\Data\CategoryInterface" type="Vendor\Module\Model\Category" />

My Model/Category.php contructor:

public function __construct(
    \Vendor\Module\Api\CategoryUrlRepositoryInterface $categoryUrlRepositoryInterface,
    \Magento\Framework\Model\Context $context,
    \Magento\Framework\Registry $registry,
    \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory,
    AttributeValueFactory $customAttributeFactory,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Catalog\Api\CategoryAttributeRepositoryInterface $metadataService,
    \Magento\Catalog\Model\ResourceModel\Category\Tree $categoryTreeResource,
    \Magento\Catalog\Model\ResourceModel\Category\TreeFactory $categoryTreeFactory,
    \Magento\Store\Model\ResourceModel\Store\CollectionFactory $storeCollectionFactory,
    \Magento\Framework\UrlInterface $url,
    \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
    \Magento\Catalog\Model\Config $catalogConfig,
    \Magento\Framework\Filter\FilterManager $filter,
    \Magento\Catalog\Model\Indexer\Category\Flat\State $flatState,
    \Magento\CatalogUrlRewrite\Model\CategoryUrlPathGenerator $categoryUrlPathGenerator,
    UrlFinderInterface $urlFinder,
    \Magento\Framework\Indexer\IndexerRegistry $indexerRegistry,
    CategoryRepositoryInterface $categoryRepository,
    \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
    \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
    array $data = []
)
{
    parent::__construct($context, $registry, $extensionFactory, $customAttributeFactory, $storeManager, $metadataService,
        $categoryTreeResource, $categoryTreeFactory, $storeCollectionFactory, $url, $productCollectionFactory,
        $catalogConfig, $filter, $flatState, $categoryUrlPathGenerator, $urlFinder, $indexerRegistry, $categoryRepository, $resource, $resourceCollection, $data);

    $this->categoryUrlRepositoryInterface = $categoryUrlRepositoryInterface;
}


texts: Magento 2 - Getting product Image url in Model/block not in template file?

texts:
I am sending product data as response for the rest  api call, I want to get product Image Url, currently using this:

$imagehelper = $objectManager->create('Magento\Catalog\Helper\Image');
$image = $imagehelper->init($product, 'category_page_list')->constrainOnly(FALSE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(400)->getUrl();

but getting following URL :

  http://XXXX.com/pub/static/webapi_rest/_view/en_US/Magento_Catalog/images/product/placeholder/.jpg

Not getting any image .

Thanks.

referring the following Question : Here


texts: Need Product list by manufacturer name or option id

texts:
i am trying this code

<?php
$manufacturerId = 28;
$attributeCode = 'manufacturer';
 $products = Mage::getModel('catalog/product')
                ->getCollection()
                ->addAttributeToFilter($attributeCode, $manufacturerId);

// print all products
echo "<pre>"; print_r($products->getItems()); echo "</pre>";

    ?>

but get real solution

output of this code is

Array
(
)

how can i get product list by manufacturer name


texts: Magento file permissions nginx server issues error 500

texts:
I issued Magento recommended commands (given below) in the root directory of my Magento 1.9 installation and since then my nginx server is issuing 500 internal server error.

find . -type f -exec chmod 400 {} \;
find . -type d -exec chmod 500 {} \;
find var/ -type f -exec chmod 600 {} \;
find media/ -type f -exec chmod 600 {} \;
find var/ -type d -exec chmod 700 {} \;
find media/ -type d -exec chmod 700 {} \;

I re-uploaded the files and website started to work but i can't figure out what's wrong with these commands!


texts: How do I add the manufacturer attribute to sales_flat_order_item?

texts:
Hi we use the manufacturer attribute a lot. And often in code we have to grab it separately because it is stored as a product attribute.

question: Is it possible, just like the flat_catalog tables, to add the manufacturer attribute to the sales_flat_order_item table?


texts: In magento 2 on product collection both addFieldToFilter and addCategoryFilter is not working

texts:
I am trying to get the product based on the 3 rules.
1st rule -> the product should have been created within a month
2nd rule -> it should be belonging to a particular category
3rd rule ->it should not have any special price

My Code:

$collection = $this->productCollectionFactory->create();
$collection->addAttributeToSelect('*');
$collection->addAttributeToFilter('created_at', ['gteq' => $previousMonthDate]);
$collection->addCategoryFilter($category);

This is returning empty array any suggestions on applying filter?


texts: How to add multiple products to cart using ajax in magento 2

texts:
I want to add more products to cart using ajax in magento 2 but it doesn't work. please help me to solve this problem here's my code
file ajax.phtml
<script>
require(['jquery'], function($){

    $(document).on("click",".tool-buttton-buy", function() {
        var addCartUrl = "<?php echo $block->getAjaxUrl().'ajaxcart/index/allcart' ?>";

        var searchIDs = $("input[name='product']").map(function(){return $(this).val();}).get();

        var jsonString = JSON.stringify(searchIDs);
        $.ajax({
            url: addCartUrl,
            type: 'POST',
            showLoader: true,
            cache: false,
            dataType: 'json',
            data: {productId : jsonString},
            success: function (data) {
                console.log(data);
            }
        });
    })
})

file Controller Ajax
         $productAllId = json_decode($this->getRequest()->getParam('productId'));

foreach ($productAllId as $productId) {

    $params = array(
                'form_key' => $this->formKey->getFormKey(),
                'product' => $productId,
                'qty'   =>1
            );
    $product = $this->product->load($productId);
    $this->cart->addProduct($product, $params);
    $this->cart->save();

}


texts: 1.9.3.7 to 1.9.3.8 Upgrade Broke Cart & Checkout for Logged in Customers After Compilation

texts: We just upgraded from 1.9.3.7 to 1.9.3.8 and getting a blank page when trying to access the cart or add products to it. This happens for logged in customers only and only when compilation is turned on. No log or PHP errors - just a blank page. We found this but not sure how to properly edit the file. Please help with exact instructions on how and what file to edit.


texts: Magento 2.3 How to override the custom theme's etc/layouts.xml file in recommended way?

texts:
There is, in a theme that I bought a layout.xml file that is used in the backoffice to hydrat a select element (that allows you to switch between 5 layouts).

app/code/CompanyTheme/LayoutSwitcher/etc/layouts.xml

this file contains

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:CompanyTheme_LayoutSwitcher:etc/layouts.xsd">
    <layout id="header_layout_1" label="Header Layout 1" type="header" />
    <layout id="header_layout_2" label="Header Layout 2" type="header" />
    <layout id="header_layout_3" label="Header Layout 3" type="header" />
    <layout id="header_layout_4" label="Header Layout 4" type="header" />
    <layout id="header_layout_5" label="Header Layout 5" type="header" />
</config>

I want to add a sixth layout. For the moment I have modified this file directly to add a line (layout 6), but I know that this is not correct because the changes I made will disappear the next time I update the code that does not belong to me.

I searched but I don't know if it is possible to override this kind of file. If so, please give me some hints or on the contrary confirm that we can't...


texts: addFieldToFilter() And Condition in magento2

texts:
I need to filter values based on and condition in my custom table

my tablename Testing

 +-------------+--------------------+--------------------+
 | customer_id | customergroup      | customeremails     |
 +-------------+--------------------+--------------------+

if customergroup and customeremails same means I dont add this value

so, I put this condition:

   $multiselectupdate =$multiselect->getCollection()
                                ->addFieldToFilter('customergroup', "'eq'=>$categoryname")
                                ->addFieldToFilter('customeremails',"'eq'=>$mail");

But, its not working for Suggest me How set And Condition in addFieldToFilter() method.


texts: how to add layered navigation in all product page

texts:
I am created all product page to show all product in on page .

For fast order processing but my difficulty is how to add product sorting.

please help solve this problem


texts: Magento2 - How to Export mysql database without products,orders and customers data?

texts:
I have one bigger website it has lot's of products, orders and customers.

I have to export database without products, orders and customers.
And have to import database in my local machine.

I follow this command to export data. this example for single table only.

  mysqldump -u root -p database
  --ignore-table=database.frst_catalogrule_product > export.sql

  mysqldump -u root -p database --no-data frst_catalogrule_product >>
  export.sql

Now my question is

  How many tables are effected for product,orders and
  customer? I need list of tables which are related to all of them?

So I can ignore those tables data and export rest.

I found list of products related tables. But i am not sure how many tables are important.

catalogrule_product
catalogrule_product_price
catalogrule_product_price_replica
catalogrule_product_replica
catalog_category_product
catalog_category_product_index
catalog_category_product_index_replica
catalog_category_product_index_tmp
catalog_product_bundle_option
catalog_product_bundle_option_value
catalog_product_bundle_price_index
catalog_product_bundle_selection
catalog_product_bundle_selection_price
catalog_product_bundle_stock_index
catalog_product_entity
catalog_product_entity_datetime
catalog_product_entity_decimal
catalog_product_entity_gallery
catalog_product_entity_int
catalog_product_entity_media_gallery
catalog_product_entity_media_gallery_value
catalog_product_entity_media_gallery_value_to_entity
catalog_product_entity_media_gallery_value_video
catalog_product_entity_text
catalog_product_entity_tier_price
catalog_product_entity_varchar
catalog_product_frontend_action
catalog_product_index_eav
catalog_product_index_eav_decimal
catalog_product_index_eav_decimal_idx
catalog_product_index_eav_decimal_replica
catalog_product_index_eav_decimal_tmp
catalog_product_index_eav_idx
catalog_product_index_eav_replica
catalog_product_index_eav_tmp
catalog_product_index_price
catalog_product_index_price_bundle_idx
catalog_product_index_price_bundle_opt_idx
catalog_product_index_price_bundle_opt_tmp
catalog_product_index_price_bundle_sel_idx
catalog_product_index_price_bundle_sel_tmp
catalog_product_index_price_bundle_tmp
catalog_product_index_price_cfg_opt_agr_idx
catalog_product_index_price_cfg_opt_agr_tmp
catalog_product_index_price_cfg_opt_idx
catalog_product_index_price_cfg_opt_tmp
catalog_product_index_price_downlod_idx
catalog_product_index_price_downlod_tmp
catalog_product_index_price_final_idx

Any help would be appreciated.
Thanks.


texts: how can we access customer session in checkout

texts:
I have one special field called some_id in customer data and I want to save the some_id and quote_id in database.

I am using sales_quote_save_afterevent to save both ids. But my customer session is not accessible here.

Can anyone knows here how can we do that?

protected $customerSession;

public function __construct(
    \Magento\Customer\Model\Session $customerSession
){
    $this->customerSession = $customerSession;
}

 public function execute(Observer $observer)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/cust.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('new observer');
        $quote = $observer->getQuote();
       $logger->log("Customer Name ". $this->customerSession->getName());
      $logger->log("Quote id ". $quote->getId());

    }


texts: Disable manage stock configuration Magento does not work

texts:
I am migrating an existing Magento site to a new install.

I imported about 10000 products which all use 'stock config' settings. When i try to change the config setting 'manage stock' to NO, it loads for a while and says 'config saved', but the setting remains YES. All other settings do work. Only not the Manage stock setting.

How can I disable the setting through database or back-end?

Greetings,


texts: How do I hide a static block on one of my category product pages?

texts:
On all my product pages just below the main product images I have a static block called "block_product_img_bottom", which contains a small image.

All but one category must display this image, so how do I hide this static block on just one of my categories?


texts: Impact of programming errors in wishlist observer introduced in 1.9.4.0?

texts:
The release of 1.9.4.0 introduces two programming errors in the wishlist observer: in order to make the method Mage_Wishlist_Model_Observer::processAddToCart compatible with PHP 7.2, the two usages of count on a possible NULL value are replaced by empty while it should have been !empty.

This is the diff between 1.9.3.10 and 1.9.4.0 of the file app/code/core/Mage/Wishlist/Model/Observer.php:

--- a/app/code/core/Mage/Wishlist/Model/Observer.php
+++ b/app/code/core/Mage/Wishlist/Model/Observer.php
@@ -102,7 +102,7 @@ class Mage_Wishlist_Model_Observer extends Mage_Core_Model_Abstract
             $wishlistIds = array($singleWishlistId);
         }

-        if (count($wishlistIds) && $request->getParam('wishlist_next')){
+        if (empty($wishlistIds) && $request->getParam('wishlist_next')){
             $wishlistId = array_shift($wishlistIds);

             if (Mage::getSingleton('customer/session')->isLoggedIn()) {
@@ -125,7 +125,7 @@ class Mage_Wishlist_Model_Observer extends Mage_Core_Model_Abstract
             Mage::getSingleton('checkout/session')->setSingleWishlistId(null);
         }

-        if ($request->getParam('wishlist_next') && count($urls)) {
+        if ($request->getParam('wishlist_next') && empty($urls)) {
             $url = array_shift($urls);
             $message = array_shift($messages);

the impact of this error is not clear to me: on the one hand the bodies of the if statements are executed exactly in wrong circumstances resulting in wishlist items not being deleted, incorrect/missing error messages in the session and redirects to NULL. But on the other hand, this logic is only triggered when the wishlist_next query parameter has a truthy value. However, I cannot find any place where wishlist_next query parameter is set.

So my question is: what is the real impact of these programming errors?


texts: PayPal Checkout and Account Registration Conflict

texts:
I was originally drafting this to ask a question, but in the process I actually fixed the problem, so I'm posting this in hopes it helps someone else.

I have Magento CE 1.9.1.0 and I'm having a problem with account registration at checkout when the customer pays using PayPal.  We use Templates Master's FireCheckout.  Here's the scenario:

Customer fills out checkout form, elects to create an account for later use, and picks PayPal as payment option
Customer redirects to PP, logs in, confirms payment, is directed back to our site on the PayPal Express Review page
Customer clicks final Place Order button, PayPal responds with an error (i.e. 10736 - city/state/zipcode mismatch)
Customer doesn't know the issue, so clicks Place Order again.
Magento session still has their account type as "register", but because of how the PayPal UK module handles PayPal Express for PayFlow customers, the customer account creation wasn't rolled back and the account was already created.  So then, upon secondary submission, they are presented with the error "That customer email already exists".
Customer tries and tries, sometimes eventually figuring it out, sometimes giving up.

This can easily be tested using the PP sandbox in Negative testing mode.

Create an item that has free shipping and costs exactly $107.36, grand total
Place an order with this item and pick PayPal as the checkout method.
Follow through the entire process, you should get the 10736 error on the file submission.
Try submitting again, you should get the "This customer email already exists" error

I have dug through some of the code and found that it is due in part to the Mage_Paypal_Model_Express_Checkout class in their _prepareNewCustomerQuote method.  This creates and saves the customer record before the order is even placed.  This is unlike the standard checkout, which creates a customer record and sets it on the quote but doesn't actually commit the customer record to the DB.  It is then able to roll back the customer creation SQL call and not commit the changes, allowing the subsequent attempts to do it.  But this rollback doesn't work in PP Express because it already committed the record.

I tried a few things to resolve this (see Mage_Paypal_Model_Express_Checkout around line 990):

I tried commenting out the $customer->save(); call in Mage_Paypal_Model_Express_Checkout.  That resulted in successfully allowing the order once the error was fixed, but it never actually saved the customer record.
I then tried adding setCustomerId(true) when it sets the customer on the quote.  I copied this from the standard checkout class: $quote->setCustomer($customer)->setCustomerId(true);.  THIS FIXED IT!  See answer below for details.


texts: Magento2 : How to call shared package in another module composer.json Magento 2 Market place

texts:
My module A depends on B.I uploaded A in the marketplace and B as a shared package. I getting following an error while uploading an A module while submitting in the market place

  Installation failed, reverting ./composer.json to its original
  content. Environment: PHP 5.6.37 Magento 2.1 CE composer require
  vendor/module-A:1.0.0 2>&1  ./composer.json has been updated Loading
  composer repositories with package information Updating dependencies
  (including require-dev) Your requirements could not be resolved to an
  installable set of packages.

  Problem 1
      - Installation request for vendor/module-A 1.0.0 -> satisfiable by vendor/module-A[1.0.0].
      - vendor/module-A 1.0.0 requires vendor/module-B ^1.0.0 -> no matching package found.

  Potential causes:
   - A typo in the package name
   - The package is not available in a stable-enough version according to your minimum-stability setting see for more details.
   - It's a private package and you forgot to add a custom repository to find it

  Read  for further common problems.

Installation failed, reverting ./composer.json to its original content.

I called following method in Module A

 "vendor/module-B": ">=1.0.0",

Note:I already uploaded Shared package successfully

Guide me How to call shared package in A module composer.json


texts: Magento 2: In which database table are the payment methods stored?

texts:
I'm working on a custom module that uses a database table that have the foreign key of both the payment methods and customer groups. I don't know which database table stores all the payment methods.

My Googling skills couldn't find it.


texts: Events when the order is placed is not firing

texts:
I am trying to observe an event when the order is placed but is not working for me. I tried with "sales_order_place_after" and "checkout_submit_all_after" events but nothing happens. The "test.log" file is not generated.

My "events.xml":

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="sales_order_place_after">
    <observer name="send_order_tracy" instance="Tracy\ShippingMethod\Observer\SendOrderToTracy"/>
</event>
</config>

My observer class:

<?php

namespace Tracy\ShippingMethod\Observer;

class SendOrderToTracy implements \Magento\Framework\Event\ObserverInterface
{
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
       $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/test.log'); // creates new log file named test.log in var/log folder
       $logger = new \Zend\Log\Logger();
       $logger->addWriter($writer);
       $logger->info("oe repinga plaicié la orden"); // this will be print in test.log file
    }
}

I tried with the first event and later with the other one, changing just the event name. Is that correct? Do I need to compile or something like that? I am just flushing cache.


texts: When updating to Magento 2.3.1 db_schema.xml is invalid: Element 'schema': No matching global declaration available for the validation root

texts:
While updating Magento 2.2.8 to 2.3.1

I'm facing issue when running bin/magento setup:upgrade

I get error:

The XML in file "/var/www/html/vendor/magento/module-store/etc/db_schema.xml" is invalid:
Element 'schema': No matching global declaration available for the validation root.
Line: 9

Anyone was facing this kind of issues?


texts: Console errors after installing Magento-CE-2.0.2

texts:
I freshly installed Magento 2.02 Community Edition but now when i
  login to admin panel then nothing is clickable and found 28 console
  error related to css and js  How can i solve this problem


texts: magento 1 Remove Category path from product URL is not working

texts:
I removed Category Path From product URL from admin area, now when Users come from google with old URL which contain (Domain.com/categorypath/Productname.html) it show 404 error instead of redirect to product page (domain.com/productname.com).
I already tried Truncate core_URLrewrite  table and reindex and remove all cache but did not worked. any help will be highly appreciated


texts:
What is the best practice for removing template files that have been defined in PHP files?

For example I want to remove helper/summary_short.phtml on category pages, normally I'd remove the block via XML. But I can't do this as the template isn't defined in a block, it's defined in PHP.

vendor/magento/module-review/Block/Product/ReviewRenderer.php

/**
     * Array of available template name
     *
     * @var array
     */
    protected $_availableTemplates = [
        self::FULL_VIEW => 'helper/summary.phtml',
        self::SHORT_VIEW => 'helper/summary_short.phtml',
    ];


texts: I have a catalog price rule for a group of products with start date 25/06/14 and end date 30/06/14. This rule stops working at midnight 29/06/14. This happens every weekend for campaigns that should be available until monday evening. Cron is running every minute. Anyone have a clue why they stop working a day in advance?


texts:
I want something like this

I tried looking into vendor/magento.../i8n translation file, but the field street address is not there.

How can I rename this specific field?


texts:
Grunt issues following error for grunt watch task:-

  Fatal error: Port 35729 is already in use by another process.

I've closed all other applications such as sublime text but still same error. I'm on Ubuntu 16.04TLS and only active application is PHPStorm.


texts: How To add JS file in frontend for all pages

texts:
I've read 3 pages of Google Results on how to load a JS file for all pages and still am not able to do it.

I've got a few doubts, hope somebody can clear them out.

Do I need to create a module inside app/code with the requirejs-config.js ? Or I can put a requirejs-config.js inside my theme instead?
What should I put inside requirejs-config.js ?
What should the code look like inside my .js file? I saw that you can't use jQuery's document.ready and you must have a define([
What should I put inside define([ ?
If I've got third party jQuery modules, do I have to edit them to make them work?
Do I need to put xml somewhere to tell magento that my.js file exists?
If I create a module inside app/code with all the js code there, would it include all the stuff in all pages? How can I achieve that?


texts: Sitemap is not generated showing error magento 2.2.5

texts:
I am getting this message when trying to generate site map from backend magento.

Path "/sitemap" is not available and cannot be used.

I have also changed the path to pub/media/ but getting same result.

Any help?


texts: Magento 2 addAttributeToFilter not adding to SQL

texts:
I'm trying to get a list of products with a custom attribute set a certain way. Right now only one product should be returned, however it's returning the whole catalog. It seems like my added attributes are just being ignored. Any idea what I'm doing wrong?

This is my block file:
    namespace Mycompany\MyModule\Block\Index;

class Index extends \Magento\Framework\View\Element\Template
{
    protected $product;
    protected $_storeManager;

    /**
     * Constructor
     *
     * @param \Magento\Framework\View\Element\Template\Context  $context
     * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $product
     * @param \Magento\Store\Model\StoreManagerInterface $storeManager
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $product,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        array $data = []
    ) {
        $this->product = $product;
        $this->_storeManager = $storeManager;
        parent::__construct($context, $data);
    }

    public function getProducts()
    {

        $collection = $this->product->create()->setStoreId($this->_storeManager->getStore()->getId());
        $collection->addAttributeToSelect('*')
            ->addAttributeToFilter('recalled', ['eq'=>'1'])
            ->addAttributeToFilter('status', ['eq'=>'2']);

        print_r($collection->getSelect()->__toString());
        die();

        return $collection;
    }
}

And this is the SQL it spits out:

SELECT 1 AS `status`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`created_at`, `e`.`updated_at`, `e`.`sku`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`row_id`, `e`.`allow_open_amount`, `e`.`b2c_fashion`, `e`.`b2c_fashion_value`, `e`.`cost`, `e`.`created_at`, `e`.`description`, `e`.`email_template`, `e`.`giftcard_amounts`, `e`.`giftcard_type`, `e`.`gift_message_available`, `e`.`gift_wrapping_available`, `e`.`gift_wrapping_price`, `e`.`has_options`, `e`.`image`, `e`.`image_label`, `e`.`is_redeemable`, `e`.`item_number`, `e`.`lifetime`, `e`.`links_exist`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`open_amount_max`, `e`.`open_amount_min`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`required_options`, `e`.`short_description`, `e`.`sku`, `e`.`sku_type`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`swatch_image`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`ts_dimensions_height`, `e`.`ts_dimensions_length`, `e`.`ts_dimensions_width`, `e`.`upc_code`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`use_config_email_template`, `e`.`use_config_is_redeemable`, `e`.`use_config_lifetime`, `e`.`visibility`, `e`.`weight`, `e`.`weight_type` FROM `catalog_product_flat_1` AS `e`


texts: Magento is creating duplicate invoice ids for the orders

texts: When I checkout with paypal Express checkout , it shows error of duplicate invoice id. This is why we can not place order. Please help me.


texts: which magento API using for create a new account

texts:
we are devoloping a android app for magento site.

we want to know where api s are calling in magento code.

for example : for creating an account, customer will enter every information

and click on "submit" button, suppose if there is already a customer registered with same email id ,

again new customer can not able to create with the account with the same email id.

what i want is how it works? which API magento using to check whether that email is already registered or not.

means which API it is passing to database to get information about that email id is registered or not.

let me know if you have any queries.

please help me to find solution


texts: How to delete an order programatically in Magento 2?

texts: How can we delete a Magento2 order programatically? There's ways to do this in Magento 1.X. Is it the same methodology for Magento2 as well?


texts:
I'm planning an ERP - Magento integration.

I know that Magento has his own API that I can use it when some changes occurs in our ERP. For example,  product catalog updates, new customers, etc... that part is easy, just use Magento API in our ERP code... (please correct me if i'm wrong).

This covers ERP to Magento sync. But what happens with Magento to ERP sync?

For example, I would like that when a sell occurs Magento make a POST to my ERP API telling, what client, and which products are sold.

Another example, a customer updates his phone in magento. ¿How I can sync that change with my ERP?

Thanks.


texts: When click on manage products return Unknown column error and app crash

texts:
I am using magento 1.9 and when I click on manage products tab app crashed and return Error log record number: 579144440716

I checked my error logs against records number and here is the error history

 a:5:{i:0;s:448:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'gc., IF(gc.column_id IS NULL, main_table.visible, gc.is_visible)' in 'field list', query was: SELECT `main_table`., `gc.*, IF(gc.column_id IS NULL, main_table.visible, gc`.`is_visible)` AS `visibility` FROM `amasty_pgrid_grid_column` AS `main_table`
 LEFT JOIN `amasty_pgrid_group_column` AS `gc` ON main_table.entity_id = gc.column_id AND gc.group_id = 0 WHERE (`column_type` = 'standard')";i:1;s:5763:"#0 /var/www/vhosts/vaperite.com/site/pub/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/vhosts/vaperite.com/site/pub/includes/src/__default.php(72645): Varien_Db_Statement_Pdo_Mysql->_execute(Array)

I have also run all commands like

Cache clean
Index
compilation

but no good luck. Please help on this I have no clue how to fix this issue my site is on live.


texts: Magento user's Linux home directory (for private RSA key)

texts:
apache runs Magento on our Linux server, and I'm trying to find out where the home directory for this user would be. I need to place a private key for SFTP access for Magento's extension.

There is /var/www, so would I have a directory, /var/www/.ssh/ here and put the private key there?

Furthermore, I'm not even sure if this will work when a Magento extension will attempt to upload a file via key-anthenticating SFTP. I do have the password-authentication SFTP already set up, and that works great. This might be a little off-topic, however.


texts: i would like to know flatrate details store database table


texts: admin/url/custom cause media directives to break

texts:
If admin uses a custom domain, different from the default website, the WYSIWYG image-selector will return malformed media directives, causing broken links to images.

Expected directive: {{media url="wysiwyg/image.jpg"}}

Returned directive: {{media url="http://backend.dev/media/wysiwyg/image.jpg"}}

This is known Magento 2 bug https://github.com/magento/magento2/issues/16427, but maybe there are some workarounds until Magento 2.3 will be released?


texts: How to get coupon code in newsletter subscription Email Template in Magento 2?

texts: get coupon code in the newsletter email template.


texts: Is there some functionality to view all routes same like Symfony(router:debug) which shows us all the available routes(URL) in the current application.


texts: Magento REST Error 401 oauth_parameters_absent=oauth_token

texts:
Since a week i'm trying to get the REST API to work but without success,
i searched the whole internet for a solution. Everytime when i try to connect to the Magento REST API i get the

  Error 401 oauth_parameters_absent=oauth_token.

I'm using the firefox RESTClient and i have 2 seperate Magento installations on different server with different versions (1.7.0.2 & 1.9.0.1) but on both systems the same error.

If i try to connect via the guest role, everything works fine but over the oAuth i always get the 401 error.

Maybe someone could help me im really getting desperate


texts: Magento 2 warning on select date on frontend

texts: Does anyone encounter this warning when choosing a date, please help me fix it. thank you.


texts: Magento 1.9.0.1 Paypal error The totals of the cart item amounts do not match order amounts (#10413:

texts:
is this using magento 1.9.0.1 has integrated the box expres paypal, in addition to this you have the plugin pro rewards points as reward points to buy some productosen which when it became the integration and buying products without using points of recompesa, payment by paypal nigun can be done without problem, but when customers use reward points, an error when confirming the order, which is

The gateway of PayPal rejected the request. The totals of the cart item Amounts Amounts do not match order (# 10413: Transaction refused Because of an invalid argument See additional error messages for details.)

Searching the net to try and fix this error, I suggest that you can modify the file Nav.php paypal adding any two codes which I put below:

first code

//Hack Start

$totalValue = $request['TAXAMT'] + $request['ITEMAMT'];
$finalValue = $totalValue - $request['AMT'];

if($request['SHIPPINGAMT'] > 0) {

$request['SHIPPINGAMT'] = ($request['AMT'] - ($request['TAXAMT'] + $request['ITEMAMT']));
$totalValue = $request['TAXAMT'] + $request['ITEMAMT'] + $request['SHIPPINGAMT'];
$finalValue = $totalValue - $request['AMT'];

}

if($request['AMT'] != $totalValue) {

if($totalValue > $request['AMT']) {
$request['TAXAMT'] = $request['TAXAMT'] - $finalValue;
}elseif($totalValue < $request['AMT']) {
$request['TAXAMT'] = $request['TAXAMT'] + $finalValue;
}else{
$request['AMT'] = $request['TAXAMT'] + $request['ITEMAMT'];
}
}

//Hack End

second Code

    // Check discount
$lineAmt = 0;
$discount = 0;
$line = 0;
$discountIndex = 0;
while(isset($request["L_AMT{$line}"])) {
if($request["L_NAME{$line}"] == 'Discount') {
$discount += $request["L_AMT{$line}"];
$discountIndex = $line;
}
else {
$lineAmt += $request["L_AMT{$line}"];
}
$line++;
}

if($discount) {
if($discount + $lineAmt != $request['ITEMAMT']) {
// Do correction
$request["L_AMT{$discountIndex}"] = ($request['ITEMAMT'] - $lineAmt);
}
} else {
// Check item amount adds up
$correctItemAmt = $request['AMT'] - $request['SHIPPINGAMT'] - $request['TAXAMT'];
if($correctItemAmt != $request['ITEMAMT']) {
$request['ITEMAMT'] = $correctItemAmt;
}

//end

Adding either code, if allowed and make payment for that discount points, but the problem is that when you see the paypal payment, is charging the amount of discount rather than the total amount, the time that the paypal customers log in and go through the expres box, all amounts are correct and desglozadas in the end the total payment amount is fine, return to the store and confirm the order, which is made successfully, but when paypal payment in the amount of discount is what we receive, it exemplifies to make it clear

Product Cost> 340
Points usuados per customer> 125 equivalent to 20.54
Total purchase in store and paypal boxed expres> 319.46
Quantity recibda to see the account on paypal> 20.54

Apart from this, when buying payment unused reward points is made, an error indicating that the amount of the transaction is valid because it is Zero appears.

I've puzzled to see what the error codes either to modify it, but I can not do it, not if someone know I have to do or can help


texts: Magento 2 tier price is not showing with tax

texts:
<?php
if($_product->getTierPrice()){
    foreach ($tierPrice as $key => $value) {
        $qty = (int)$value['price_qty'];
        $price = $value['price'];
        $formattedTierPrice = $this->helper('Magento\Framework\Pricing\Helper\Data')->currency(number_format($price, 2), true, false);
        $savePercentage = round(100 - ( (100 / $_product->getPrice())* $price) ) ."%";
        echo "
"."Buy $qty for "."" . $formattedTierPrice . ""." each and save ".$savePercentage."
"."
";
    }
}
?>


texts:
Does anyone know why the login template is duplicated in CE 1.9 ? (see image)

Thanks.


texts: Change the size of the "Product Process Image"

texts:
The image displayed next to the Main Product image is being resized down too small.  Where can I change the setting for this?

I changed the size for the Product Process Image in the admin panel config area and saw no change.  I am looking through the file directory but haven't run into what i'm looking for.


texts: Magento 2 : Configurable Product Page Price Change

texts:
I imported product into magento 2. All of products are configurable products with simple products associated with them.

I am using cart2cart to achieve this. There are a bunch of issues that they seem to be able to handle well.

After a successful demo migration (took some time/customization on their behalf). I noticed that price on product pages does not update to reflect price of the simple product.

When adding product to cart, price is correctly shown (as price of simple product).

I am wondering, if this is way magento works, or if there is a setting that would change that, or if I would need to customize magento to update price on product page with either an addon or custom job.


texts: installing & using reactjs in magento 1.9

texts:
Im trying to run reactjs library in my magento 1.9 website. reactjs can be run in php server using v8js-php consequently it could work.

many reactjs components are installed using composer:

a- its possible to use NPM and composer in magento 1.9?
b- anyone has a github or similar displaying a reactjs installation with magento 1.9?


texts: CLI command to change env.php 'downloadable_domains'

texts:
Is there a CLI or rest interface that can modify the downloadable_domains section in env.php, or do I have to just manually run a sed or awk on the file during my deployment process

Thanks
(BTW, google search for "downloadable_domains" comes up with 0 results)


texts:
In my project, I have a requirement where I need to filter simple products based on price.

In default Magento, the filtering of price is based on configurable products.

Some important points related to my project are:

The simple products in are associated with the configurable products.
Each configurable product has three types of simple products associated with it.

For example, if the configurable product is A, then the associated simple products are A1, A2 and A3.

PS: After failing to hold the grip even after digging deeper in Magento core files, I am asking here.

Please give some clear suggestions.


texts: Something went wrong while saving this configuration: Area is already set

texts: I am unable to apply a new theme in a clean install of 2.2.4. Upading to 2.2.5 does not fix the problem.


texts: magentocommerce.com/magento-connect/login-as-customer-by-praxigento.html for login from the admin as customer but I have a problem when I log in to one customer and log out then go to another all products in cart from previous customer are copy in next customer cart the current one are deleted and products from previous customer are added any help or suggestion Please


texts: where,are the URLs to attached product file?

texts:
I exported "all" product data using the System/data flow profiles/export all products tool from Magento backend manager. Yet, while there were nearly all, there was no column to indicate the attached file that you sometimes want to join to your product when you are creating one.

I have found the directory where all those files are> media/amfiles/files but I need the url of the product to their respective pdf files


texts:
I'm using magento 2, I want to use a private  sql connection with port
when I try to add this code to my env.php, it does not work

'db' => [
    'table_prefix' => '',
    'connection' => [
        'default' => [
            'host' => '',
            'port' => '',
            'dbname' => '',
            'username' => '',
            'password' => '',
            'active' => '1'
        ]
    ]
],

help please


texts: Actually, I forgot to create a category in magento 2. But the products are available when I searching. The category shows like the image below I have attached. And it is not in the frontend navigation bar. How to solve this?


texts:
I want to retrieve the list of items in my custom options dropdown. Below is my item

Any idea how to retrieve these items? I want to place this into a select options. But tbh I don't know how to do this in Magento 2.3


texts:
I have hosted my Magento site on the server.

My question is what I do after custom changes in Magento 2 on the server.

How will I execute the command on the server?


texts:
I just created a module and I put this in my layout file:

<?xml version="1.0"?>
<layout version="0.1.0">
    <filteredproducts_index_index>
        <reference name="root">
            <action method="setTemplate">
                <template>page/2columns-left.phtml</template>
            </action>
        </reference>
        <reference name="content">
            <block type="filteredproducts/myblock" name="myblock" template="test.phtml"/>
        </reference>
    </filteredproducts_index_index>
</layout>

Now for some reason, no mather what block I put there inside my reference name="content" tag. The block is shown twice.

test.phtml:

<?php
    echo "test";
?>

IndexController.php:

<?php
class Brightinsight_FilteredProducts_IndexController extends Mage_Core_Controller_Front_Action
{

    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }

}

The text shown at the page is testtest.
So the content must be loaded two times for some reason I just can't seem to figure out how.
Any help appreciated.


texts: How to get distinct list of specified attribute using product collection

texts:
Need to get distinct list of product manufacturers using product collection.

Manufacturer is an EAV attribute.
For example I have this data:

As a result preferable to recieve array list of manufacturers.

I'm trying to do something like this

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

    $productManufacturer = $objectManager->create('\Magento\Catalog\Model\Product');
    $manufacturerCollection = $productManufacturer->getCollection();
    $manufacturerCollection->addAttributeToSelect('manufacturer');
    $manufacturers = $manufacturerCollection->getSelect()->group('manufacturer');

Please, any advices how to implement this?


texts: Magento 2: How to get product url in order email

texts:
I am trying to get the product url along with product name in

app/design/frontend/yourPackage/yourtemplate/template/email/order/items/order/default.phtml

Here is the code that gets the product name and sku. Is there any function that can return the product url to be used in the email as a clickable link?

<?= $block->escapeHtml($_item->getName()) ?>

<?= /* @escapeNotVerified */  __('SKU'); ?>: <?= $block->escapeHtml($block->getSku($_item)) ?>


texts: How we can add container for inner pages in magento 2.2.6

texts: How we can add container for inner page template not in home page in magento 2.2.6?


texts: Magento 2 Remove configurable products from product listing page programatically

texts:
I am trying to remove configurable products from product collection, as a result products are being filtered correctly but pagination is not working as expected and showing wrong count.
For example there are 30 products to be listed out of them there are 20 simple and 10 configurable.
After making this change I am able to see only simple products on the listing page but sill count shows as 30 which should be 20.
Below is the change I have made in Magento\Catalog\Model\Layer using preference and plugin both but pagination is not working as expected.
Below is my logic in the class mentioned:
public function getProductCollection()
    {
        if (isset($this->_productCollections[$this->getCurrentCategory()->getId()])) {
            $collection = $this->_productCollections[$this->getCurrentCategory()->getId()];
        } else {
            $collection = $this->collectionProvider->getCollection($this->getCurrentCategory());
            $this->prepareProductCollection($collection);
            $this->_productCollections[$this->getCurrentCategory()->getId()] = $collection;
        }

        $collection->addAttributeToFilter('type_id', ['neq'=>"configurable"]);
        return $collection;
    }

I am using version 2.4.1-p1. Please let me know how I can manage this.


texts: Magento 2 : How does shipment tracking data get stored?

texts:
I'm trying to figure out how shipment tracking data is stored. Especially when it's set by the API. So when I look at sales/etc/webapi.xml I see the following.

<route url="/V1/shipment/track" method="POST">
    <service class="Magento\Sales\Api\ShipmentTrackRepositoryInterface" method="save"/>
    <resources>
        <resource ref="Magento_Sales::sales" />
    </resources>
</route>

This leads me to sales/etc/di.xml where I see the following:

<preference for="Magento\Sales\Api\ShipmentTrackRepositoryInterface"
            type="Magento\Sales\Api\Data\ShipmentTrack\Repository"/>

Now this is where my question starts. Because I can't seem to find a class named Magento\Sales\Api\Data\ShipmentTrack\Repository. Or am I missing something here?


texts:
Can you please tell me if it is possible in magento bookme to set more than one price? For example, on my website, I'm renting rooms,and I have different prices per months(01.-31.july 30€, 01.-30.august 50€,01.-31.september 40€). With the special price app i can't do that....Is there any method to set those prices?

Thanks


texts:
I have created the custom module, in this I have send an email with product information with product image. working fine but Image is not displaying, only url is displaying in mail.

my code is:

observer.php

public function customerRegisterSuccess(Varien_Event_Observer $observer)
    {
        if (Mage::registry('my_observer_has_run')) {
            return $this;
        }

    Mage::register('my_observer_has_run', true);

  ....

                $emailTemplateVariables['Product_Name'] = $information['name'];
                $emailTemplateVariables['Product_Price'] = $information['price'];
                $emailTemplateVariables['Product_SKU'] = $information['sku'];
                $emailTemplateVariables['Product_Description'] = $information['description'];

                if (count($product->getMediaGalleryImages()) > 0){
                    foreach ($product->getMediaGalleryImages() as $_image){
                        $thumbnail12 = Mage::helper('catalog/image')->init($product->getProduct(), 'image', $_image->getFile())->resize(2000);
                        $thumbnail13 = str_replace('/webApps/migration/productapi/new/','/',$thumbnail12);
                        $emailTemplateVariables['Product_Image']=$thumbnail13;
                    }
                    }
.....

    }

in locale\en_US\template\email\custom_mail.html

Thank You.

Product Details

Product Name                 : {{var Product_Name}}.

Product Price                : {{var Product_Price}}.

Product SKU                  : {{var Product_SKU}}.

Product Description          : {{var Product_Description}}.

my mail receiving below text.

Thank you,

Product Details

http://localhost/magento/media/catalog/product/cache/1/image/2000x/9df78eab33525d08d6e5fb8d27136e95/c/o/computer.jpg.
Product Name : Monitor.
Product Price : 1000.0000.
Product SKU : Dell001.
Product Description : Monitor.

mail is receiving but image is not displaying in mail.

can you tell me how can I solve this?

thanks.


texts: Out of Stock Configurable Products in list.phtml

texts:
I need to display a "sold out" text to all products in a list.phtml file...

I'm using <?php if($_product->isSaleable()) : ?> and it's working great for simple products but it's not working for configurable.

I've tried few things, and for example this code

    if($productType == "configurable") {
        $arrayvalori = array("Small"=>"0","Regular"=>"0","Large"=>"0");
        $attValConfig = $product->getTypeInstance()->getConfigurableAttributesAsArray();

        if(sizeof($attValConfig)) {
            $hasAtts++;
            foreach($attValConfig as $attValConfigSingle) {
                foreach($attValConfigSingle['values'] as $attValConfigSingleVal) {
                    if($arrayvalori[$attValConfigSingleVal["label"]] > 0) {
                            echo 'buy';
                    } else {
                        echo "sold out";
                    }
                }
            }
        }
    }

it works but returns all of the available attributes statuses (for the given configurable product)
output example:

buy
buy
buy
buy
sold out
sold out
buy

I want it to display buy if 1 or more variations are available and display sold out if all are sold out?!?!!

thanks


texts:
How to set a price more than 100 million? Tried this solution http://www.magentocommerce.com/boards/v/viewthread/210738/P15/#t454441, but no luck.
Now I can set price more than 100 million, but on the frontend it automatically converts to 100 million special price.
If changing values in DB directly, everything fine, before you make changes in admin panel.
Thanks in advance.


texts: Datasheet from product images gallery in modal popup

texts:
I would like to show the product data sheet in a modal popup. I intend to add the data sheet to the product image gallery, keep it hidden and then recall it in the popup.

Create the modal popup is not difficult, I need help only to display the image product.

To do this I created a new image attribute "datasheet", so I would like to use a similar code to show the attributes but in this case it will shows the datasheet image and that it can dynamically change for configurable products.

Can you help me?


texts: filtering orderList with multiple filter searchCriteria in 'AND' logic

texts:
I am trying to filter the order list based on two filters.

So far, all of my attempts failed and didn't work. The filter is not working properly and it returns very first order in list of orders in admin panel. It doesn't care about the status or post value of the filter.
I tried to do the filter based on magento 2 documentation
Any idea?

    public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Sales\Model\ResourceModel\Order\CollectionFactory $orderCollectionFactory,
    \Magento\Sales\Model\OrderRepository $orderRepository,
    \Magento\Sales\Model\Order $order,
    \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
    \Magento\Framework\Api\FilterBuilder $filterBuilder,
    \Magento\Framework\Api\Search\FilterGroupBuilder $filterGroupBuilder
) {
    $this->_orderCollectionFactory = $orderCollectionFactory;
    $this->_orderRepository = $orderRepository;
    $this->_searchCriteriaBuilder = $searchCriteriaBuilder;
    $this->_order = $order;
    $this->_filterBuilder = $filterBuilder;
    $this->_filterGroupBuilder = $filterGroupBuilder;
}

/**
* Save order - set as handled
*
* @param {Collection} list of orders
*/
public function setOrdersAsRead($orders){

    foreach($orders as $order){

        $order->setPost('1');
        $order->setStatus('complete');
        $this->_orderRepository->save($order);
    }
}

/**
* Find orders where the `post` field is 0
*
* @return {Array} $orders
*/
public function getOrders() {

    $filter1 = $this->_filterBuilder
          ->setField('post')
          ->setValue('0')
          ->setConditionType('eq')
          ->create();

     $filterGroup1 = $this->_filterGroupBuilder;
     $filterGroup1->setFilters([$filter1]);

     $filter2 = $this->_filterBuilder
         ->setField('status')
         ->setValue('canceled')
         ->setConditionType('neq')
         ->create();

     $filterGroup2 = $this->_filterGroupBuilder;
     $filterGroup2->setFilters([$filter2]);

     $searchCriteria = $this->_searchCriteriaBuilder;
     $searchCriteria->setFilterGroups([$filterGroup1, $filterGroup2])->create();

    $orderList = $this->_orderRepository->getList($searchCriteria->create());

    return $orderList;
}


texts:
Get Simple Product Details Passing Configurable productId and option like color

Using Product Collection I want to fetch this.


texts:
This code:

Mage::getStoreConfig('trans_email/ident_general/email')

gets the value of the general contact email from "Default Config", but I have several countries, each of them has different emails and I want to get them. How can I do that ? thx


texts: how to get Category description after product listing

texts: How can i get category description after product list in product listing page?


texts:
I recently upgraded my server to PHP 5.6 from 5.4.

Now Magento freezes and times out when I try to upload product images. I never get to upload them. It just freezes after browsing and selecting the images.

Magento 1.9.2

Also it could be the new patch I applied recently?


texts:
I'm doing Search Wish List.

Everything i have done til now is create a CRUD module. So, I'm not very clear about this.

The idea is type something in the Search box on the top right. And after that, it go to this url : http://localhost/magento/fudu/wishlistsearch/result/?q=Way.
For example, i type "Way" and then push enter.

After that, it should appear Product in Wish List that have name like "Way".


texts:
How to display exclude images on magento product view page.
I'm using magento 1.9


texts: How do I reliably export cc_type and cc_last4 with auth.net Direct Post?

texts:
I am using the Authorize Direct Post Payment Method with EE 1.13. I need to export credit card payment details including cc_type and cc_last4.  In sales_flat_order_payment cc_type is null and cc_last4 appears to be encrypted.

A few orders include cc_type and the unencrypted cc_last4 in the additional_information field which looks like this:

a:1:{s:15:"authorize_cards";a:1:{s:32:"61cb8d50438f041ab581a381cd81f8e8";a:13:{s:2:"id";s:32:"61cb8d50438f041ab581a381cd81f8e8";s:16:"requested_amount";s:0:"";s:15:"balance_on_card";s:0:"";s:13:"last_trans_id";s:10:"2195591072";s:16:"processed_amount";s:5:"18.95";s:7:"cc_type";s:2:"VI";s:8:"cc_owner";N;s:8:"cc_last4";s:4:"1111";s:12:"cc_exp_month";s:1:"1";s:11:"cc_exp_year";s:4:"2015";s:11:"cc_ss_issue";N;s:17:"cc_ss_start_month";N;s:16:"cc_ss_start_year";N;}}}

But most payments additional_information field just looks like

a:1:{s:12:"payment_type";s:9:"authorize";}

Why do some payments include cc_type and cc_last4 in additional_information and some do not?

How do I reliably capture cc_type and cc_last4 prior to payment capture with auth.net Direct Post?


texts: Order purchase date filter range not showing expected results

texts:
Preconditions

Magento 2.2.2, Nginx, Redis.
Magento local timezone AEDT,
server time AEDT
mysql SELECT CURRENT_TIMESTAMP(); returns AEDT time
SELECT @@global.time_zone, @@session.time_zone; returns SYSTEM.

Steps to reproduce

1. Go to Sales order grid
2. Apply purchase date range it should be a week or more in my case it's from 5-12-2018 to 12-12-2018 (7 days).

Expected result

1. It should display all orders in this range in my case it should show 42 orders.

Actual result

Not displaying all order in from 5-12-2018 to 12-12-2018 (7 days), its showing 39 Order and the last order is 000153. See below screenshot for reference.

When I increase my date range in my case 4-12-2018 to 12-12-2018 (8 days) it's showing 3 more orders from 5-12-2018. See below screenshot for reference.


texts:
I use magento 2.1.8 and when i add coupon by API i get this error

{"message":"No such entity with %fieldName = %fieldValue","parameters":{"fieldName":"cartId","fieldValue":null}

this is my url /rest/V1/guest-carts/65521/coupons/888 and i use PUT for this request.
can show me one example or good documents with example


texts:
I'm new to Magento. I'm learning to add custom Module.
I have created a custom module and able to load the controller.
Now i'm learning to add Blocks and Layouts. I have added the files but i'm not getting the expected output.

I have used namespace 'Nikhil' and the Module name is 'MyModule'.

When it's executed, I can see the webpage, there are no errors. But its not showing the string "MyModule Block" or its not logging the message 'i'm in Block'.

I have spend several hours debugging it. Please help

The contents of the configuration file in \test\app\etc\modules\Nikhil_MyMdoule.xml is:

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

Config File: app\code\local\Nikhil\MyModule\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Nikhil_MyModule>
            <version>0.0.1</version>
        </Nikhil_MyModule>
    </modules>
    <frontend>
        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>Nikhil_MyModule</module>
                    <frontName>nikhil</frontName>
                </args>
            </mymodule>
        </routers>
        <layout>
            <updates>
                <mymodule>
                    <file>mymodule.xml</file>
                </mymodule>
            </updates>
         </layout>
    </frontend>
    <global>
        <blocks>
            <mymodule>
                <class>Nikhil_MyModule_Block</class>
            </mymodule>
        </blocks>
    </global>
</config>

Controller: app\code\local\Nikhil\MyModule\controllers\IndexController.php

    class Nikhil_MyModule_IndexController extends Mage_Core_Controller_Front_Action
    {
        public function indexAction()
        {
            Mage::log('im in Controller');
            $this->loadLayout();
            $this->renderLayout();
            Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles());
        }

        public function testAction(){
            echo "custom function";
        }
    }

Block file: app\code\local\Nikhil\MyModule\Block\MyBlock.php

class Nikhil_MyModule_Block_MyBlock extends Mage_Core_Block_Template
{
    public function myfunction(){
        Mage::log('im in Block');
        return "MyModule Block";
    }
}

Sorry missed to add following files.

\app\design\frontend\base\layout\mymodule.xml

<code>
<?xml version="1.0"?>
<layout version="0.1.0">
<mymodule_index_index>
<reference name="content">
<block name="myblock" template="mymodule/mymodule.phtml" type="mymodule/myblock"/>
</reference>
</mymodule_index_index>
</layout>
</code>

And from \app\design\frontend\base\template\mymodule.phtml

echo $this->myfunction();

I'm trying to call the index Action


texts: domain move but wierd path errors and 'caching' without cache enabled

texts:
I am trying to create a staging site to debug our site.
I have created it:
 - Disabled compilation.
 - Disabled caching  directly in the db
 - Deleted the var/cahce/ contents just to be sure.
 - Updated unsecure_base_url and secure_base_url in the db.

I've also checked the base skin urls etc just to make sure they are correct.

I've disabled ssl in the db to keep things simple.

Changed the database credentials in local.xml

Changed the apc prefix to be specific to the staging site.

Disabled the BOLT full page cache we use.

Checked the virtual host setup to make sure it is loading from the right directories.

Yet when I access debug.domain.com two issues happen.
In the frontend the catalog links etc all refer to www.domain.com not debug.domain.com
and when I access the admin and log in none of it renders correctly because all of the resources have the full file path amended so it tries to load
e.g.
http://debug.domain.com/var/www/vhosts/debug.domain.com/web/content/skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css

rather than http://debug.domain.com/skin/adminhtml/default/default/lib/prototype/windows/themes/magento.css

I'm totally stumped, I've been through loads of walkthroughs trying to spot something I've missed, can anyone spot anything I've forgotten or suggest anywhere else to look?


texts: Magento order status updated to “Processing” even when PayPal payment fails

texts:
I have an issue with Magento 1.9 and PayPal payment method. When a customer pays with PayPal and there is a payment review the order in such cases order status would be set to "Payment Review" that is correct.

However, the problem is, in instances where the payment actually fails (i.e., insufficient funds in customer account), Magento updates order status to "Processing" & customers ends up getting free goods.

What I need to do is, when such "Failed" IPN invoked I need to set "Closed" status to that particular order. I spent more that 4 hours to find the solution but didn't found any proper solution.

If someone have any fixes for this please share with me.

PayPal IPN response variables:

    [payer_email] => xxx@xxx.com
    [payer_id] => xxxxxxxxxxxx
    [payer_status] => unverified
    [payment_date] => 14:33:46 Jun 08, 2015 PDT
    [payment_gross] => 43.24
    [payment_status] => Failed
    [payment_type] => echeck
    [protection_eligibility] => Ineligible

Any help would be highly appreciated.


texts: Adding a single product manual to configurable product - searchbox is grey

texts:
i have the issue that i cannot add a single product to my configurable product. It is shown, but i cannot select it because the checkbox is grey.
Any idea what I have to change ?
THX and best wishes
Niels


texts: PayPal Express - 10002 security header is not valid error

texts:
I am getting an error while testing PayPal Express, the error is: 10002 security header is not valid.

The site runs on an AWS EC2 with nginx and Varnish in front. I use Turpentine for the config and hole-punching. Would this architecture have something to do with it?

I'm not testing on Sandbox mode however the live API credentials are all correct, I've reset it multiple times. I've looked through the logs but I can't find anything significant.

2014-01-31T05:47:11+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'PayPal NVP gateway errors: Security header is not valid (#10002: Security error). Correlation ID: 60e76cc8d89c5. Version: 72.0.' in /var/www/app/Mage.php:580

Perhaps the following might be relevant? The token is empty:

==> payment_paypal_express.log <==
2014-01-31T05:22:42+00:00 DEBUG (7): Array
(
    [url] => https://api-3t.paypal.com/nvp
    [GetExpressCheckoutDetails] => Array
        (
            [TOKEN] =>
            [METHOD] => GetExpressCheckoutDetails
            [VERSION] => 72.0
            [USER] => ****
            [PWD] => ****
            [SIGNATURE] => ****
            [BUTTONSOURCE] => Varien_Cart_EC_AU
        )

    [response] => Array
        (
            [TIMESTAMP] => 2014-01-31T05:22:42Z
            [CORRELATIONID] => 5bcdb0da70494
            [ACK] => Failure
            [VERSION] => 72.0
            [BUILD] => 9285531
            [L_ERRORCODE0] => 10002
            [L_SHORTMESSAGE0] => Security error
            [L_LONGMESSAGE0] => Security header is not valid
            [L_SEVERITYCODE0] => Error
        )

    [__pid] => 1219
)


texts: how to hide child of configurable product in Category page magento 2

texts:
I want to display configrable product without child product in Category page and when i access the product page of the configurable product i get the child according to my choice

So how to do that please and thanks in advance


texts: Access custom widget parameters from helper

texts:
I have a widget where I need to get a parameter from user and then be able to use it inside my Helper/Data.php file.

The widget looks like

<?xml version="1.0" encoding="UTF-8"?>
<widgets>
    <my_product_reviews type="reviewcontainer/product_container">
        <name>My Review Container</name>
        <description>Displays the product reviews for a given product in a widget</description>
        <query_reviews_by>
            Get product reviews by
            <type>select</type>
            <values>
                <product_id translate="label">
                    Product ID
                    <value>id</value>
                </product_id>
                <product_sku translate="label">
                    Product SKU
                    <value>sku</value>
                </product_sku>
            </values>
            <sort_order>10</sort_order>
            <visible>1</visible>
            <required>1</required>
        </query_reviews_by>

I can access this params from my Block/Product/Container:

<?php

class My_Reviewcontainer_Block_Product_Container extends Mage_Core_Block_Template implements Mage_Widget_Block_Interface
{
    /**
     *
     * Returns the parameter set on the widget for: query_reviews_by
     *
     * @return string
     */
    public function getParamQueryReviewsBy()
    {
        if ($queryReviewsBy = $this->getData('query_reviews_by')) {
            return $queryReviewsBy;
        } else {
            return '';
        }
    }
}

But how can I access it from my Helper:

<?php

/**
 * Class My_ReviewContainer_Helper_Data
 */
class My_ReviewContainer_Helper_Data extends Mage_Core_Helper_Abstract
{
    /**
     * The constructor
     */
    public function __construct()
    {
       // here for example
   }
..


texts: Error extends AccountController.php in magento

texts:
I'm trying to extend the core AccountController.php -> app/code/core/Mage/Customer copied it to app/code/local/Mage/ and add a log to see which extends properly.

In the file AccountController.php (app/code/local/Mage/Customer/controllers)
...
...
public function createPostAction() {
        Mage::log('In app/code/local/Mage/', null, 'test.log', true);
...
...

AND CORE (only test)
In the file AccountController.php (app/code/core/Mage/Customer/controllers)
...
...
public function createPostAction() {
        Mage::log('In app/code/core/Mage/', null, 'test.log', true);
...
...

And does not go through code/local/ Mage but by CORE. I need to configure something or it fails?

So I created a separate module following this tutorial: http:// aqpredict.com/blog/overriding-account-contoller-magento/ does not work.

anyone has an example of this, thanks.


texts: Add option to product in the cart progrmatically in magento 2

texts:
<?php
namespace Neologix\Bopis\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;
use \Magento\Checkout\Model\Session as CheckoutSession;

class SetAdditionalOptions implements ObserverInterface
{

    protected $_request;

    public function __construct(
        RequestInterface $request,CheckoutSession  $checkoutSession
    ) {
        $this->_request = $request;
        $this->checkoutSession = $checkoutSession;
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $infoDataObject = $observer->getEvent()->getInfo()->toArray();
        $cart = $observer->getEvent()->getCart();

        foreach ($infoDataObject as $itemId => $itemInfo) {

           $item = $cart->getQuote()->getItemById($itemId);
           $product = $item->getProduct();
           **// able to load product but after this code is not working for adding options to the product**
           $additionalOptions = array(
                array(
                    'code'  => 'my_code',
                    'label' => 'This text is displayed through additional options2',
                    'value' => 'ID is '
                )
            );
             $product->addOption(
                array(
                     'code'  => 'additional_options',
                     'value' => serialize($additionalOptions),
                )
            );
        }
    }
}
?>


texts: Can I rollback backup files from different Magento 2 versions?

texts: I have a store running on Magento version 2.3, and I want to perform a clean installation of the OS. Therefore, I made a backup of Magento's code, media, and database. Can I rollback my store backup files from Magento 2.3 on a clean Magento 2.4 installation?


texts: I'm creating a module using blocks and view models, but when is it better to use view models instead of blocks?


texts: Where is the file that generates the 'Items Ordered' table in sales/order/view

texts: I've found the table header file located at app/design/frontend/base/default/template/sales/order/items.phtml but the table content is generated elsewhere but I don't know where that is


texts: Magento 2 - Reviews - Product Reviews - created_at value is not getting as in database

texts:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_reviewsColFactory = $objectManager->get("\Magento\Review\Model\ResourceModel\Review\CollectionFactory");
$_storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$reviewsCollection = $_reviewsColFactory->create()
                                        ->addStoreFilter($_storeManager->getStore()->getStoreId())
                                        ->addStatusFilter(\Magento\Review\Model\Review::STATUS_APPROVED)
                                        ->setDateOrder();
<?php foreach($reviewsCollection as $review):?>
<?php echo $review['review_id'];  ?>----<?php echo $review['created_at'];  ?><br/>
<?php endforeach;?>

$review['created_at'] is not getting the value that is present in database.


texts: How to add Product Image Programmatically in Magento 1.9.2

texts:
Hello Guys I am creating product programmatically from frontend by submitting a form but when I am doing :

$this->getRequest()->getPost();

I am not getting the image data in array.

Also I want to add that in product how I can do that please guide me.

here the code of my frontend form :

<form action="<?php echo $this->getUrl('custom_abc/customProduct/addProduct') ?>" method="post" name="add-product" autocomplete="off" id="add-product-form" class="scaffold-form" enctype="multipart/form-data">

        *Product Image

            <input type="file" id="product-image" name="product-image" title="Product Image" class="input-text required-entry">

</form>

Here is the code of my product addition :

Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$product = Mage::getModel('catalog/product')->load($productData['productId']);

try {
        $product
                ->setMediaGallery(array('images' => array(), 'values' => array())) //media gallery initialization
                ->addImageToMediaGallery('not understanding what to do here', array('image', 'thumbnail', 'small_image'), false, false) //assigning image, thumb and small image to media gallery

        if ($product->save()) {

            Mage::getSingleton('core/session')->addSuccess('Your Product Uploaded Successfully');
            $this->_redirect('custom_abc/CustomAccount/manageCustomProduct');
            return;
        }else{

            Mage::getSingleton('core/session')->addError('Error in uploading Product');
            $this->_redirect('custom_abc/CustomAccount/manageCustomProduct');
            return;
        }
    } catch (Exception $e) {
        Mage::log($e->getMessage());
    }


texts:
I have collection, so if I used $collection->getSelect() to view the query and run directly in mysql it give me right result but id I used to see total result using $collection->count() then it is not giving the right result.

So count used the load() function because of that my gird view do not have filter result which should be.

Can any one help me around it what is happening here?

Even I call the select query after the loading ($collection->load()) the collection, still query is right but collection result are wrong.


texts: Performance issue bitnami stack on azure machine

texts:
I have Magento 2 multi website in single instance.
i have Azure machine with 32GB Ram and 8 CPU cores and premium SSD disk 30GB and temp disk 64GB "Not used"
i used Bitnami stack to launch it,
i have performance issue and the site can't serve big amount of users,
i think the problem is the SSD disk has limit of 120 iops and can't increase it,
any recommendation?


texts: Redirect Issue After successfully install patch 8167

texts:
After successfully install patch 8167 (with the help of this tuto).

During checkout, I redirect to old URL:

  https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout....cart_token

instead of a new one:

  https://ipnpb.paypal.com/cgi-bin/webscr

I thought, after installing the patch, I will redirect to new URL but still redirect to same old URL.


texts:
Trying to upgrade Magento Commerce (EE) to 2.2.3 from 2.2.2 using composer, however, the package doesn't seem to be available in repo.magento.com - anyone else had this problem?

Tried a lot of debugging, composer cache clearing, etc, but got me nowhere.

Any ideas would be greatly appreciated!

Thanks

Update

Turns out it was another composer-installed module that was preventing me from doing the upgrade, unfortunately still don't know to this day why composer didn't tell me about it, the way it usually does in these situations.

Oh well, panic over!


texts: Magento 2 Import product are not updated in front

texts:
I imported 1500 products from a CSV file that went well.
In the back office when I look at my individual product, the value of the attribute is good. However, when I look in the list of products still in the back office, the value of my attribute is not the same, it's still the same value before update. It is bad, and it is the same one that is visible on the front-end.

Of course, I emptied the cache and reindexed everything.

I'm at a dead end...


texts: Stock increases by itself Magento 1.9.2.0

texts:
I have an issue on a Magento 1.9.2.0 webshop. About 3 weeks ago products with a Stock of 0 automatically change to a Stock of 1 within half an hour.

As far as I know there have not been any changes to how Stock is calculated. Any help is appreciated.


texts: What is the benefit of the letter case conventions in layout xml?

texts:
Example scenario:

$ grep ^class app/code/local/MyApp/MadCaseExample/Block/CaseMaker/BlockThing.php
class MyApp_MadCaseExample_Block_CaseMaker_BlockThing extends MyApp_MadCaseExample_Block_Mce
$ grep -iF 'blockthing' app/design/frontend/myapp/default/layout/madcaseexample.xml
<block type="madcaseexample/casemaker_blockthing" name="madcaseexample.pages.blockthing" template="…"/>

The above won't work because Magento doesn't magically transform the xml names to the right case to find the classfile. An implicit lowercase convention seems to exist, so for a while we've been (I think cargo-culting) our classfiles this way:

app/code/local/MyApp/Madcaseexample/Block/Casemaker/Blockthing.php

Even though we really want to use camel case for most of our classnames. But would it really be so wrong to just be case-sensitive in the XML as well?

<block type="MadCaseExample/CaseMaker_BlockThing" …

What's the benefit of having to express the file and classnames two or three different ways?


texts: CSS not loading on page within Magento 2 page

texts:
I know this question is being asked all over Magento's stack exchange, but I can't get it to work. I'm trying to add some custom css to a page, and Chrome's console is reporting 404s when trying to load the css file. Developer mode is on, I've enabled the rewrite apache module, and my apache2.conf allows symlinks:

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

Chrome's console:

GET (404) http://localhost/magento2/pub/static/version1496785793/adminhtml/Magento/backend/en_US/css/mybase.css

Here's my layout file (/MyCompany/MyModule/view/adminhtml/layout/myroute_profile_edit.xml)

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="css/mybase.css"/>
    </head>
    <body>
        <referenceContainer name="content">
            <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit" name="mycompany_mymodule_profile_edit"/>
        </referenceContainer>
        <referenceContainer name="left">
            <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit\Tabs" name="mycompany_mymodule_profile_tabs">
                <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit\Tab\Profile" name="mycompany_mymodule_profile_edit_tab_profile"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">profile</argument>
                    <argument name="block" xsi:type="string">mycompany_mymodule_profile_edit_tab_profile</argument>
                </action>
                <block class="MyCompany\MyModule\Block\Adminhtml\Profile\Edit\Tab\TargetProfile" name="mycompany_mymodule_profile_edit_tab_targetprofile"/>
                <action method="addTab">
                    <argument name="name" xsi:type="string">target_profile</argument>
                    <argument name="block" xsi:type="string">mycompany_mymodule_profile_edit_tab_targetprofile</argument>
                </action>
            </block>
        </referenceContainer>
    </body>
</page>

I've also created 3 css files all having the exact same code:
MyCompany\MyModule\web\css\mybase.css
MyCompany\MyModule\view\adminhtml\web\css\myadmin.css
MyCompany\MyModule\view\frontend\web\css\myfrontend.css

body {
    background-color: lightblue;
}

And these are the steps I perform each time I change the css and xml files:

Go to the var directory and remove everything in cache, page_cache, di, and generation.
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
Go to pub/static and remove everything except ./.htaccess.
sudo php bin/magento setup:static-content:deploy
sudo php bin/magento indexer:reindex
sudo chown -R www-data:www-data magento2 (root magento dir)
sudo chmod -R 777 magento2
Clear caches.

I've tried putting each of the 3 css files in my myroute_profile_edit.xml.

<head>
     <css src="css/mybase.css"/> or <css src="css/myadmin.css"/> or <css src="css/myfrontend.css"/>
</head>

After changing myroute_profile_edit.xml, and running the above steps, I get a 404 in Chrome's console, stating mybase.css or myadmin.css or myfrontend.css could not be found.


texts:
I am getting 2 below errors, please help me to sort out this issue

  Value for 'size' attribute contains an incorrect value, see acceptable values on settings specified for Admin in the row(s):
  Invalid option value for attribute "size" in row(s):

i have mentioned size attributes in "additional_attributes" ,"configurable_variations" column. and same as in Back-end as well

I am attaching a screenshot for your reference

Thanks in advanced.
kk


texts: Could not find a matching version of package

texts:
I have uploaded my magento 2 module to GitHub, and published my private module to https://packagist.com/. Now module published successfully as below.

And my composer as below
{
    "name": "vlcsolutions/module-connector",
    "description": "Business Central Express Connect",
    "require": {
        "php": "~7.0.0|~7.1.0|~7.2.0|~7.3.0|~7.4.0"
    },"minimum-stability": "dev-main",
"repositories": {
    "type": "composer",
    "url": "https://repo.packagist.com/vlcsolutions/"
},
    "type": "magento2-module",
    "version": "2.2.0",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "autoload": {
        "files": [
            "registration.php"
        ],
        "psr-4": {
            "vlcsolutions\\connector\\": ""
        }
    }
}

When I installing composer require vlcsolutions/module-connector:dev-stable the module getting below error.

Can you please suggest me where I went wrong?


texts:
I’m writing a little script to hopefully pull a collection of products which match certain criteria - so far its working at its most basic using:

$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToFilter('status', 1);
$products->addAttributeToSelect('*');

What I am struggling with is creating a filter which will only pull products into the collection if they are not assigned to any categories.

I have been tearing my hair out searching through any docs I can find but cant seem to get my head around it - I can use getAvailableInCategories() after but looping through 25,000 products is time consuming and there must be a better way to do it.

Any help appreciated - im a complete newbie smile