texts: How to join catalog product collection to custom collection

texts:
I want to make join on my custom module collection to product collection.In my module there is a single table which have product sku and product url key.Now I want all catalog product data as well as my module data below is the code which i am using but it's not working :

$collection = Mage::getModel("catalog/product")->getCollection();
                $msa_eventType = Mage::getSingleton('core/resource')->getTableName('preview/preview');
                $collection->getSelect()->joinLeft(array('review'=>$msa_eventType),'`main_table`.`sku` = `review`.`sku`',array('product_name'));


texts:
I am new to Magento so please bear with me :D

I have successfully created a theme that is a child to the blank theme.

I am trying to get the menu working and for the life of me cannot see why it is not showing. I have read a couple of other threads and no luck.

I have added a root category with my subcategories in it. I have then assigned it to the store settings. I have re-indexed the site, cleared cache and still no joy.

Am I doing the right thing by just adding a category and it will show?

Thanks

It seems I don't have the default category - see screenshot below

UPDATE

I have reinstalled Magento on my local machine. The menu shows fine on Luma and Blank theme but on my own custom one, it is not showing. Is there anything I need to include or check?

Thanks for the help


texts:
Invalid credentials for https://repo.magento.com/archives/magento/module-sales-archive/magento-module-sales-archive-100.1.1.0.zip

I've successfully configured Composer credentials with my Magento Key set using

composer.phar config http-basic.repo.magento.com <public_key> <private_key>

and have confirmed that auth.json is effectively updated in Magento root with my keys from Magento Marketplace.

Testing with composer.phar update --dry-run Loads repositories, Updates dependencies etc. with the only errors being some requested packages not being found, no probs, I'll get to them ...BUT credentials are fine.

Why when I run bin/composer.phar install does Composer proceed to download the bulk of the required dependencies, but fail at this particular module?


texts: Magento 2: Unable to reindex catalogsearch_fulltext_scope1

texts:
I've migrated from Magento 1.9 to Magento 2.3.

While running reindex command for catalogsearch_fulltext_scope1 I'm getting the following error:

Catalog Search indexer process unknown error:
[1064] index catalogsearch_fulltext_scope1: does not support DELETE (enabled=0) [ DELETE FROM catalogsearch_fulltext_scope1 WHERE id > 0].

I tried some fixes but don't work. If anybody known to this issue then please suggest some solution for this issue.

Thanks


texts: How to restrict role in magento to add products in one category

texts: Hi I have created a role named Retailer and I want the retailer to add products to one category named Books and not have the permission to access other than that and he has to access customers only from Books website..


texts:
I just completed this observer, and i want your opinion if this going to work, the order status will based on the ordered product sku.

What i'm trying to achieve is, if the ordered product has sku ends with "FBA", then assign certain status, if not just go normal.

So i defined the state to be used, and calling the skus from the orders, and checking from that in order to check from it.

But yet it's not working for some reason.

Looking forward to hearing from you.

public function changestatus($event) {

$_order = $event->getOrder();

$STATE = 'amazonfba';

foreach($orders as $order){
    $items = $order->getAllVisibleItems();
    foreach($items as $item){
        $sku = $item->getSku();
    }
}
if(strpos($sku, '_FBA') === true){
    $_order->addStatusHistoryComment('Amazon FBA', $STATE)
                   ->setIsVisibleOnFront(false)
                   ->setIsCustomerNotified(false);
}
    return $this;
}
}

EDIT:

Config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_FBA>
            <version>0.0.1</version>
        </Company_FBA>
    </modules>
    <global>
        <models>
            <company_fba>
                <class>Company_FBA_Model</class>
            </company_fba>
        </models>
    </global>
    <adminhtml>
        <events>
            <sales_order_place_after><!-- observe the event -->
                <observers>
                    <company_fba>
                        <type>singleton</type>
                        <class>company_fba/observer</class>
                        <method>changestatus</method>
                    </company_fba>
                </observers>
            </sales_order_place_after>
        </events>
    </adminhtml>
</config>


texts:
I have added the following code to the page for https://cashino.kellyseye.com/

Store Login

<form
action="https://cashino.kellyseye.com/customer/account/loginPost/"
method="post">

<input id="mini-login" class="input-text"
spellcheck="false" type="email" placeholder="Email:" name="login[username]"
/> <input id="mini-password" class="input-text" type="password"
placeholder="Password:" name="login[password]" /> <input type="hidden"
value="&lt;?php echo Mage::getSingleton('core/session')-&gt;getFormKey() ?
&gt;" name="form_key" />

<button class="button" type="submit">
Login  </button>

</form>

Unfortunately, when I enter my credentials and click "Login", I am redirected to the login page, where I have to add my credentials once again.

On other pages for example https://beaconbingo.kellyseye.com/ I have no problem logging in from the form on the homepage.

Why is this?


texts:
I have an input array data containing time in 'Y-m-d h:i:s' format and the gmt timezone data  like this:

$time = array(
           "time" => "2017-11-01 12:00:12"
           "gmt"  => "+7"
        );

i wish to convert the above time data into a date with format from magento locale config timezone, is there a way to do this?


texts: how can I remove some fields on the checkout

texts:
I want to remove some Fields in shipping and billing addresses in the checkout page in magento 1.

like: company , middle name , region , fax , ZIP code....

How can I do It using programatically.

magento 1.9.2


texts: Override or rewrite blocks magento? Best practice

texts:
I know that overriding and rewriting is not the same thing, in some cases we should override instead of rewrite like the abstract classes for exemple, but i found several replies which propose to override a block magento like catalog block product list ! But for me it's better to rewrite them right ?

Now i would like to have a clarification about rewriting a block catalog block product list, i want to add some filter in collection product of catalog/product/list.phtml so i think that the only way is to rewrite the block who prepare this collection, someone can tell me where I can find it?


texts: How can I trigger a shipping method price change based on street address?

texts:
I have below code to trigger a change in a shipping method price in this file:  view/web/js/model/shipping-rates-validation-rules.js

define(
    [],
    function () {
        'use strict';
        return {
            getRules: function() {
                return {
                    'country_id': {
                        'required': true
                    },
                    'region_id': {
                        'required': true
                    },
                    'street': {
                        'required': true
                    }
                };
            }
        };
    }
)

Both country_id and region_id trigger a reload for the shipping method but street is not doing so.


texts:
I have an observer attached to 'front_init_before' action:

<controller_front_init_before>
    <observers>
        <custom_front_init_before>
            <type>singleton</type>
            <class>Gmod_Custom_Model_Observer</class>
            <method>checkCustomId</method>
         </custom_front_init_before>
     </observers>
</controller_front_init_before>

It checks request string for a parameter and saves it in a session. Code from an Observer.php file:

Mage::getSingleton('core/session')->setCustomId($dealer);

Everything works up to now. Data is saved in the session at this point but when I want to read it from a .phtml file:

$custom_id = Mage::getSingleton('core/session')->getCustomId();

$custom_id is empty. Then, in my Observer.php, directly after setCustomId() I call:

Mage::getSingleton('core/session')->getCustomId();

and the 'get' function in phtml file returns the desired value.

Why get function from .phtml file works only when it's called in the Observer too?


texts: Magento 1.9.x Requiring State for Countries Not Set to Require States

texts:
We have added many States, Regions, etc. to many countries in the database. In admin, if we try to edit a customer's address in a country that is clearly not selected in System > Configuration > General > States Options, thus no State is required, Magento still will not allow the address to be changed and saved unless a State is selected. The error, "This is a required field." still appears. Why?

What is the fix?


texts: Where do i change text for transactional emails and account dash

texts:
I know how to create the transactional templates, also for other languages. But I can not figure out where the ordered items and order tax, shipping and order value.

I have searched in app/locale without any result.

For some reason I can not find where to find these translations in order to change the text to my needs.

anyone knows where and how?


texts: Show Separate product detail page based on attribute value in Magento 2

texts:
Shall we load separate product detail page based on the product attribute value in magento2 ?

I have created the attribute product called "type_of_product"

If this attribute value is "Test 2", I need to load custom template file in product detail page.(A separate phtml file load all product data)

If any other value for attribute, Default magento product page should load.

Note: Once the value of attribute is "Test 2" I don't want to show any other default blocks of product detail page like image,price,tabs,links, etc..

How this can be implemented in M2.

Can anyone help me please.


texts: Issue in Exporting CSV file from a custom module

texts:
I have a custom module in admin panel,when I click  at "Export" button following function is called. CSV is being exported and downloaded correctly, in CSV one column is having id's instead of value of field.So I just want to changes to the value for that column, But I can't find where data is being dumped into csv file.

class Abc_AddressManager_Adminhtml_StoresController extends
Mage_Adminhtml_Controller_Action {
 public function exportCsvAction() {
    $fileName = 'stores.csv';
    $content = $this->getLayout()->createBlock('abc_addressmanager/adminhtml_stores_csv')
            ->getCsvFile();

    $this->_prepareDownloadResponse($fileName, $content);
 }
}

And

class Abc_AddressManager_Block_Adminhtml_Stores_Csv extends Mage_Adminhtml_Block_Widget_Grid
{

protected function _prepareCollection() {
    $customer_id = $this->getRequest()->getParam('id');

    $collection = Mage::getResourceModel('customer/address_collection');
    $collection->addAttributeToSelect('*');
    $select = $collection->getSelect();

    $select->joinLeft(
            array('customer' => $collection->getTable('customer/entity')), 'customer.entity_id=e.parent_id', array('email' => 'email')
    );

    $d = $collection->getSelect()->__toString();
    $this->setCollection($collection);

    return parent::_prepareCollection();
}
protected function _prepareColumns() {

    $addressModel = Mage::getModel('customer/address');
    $addressForm = Mage::getModel('customer/form');
    $addressForm->setFormCode('adminhtml_customer_address')
            ->setEntity($addressModel)
            ->initDefaultValues();
    $attributes = $addressForm->getAttributes();

    $this->addColumn('email', array(
        'header' => 'email',
        'type' => 'text',
        'index' => 'email',
        'filter' => false,
        'sortable' => false,
    ));
$this->addColumn('entity_id', array(
            'header' => 'address_id',
            'type' => 'text',
            'index' => 'entity_id',
            'filter' => false,
            'sortable' => false,
        ));
    foreach ($attributes as $attribute) {

        $code = $attribute->getData('attribute_code');

        $this->addColumn($code, array(
            'header' => $code,
            'type' => 'text',
            'index' => $code,
            'filter' => false,
            'sortable' => false,
        ));
    } // end

    return $this;
}

My field Column is "Ownership", that is a customer attribute, type drop down,its attribute_id =554 in eav_attribute table, and option id's are =438 to 443 in eav_attribute_option, and values for option is stored in eav_attribute_option_value,in csv file, column name is Ownership, but its has option id's(438 to 443) in it, instead of their value. My grid look like this.As you can see, Ownership has value(CO), in csv it here I am getting '439' option_id for "CO"


texts: pass created model object in one test method to next one in EcomDev PHPUnit

texts:
Need to create test for custom creating product and custom editing product methods.
I use fixtures for both methods with same user data and want to pass freshly created product in first method to second, how can i achieve it ?

Creating product :

    /**
     * Test Add New Service Controller
     * @test
     * @loadFixture
     * @group testor
     */
    public function addNewServiceTest()
    {
        ...
        $this->getRequest()->setMethod('POST')->setPost($mockPostDataForNewService);
        $this->dispatch($addNewServiceRoute);
        ...
        $responseDecoded = json_decode($response);
        $createdProductId = $responseDecoded->id;
        $createdProduct = Mage::getModel('catalog/product')->load($createdProductId);
        return $createdProduct;
    }

    /**
     * Test proper editing of created product
     * @test
     * @group testor
     * @loadFixture
     * @depends addNewServiceTest
     */
    public function editServiceTest($createdProduct) {

        $createdProduct->save(); // save seems like done ok, but all
        Mage::getModel('catalog/product')->getCollection()->getItems(); // still returns only fixture products, but not saved one

    }

Thanks !!!


texts: show product discount on order email template

texts:
I would like to show product discount percentage on email template. i am using this code but its showing discount on product details page not on order email.

<?php // Display Discount percents start ?>
    <?php if($_finalPrice < $_price): ?>
    <?php $_savingPercent = 100 - round(($_finalPrice / $_price)*100); ?>

            <?php echo $this->__('Your Saving:') ?>

                <?php echo $_savingPercent; ?>%

    <?php endif; ?>
<?php // Display Discount percent end ?>


texts: Magento 2 Internal Error. details are available in magento log file. Report ID:

texts:
I see this error when try to create order with credit card payment method

Anyone can explain this please?

Next Exception: Report ID: webapi-5932d82f90e81; Message: Property "Title" does not have corresponding setter in class "Magento\Quote\Api\Data\PaymentInterface". in /var/www/html/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/html/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 /var/www/html/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 /var/www/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/html/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#5 /var/www/html/index.php(41): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#6 {main} [] []


texts: Magento2 : afterGetProductDefaultQty() plugin not working

texts:
I would like to modify the product page price and quantity programmatically using magento2 plugins :

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\Model\Product">
        <plugin name="my_module_price_setprice" type="My\Module\Plugin\Catalog\Product\Price\ApricePlugin" sortOrder="1"/>
        <plugin name="my_module_quantity_setqty" type="My\Module\Plugin\Catalog\Product\Quantity\AqtyPlugin" sortOrder="2"/>
    </type>
</config>

My\Module\Plugin\Catalog\Product\Price\ApricePlugin.php

<?php

namespace My\Module\Plugin\Catalog\Product\Price;

class ApricePlugin
{
    protected $_request;
    protected $_pricer;
    protected $_modelOdbtFactory;

    public function __construct(
            \Magento\Framework\App\RequestInterface $request
            ) {
                $this->_request = $request;
    }

    public function afterGetPrice(\Magento\Catalog\Model\Product $subject,
            $result
    )
    {
...
    }
}

My\Module\Plugin\Catalog\Product\Quantity\AqtyPlugin.php

<?php
namespace My\Module\Plugin\Catalog\Product\Quantity;

class AqtyPlugin
{
    protected $_request;

    public function __construct(
            \Magento\Framework\App\RequestInterface $request
            ) {
                $this->_request = $request;
    }

    public function afterGetProductDefaultQty(\Magento\Catalog\Model\Product $subject,
            $result
    )
    {
        $toto=1;
    }
}

Price plugin is called and works, but no the qty plugin...


texts: Magento 2: Disable all custom and Third Party Module in single Command

texts:
Is there is any way that we can disable all custom and third party Module in a single command? Currently, I am using below command to disable multiple modules

  php bin/magento module:disable module1 module2 module3....moduleN

Currently I am defining all module but I don't want to define all modules since there are so many modules.


texts: Magento 2 How to get order id and set custom order attribute after or before order placed

texts:
when using these events -
1 - sales_order_place_after
2 - sales_order_save_before
3 - sales_order_place_before

Using these events I am able to set custom order attributes but unable to get order ID above mentioned.
1 - sales_order_save_after
2 - checkout_submit_all_after

When using these events I am able to get order id but unable to set the custom order attribute
Does anyone know how to set custom order attributes and get order id with the same event?


texts: After Migrate Magento1 Database Into magento 2 product is not open?

texts:
When edit the product from backend is not open getting error

Class Magento\Catalog\Model\Product\Attribute\Backend\Media does not exist

How i solve this please tell me


texts: Channel 'core' doesn't exist - Installing extension

texts:
Working on magento community 1.9.1, security patch up to date.

I've tried to install an extension, but I get this error message :

> Checking dependencies of packages Package core/Mage_Catalog failed:
> Channel 'core' doesn't exist Installing package
> community/Package_name_version Package community/Package_name_version
> installed successfully Package installed:  community
> Package_name_version

I have tried the following base on what I found on the net, which is really not a lot about this issue...

> ./mage mage-setup

Then add the extension again via magento connect & Then delete /downloader/cache.cfg

This had no result.

It's not comming from the extension because it's working fine on another instance of magento.
The extension seems to be installed, but when I try to use it under the admin panel, i get this error :

  Error: Http code "302" returned from extension_name

Thank you for helping


texts:
I got this error :

Exception #0 (Magento\Framework\Config\Dom\ValidationException):
Element 'title', attribute '{http://www.w3.org/2001/XMLSchema-instance}type':
The type definition 'string', specified by xsi:type, is blocked or not validly derived from the type definition of the element declaration.

When trying to enable my module


texts: Store and currency based on visitor's IP in Magento2.1

texts:
I want to use store and currency should change based on visitor's IP (i.e., Geo IP (aka) Geo tagging) in Magento2.1. It should be automated like when the USA customer opens our site, the site should use USD.

Is there any free extensions available for this in  Magento 2.1? If so, Please suggest me. I have a very short period of time to do this.

Thanks in advance!!


texts: How to change a Simple Product to a Bundle Product

texts:
I tried doing the below SQL on Magento CE v1.7 to change a Simple Product to a Bundle Product, but after I run the update, the price also shows as 0 and it doesn't let me edit the price on the Product-->Price tab (it's always set as Dynamic price and the price field is non-editable).

UPDATE catalog_product_entity SET type_id = 'bundle', has_options = 1 where sku = <Simple Product SKU>

Any ideas how to resolve this? I need to update a bunch of simple products to be bundled products, but am always facing this issue.


texts: Get current product in observer Magento 2

texts:
With my code, my product is not added (the "add to cart button" is not clickable after I clicked on in on the first time, I have to refresh)

I believe that's because my code isn't right, so I need help (to get the current product in my observer)

This is my code:

namespace Vendor\Module\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Registry;

class RestrictAddToCart implements ObserverInterface
{
    /**
     * @var \Magento\Framework\Message\ManagerInterface
     */
    protected $_messageManager;
    protected $registry;
    private $product;

    /**
     * @param \Magento\Framework\Message\ManagerInterface $messageManager
     */
    public function __construct(
        \Magento\Framework\Message\ManagerInterface $messageManager,
        Registry $registry
    ) {
        $this->registry = $registry;
        $this->_messageManager = $messageManager;
    }

    /**
     * add to cart event handler.
     *
     * @param \Magento\Framework\Event\Observer $observer
     *
     * @return RestrictAddToCart
     * @throws LocalizedException
     */
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $id = $observer->getEvent()->getProduct()->geId();

        $test = false;
        if ($test == false) {
            $this->_messageManager->addErrorMessage(__($id));
            //set false if you not want to add product to cart
            $observer->getRequest()->setParam('product', false);
            return $this;
        }

        return $this;
    }
}

Using event

  controller_action_predispatch_checkout_cart_add


texts: How to get Shipping information in magento2?

texts: Hello I need to add "Ship to" information in my new created step in checkout for the reference i attach the image please help me


texts: Search Type: Like, Full Text or Combined?

texts:
What is the difference between the different search types?

Like
Full Text
Combined

I am specially interested in how the search behavior and performance changes for those settings.


texts: Changing the size of icons Magento rwd-theme

texts:
I am customising the rwd theme but have some problems.

I need to style the icons for the rwd-theme

I would like to:-
1.increase the icon size
2. display the label underneath rather than to the side
3. make the header fixed, i have managed this by changing position: fixed in .page-header but this causes contents of this div to lose position, managed to fix most apart from the basket icon that insists on placing itself in the top right of the page.

I am using the sass files to edit the style sheets
Thanks


texts: Magento 2 Additional step between shipping and payment in checkout

texts:
I created a custom step login in checkout which being my first step I used the below mixins:

In requirejs-config.js:

var config = {
'config': {
    'mixins': {
        'Magento_Checkout/js/view/shipping': {
            'MyVendor_Customcheckout/js/view/shipping-payment-mixin': true
        },
        'Magento_Checkout/js/view/payment': {
            'MyVendor_Customcheckout/js/view/shipping-payment-mixin': true
        }
    }
}
};

and in shipping-payment-mixin.js:

define(
[
'ko'
],
 function (ko) {
 'use strict';

var mixin = {

    initialize: function () {

// this.isVisible variable is used by Magento_Checkout/js/view/payment. this variable is missing from the sample code.
        this.isVisible = ko.observable(false);

// this.visible variable is used by Magento_Checkout/js/view/shipment.
        this.visible = ko.observable(false);
        this._super();
        return this;
    }
};

return function (target) {
    return target.extend(mixin);
};
}
);

Now I created another step say scheduling which is an additional step between shipping and payment.

I haven't created any mixin for this yet but on page load, my shipping and scheduling form shows on the same page.

Is it an issue related to mixin? Or is it some other issue? How do I create a mixin for this?


texts: Translating "Add to Cart" and "Go to Top"

texts:
On my Magento website I have 2 buttons (javascript/ajax) that have the text

  "Add to Cart"
  &
  "Go to Top"

These buttons are both in English, and since my website is in Dutch I tried to translate them. In the .CSV files I tried to edit them, but no effect was shown. This while all of my other translations through .CSV files went very well.

Then I tried using Magento's inline translation, but when hovering over the buttons, there is no booklet to click on in order to translate it.

It looks like the pieces of text are somewhere in some javascript file, but I can't seem to find it anywhere. Would anybody perhaps know where I can edit these two buttons text? Thanks!


texts:
I have Magento 1.7.0.2

The DHL shipping module does not work. I enable it in the Admin and all it does is display the error message specified in the config when trying to use it on the frontend.

I read somewhere else that there was a bug with this module in 1.7.0.2 where it was sending empty headers and that the only fix was to upgrade to 1.9. There was mention that there was an update to the Varien library that would fix the issue.

Well, I can't upgrade to 1.9 so I'm wondering if there's any other way to fix the issue?

Here is the DHL error log:

2014-06-15T01:34:22+00:00 DEBUG (7): Array
(
    [0] => Error parsing body - doesn't seem to be a chunked message
    [1] => The response is in wrong format.
    [__pid] => 27568
)


texts: Optimize grid collection for huge data set Magento 2

texts: I am working on creating an admin grid for sales_order_item table. There are probably a hundred million rows in the database and when I use the collection to filter and load data into the grid, it takes about three minutes to join and process all the data required for the table. What are the steps that I can take to optimize the loading time?


texts: how can i get download link for downloadable product which are added in cart

texts:
Downloadable product have multiple download link and i want to get link which added in cart.
I have tried this code but it gives all availbale links

$_links = $_item->getProduct()->getTypeInstance(true)->getLinks($_item->getProduct());


texts: How to send order email only to Admin ? (V 1.9)

texts:
By default, when a customer buys something on my website (Magento 1.9) he receives an order confirmation via email.
The thing is I'm using another platform to send my emails to the customer.
So I don't want magento to send emails to the customer. I want to be the only one (the admin) notified when someone buys something.

So how can I make magento to send order email only to the admin and not the customer ?
Maybe I have to modify some files, but I dont know which one...

I really need some help. Thank you !


texts: how to reset password for 15000 user and send it to the email id in magento 1.9

texts:
i got this error

  Fatal error: Uncaught exception 'Exception' with message 'Warning:
  simplexml_load_string(): Entity: line 41: parser error : StartTag:
  invalid element name in public_html/lib/Varien/Simplexml/Config.php on
  line 383' in public_html/app/code/core/Mage/Core/functions.php:245
  Stack trace: #0 [internal function]: mageCoreErrorHandler(2,
  'simplexml_load_...', '/p...', 383, Array) #1
  /public_html/lib/Varien/Simplexml/Config.php(383):
  simplexml_load_string('loadCache() #3
  /public_html/app/code/core/Mage/Core/Model/Config.php(255):
  Mage_Core_Model_Config->loadModulesCache() #4
  /public_html/app/code/core/Mage/Core/Model/App.php(277):
  Mage_Core_Model_Config->init(Array) #5 /public_html/app/Mage.php(616):
  Mage_Core_Model_App->init('', 'store', Array) #6
  /public_html/sendmail.php(6): Mage: in
  /public_html/app/code/core/Mage/Core/functions.php on line 245

Using this script

<?php
ini_set('display_errors',true);
include 'app/Mage.php';
Mage::setIsDeveloperMode(true);

Mage::app();

$coll = Mage::getResourceModel('customer/customer_collection');

$coll->addFieldToFilter('group_id',1);

foreach ($coll as $customer) {
$customer->setForceConfirmed(true);
$sendPassToEmail = true;
$customer->setPassword($customer->generatePassword());
$customer->save();
$customer->sendNewAccountEmail('registered', '',
$customer->getStoreId());
}


texts: Magento 2 Certified Front End Developer exam reading material

texts:
We know Magento recently released Magento 2 Certified Front End Developer exam.

I know the passing score is 63%, but I want to know what study material is useful in this exam (apart from free study guide from Magento)

Number of questions going to ask in exam?

Number of retake for that exam?

Are there any passing criteria for EE edition just like we have in M1 Developer Plus Exam ?

How many free retakes are available (If you fail in first attempt)?


texts: Magento 2 How to add time to date filters in UiComponents

texts:
I have a field that uses time (hours, minuets) as well as a date on my grid component.

I'm trying to filter by time on the admin panel.

This is what I want:

But I want it for the filters above the uiCompenent Grid:

Adding the following code to each <column> node (where dates apply) didn't do the trick, which I guess was expected:

<item name="options" xsi:type="array">
    <item name="dateFormat" xsi:type="string">yyyy-MM-dd</item>
    <item name="timeFormat" xsi:type="string">HH:mm</item>
    <item name="showsTime" xsi:type="boolean">true</item>
</item>


texts: Remove price change from custom product dropdown

texts:
Is there a way of removing the price change (e.g. the string '+£80.00' or '-£60.00') from after the option name in a custom option dropdown list?

I do not want to remove it from any other location, i.e. it should still add on to the total price as it currently does, it just shouldn't be visible in the dropdown.

Ideally I don't want to hack the code anywhere but I realise this is probably not a built in option.


texts: 301 redirect for multi website and store code added to url

texts:
I have a specific scenario to work with and need help.

Currently I have set up for 8 years a Magento 1 multi website store with this configurations:

Magento is installed in a subfolder of a domain and its on the shop.olddomain.com

Added 4 website's and in Magento option enabled 'add store code to url's':

website 1 - store 1 - store view 1 url: shop.olddomain.com/us/ USA
website 2 - store 2 - store view 2 url: shop.olddomain.com/eu/ EUROPE    website 3 - store 3 - store view 3 url: shop.olddomain.com/hr/ CROATIA website 4 - store 4 - store view 4 url: shop.olddomain.com/si/ SLOVENIA

Now I want for Europe, Croatia and Slovenia website to move each of them to newly bought domains separately. It needs to become:

2 - newdomain.eu
3 - newdomain.hr
4 - newdomain.si

and for US to stay the same:

olddomain.com/us/

How to achieve that with .htaccess 301 redirects (and in the same time to disable in Magento option 'add store code to url's)


texts: How to get customerid inside custom block to display in frontend myaccount section?

texts:
How to get customer_id in block and pass data to phtml file and also pass custom data from our module as grid.
Here I'm getting null value when i was get customer_id in block file.


texts: Product options not showing up after import products

texts:
I have paid someone to import all my magento items from our yahoo store and he was able to get them all in there.

The issue I have is that the products show up but no the options. The options are all setup fine in the backend. Also, if I make a change to one of the options and then save the product, the options will show up for just that one product.

Any ideas as to why all the options on all other products don't show up?


texts: How I can load custom meta data or scripts for CMS page head only.


texts: Theme not loading for main site or Admin - Just shows The menus in Text

texts:
Currently running magento 1.9.xx Not sure exactly which version, I have (And still and away on holiday) and I have been called as our magento store is not working.

I have scoured the logs, done everything I can think of to try and solve the issue which is when the site loads it just shows text none of the graphics etc. This is true for the admin side of the site too.

I'm really not sure what I should be looking for to solve this. Can anyone give me pointers please ?

I have cleared the cache files, deleted all the sessions, I just cant find anything wrong. I used magento-check.php shows its all the requirements are installed.

This is not a duplicate, I have checked that issue, and checked things like the db core_config etc, however has proved not able to resolve


texts: $_product->hasCustomOptions() returns nothing [If a product has custom option]

texts:
I am checking all the products in the cart, as if any of them contain custom options.

$items = Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();
    foreach ($items as $item) {
       echo $item->getId(); //prints ids eg. 427 429
       $_product = Mage::getModel('catalog/product')->load($item->getId());
       if($_product->hasCustomOptions()){
              echo 'has custom option'; //doesn't print even the product has custom options
         }
     }

But the code above doesn't print "has option" even the product has. How to know if the product has custom option or not regardless of product type ?


texts:
i am trying to city as dropdown in only checkout page with following script in Magento\Checkout\Block\Cart\LayoutProcessor.php

$elements = [
        'city' => [
            'visible' => true,
            'formElement' => 'select',
            'label' => __('City'),
            'options' => [
                [
                    'value' => '',
                    'label' => 'Please Select',
                ],
                [
                    'value' => '1',
                    'label' => 'First Option',
                ]
            ],
            'value' =>  null
        ],
        'country_id' => [
            'visible' => true,
            'formElement' => 'select',
            'label' => __('Country'),
            'options' => [],
            'value' => null
        ],
        'region_id' => [
            'visible' => true,
            'formElement' => 'select',
            'label' => __('State/Province'),
            'options' => [],
            'value' => null
        ],
        'postcode' => [
            'visible' => true,
            'formElement' => 'input',
            'label' => __('Zip/Postal Code'),
            'value' => null
        ]
    ];

but still it's showing as input text filed. Any one can please suggest best solution


texts:
How to add authorize direct post method to one step checkout in magento?

http://prntscr.com/agdco5

Here, i add screen cast of my one step checkout page.
i enable authorize direct post method but in not works in one step checkout.

when i click on place order button it will place new order at admin >> sales >> order

but don't see cc form.


texts: Upgrading Magento 2.1.9 to Magento 2.2.2 is very slow

texts:
We are trying to upgrade a Magento 2.1.9 site to Magento 2.2.2
We have more than 130k products and the process seems to be stuck for more than 3 hours on,

Upgrading data..
Module 'Magento_Backend':
Module 'Magento_Catalog':

I used xdebug to profile what process takes so long and apparently the problem is:

if (version_compare($context->getVersion(), '2.2.2') < 0) {
    $this->upgradeWebsiteAttributes->upgrade($setup);
}

Having many products and many attributes the process takes ages. Actually it's still stuck there so it's been 3 days. The database size it's 47GB.


texts: Magento2: how to call login popup on place order button and remove from proceed to checkout button

texts:
Magento2.3.1:
How to call login popup on place order button and remove from proceed to checkout button.
I am trying to get solution with these files:-
vendor/magento/module-customer/view/frontend/web/js/model/authentication-popup.js
createPopUp: function (element) {
            var options = {
                'type': 'popup',
                'modalClass': 'popup-authentication',
                'focus': '[name=username]',
                'responsive': true,
                'innerScroll': true,
                'trigger': '.proceed-to-checkout',  // I want to add place order button class here
                'buttons': []
            };

            this.modalWindow = element;
            modal(options, $(this.modalWindow));
        },

But I am not able to find which class should I use and how login popup works with .proceed-to-checkout class, even I have changed this and test.
If there is any other approach please let me know and if I am on the right direction what place order class should I use here.


texts: Observer event Argument 1 passed to AbstractDb::load() must be an instance of \AbstractModel

texts:
Need some clarity or correction in my Observer class where I'm trying to save the product when it is updated, but I get "Call to member function dispatch() on null"

Here is my events.xml

<event name="catalog_product_save_after">
    <observer name="catalog_product_save_after_handler" instance="Vendor\Module\Observer\SyncObserver"/>
</event>

Vendor\Module\Observer\SyncObserver.php

<?php
namespace Vendor\Module\Observer;

use \Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\Event\ObserverInterface;

class SyncObserver implements ObserverInterface
{
  protected $_queue;

/**
 * @var \Vendor\Module\Model\QueueFactory
 */
protected $syncEngineFactory;

/**
 * @var \Psr\Log\LoggerInterface
 */
protected $logger;

/**
 * @param \Vendor\Module\Model\ResourceModel\Queue $queue
 */
function __construct
(
    \Vendor\Module\Model\ResourceModel\Queue $queue
)
{
    $this->_queue = $queue;
}

public function execute(EventObserver $observer)
{
    $product = $observer->getEvent()->getProduct();
        $this->productUpdate($product);
        return $this;
}

  public function productUpdate($product){
    //Till here the my product gets saved!!!
  }
}

Now in my productUpdate() has current code custom as:

UPDATED:

public function productUpdate($product)
{
    //$product = $observer->getEvent()->getProduct();
    $product_id = $product->getId();  //i get the id here

        if(!$product_id) {
            return;
        }
        //Check already record is exists in queue table
        $existingProduct = $this->_queue->load($product_id,'entity_id');   //problem here...

^ Here I get:

  Recoverable Error: Argument 1 passed to Magento\Framework\Model\ResourceModel\Db\AbstractDb::load() must be an instance of Magento\Framework\Model\AbstractModel, string given, called in app\code\Vendor\Module\Observer\SyncObserver.php on line 51 and defined in lib\internal\Magento\Framework\Model\ResourceModel\Db\AbstractDb.php on line 333

        $_id = $existingProduct->getId();

        if(empty($_id)) {
            $data = array(
                "product_id" => (int) $product_id
            );

                $this->_queue->setData($data);
                try {
                    $queue_id = $this->_queue->save()->getId();

                    //custom defined log
                    /* $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/productUpdate.log');
                    $logger = new \Zend\Log\Logger();
                    $logger->addWriter($writer);
                    $logger->info("Queueing: [ ".$product_id." ] new product"); */

                } catch(Exception $e) {
                    $this->logger->log(null, "Sync Queue: error adding product [ ".$product_id." ] in queue");

                }

        } else {
            $logger->info("Sync Queue: Error adding product  [".$product_id." ] in queue");
        }
   }

Vendor\Module\Model\ResourceModel\Queue.php

protected function _construct()
{
        $this->_init('tgs_queue','id');
}

What's the correct usage of my load() 1st argument I get the above error.

Cause i'm already calling the $this->_queue->load in Observers constructor.

Please correct me the proper code in the productUpdate() function.

I'm trying to save the product id in my custom table upon changing or updating any product details


texts: addCustomOption disappears when updating cart item

texts:
I have a function that programmatically adds a product to the the cart.  I'm adding a custom option to that product using addCustomOption:

$id = 27;
$qty = 2;

$new_custom_option = bin2hex(mcrypt_create_iv(5, MCRYPT_DEV_URANDOM)); //Makes the product unique
$_product = Mage::getModel('catalog/product')->load($id);
$_product->addCustomOption('my_new_custom_option',$new_custom_option);

//I'm omitting the part where I set the $options_array

$params = array(
    'product' => $id,
    'qty'     => $qty,
    'options' => $options_array,
);

$cart = Mage::getSingleton('checkout/cart');

$cart->init()->getQuote();

$cart->addProduct($_product, new Varien_Object($params));
$cart->save();

Then, I have another function that updates the cart item with new options:

$params = array(
    'product' => $_product_id,
    'qty'     => $qty,
    'options' => $new_options_array,
);

$item->save();
$cart->updateItem($itemId, $params);
$cart->save();

The problem is that updating the cart item in this way removes my 'new_custom_option' from the item.  Can anyone tell me how to either maintain 'new_custom_option' or re-add it to the item when updating? I assume I have to add 'my_new_custom_option' to the options array, but I can't figure out how to do this.  addCustomOption seems to create a different kind of custom option that doesn't fit into the array.

The whole reason I'm doing this is to create a unique product, so I can have two identical items exist in the cart as separate entities.

Any help is appreciated.


texts: Magento 2 submit contact form not showing success/error messages

texts:
I'm using Magento 2.4.2 on a website with multiple stores where I have :

example.com/fr
example.com/es
example.com/us/en

...
My issue is when someone submit on the contact form, no success or error message is displayed, and the div that should contain it is empty (not a css issue).
Other messages such as add to cart success or bundle select option are well displayed on each stores.
I tried to debug it and I found something with cookies:
When going for the first time on example.com/fr/contact, I will have the cookie "mage_messages" with no value, 'example.com' as domain and '/fr' as path. When submiting, a new cookie "mage_messages" is created with the success message encoded as value, 'example.com' as domain and '/' as path. The first cookie "mage_messages" is same as before submitting
I tried to force set the encoded value in the cookie with path '/fr' and the messages appeared after refresh.
It seems that Magento is setting a cookie with wrong path, that cause the creation of a new one with the wanted value.
When the bug appeared, the "cookie path" config was empty. I tried to set it as '/' or '/fr' but it had no effect so I let it empty.
Could you please help me to find out what is happening?


texts: Magento 2, with Bosnian Language: bs_Latn_BA, show wrong price format. How to correct?

texts:
I install Magento 2, with Bosnian Language: bs_Latn_BA and I notice that price format is wrong.

For example, if price is: 1345.67 Magento show me:
KM 1,346

Bosnian correct format is:
1.345,67 KM

thousand separator: .
decimal separator: ,
precision: 2
currency name on right side: 0.00 KM

Where I can change currency format for this language?


texts: Why is Magento 2 creating this Interceptor file?

texts:
I've been comparing two versions of a website I'm working on -- one is fine and the other has a broken layout -- and the main difference I've found between them is the following file:

generated/code/Magento/Theme/Block/Html/Topmenu/Interceptor.php

My question is: where in the codebase is Magento 2 being directed to create this file?  If I delete it and refresh the website, it's automatically generated again.


texts: Magmi - Magento Mass Import - How to Import Image as Base Image, Thumbnail & Small Image?

texts:
I am new to Magmi and am wondering if anyone has figured out how to correctly import an image so it automatically is set to base image, thumbnail and small image?

I currently can import images but it is only set as the base image.

Their documentation for itemprocessor "Image attributes processor v1.0.24" is here but I do not really understand how to get my result.


texts:
Is there any way around that I can filter search result using via search.

Example : Suppose I am on home page and there I searched "blue" in the search box.
Now I am on the search result page ({{base_url}}/catalogsearch/result/?q=blue), and my result contains all the related items like blue jeans, blue shirts, blue t-shirts, blue hats, etc.

Now I want if a user perform another search from the search result page, let say user enter "hats" in the search box, now instead of showing the result set containing hats. I want to show the result containing (hats OR blue (OR is boolean operator here)). Currently when I am performing search from the search result page, the result contains the result for the new term only.

Example : It is showing the result for hats only whereas I want the result for both blue and hats.

Please guide me how can I proceed on this.


texts: How to Insert Data in magento 2 database table programatically

texts:
We want to insert data in database table.
My site is in magento 2.
Any one help me for insert data in database table.

namespace Agtech\Productstockupdate\Block\Index;
class Index extends \Magento\Framework\View\Element\Template {
protected $productFactory;
public function __construct(
    \Magento\Catalog\Block\Product\Context $context,
    \Magento\Catalog\Model\ProductFactory $productFactory,
    array $data = []) {
    $this->productFactory = $productFactory;
    parent::__construct($context, $data);
}

protected function _prepareLayout()
{
    return parent::_prepareLayout();
}

public function updateStock($product_sku,$product_QTY)
{
    $product = $this->productFactory->create()->load($productId);

    if($product->getStatus() == 2){ // 2 => Disable , 1 => Enable

        $product->setStatus(1);

        if($product->getStatus() == 1){
            $product->setStockData([
                'is_in_stock' => 1,
                'qty' => $productQty
            ]);

            $product->setQuantityAndStockStatus([
                'qty' => $productQty,
                'is_in_stock' => 1
            ]);
        }

        $product->setStatus(2);

        try {
            $product->save();
            echo 'Quantity update of SKU => '.$product->getSku().'
';
        } catch (Exception $e) {
            echo $e->getException();
        }

    }else{

        $product->setStockData([
            'is_in_stock' => 1,
            'qty' => $productQty
        ]);

        $product->setQuantityAndStockStatus([
            'qty' => $productQty,
            'is_in_stock' => 1
        ]);

        try {
            $product->save();
            echo 'Quantity update of SKU => '.$product->getSku().'
';
        } catch (Exception $e) {
            echo $e->getException();
        }
    }
}
}


texts: How to get current subcategory in magento?

texts:
I'm working on product page in which I've to display the current subcategory. I've searched a lot but all I could find is to display all the categories and subcategories. How would I get only a subcategory in which I'm i.e. current subcategory.
I'm using following code-

    <?php $_helper = Mage::helper('catalog/category') ?>
      <?php $_categories = $_helper->getStoreCategories() ?>
      <?php $currentCategory = Mage::registry('current_category') ?>
        <?php if (count($_categories) > 0): ?>

           <?php foreach($_categories as $_category): ?>

            <a href="<?php echo $_helper->getCategoryUrl($_category) ?>">
               <?php echo $_category->getName() ?>

            <?php $_category = Mage::getModel('catalog/category')->load($_category->getId()) ?>
           <?php $_subcategories = $_category->getChildrenCategories() ?>
              <?php if (count($_subcategories) > 0): ?>

                 <?php foreach($_subcategories as $_subcategory): ?>

                  <a href="<?php echo $_helper->getCategoryUrl($_subcategory) ?>">
                    <option><?php echo $_subcategory->getName() ?>
                    </option>

                 <?php endforeach; ?>

               <?php endif; ?>

           <?php endforeach; ?>

     <?php endif; ?>

Please some one help me out.


texts: get attribute option value in magento 2.1 using helper in custom module in data.php

texts:
Ex : color attribute code, While adding product from admin panel, if we select color attribute option using dropdown (Green, Blue, yellow ....), selected color i want to set to particular product title color in list.phtml file,

how to write code to access color attribute option in custom module in data.php helper file, and how to retrieve in list.phtml file.

Please suggest me solution,thank you


texts:
i am trying to put nginx as a application server for magento with varnish being on top and pound as ssl termination , problem is the whole setup result to nasty redirect loop.
using apache and adding "SetEnvIf X-Forwarded-Proto https HTTPS=on" in .htacess save the day . still need to run it on nginx, can some one please provide the solution for the same .


texts: When creating a payment integration, what does the "order" payment action do?

texts:
When you implement your own payment method, you can set the order action to authorize, or authorize and capture (sale). I’m quite clear on how they fit into the order management scheme of things. I.e. when you choose authorize, creating an invoice will capture the funds. When you choose sale, the invoice will be created automatically, and an admin will only have to create a shipment to make the order complete.

However, I just found out that there’s a third payment action, called “order” (in \Magento\Sales\Model\Order\Payment::processAction). What does it do?


texts:
I am new to Magento and was trying tutorial's example, and my site got broken with HTTP ERROR 500 when i have added my events.xml under my module's etc folder

<event name="controller_action_predispatch">
    <observer name="predispatch" instance="MyCompany\Test\Observer\ControlerPreDispatch" shared="false" />
</event>

along with my observer and here is the constructor

public function __construct(\Magento\Framework\App\Response\RedirectInterface $redirect,\Magento\Framework\App\ActionFlag $actionFlag)

Here is apache error:

PHP Fatal error:  `Uncaught TypeError: Argument 1 passed to MyCompany\\Test\\Observer\\ControlerPreDispatch::__construct() must implement interface Magento\\Framework\\App\\Response\\RedirectInterface,` .....

any clue?


texts: getEscaper() is deprecated on Ui Component Listing Column Actions on Magento 2.3

texts:
getEscaper() is show deprecated, Actually, I followed a tutorial to create Magento grid and actions on it, but the getEscaper() shows deprecated.

So i go over one of Magento 2 default extension Magento CMS,

vendor/magento/module-cms/Ui/Component/Listing/Column/PageActions.php

on line number 82, it shows the same.

Any idea what is this?

If Default Magento extension have this issue so then where I get the solution to it?


texts:
I want to translate the word "Categories"

I tried to change the translate.csv file,
cleared all cache,
tried to find the file with path hints, but cannot find the .phtml file also
Changed Mage_catelog (this file changed another word correctly)

Is there another file to be changed for this category in de left side bar?


texts: Debugging Magento 2 cron errors when no message is left?

texts:
Quite often when I'm attempting to create a CRON job I'll mess up along the way and the job will fail to run.
Typically I'd check my logs and see where I went wrong, put the missing semicolon back, and continue on my way, but when it comes to cron jobs Magento rarely gives you any information of substance.
The messages field is null in the cron_jobs table, no messages are left in the Php error logs, none in the magento exceptions, none in cron.log, and none anywhere else I can think of to check, but the job still gets an "error" status.
Am I just not looking in the correct place for these errors or is there some way to make the cron log them somewhere?


texts:
I would like to add a new text line in the footer in the PDF invoice.

But where can I do this?


texts: Payment methods not showing in checkout page magento

texts:
I have a website on Magento multi-store view. I am using three payment methods like PayPal, stripe and bank transfer.

On checkout page only PayPal showing remaining two payment methods are not showing. I checked in the admin all three store view setting. everything fine. but I don't know why it's not showing.

I am also using Partial payment extension.

Please, anyone help me.


texts: How to store custom attribute after place order?

texts:
I am trying to store customer's reward point into sales_order table using event-observer.

here is 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="checkout_onepage_controller_success_action">
    <observer name="save_reward_pont" instance="SimpleMagento\RewardPoint\Observer\SaveRewardPoint" />
</event>

and my observer: SaveRewardPoint.php

public function execute(Observer $observer)
{
     $order=$observer->getEvent()->getOrderIds();
     $order->setData('reward_point',0);
}

I created reward_point column into sales_order table, but when the event trigged its throwing

Uncaught Error: Call to a member function setData() on array

Thanks


texts: Disable freeshipping for 2 states in USA

texts:
I am Trying to disable Free-shipping For 2 states in USA other States have free-shipping eligibility and I have set up table rates for these 2 states its getting worked.

But I don't want to show the free shipping for this 2 states I have tried to create a cart price rule but its not getting worked please find the following images can any one help me to disable free-shipping for ony hawaii and Puerto rico


texts: how do overriding Block with template has changed?

texts:
I want to override the block :

<block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart.additional" as="product.info.addtocart" template="product/view/addtocart.phtml"/>

This block has template. I want to override this block with a template on a condition. Template is product/view/addtocart.phtml.

Edited
I tried is success.

$this->getLayout()->getBlock('product.info.addtocart')->setTemplate('Namespace_Modulename::tempalte.phtml');


texts: Magento 2 developer mode only half loads required js

texts:
I have a weird problem whereby when I'm in Developer mode, none of my JS files are loading properly. They are almost always cut a few bytes short of the EOF.
For example:

Now when I manually go to that JS file in the browser, it loads fine.
This happens randomly to all files imported through requireJS including system files such as JQuery. Every time I refresh the page, I get different JS files affected at different points in the file, but almost always a few bytes short of the end of the file.
If I deploy static content, everything works and loads absolutely fine.
I suspect it is something to do with my local web server set up, but it had been working fine. (I am running valet on a mac with PHP and Nginx etc through brew)
Anybody seen this before?


texts: Order email getShippingDescription - remove method name

texts:
In magento configuration, I have set Flat Rate like this:

Yet in order confirmation email, {{var order.getShippingDescription()}} returns
Flat Rate - Delivery

I'd like to remove Flat Rate, and have just Delivery displayed.

How can I do that?


texts: In Magento 2 i want to add the image in my custom module template file and the image i want to use is my company logo

texts:
I tried this  with my  source but not work:

C:\wamp\www\magento\app\code\magento\hello\view\adminhtml\templates\custom\logo.png


texts: Magento product collection ignores custom sort order (order by FIELD)

texts:
I've setup this collection to sort products based on a list i have.

    $_productCollection = Mage::getModel('catalog/product')->getCollection();
    $_productCollection->addAttributeToSelect('*');
    $_productCollection->addUrlRewrite();
    $_productCollection->addAttributeToFilter('visibility', 4);
    $_productCollection->addStoreFilter(Mage::app()->getStore()->getStoreId());
    $_productCollection->addAttributeToFilter('sku', array('in' => $this->_productskus));
    Mage::getModel('review/review')->appendSummary($_productCollection);
    $_productCollection->getSelect()->order(new Zend_Db_Expr('FIELD(e.sku, ' . "'" . implode("','", $this->_productskus) . "'".')'));

When i print the SQL just before looping "foreach" it gives me a nice working SQL statement (tested this in db). Order is good too.

 .....   AND (e.sku IN('ABC123', 'TEST', 'ATEST')) ORDER BY FIELD(e.sku, 'ABC123', 'TEST', 'ATEST')

However, when i loop over the collection, the order is not right!

After enabling SQL debugging all queries. It seems the product collection SQL has cut of the order-by part.

Any ideas why and where magento is doing this?


texts: Magento 2 Aftet Migration Error - Reindex No Such Entity Error

texts:
[root@test]# php bin/magento indexer:reindex
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Product Flat Data index has been rebuilt successfully in 00:00:46
No such entity.
No such entity.
No such entity.
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:14
Stock index has been rebuilt successfully in 00:00:03
Product Price index has been rebuilt successfully in 00:00:02
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:05

Any help thanks.


texts: Magento 2 Save customer attribute value while customer register

texts:
I have created one 'test' text customer attribute. I have added input field on frontend customer register form. I can able to save this attribute value by override createPost.php from my custom module.

But I think this is not proper way to save value by override controller. There is any way to save customer attribute using plugin or observer?


texts: How To Integrate SOLR With Enterprise Edition?

texts:
I have a enterprise edition I want to activate solr search engine in that I have configured it and ajax result are showing in search but in solr admin panel I didn't get any result bu fetching query and analysis :

No result in Solr search

How to connect with solr? And when I activate solr default engine no product shown in frontend. Please tell me how to configure it.


texts: How to know if the observer function have executed after an event?

texts:
I am trying to observe an event. How can I debug or know if the observer function has been called?
I am using the event "checkout_cart_add_product_complete" and trying to do something simple when a product is added to the cart. But nothing happen when I add the product. I would like to know if the function was reached.
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="checkout_cart_add_product_complete">
    <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)
    {
        debug_to_console("por la chuchaaa");
        //die('Observer Is called!');
    }

    function debug_to_console( $data ) {
        $output = $data;
        if ( is_array( $output ) )
            $output = implode( ',', $output);

        echo "<script>console.log( 'Debug Objects: " . $output . "' );</script>";
    }
}


texts:
I need to check the status of an order 30 minutes after it is placed, and send an email accordingly.

I tried running magento cron but it executes every 30 minutes

In config.xml :

<crontab>
    <jobs>
      <send_mail_sms>
          <schedule>
                <cron_expr>0 30 * * * *</cron_expr>
            </schedule>
            <run>
                <model>namespace_module/cron::sendMail</model>
            </run>
        </send_mail_sms>
    </jobs>
</crontab>

I need to run the Cron only once and run it from the observer of sales_order_place_after where i can provide the orderid.


texts: For some reason every time I compile or setup:upgrade the file permissions on my server change and my site's layout is affected. Does anyone know what can be causing this?


texts: Magento configuration _beforeSave not working on website scope

texts:
I am trying to validate my configuration before save but it does not work on website scope.

It works if i choose default config scope.

Here is my code.

 <?xml version="1.0"?>
<config>
<sections>
        <payment>
            <groups>
                <banktransfer>
                    <fields>
                        <showinfrontend translate="label">
                        Enabled On Front-End
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        </showinfrontend>
                        <partpayment translate="label">
                        Partpayment Method
                        <frontend_type>select</frontend_type>
                        <source_model>bankpayment/partpayment</source_model>
                        <backend_model>bankpayment/system_config_backend_validatepayment</backend_model>
                        <sort_order>1</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                        </partpayment>
                    </fields>
                </banktransfer>
            </groups>
        </payment>
    </sections>
</config>

Model file is as below.

    <?php
class Kgn_Bankpayment_Model_System_Config_Backend_Validatepayment extends Mage_Core_Model_Config_Data
{
    protected function _beforeSave()
    {
         echo "
";print_r(Mage::app()->getRequest()->getPost());exit;

        $value = $this->getValue();
        $totalpartCollection = Mage::getModel('pdftemplate/totalpart')->getCollection()
        ->addFieldToFilter('payment_id','banktransfer');
        $resource = Mage::getSingleton('core/resource');
        $writeConnection = $resource->getConnection('core_write');
        $table = $resource->getTableName('pdftemplate/totalpart');
        foreach($totalpartCollection as $totalpart){
            $id = $totalpart->getId();
            if($value == $id){
                $query = "UPDATE {$table} SET status = 1,is_default=1 WHERE totalpartrule_id = "
             . (int)$id;
             $writeConnection->query($query);
            }else{
                $query = "UPDATE {$table} SET status = 2,is_default=0 WHERE totalpartrule_id = ". (int)$id;
                $writeConnection->query($query);
            }

        }

    }

}


texts: How to get all product details using multiple product id/sku in array REST API

texts:
I need one help. I need to get all product details using multiple product id/sku in array using REST API. I am explaining my code below.

$pid=[23,24,25]
foreach ($pid as $v) {
        $ch = curl_init("http://example.com/index.php/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=entity_id&searchCriteria[filterGroups][0][filters][0][condition_type]=eq&searchCriteria[filterGroups][0][filters][0][value]=".$v);

        //curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        //curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));
        $resp = curl_exec($ch);
        $resup = json_decode($resp, 1);
        $allProdArr[]=$resup;
    }

Here I am using loop for that reason also the response is coming late. Here I need Is there any REST API which can take the direct  array of ids/sku and give the response in a single request. By using loop and calling passing the request each time give the late response which is not user friendly. Please help me to resolve this issue.


texts: Magento Translation of option labels and values

texts:
I have 6 store views for different languages.

My problem is, $_option['label'] and the $_option['value'] which are using in  product-view page, cart page, cart-sidebar, onepage-chekcout is always displaying the admin-side values and not the each language value.

Can anyone help on how to get the translated versions?

Thanks


texts: How to override product view page in magento 2

texts:
I want to override product view page and add my custom code over that.

So please help me on how can I override template of product view page.

Thank you.


texts: Magento how do I get store_code when I have store_id

texts:
we have the opposite question from this one:
How to get the store id from the code

question: How do I get the Magento store_code when I have store_id? (quick without loading the whole config)

So we have ID=6 and need the code = store_EN

thanks in advance


texts: How to fillter Cart Price Rules by website id?

texts:
I want to get active sales rule which is valid and filter Cart Price Rules by website id as the store is multi-website so try using bellow code but getting an error

My Code

protected $sales_rule;
    protected $rule;
    protected $search_builder;
    protected $store;
    public function __construct(Template\Context $context,\Magento\SalesRule\Api\RuleRepositoryInterface $sales_rule,\Magento\Framework\Api\SearchCriteriaBuilder $search_builder, \Magento\SalesRule\Model\RuleFactory $rule,array $data = array(), \Magento\Framework\Api\SortOrderBuilder $sortOrderBuilder){
        $this->sales_rule=$sales_rule;
        $this->search_builder=$search_builder;
        $this->sortOrderBuilder = $sortOrderBuilder;
        $this->rule = $rule;
        $this->store=$context->getStoreManager();
        parent::__construct($context, $data);
    }
    public function getPromoDetail(){
        $sortOrder = $this->sortOrderBuilder->setField('to_date')->setDirection('ASC')->create();
        $searchCriteria = $this->search_builder->addFilter('website_id',$this->store->getStore()->getWebsiteId(),'eq')->addFilter('is_active',1,'eq')->addFilter('is_popup_rule',1,'eq')->setSortOrders([$sortOrder])->create();
        $items = $this->sales_rule->getList($searchCriteria)->getItems();
        if(count($items)):
            return current($items);
        endif;
        return false;
    }

Error

Fehler beim Filtern der Vorlage: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'website_id' in 'where clause', query was: SELECT main_table.*, rule_coupons.code FROM salesrule AS main_table LEFT JOIN salesrule_coupon AS rule_coupons ON main_table.rule_id = rule_coupons.rule_id AND rule_coupons.is_primary = 1 WHERE ((website_id = '1')) AND ((is_active = 1)) AND ((is_popup_rule = 1)) ORDER BY to_date ASC

purpose of code is I want to display active coupon code in a popup so write code for getting Cart price rule and display in pop...

any help appreciated..


texts:
I have installed magebuzz shopping list extension. when I click on the link to add a product to a shopping list in the default theme I go to a page which looks like this (and is correct)

but if I change the theme to a purchased theme I have this empty page:

any idea where the error could be or how I could figure out what the problem is?


texts:
I am using Magento2 and need to add a product to the cart from a remote site. Same TLD, different subdomain.

ie www.mainsite.com add to checkout.mainsite.com

I was using the REST API and found that it actually uses sessions, which override other data when adding to a cart.

For example POST to /rest/V1/guest-carts will return a cartID and set the PHPSESSID cookie. If you include the PHPSESSID in subsequent POST to /rest/V1/guest-carts/cartID/items then the cartID is overridden and PHPSESSID is used instead.

It seems like the cart data is now tied to PHPSESSID, but if I go to checkout.mainsite.com there is nothing in the shopping cart, even though my PHPSESSID is still the same.

Can the API be used as is to AddToCart from a remote site, then go to Magento2 and view the items in the cart?


texts: How to create search select box using block class

texts:
I want to create a select box like the below

I know this can be done using Ui components, but i want it to be done using form.php class (block class)

Currently i am just using the simple select box

       $fieldset->addField(
            'customer',
            'select',
            [
                'label' => __('Customer'),
                'title' => __('Customer'),
                'name' => 'customer',
                'required' => true,
                'values' => $this->options->toOptionArray(),
            ]
        );


texts: What is stopping my Magento Database upgrading

texts:
We currently are working on 2 Magento sites, one is Enterprise 1.11 and one is Enterprise 1.13, if we take too long testing out all out modifications in 1.13 then we plan on getting a security patch for 1.11 and use that as the production site, otherwise we will use 1.13

natully, bugs found in 1.11 still need to be fixed and we are also being told to make other modifications to 1.11 despite the fact we are trying to get 1.13 working, some fixes/mods for 1.11 involve database edits

now i though if i restored my database to the latest dumped version of 1.11 we have and run a 1.13 version of magento the database would update itself, however it's not, firstly, when i go into a category after landing on the home page i get this exception error

Unknown column 'rule.calculate_subtotal' in 'field list'

looking over the update .php files and there is a upgrade-1.6.0.3-1.6.0.4.php in /app/code/core/Mage/Tax/sql/tax_setup/, looking in core_resource in both the 1.11 database i'm trying to upgrade and 1.13 database that i have been working on for a while (which is fully upgraded but doesn't have most of the database edits) and the 1.13 database shows both version and data_version for tax_setup to be 1.6.0.4, in the 1.11 database they both show 1.6.0.3 (one at least should be 1.6.0.4)

now if it was just edits to our custom tables we have added then there would be no problem but there are some banner/cms/system settings that have been chnaged and the sql dump file is almost 1GB so try doing a compare with that

i am wondering why Magento is not updating the database when it should, is there a cache i have to remove that isn't the var/cache or var/full_page_cache which i delete anyway


texts: How to get Lifetime Sales Data in Magento 2

texts:
Programatically i am trying to get the Lifetime Sales data of individual customers.

But i am not getting correct data. I am getting same data for all customers.

Here is my code.

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
    $objectManager = $bootstrap->getObjectManager();
    $objectManager->get('Magento\Framework\App\State')->setAreaCode('admin');

    //$objectManager->get('Magecomp\Assigngroups\Helper\Data')->groupChange();

    $customers = $objectManager->get('\Magento\Customer\Model\ResourceModel\Customer\Collection')->load();
    $customerLifetimeSales = '';
    foreach($customers as $customer)
    {
        echo "
";
        print_r($customer->getName().'
');
        print_r($customer->getGroupId().'
');
        $sum = 0;
        $_collection = $objectManager->get('\Magento\Sales\Model\ResourceModel\Sale\Collection');
        $_collection->addFieldToFilter('status', array('in' => array(\Magento\Sales\Model\Order::STATE_PROCESSING, \Magento\Sales\Model\Order::STATE_COMPLETE)));
            $_collection->setOrderStateFilter(\Magento\Sales\Model\Order::STATE_CANCELED, true)
                    ->setCustomerIdFilter($customer->getId())
                    ->load();
        $customerLifetimeSales = $_collection->getTotals();
       print_r($customerLifetimeSales);
        print_r('======================');
      echo "
";
    }

Let me know if i am doing something wrong here.

Thanks in advance for your answer.


texts: How do I create a shipment via REST API magento2?

texts:
Can someone help me about the shipment. How can I pass the MSI source code to the Shipment Create API?

Thanks


texts: Magento 2 : How to move the search box next to logo title [SOLVED]

texts:
I'm using Magento 2 and trying to change the header part of the theme. I want the search box next to the logo Title "Electro store" as shown in image also i want to know how to change the css of search box and add a submit button by removing search icon and advance search link.

"Electro Store" Title is CMS Static Block which i've created in admin panel and used below code in /var/www/html/magento226/vendor/magento/module-theme/view/frontend/templates/html/header/logo.phtml,

<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('Electro-Title')->toHtml();?>

Below code is showing me search box in header links(next to register and login links),

<move element="top.search" destination="header.panel" before="-"/>

I tried to add float:left; css to block-search class in styles-l.less file,as suggested in this forum Move Search Bar but that's not working. Everytime i run this command php bin/magento cache:flush in terminal it removes the changes in file.

Let me know if anyone have solution or query about question.


texts: Has anybody used Plugins(Interceptors) for Magento 1 from SafeMage Team?

texts:
everybody!
Could anybody tell me if he use  Plugins(Interceptors) from this team?
http://www.safemage.com/function-plugins-for-magento-1.html

It seems it is similar to the same functionality of Magento 2


texts:
Why Magento is using $this->_objectManager->create() directly in function _initCategory in file vendor/magento/module-catalog/Controller/Adminhtml/Category.php?

protected function _initCategory($getRootInstead = false)
    {
        $categoryId = $this->resolveCategoryId();
        $storeId = (int)$this->getRequest()->getParam('store');
        $category = $this->_objectManager->create(\Magento\Catalog\Model\Category::class);
        $category->setStoreId($storeId);

        if ($categoryId) {
            $category->load($categoryId);
            if ($storeId) {
                $rootId = $this->_objectManager->get(
                    \Magento\Store\Model\StoreManagerInterface::class
                )->getStore(
                    $storeId
                )->getRootCategoryId();
                if (!in_array($rootId, $category->getPathIds())) {
                    // load root category instead wrong one
                    if ($getRootInstead) {
                        $category->load($rootId);
                    } else {
                        return false;
                    }
                }
            }
        }

        $this->_objectManager->get(\Magento\Framework\Registry::class)->register('category', $category);
        $this->_objectManager->get(\Magento\Framework\Registry::class)->register('current_category', $category);
        $this->_objectManager->get(\Magento\Cms\Model\Wysiwyg\Config::class)
            ->setStoreId($this->getRequest()->getParam('store'));
        return $category;
    }

As per the Magento recommendation, we should include class/object in constructor using DI. So, why is it so?

Or Am I reading this code incorrectly?


texts: Newly added Page not work only redirect to 404 Error Page

texts:
I added a new page in Magento 2 with url newpage but it return with 404 Not Found eror.

I compared it to a working page and the setting


texts: What does this function does ? Magento 2 billing-address.js

texts:
Would like to know what does this fucntion does in billing-address.js initialize: function () {
            this._super();
            quote.paymentMethod.subscribe(function () {
                checkoutDataResolver.resolveBillingAddress();
            }, this);
            shippingRatesValidator.initFields(this.get('name') + '.form-fields');
        },


texts: Need to create a new attribute in a new type of product

texts:
I am creating a module to insert a new attribute and a new type of product in my store. As template, I use the same registration screen of the Virtual Product type and include new options ONLY this type of product.
For this, in my config.xml, I used:

<catalog>
        <product>
            <type>
                <incomm_virtual translate="label" module="incomm">
                    <label>Incomm Virtual</label>
                    <model>incomm/product_type</model>
                    <price_model>incomm/product_price</price_model>
                    <is_qty>1</is_qty>
                    <composite>0</composite>
                    <can_use_qty_decimals>0</can_use_qty_decimals>
                </incomm_virtual>
            </type>
        </product>
    </catalog>

and to configure the installation with the sql in same config.xml:

    <resources>
        <abc_incommproduct_setup>
            <setup>
                <module>ABC_Incomm</module>
                <class>Mage_Catalog_Model_Resource_Setup</class>
            </setup>
        </abc_incommproduct_setup>
    </resources>

The next file was used mymodule / model / product / type.php containing:

class ABC_Incomm_Model_Product_Type
    extends Mage_Catalog_Model_Product_Type_Virtual
{
    const TYPE_INCOMM          = 'incomm';
    const XML_PATH_AUTHENTICATION = 'catalog/incomm/authentication';

    protected function _prepareProduct(Varien_Object $buyRequest, $product, $processMode)
    {
        if ($this->_isStrictProcessMode($processMode)) {
            return Mage::helper('ABC_Incomm_Helper_Data')->__(
                'Incomm product %s cannot be added to cart. ' .
                ' On the product detail page click the "Go to parent site"'.
                ' button to access the product.',
                $product->getName()
            );
        }
        return parent::_prepareProduct($buyRequest, $product, $processMode);
    }
}

In the same folder, the virtual.php:

class ABC_Incomm_Model_Product_Virtual extends Mage_Catalog_Model_Product_Type_Virtual {
}

Finally, the SQL installation file in sql folder / abc_incommproduct_setup / mysql-install-4-0.1.0.php:

$this->startSetup();

$this->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'terms_of_use', array(
    'group'         => 'General',
    'input'         => 'textarea',
    'type'          => 'text',
    'sort_order' => 4,
    'label'         => 'Terms of use',
    'backend'       => '',
    'visible'       => true,
    'required'      => true,
    'wysiwyg_enabled' => true,
    'visible_on_front' => true,
    'apply_to'                => 'incomm', //only in this type of product
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));

$this->endSetup();

My problem is this, after disabling the cache in magento, clear the cache and include a new type of product, in the Product Types list appears my NEW type of product, but the options NOT load the new attribute inserted via SQL. Did sqlinstall.php not run?


texts: Cannot search for multiple words with Elasticsearch

texts:
Since switching search engine to ElasticSearch 7.9.1 (necessary for Magento 2.4.0) my site has only been able to search the catalog with a single word. When two or more are entered the front end reports "no products found" but in the exception log is this clue:

field:[sku] was indexed without position data; cannot run PhraseQuery

The message comes from Elasticsearch which I know nothing about but this page gives me hope that it can be fixed. The confusing part is that SKU field is not supposed to be searchable. Also I cannot imagine this would be a pre-existing bug that got by Magento's devs unnoticed.
So what is the solution? How can the search schema be corrected or can SKU be excluded from search altogether? I would prefer the latter as the schema is probably rebuilt on a full reindex and that would reset any fix.
Update We found a workaround by setting SKU attribute to be searchable and then running:
bin/magento indexer:reindex catalogsearch_fulltext

This isn't ideal as SKU wasn't intended to be exposed to customers.


texts: Unable to create new service: ChromeDriverService error in MFTF Test for custom Plugins

texts: I'm getting this error message while Running MFTF test commands in terminal


texts: Live URLs completely different from defined ones

texts:
I have an odd problem with a 1.9.2.0 Magento install.

Even though I have specific URLs set for each product, I am seeing the same format for every product, based on one of the initial products we setup:

http://www.mydomain.co.uk/first-product-created-1650
http://www.mydomain.co.uk/first-product-created-1651
http://www.mydomain.co.uk/first-product-created-1652
http://www.mydomain.co.uk/first-product-created-1653

The system seems to be using the ID at the end to differentiate, but it is not the product ID.

This is the case whether a direct product link or via categories:

http://www.mydomain.co.uk/brands/mybrand/first-product-created-1653

I've cleared cache, reindexed, etc. Nothing works.

I've pored over the backend, and am lost as this value is not hard coded.


texts: I want to make a customer group in magento where the customers in that group will have to pay 10% extra on top of the product price, is there a simple way (like adding discounts for customer groups) to do this?


texts: What url should I be using to redirect my customers back to the site after they have paid with paypal?


texts:
I have just added a static block into the left bar but am sturggling to move it to a certain position! If I want to move it to the top I assumed you leave sibling blank and put after as 0.

<default>
   <reference name="left">
      <block type="cms/block" name="tester" >
          <action method="setBlockId">
            <block_id>tester</block_id>
            <siblingName></siblingName>
            <after>0</after>
          </action>
      </block>
   </reference>
</default>

The block just sits at the bottom of the left bar and I cant get it to move!

Can someone shed some light on what I am doing wrong?


texts:
I've got a translation extension. In some files, things seem to be translated well, but some words don't change in frontend. I've also deleted cache.

In which CVS files can I translate these pages:

POPULAR SEARCH TERMS
CREATE NEW ACCOUNT
CATALOG ADVANCED SEARCH
CATALOG ADVANCED SEARCH FORM
SHOPPING CART
ORDERS AND RETURNS

HEADER


texts: How to show all products of specific category in a cms page

texts:
I have create one cms page in magento.i have also show one category products on that page.In that category 18 products. but in cms page showing only 12 products.

i have try following code.

 {{block  type="catalog/product_list" limit="18" category_id="383"  template="catalog/product/list.phtml"}}


texts: Magento 2 do not use taxes when the customer is a company from another country

texts:
I'd like to know the happy path in magento 2 for following scenario

I have a shop in germany which ships to other, EU countries.
When you order as a company from another country, let's say France and you provide your VAT-Id, the order has to be calculcated excluding VAT.

How can I realize this with Magento 2 ?
I tried to set up a specific customer group which is tax free, but this does not work on guest customers

thanks


texts: Magento 2.3 admin not working after grunt setup

texts:
I have a big problem.I setup grunt configuration for magento 2.3 as I used to setup for magento 2.2 and renamed below files

grunt-config.json.sample, package.json.sample and gruntfile.js.sample by removing .sample from their name and installed node_modules through below command.

npm install

However When I refreshed magento admin, it's not showing any css in magento admin.

I don't know what the problem is but whenever I removed the generated package.lock.json from root admin started working as expected.

Also I created local-themes.js at dev\tools\grunt\configs location and added my theme name for grunt compilation purpose but admin css was not showing.

So please help.


texts: Magento transactional emails not working

texts:
Magento transactional emails do not work, I am not sure If I set them up correctly. I added and customized transnational emails. I read somewhere, my contact information should be @websitename.com in order to work. Please advice what fields should I edit, what information am I missing. Why it does not work.
Thanks


texts:
I have a website in magento, right now search results showing in product listing page, i want change the search result page into Product view page.

I don't know how to do this, please help me anyone?


texts: Adding custom customer fields to One Page Checkout

texts:
I have been struggling with this for quite some time.

I have a one page checkout (IWD), and on it I have 2 custom fields that I want the user to fill in. The fields already show, and validation happens. The one page checkout is a form that works on ajax (I'm not sure if it's the theme or the actual one page checkout, I was handed this project when it was almost finished).

Guest checkout is disabled, so in order to check out, the user has to fill in the billing address (which contain the two fields) and that then registers the user.

When a user submits this form, with these two fields filled in, I get an alert back that says the two fields are required. Now my thinking is as follows: Since it passes validation on the front end and fails on the back end, the fields aren't being submitted to user registration. These fields are required in user registration. I created the fields with Custom Registration Fields and set it to required in the admin section.

How would I go about getting these fields to post to the user registration? I've tried setting the user session and including these fields. I've also read through this answer.

Any assistance will be appreciated.


texts: Magento2: Set specific theme in layout XML - example checkout_index_index

texts:
In Magento2 how to you update the theme in a layout XML?  In M1 you could set this in your layout;

<reference name=”root”>
<action method=”setTheme”><theme>custom-theme</theme></action>
</reference>

What is the correct syntax in M2?  For example, if you wanted to use the Luma checkout design on a custom theme?


texts: How can i Import & Export attributes & attribute set through import fuctionality in magento 2.0?

texts:
I need to Import/Export attributes and attribute sets from Magento admin (2.0)
 & trying to make new import functionality through extending the        \Magento\ImportExport\Model\Import\Entity\AbstractEntity

CSV content these values

  EntityTypeId, attribute_set, attribute_name, attribute_group_name, is_global,
  is_user_defined, is_filterable, is_visible, is_required, is_visible_on_front,
  is_searchable, is_unique, is_configurable, frontend_class,
  is_visible_in_advanced_search, is_comparable, is_filterable_in_search,  is_used_for_price_rules, position, frontend_input, backend_type,    frontend_label, default_value, apply_to, attribute_options


texts:
How to load more then one category id

$categoryIds = array(957);
  $collection = Mage::getModel('catalog/category')->load($categoryIds)
->getProductCollection()
->addAttributeToSelect('*');
$collection->joinField(
                        'is_in_stock',
                        'cataloginventory/stock_item',
                        'is_in_stock',
                        'product_id=entity_id',
                        '{{table}}.stock_id=1',
                        'left'
                )
                ->addAttributeToFilter('is_in_stock', array('eq' => 0));
//->addAttributeToFilter('status',array('eq' => Mage_Catalog_Model_Product_Status::STATUS_DISABLED))


texts: Checkout.com Payment Gateway error "Transaction has been declined. Please try again later."

texts:
Transaction has been declined. Please try again later.

Checkout.com

In Magento 2, when trying to place order using checkout.com payment gateway with sandbox credentials getting above error


texts: Magento 2.1.5 Server load very high suddenly

texts:
I have a magento 2.1.5 EE website. There are around 5000 visitors a day.  Below are the server Specifications:

Intel Xeon E3-1270 CPU
3.50Ghz CPU Clock Speed
4 CPU Cores
8 CPU Threads
8MB CPU Cache
16GB DDR3 RAM
1TB SATA II HDD
5TB Bandwidth

I am facing a problem recently. I installed an extension ,after two days I disabled it and then I enabled it after 1 day. After enabling the extension, I run the setup:upgrade command. The command takes a lot of time which is unusual and the Server load reaches 30.

I tried to figure out the problem:

Disabled the cron jobs
Uninstalled the above extension
run the setup upgrade and the di:compile and the deploy commmands
Cleared the cache

The Server load is increasing quickly to reach 30 for a little time then it decreases back to 1-2. This is happening multiple times a day.

I contacted the hosting company, they said that the resources usage is not related to the traffic I am getting, but rather to the number of executions my website scripts are making.

I wonder how can I solve this issue?

Any help is appreciated.


texts: how to make request to get all products using REST API. I'm integrating salesforce - magento through apex controller. please tell me how construct the request.


texts: Magento2: Apply taxes to existing orders

texts:
Customers created a lot of orders before client set up taxes. Now the client has wrong tax values in reports for that period.
So I'm wondering has anybody ever recalculated all the existing orders according to the new tax classes/rates set on products and could share the code? Or is there an extension for it?


texts: Custom CMS page not showing in specied pages list of widget page in Admin - Magento 2.2.4

texts: Hi I want to add a widget in my custom CMS page, but my custom page is not coming in list of specified pages dowpdown under layout updates in widgets page.


texts: Magento 2 - Ko Js - Multiple Instance of component in the same page

texts:
I am trying to add two templates with the same component, but i need that each template do not share observables and computed this with the other template. I need each one have it own instance of the component.
Is it possible? i spend some hours and i could not find the solution even in this forum.


texts: Get current category id of the product in search result

texts: Is it possible to get the category id from which the product is loaded in search result?


texts:
I have a module where the admin does not work:

I had it like this:

<admin>
        <routers>
            <custommenu>
                <use>admin</use>
                <args>
                    <module>Company_Custommenu</module>
                    <frontName>custommenu</frontName>
                </args>
            </custommenu>
        </routers>
    </admin>

I've changed it to this:

<admin>
    <routers>
        <adminhtml>
            <args>
                <modules>
                    <custommenu after="Mage_Adminhtml">Company_Custommenu_Adminhtml</custommenu>
                </modules>
            </args>
        </adminhtml>
    </routers>
</admin>

But I get frontend 404's.
What else should I change?

Thanks!


texts:
I am using magento 2.3.3.
I configured the new logo. When I create a new customer account the email sent to the customer contains the new logo, but the email copy sent to me has always the luma logo.
I tried to delete all the luma images in the directories but still got the luma logo.
The header.html contains src="{{var logo_url}}". I don't know where to set the right logo for email sent to myself.


texts: controller showing blank page in magento

texts:
I'm using Magento 1.9.2

I'm trying to create a new custom module.I have call one controller in another second controller. my problem is that i have call .phtml file in second controller my page is redirected but Blank page is showing.

First controller:

  class Spiffprogram_Spiff_IndexController extends Mage_Core_Controller_Front_Action {
  public function createNewPostAction() {
  $this->_redirect('spiffsuccess');//call another controller
  }

Second Controller:

  class SuccessSpiffProgram_SpiffSuccess_IndexController extends Mage_Core_Controller_Front_Action
    {
        public function indexAction()
       {
          $block=$this->getLayout()->createBlock('Mage_Core_Block_Template','core/template',
                                    array('template' => 'spiffsuccess/index.phtml')
                                   );
    }
   $this->renderLayout();


texts: Magento 2.0 Updating product quantity programmatically (Order data inserted using SQL)

texts: What is the correct way of updating a products quantity?  I created programmatically an order by inserting data using SQL.  I would like to know how I can "update" the quantity of products added in my order.


texts: Add a custom attribute in grid customer magento 2

texts:
I have created an attribute type: select but i can't display it in the grid customer.
the code of my customer_listing.xml

<column name="customer_status">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">select</item>
                <item name="editor" xsi:type="string">select</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                <item name="dataType" xsi:type="string">select</item>
                <item name="label" xsi:type="string" translate="true">Customer Status</item>
                <item name="sortOrder" xsi:type="number">190</item>
            </item>
        </argument>
    </column>

the code of the UpgradeData.php

$attributeCode7 = "customer_status";
    $customerSetup->addAttribute(Customer::ENTITY, $attributeCode7, [
        'type'              => 'varchar',
        'label'             => 'Customer Status',
        'input'             => 'select',
        'source'            => 'Stack\Customer\Model\Attribute\Source\CustomerStatus',
        'required'          => true,
        'visible'           => true,
        'user_defined'      => true,
        'sort_order'        => 1000,
        'position'          => 1000,
        'system'            => false,
        'is_used_in_grid'       => true,
        'is_visible_in_grid'    => true,

    ]);

    $attribute7 = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, $attributeCode7)
        ->addData([
            'attribute_set_id' => $attributeSetId,
            'attribute_group_id' => $attributeGroupId,
            'used_in_forms' =>  ['adminhtml_customer', 'customer_account_create', 'customer_account_edit']
        ]);
    $attribute7->save();

also i created indexer.xml under etc of my module here is the code:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
<indexer id="customer_grid">
    <fieldset name="customer">
        <field name="customer_status" xsi:type="filterable" dataType="int"/>
    </fieldset>
</indexer>

please help me and thanks in advance


texts: How can I add programmatically welcome message with user name

texts: How can I add programmetically  welcome message with user name, with this welcome message display all of my page.


texts: How to use Identities for to implementing hole punching in my custom module magento 2

texts:
I tried this link link

Not working for me.

Any other way to achieve the hole punching.


texts: Exclude Products With Tier Prices From Catalog Rule Collection

texts:
When creating a Catalog Rule, it currently includes products that have tier prices.

I would like to do the direct opposite of the following code

$select->joinInner(
     array('product_tierprice' => 'catalog_product_entity_tier_price'),
     'product_tierprice.entity_id=rp.product_id',
     array()
 );

The above code will limit Catalog Rules to just products with tier prices and it works. Attempting to do the opposite causes errors.

What I want to do is rp.product_id's that are not present in catalog_product_entity_tier_price. Something along the lines of the following, but actually works

$select->joinLeft(
    array('product_tierprice' => 'catalog_product_entity_tier_price'),
    'product_tierprice.entity_id=rp.product_id',
     array()
);
$select->where('rp.product_id NOT IN (product_tierprice.entity_id)');