texts: Generate dynamic page with magento 1.9. - 2.1

texts:
I have a php api to generate html code. What I'd like is to use it with magento.

is posible to do it ?

This is my target :

run_magento() --> generate magento page

By example in magento 2.1 we have by default :

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);
$bootstrap->run($app);

And this code will generate a magento page using magento block structure.

What I'd like to get is we could to generate those block structures dinamically.

To you understand me :

Instead to have :
<?php echo $content ?>

I'd like to have : echo <?php generate_tag(p, $content) ?>

This same idea using magento Api. I have this idea already implemmented with Drupal 5-8 without problems and now I'd like to try to implemment with Magento.

Is possible ?


texts:
I have installed Magento on a test Ubuntu 20.04.01 server via composer with the command:
composer create-project --repository=https://repo.magento.com/ magento/project-community-edition ~/magento --ignore-platform-reqs

After the installation, I created a symbolic link:
sudo ln -s /home/<loginname>/magento/vendor/magento/magento2-base /var/www/html/magento

When starting Magento, I receive an autoload error:

We can't read some files that are required to run the Magento
application. This usually means file permissions are set incorrectly.

However, the file permissions have been set with the following command:
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type f -exec chown www-data:www-data {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type d -exec chown www-data:www-data {} \;
sudo find ./var -type d -exec chmod 777 {} \;
sudo find ./pub/media -type d -exec chmod 777 {} \;
sudo find ./pub/static -type d -exec chmod 777 {} \;
sudo chmod 777 ./app/etc
sudo chmod 644 ./app/etc/*.xml

On Magento 2 : getting Autoload error the user Sinisa Nedeljkovic wrote that it might be possible that the app/etc/vendor_path.php file is missing.

If you take a look at vendor/magento/magento2-base/app/autoload.php,
you'll notice following piece of code:
define('VENDOR_PATH', BP . '/app/etc/vendor_path.php');

if (!file_exists(VENDOR_PATH)) {
    throw new \Exception(
        'We can\'t read some files that are required to run the Magento application. '
         . 'This usually means file permissions are set incorrectly.'
    );
}

That means that either you don't have app/etc/vendor_path.php file, or
you're not having enough permissions.

And that is the case: that file is not present in the given folder.
So my question is: how do I get that file? Or copy it from ./vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Framework/Composer/_files/vendor_path.php?
Feedback is appreciated and with kind regards,
TheStingPilot


texts: Magento 2.1 : Cannot retrieve session variable

texts:
Im trying to save form token in session variable and  get it back in the result page when the form is submitted.
I created the following Session Model to handle sessions in my custom module:

<?php

namespace My-Vendor\My-Module\Model;

class Session extends \Magento\Framework\Session\SessionManager
{

public function __construct(
    \Magento\Framework\App\Request\Http $request,
    \Magento\Framework\Session\SidResolverInterface $sidResolver,
    \Magento\Framework\Session\Config\ConfigInterface $sessionConfig,
    \Magento\Framework\Session\SaveHandlerInterface $saveHandler,
    \Magento\Framework\Session\ValidatorInterface $validator,
    \Magento\Framework\Session\StorageInterface $storage,
    \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager,
    \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
    \Magento\Framework\App\State $appState
) {
    parent::__construct(
        $request,
        $sidResolver,
        $sessionConfig,
        $saveHandler,
        $validator,
        $storage,
        $cookieManager,
        $cookieMetadataFactory,
        $appState
    );
}

/**
 * Set Session data
 *
 * @param string|null $id
 * @return $this
 */
public function setSession($key,$data)
{
    $this->storage->setData($key, $data);
    return $this;
}

/**
 * Retrieve Session data from current session
 *
 * @return string|null
 */
public function getSession($key)
{
    if ($this->storage->getData($key)) {
        return $this->storage->getData($key);
    }
    return null;
}

}

The Index Block is injected with Session Model and then I set the session:

use My-Vendor\My-Module\Model\Session;
class Index extends \Magento\Framework\View\Element\Template
{
protected $sessionHandler;
public function __construct(...,Session $sessionHandler,...)
{
    ...
    $this->sessionHandler = $sessionHandler;
    ....
}

public function prepareFormToken()
{
    $token = Get the generated token...
    $this->sessionHandler->setSession('form_token',$token);
    return $token;
}

}

I can get the session variable from the Index Block using

$this->sessionHandler->setSession('form_token');

but I can't get it from the Result controller where the form is submitted to.

What's wrong with my code?


texts: Getting param of url on dataprovide class

texts:
I am having ui grid, I want to filter the data based on the param passed in the url.

How can i achieve this?


texts: How to create a custom UI Component dropdown field?

texts:
Hi i'm new at magento 2 and i want to create a dropdown field with two custom strings options.
And if possible in other ocasion i would like to customize with a sql select values.


texts:
Every time the cron runs it logs this error:

[Magento\Framework\Exception\LocalizedException]
 Invalid Document
 Element 'group': Missing child element(s). Expected is ( job ).
 Line: 24

cron:run [--group="..."] [--bootstrap="..."]

the crontab -e shows this at line 24:

* * * * * /usr/bin/php7.0 /var/www/html/store/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/html/store/var/log/magento.cron.log

I checked official documentation and didn't found any significal differences between these lines aside from paths.
Does anyone knows what "group" is missing and how do i fix that??


texts:
I need to give different styles [css] for  products of different attribute sets, so in view.phtml i am using below code & its working fine.

<?php
if($_product->getAttributeSetId()==20){
?>
<style>

.product-options
{
width: 30px;
}

</style>

<?php
}
?>

but when i tried the same code in app/design/frontend/rwd/theme1/template/catalog/product/view/options/type - select.phtml , its giving below error :

Fatal error: Call to a member function getAttributeSetId() on a non-object in line

if($_product->getAttributeSetId()==20){

I added below code, still i have same error

$SetId = Mage::getModel('eav/entity_setup','core_setup')->getAttributeSetId('catalog_product','Default');

Mage::getSingleton('catalog/config')->getAttributeSetId('catalog_product', 'Default');


texts: Configurable products import doesn't work configurable_variations not imported

texts:
I am trying to import configurable products using a script. All products imported successfully but child product is not associated with the parent in case of configurable. Please check below script & attached CSV.

$this->eavConfig->clear();
    $importModel = $this->importModel;
    $importModel->setData(
        [
            'entity' => 'catalog_product',
            'behavior' => 'append',
            'import_images_file_dir' => 'pub/media/catalog/product',
            Import::FIELD_NAME_VALIDATION_STRATEGY =>
                ProcessingErrorAggregatorInterface::VALIDATION_STRATEGY_SKIP_ERRORS
        ]
    );

    $source = $this->csvSourceFactory->create(
        [
            'file' => 'Setup/fixtures/product.csv',
            'directory' => $this->readFactory->create(
                $this->componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Custom_Catalog')
            )
        ]
    );

    $currentPath = getcwd();
    chdir(BP);
    $importModel->validateSource($source);

    try {
        $this->importModel->importSource();
    } catch (\Exception $e) {
         $e->getMessage();
    }

    chdir($currentPath);

    $this->eavConfig->clear();

My observations on the above code are as below
1)If I put qty more than 1
2)If I run the above script 2 times it is working.


texts: What is the right way to remove the shipping method in the checkout page? I have tried to follow some tutorials, but most of them don't seemed to work in 1.7 version.


texts: Is there a way to configure magento search to show a particular block if no search results are returned?

texts: Is there a way to configure magento search to show a particular block in the search result area if no results are returned. For example may be I can show the recently view items or most popular items.


texts: Magento2: How to add separate css file on each cms page?

texts:
Is it possible to add individual CSS file on each cms page? Upon researching, I can do it by adding code on Layout update XML.

Unfortunately, it isn't working. Here's my code:

<head>
  <css src="Namespace_YourModule::css/styles.css"/>
</head>


texts: Overriding Mage_Wishlist_IndexController in Magento

texts:
Hi i am trying to override magento wishlist IndexController. I have followed all steps but its not working here is my code and files path

  app\code\local\XS4Arabia\Wishlist\etc\config.xml

    <?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <XS4Arabia_Wishlist>
            <version>0.1.0</version>
        </XS4Arabia_Wishlist>
    </modules>
    <frontend>
        <routers>
            <wishlist>
                <args>
                  <modules>
                    <XS4Arabia_Wishlist before="Mage_Wishlist">XS4Arabia_Wishlist</XS4Arabia_Wishlist>
                  </modules>
                </args>
          </wishlist>
        </routers>
    </frontend>
</config>

  app\code\local\XS4Arabia\Wishlist\controllers\IndexController.php

    require_once Mage::getModuleDir('controllers', 'Mage_Wishlist') . DS . 'IndexController.php';
    class XS4Arabia_Wishlist_IndexController extends Mage_Wishlist_IndexController
    {
      public function sendAction()
       {
        die('local');
       }
    }

  app\etc\modules\XS4arabia_Wishlist.xml

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


texts: magento 2 how to use mailchimp programatically only for newsletter

texts:
We need to use 2 email service
MailChimp for newsletter

and other for SendGrid

SendGrid is working fine but needs to manage how we can use MailChimp only for newsletter?
Which thing needs to override controller, blocks, etc...?


texts:
We have a client that has a very old HTML website that needs to be upgraded to Magento.
This client sells Chimney Liner Kits, which is essentially 4 different products that work together. Here is the flow:

Select a Chimney Liner
Select a Bottom Connector
Select a Chimney Cap
Select A Flue Cap

How would we set that up in Magento? Would these be bundled products, kits, or related product? Conceptually I am not sure what to do. I am sure there is probably some extension that could make this work, but I'm not sure what to look for. Can somebody point me in the right direction?


texts: What does the 's' parameter in the URL mean?

texts:
I am still fairly new to Magento's URL system.

I do know that name value pairs are separated with slashes (though you can also pass a ? and then a=5&b=6&z=etc)

What is the "s" meaning in the following URL?

http://www.mycompany.com/smi1304/catalog/category/view/s/grad-packs/id/312906/

Does that mean s=grad-packs or is s just a delimiter to indicate the start of query parameters?


texts: magento 2 i want to add some new Currency

texts: How to add new Currency in Magento 2 in backend I saw some currency is there more than that I want to add new MYR, SGD, LKR


texts: What happens to Magento 1 websites when PSD2 effective on Sep 14th, 2019?

texts: Can Magento 1 site (CE + EE) comply with PSD2?


texts: In Magento 1.9, why are order emails send through the queue, while Invoice emails are sent directly? I checked the code for Order and Invoice, and the order-sendNewOrderEmail uses the queue, while invoice->sendEmail() skips it completely. It's making the order email be sent after the invoice email instead of before in case the order is approved automatically!


texts: Remove advanced search link from top.search in Magento 2

texts:
In Magento/Blank an advanced search link appears under the search form by default. I have unsuccessfully been attempting to remove this by referencing the block name for removal. My issue is, not being able to determine what the actual block is called. Turning on path hints and block names was not helpful, nor was looking in the module folder. What am I missing?

<referenceBlock name="advanced.search" remove="true"/>


texts: Magento 2 - Best approach to display and customize Recently Viewed Products with slider

texts:
Using our custom theme, we need to display Recently Viewed Products block on product detail page. We followed below approach

Under Admin Panel we have Content -> Widgets
Add Widget -> choose widget type Recently Viewed Products
Type = Recently Viewed Products
Design Theme = Assign my theme
Widget Title = Recently Viewed Products
Assign to Store Views = Select as you need
Sort Order = (Add as per you need) else leave empty, it will set to 0
Layout Updates - Add Layout Update
Display on = All Product Types
Products = All
Container = Main Content Area
Template = View Products Grid Template
Under Widget Options
Number of Products to display = 7

Now, on product detail page, recenlty viewed products in grid form can be seen. How could I achieve below

Change title from Recently Viewed to Recently Viewed Products ? To
customize, which template/xml file I have to extend and modify in
my custom theme to achieve the same ?
For product count more than 5, the product displays in second row
as seen in image attached. How could I add a slider so that 5
products are seen and if more than 5 then slider will appear ? In Magento
1.9 they have a slider code. Add a class="slideshow-container" for a parent
container and add class="slideshow" for a ul or ol


texts:
I download a live site and installed it in localhost. I am using windows and xampp. I can see home page but if I click on a category page then Magento showing "Object not found!" .

Can anyone say where is the problem ??


texts: Magento controller custom action redirecting

texts:
I have a customer action on a customer controller I am creating. My controller extends Mage_Adminhtml_Controller_Action.

Whenever I send a POST request to a customer controller action instead of returning what I set the body to in the action it sends a redirect to the admin dashboard.

I am making this POST request via AJAX and don't want a redirect.

Controller:

class JB_UPI_Adminhtml_ImportController
    extends Mage_Adminhtml_Controller_Action
{
    //....

    public function createProductsAction()
    {
        $this->getResponse()->clearHeaders()->setHeader('Content-type','application/json');

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

        $storeId        = $this->getRequest()->getParam('store');
        $redirectBack   = $this->getRequest()->getParam('back', false);

        $this->getResponse()->setBody('{"_success":true}');
    }

    //....
}

JavaScript making AJAX call:

$.ajax({
    url: createEndpoint,
    type: 'POST',
    data: outputData
})
.success(function(data)
{
    console.log(data);
});

SOLVED

I found this article which mentioned a form_key. Adding that to my AJAX POST request solved the problem.


texts: custom email template is showing header and footer from Luma theme?

texts:
I have created custom email template in my custom module for contact form. while submitting form email should have to trigger to admin and end user and email also triggering as per requirement but it is taking header and footer from luma theme.
But we need header and footer from our custom theme.
Please, below attachment for more clarity:

Thanks in advance !


texts:
I have one cronjob needs to update status periodically.
Target table name is "Custom"
if custom table contain customid, user_id, status, exp_date columns.
I have scheduler php file call "custom.php".
I added below in __construct(
use Test\Subscription\Model\ResourceModel\Custom\CollectionFactory

public function __construct(
     CollectionFactory $collectionFactory
) {
     $this->collectionFactory=$collectionFactory;
}

public function execute() {
    $custom_obj = $this->collectionFactory->create();

    $custom_obj->addFieldToSelect('*')->load();
    $items = $custom_obj->getItems();

    foreach($items as $key=>$item){
         if( date("Y-m-d") > $item->getDataByKey("exp_date") ) {
              // save column
         }
    }
}

In this case does anyone know how to update column for this case ( to fill save column )?
Also, Does anyone know best practice for this kind of case for update?
Thank you!


texts: magento2 check if order invoiced or shipped

texts:
How to check if the order is shipped or invoiced by store owner from order object.

$this->registry->registry('current_order');

I have current order object, I want to know if its been shipped or invoiced

Thanks


texts: Magento 2.3.x problem in save and duplicate product

texts:
when i try to use the duplicate and save product , magento throw me  this error

  Warning: file_put_contents(/var/www/html/Magento_2/presentation_folders_ca/var/cache//mage-tags/mage---32d_DB_PDO_MYSQL_DDL): failed to open stream: Permission denied in /var/www/html/Magento_2/presentation_folders_ca/vendor/colinmollenhour/cache-backend-file/File.php on line 691

what happen here?


texts:
I would like to move the "product-price" so it is just over the "add-to-cart".

The problem is I didn't find the exact "destination".

Had some minor success, either on "configurable products" or on the "simple product" view.

So my question is it possible to move if "configurable product" -->destination a or "simple product" -->destination b

Destination A:

<move element="product.price.final" destination="product.info.options.wrapper" after="-" />

Destination B:
<move element="product.price.final" destination="product.info.form.content" before="-" />

Thanks for your help

The idea with "basket.button.price" didn't work. Here my xml:

<container name="product.info.form.content" as="product_info_form_content">
<container name="basket.button.price" htmlTag="div" htmlClass="basket__elements"></container>
    <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart" as="product.info.addtocart" template="product/view/addtocart.phtml"/>
</container>
<block class="Magento\Framework\View\Element\Template" name="product.info.form.options" as="options_container">
    <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper" as="product_options_wrapper" template="product/view/options/wrapper.phtml">
        <block class="Magento\Catalog\Block\Product\View\Options" name="product.info.options" as="product_options" template="product/view/options.phtml">
            <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" as="default" template="product/view/options/type/default.phtml"/>
                <block class="Magento\Catalog\Block\Product\View\Options\Type\Text" as="text" template="product/view/options/type/text.phtml"/>
                    <block class="Magento\Catalog\Block\Product\View\Options\Type\File" as="file" template="product/view/options/type/file.phtml"/>
                    <block class="Magento\Catalog\Block\Product\View\Options\Type\Select" as="select" template="product/view/options/type/select.phtml"/>
                    <block class="Magento\Catalog\Block\Product\View\Options\Type\Date" as="date" template="product/view/options/type/date.phtml"/>
                </block>
            <block class="Magento\Framework\View\Element\Html\Calendar" name="html_calendar" as="html_calendar" template="Magento_Theme::js/calendar.phtml"/>
        </block>

    <block class="Magento\Catalog\Block\Product\View" name="product.info.options.wrapper.bottom" as="product_options_wrapper_bottom" template="product/view/options/wrapper/bottom.phtml">
        <container name="basket.button.price" htmlTag="div" htmlClass="basket__elements"></container>
            <block class="Magento\Catalog\Block\Product\View" name="product.info.addtocart.additional" as="product.info.addtocart" template="product/view/addtocart.phtml"/>
        </block>
    </block>


texts: Magento 2 Reorder Button - How to ignore out of stock item

texts:
The method responsible for reordering is Mage_Sales_Model_Order::_canReorder(). The method _canReorder is called by Mage_Sales_Model_Order::canReorder(). This is actually called to see if you can reorder. I understood that part.
I know that the reorder button doesn't show up when an item is out of stock. How can I make ignore this condition and allow customer to reorder by excluding the out of stock item?
The _canReorder function looks like this:
 protected function _canReorder($ignoreSalable = false)
{
    if ($this->canUnhold() || $this->isPaymentReview()) {
        return false;
    }

    if ($this->getActionFlag(self::ACTION_FLAG_REORDER) === false) {
        return false;
    }

    $products = [];
    $itemsCollection = $this->getItemsCollection();
    foreach ($itemsCollection as $item) {
        $products[] = $item->getProductId();
    }

    if (!empty($products)) {
        $productsCollection = $this->productListFactory->create()
            ->setStoreId($this->getStoreId())
            ->addIdFilter($products)
            ->addAttributeToSelect('status')
            ->load();

        foreach ($itemsCollection as $item) {
            $product = $productsCollection->getItemById($item->getProductId());
            if (!$product) {
                return false;
            }
            if (!$ignoreSalable && !$product->isSalable()) {
                return false;
            }
        }
    }

    return true;
}

Where is the part that detects "out of stock" item and how can I add logic to exclude out of stock item from reordering cart?
I'm new to Magento, so any help would be appreciated. Thank you.


texts: Want layered navigation filters on top in one column layout

texts:
I am having a issue.
I want to filter the products using the attributes on the top.
for eg., I want to filter the product by type. Type is a name of attribute.
for reference the site is http://www.loft-interiors.co.uk/beds-and-mattresses/bed-frames/upholstered-beds
I want navigation like this and my current site is http://infigic.com/landlordstore/furniture/living-room/sofa-armchairs/three-seat-sofa.html
Please suggest a way


texts: How to create a button on custom page backend

texts:
I'm looking to add a button that executes my own custom code.
I've successfully created the page, along with a button but I can't for the life of me get it todo anything. I've stripped it back down to basics, where I just display the page with the layout form etc.
Please see my code below, I wondered if anyone would be able to help me/point me in the right direction.
Thank you in advance.
My Controller
    <?php

namespace Ozark\Maxoptra\Controller\Adminhtml\ExportEmail;

use Laminas\Form\Element\Button;
use Magento\Backend\App\Action\Context;
use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
use Magento\Framework\View\ResultPageFactory;

class Index extends \Magento\Backend\App\Action
{
    private $resultPageFactory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }
    public function execute()
    {
        $resultPage = $this->resultPageFactory->create(); // this crete an empty page
        return $resultPage;// this show page
    }

}

Template

Test info@xxxxxxx.co.uk

<form class="export button">
    <input type="submit" value="Run Export" name="runExport" />
</form>


texts: Table rate shipping with multiple shipping methods pulling rate from USPS

texts:
So I'm trying to setup table rate shipping. My client wants to present the customer only one shipping option based on their location. As an example: for x number of items and USPS zones 1-4, they want to calculate shipping based on weight/destination. However, for zones 5-8, they want to charge a flat rate. I've tried the Matrix Rates extension, but it seems to require that I put in the rates, when in reality, I need it to ask USPS for the rates based on the correct shipping method.

I have also tried Webshopapps Zone Table Rate extension, but I can't get support from them beyond "refactor the extension because it's old and it may not work." The whole idea behind using an extension is to not have to write the module myself.

Does anyone know a solution for this?


texts: During Magento 2.1.12 Product Export,some attribute values for english store missing

texts:
There are 2700 products on the site & lots of product custom attributes.I've 2 stores "default" & "english" & when I'm exporting products then getting empty values for the store "english" in most of the attributes columns.

e.g-"name","description","custom-attribute" etc.

Please see the screenshot:-

I've already done reindexing,ignore customs attributes during export etc.

Please help me to resolve this issue ASAP.

--
Thanks!!!


texts:
Below is my config.xml

<?xml version="1.0"?>
<config>
    <modules>
       <NameSpace_ModuleName>
          <version>1.0.0</version>
       </NameSpace_ModuleName>
    </modules>
</config>

Below is my adminhtml.xml

<?xml version="1.0"?>
<config>
    <acl>
    <resources>
        <all>
            <title>Allow Everything</title>
        </all>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <mymodulename>
                                    <title>Customer Config</title>
                                    <sort_order>80</sort_order>
                                </mymodulename>
                            </children>
                        </config>
                    </children>
                </system>
            </children>
        </admin>
    </resources>
</acl>
</config>

Below is my system.xml

<?xml version="1.0"?>
<config>
    <sections>
        <mymodule translate="label" module="mymodule">
            <class>separator-top</class>
            Customer Config
            <tab>customer</tab>
            <sort_order>100</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <general translate="label" module="mymodule">
                    Customer Configuration
                    <sort_order>20</sort_order>
                    <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <expanded>1</expanded>
                    <fields>
                        <active translate="label">
                            Enable My Module
                            <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>
                        </active>
                    </fields>
                </general>
            </groups>
        </mymodule >
    </sections>
</config>

I can see the section under Customer Tab, but when I click on it, it gives me 404 Not found error

My system.log is empty and shows nothing.

Please help to resolve.


texts: Magento multistore languages: Getting the locale language name in store selector

texts:
When looking through the multistore language selector (in our theme) we see that the dropdown is populated as follows:

foreach ($this->getStores() as $_lang) {
    $select_stores[] = '<option '.$_selected_option.' value="'. $_lang->getCurrentUrl() .'">'. $this->htmlEscape($_lang->getName()) .'</option>';
}

The problem is that the (real) language is not the store name we give it and is fetched through '$_lang->getName()'

But rather the Locale set in the backend in storeconfig

$_language_code = substr(Mage::getStoreConfig('general/locale/code', $_lang->getId()),0,2);

I know how to fetch ths ID, but ....

Question: How can we now fetch the Locale full language name to populate the dropdown? (so German or Deutsch for Germany and English or Engels for English)

(And maybe cut off the the piece between brackets, so English (United States) becomes English)


texts: Magento 2 add new column to existing table on a running webshop

texts:
I know there are few posts regarding how to add new column to existing table in Magento 2. My concern is if I already have a webshop that is running, can I still add a new column to a table?

for example, I want to add a new column to the table sales_order_item in a webshop database that already has a lot of data existing.


texts: I want to add social share buttons in Magento 2

texts: Can anyone guide me how can i add social share buttons in Magento 2 ?


texts: Magento 2 add coupon by default to all order?

texts: How to add a default coupon to all order. Will it be an observer?


texts:
Magento 2.2.5 - How to add the google captcha in checkout page before place order button.

I need to show the google captcha in checkout page before place order button.


texts: Login customber login into the magento website from codeigniter

texts:
I have two websites, one is made in codeigniter and second one is in magento both are in same root server.

I want to customer login into the magento website from the codeigniter website.

Using the below code login is success but when I am going on magento website it is asking to login again.

     require_once ("../app/Mage.php");
    umask(0);
    Mage::app('default');
    Mage::getSingleton('core/session', array('name' => 'frontend'));
    $session = Mage::getSingleton('customer/session', array('name'=>'frontend'));

    $customer = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId());

    $customer->loadByEmail($email);

    $session = Mage::getSingleton('customer/session');

    $session->loginById($customer->getId());
    if ($session->isLoggedIn()) {
       echo "success";
    }


texts: Magento 1.9.3 Automatically generate pdf file of new orders

texts:
In Magento, we can manually create a order confirmation in PDF file in admin. I would like to make this happen automatically. So every time a customer has placed an order, I would like Magento to create a PDF file of the order confirmation, and place it in a certain folder on the server.

Is this possible?


texts: magento2 cron schedule not running, cannot understand why

texts:
Crontab

* * * * * php -c /opt/alt/php56/etc <magento2_path>/bin/magento cron:run | grep -v "Ran jobs by schedule" >> <magento2_path>/var/log/magento.cron.log
* * * * * php -c /opt/alt/php56/etc <magento2_path>/update/cron.php >> <magento2_path>/var/log/update.cron.log
* * * * * php -c /opt/alt/php56/etc <magento2_path>/bin/magento setup:cron:run >> <magento2_path>/var/log/setup.cron.log

Backend configuration:
Group index:

Generate Schedules Every    1
Schedule Ahead for          4
Missed if Not Run Within    10
History Cleanup Every       10
Success History Lifetime    60
Failure History Lifetime    600
Use Separate Process        Yes

Group default:

Generate Schedules Every    15
Schedule Ahead for          20
Missed if Not Run Within    15
History Cleanup Every       10
Success History Lifetime    60
Failure History Lifetime    600
Use Separate Process        No

magento.cron.log and update.cron.log show this:

X-Powered-By: PHP/5.6.19
Content-type: text/html; charset=UTF-8

bin/magento must be run as a CLI application

When I add new products in the catalog the reindex does not happen and the products do not show on the frontend. On the other hand, when I place orders the buyer get the transaction mail.
A manual run of cron:run or indexer:reindex works properly from SSH and the indexes get reindexed.
What am I missing? It's been days and I can't get through it.

UPDATE: changing the crontab rows from php to php-cliresults in clear logs, but still the indexing has to be done manually. The scheduling and execution of cron jobs runs smoothly, according to the table cron_schedule in the database.


texts: AddToCart using GET and Query String in Magento 2.2

texts:
I am currently migrating a store from Magento 1.7 to Magento 2.2

On many of our product pages there is a button to order a free sample which is achieved by adding a product 'free sample' with options that detail the product in question. The adding to cart is done using a GET request like the following:

<button type="button" id="cartbutton" title="sample" class="btn btn-md btn-default" style="height:38px;" onclick="addsample()">&nbsp;Order Free Sample</button>

Can the same be achieved in Magento 2.2?

I have done some research and found that I can get an addtocart url by making a function like the following in my block:

public function getLoadProductAddUrl($id)
{
    $product = $this->_objectManager->create('Magento\Catalog\Model\Product')->load($id);
    return $this->_objectManager->get('Magento\Checkout\Helper\Cart')->getAddUrl($product);
}

And that gives me the following:

  https://tmp.domain/checkout/cart/add/uenc/aHR0cHM6Ly90bXAuZmxvb3JzYXZlL25vY2UtcnViaW8td2FsbnV0LXByZW1pdW0tbGFtaW5hdGUtZmxvb3JpbmctMTJtbS5odG1s/product/113/

This will take me to the shopping cart but nothing is added. I am also aware that there is such a thing as FormKey and I am able to get that with a function in my block like:

public function getFormKey(){
    $formKey = $this->_objectManager->get('Magento\Framework\Data\Form\FormKey');
    return $formKey->getFormKey();
}

But then I am not submitting a form with POST but trying to use GET.

Should the FormKey be added to the URL?
Can I add options to the query string in the same way as it is done in our Magento 1.7 version?

Is it simply not possible to do like this with a GET and query string as the latest best practice security and so on dictates that a form should be used?


texts:
Why the Product's Breadcrumbs template is different from the rest of the pages?
<referenceBlock name="breadcrumbs" template="Magento_Catalog::product/breadcrumbs.phtml">
    <arguments>
        <argument name="viewModel" xsi:type="object">Magento\Catalog\ViewModel\Product\Breadcrumbs</argument>
    </arguments>
</referenceBlock>


texts: Magento 2 Extension - lib folder or through composer

texts:
I am using a third party module for Mailchimp. I've been able to install it through composer and also used it through directory lib in the magento 2 root.

As installing through composer is quite cumbersome task, therefore I was looking whether it will be ok to add my 3rd party library in lib folder for creating an extension to sell it on magento's market place.


texts:
I am trying to override a function in Mage/Core/Model/Email/Template/Filter.php the module i wrote is just a config that looks like this

<?xml version="1.0"?>
<config>
    <modules>
        <Namespace_Module>
            <version>0.1.0</version>
        </Namespace_Module>
    </modules>
    <global>
        <models>
            <module>
                <rewrite>
                    <email_template_filter>Namespace_Module_Model_Email_Template_Filter</email_template_filter>
                </rewrite>
            </module>
       </models>
    </global>
</config>

in Namespace/Module/Mage/Core/Model/Email/Template/Filter.php I have

<?php
class Namespace_Module_Model_Email_Template_Filter extends Mage_Core_Model_Email_Template_Filter
{...
    public function varDirective($construction)
    {

why is this not working?


texts: Create custom currency programmatically in magento

texts:
I want to add my own currency in magento like as other currencies,and also for the created currency I want to set rate.
how I can do this.
Is there any idea?


texts: IWD Store Locator.... Helper Error, No support?

texts:
I've ran into a helper error after installing the IWD store locator extension and after trying their support line for 24 hours and not receiving a response from my email I thought I'd ask the world!

So, the error is...

PHP Fatal error:  Class 'Mage_Storeloctor_Helper_Data' not found in /app/Mage.php on line 547

I know this usually means there's an error in the config.xml (notibly the obvious typo Storeloctor instead of StoreLocator - after checking the config file it shows;

    <helpers>
        <storelocator>
            <class>IWD_StoreLocator_Helper</class>
        </storelocator>
    </helpers>

Helper is defined perfectly (IWD/StoreLocator/Helper/Data.php exists), where am I going wrong?

TIA


texts: How to create zip of folder and download zip in magento 2?

texts:
I want to create and download zip of a folder in my custom module.
I followed this link, but getting fatal error Uncaught Error: Class 'Vendor\Module\Controller\Custom\ZipArchive' not found.
How to accomplish this. please help.


texts: Unable to install Magento2 B2B module extension

texts:
I am installing magento2 B2B extension after creating auth.json and giving proper username and password i am getting following error.

composer require magento/extension-b2b

 [Composer\Downloader\TransportException]
  Invalid credentials for 'https://repo.magento.com/packages.json', aborting.

and my auth.json file contain following code.

{
"http-basic": {
    "repo.magento.com": {
       "username": "muha********",
        "password": "Zx*********"
    }
}

}

anyone can help if possible


texts:
I am on Magento CE 1.9.1.0 - I've successfully installed the sample data as well. I have no issues on my Mac OS X Yosemite however, on my AWS Ubuntu instance, I am getting the following error:

PHP Fatal error:  Call to a member function getBaseMediaPath() on a non-object in /var/www/foobar/app/code/core/Mage/Catalog/Model/Product/Image.php on line 270

Also trying to view the same product in the admin gives me:

PHP Fatal error:  Call to a member function getConfig() on a non-object in /var/www/foobar/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php on line 50

I have PHP GD installed and enabled. The var folder and media folders are set to 777.

All caches have been flushed & disabled, all indexes have been re-indexed.

EDIT: I've just turned on System & Exceptions logging. system.log shows:

2014-12-22T13:38:10+00:00 ERR (3): Warning: include(Mage/Catalog/Model/Product/Media/Config.php): failed to open stream: No such file or directory  in /var/www/foobar/lib/Varien/Autoload.php on line 94
2014-12-22T13:38:10+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Catalog/Model/Product/Media/Config.php' for inclusion (include_path='/var/www/foobar/app/code/local:/var/www/foobar/app/code/community:/var/www/foobar/app/code/core:/var/www/foobar/lib:.:/usr/share/php:/usr/share/pear')  in /var/www/foobar/lib/Varien/Autoload.php on line 94


texts: Hide a Ui Component Field based on condition on product edit

texts:
I have created custom field in Magento 2.4.1 product edit page,
product_form.xml
<field name="type" formElement="select">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Ceymox\DigitalCard\Model\DigitalCard\Options</item>
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">block</item>
                </item>
            </argument>
            <settings>
                <dataType>select</dataType>
                <label translate="true">Digital Card Type</label>
                <dataScope>type</dataScope>
            </settings>
        </field>

        <file name="csv_uploader" >
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string">CSV File</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="componentType" xsi:type="string">fileUploader</item>
                    <item name="notice" xsi:type="string" translate="true">Allowed file type: csv.</item>
                    <item name="allowedExtensions" xsi:type="string">csv</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="digitalcard/index/generate"/>
                    </item>
                </item>
            </argument>
        </file>

        <insertListing name="digitalcard_listing" >
            <settings>
                <dataLinks>
                    <exports>false</exports>
                    <imports>true</imports>
                </dataLinks>
                <autoRender>true</autoRender>
                <selectionsProvider>digitalcard_listing.digitalcard_listing.columns.ids</selectionsProvider>
                <dataScope>digitalcard_listing</dataScope>
                <ns>digitalcard_listing</ns>
            </settings>
        </insertListing>
     </fieldset>

Now I need to hide this field based on condition(based on product type).How can i do this? can anyone help me on this


texts: Magento2 - Inventory source By Product Sku

texts:
I am getting the product inventory source successfully below is my code.

 $sources = $this->getSourceItemsBySku->execute($sku);

 $array = [];

 foreach ($sources as  $index => $source) {

 $array[] = [
         'value' => $source->getSourceCode(),
         'label' => $source->getName()
      ];
 }

Here you can see in an array I am getting value and label like this its showing be value but Label values in null $source->getName() so how I can get source name.


texts:
Have searched and searched but haven’t yet found an answer to this.

In Config > sales > Gift options I have enabled ‘Allow Gift Messages for Order Items’. My question is, can I add a charge for this? Per item?

If so, how would I go about doing this?

Many thanks in advance!

Sorry everyone, but I’m going to give this a bump - surely there must be a way to add a charge to the gift message if one has been entered?

The problem I’m having is that my client charges £3 per item gift wrapped, not one charge per gift wrap, and so I’m even struggling to find a module to achieve this.

But it seems silly to have an additional module anyway if the gift options are already available within Magento - I just need to add a charge per message entered.


texts: CE 1.9.2 - Create Admin accessible grid for viewing log files

texts:
We have created a module that connects to and submits order data to a web-service when a new order is placed an paid for (status = Processing). With every call, we are writing some info to a log file (Successful/Failed/etc).

What I would like to do is push the log entries into the database and create a grid accessible by any admin with permissions to view these log entries. So this will be completely read-only. The grid will show 3 columns -> ID, OrderNumber, and Status (Success/Failed). Clicking on an entry should show them more details about the log entry.

Can anyone please point me towards some online references for implementing this?


texts: Prevent changing of shipping method at Paypal Review page

texts:
I would like to know how to prevent shipping method change at order review page (https://www.mysite.com/paypal/express/review/).

I am using Magento 1.6.0 and Paypal Express Checkout.


texts: "Wrong Entity ID" when Installing Extension (Database Litter?)

texts:
I've run into a dead end trying to install an extension and am hoping for some guidance. The extension is Blackbird_ContentManager -- great extension and support overall, but I can't figure out what's going on here.

At first, I received

Blackbird_ContentManager data: current version - none, required version - 2.2.12

So when I run setup:upgrade, it got to Installing Data and then:

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
update a child row: a foreign key constraint fails
(`db_5798qz73hik`.`eav_entity_attribute`, CONSTRAINT
`EAV_ENTITY_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN
KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON D),
query was: INSERT INTO `eav_entity_attribute` (`entity_type_id`,
`attribute_set_id`, `attribute_group_id`, `attribute_id`, `sort_order`)
VALUES (?, ?, ?, ?, ?)

Sometimes it'll make it it to the "Installing Data" phase of setup, but then I'll receive "Wrong entity ID" error. This is after deleting all relevant eav_* and blackbird_* tables/rows, as well as the entry in setup_module.

Obviously, I'm doing something wrong here, but I'm unsure what to do that I haven't already done and am getting increasingly nervous. Any help would be appreciated!


texts: SUPEE-8788 magento 1.7.0.0 upload image button not responding after patch

texts:
I am having an issue with image upload on backend after apply patch 8788.

I have seen problems with upload image but this I believe is different as upload file doesnt trigger any action or display any error.

Basically buttons 'upload file' and 'remove' dont work, not firing any function, just do nothing.

I can browse file and select a file and open. After that I can see the image ready to upload.

But as I said upload and remove buttons do not respond.

I cant see any issue on server or php issue, only issue I see is js on console:

Things I have tried:

-Cache is cleared, even minifycache.

-all permissions on js and media. group is also apache group.

-Checked that modifications are made, patch was applied successfully.

-js files are present (instance.js, browser.js, flow.min.js, fusty-flow.js, fusty-flow-factory.js...)

Any help will be appreciated.


texts: Magento2 - Customer group price not reflect after login

texts: Magento2.1.9 without login when configurable product add to cart, after login with customer not reflecting for customer group price ( tier price) in cart,minicart, checkout section is working fine.


texts: Migration error Warning: DOMDocument::loadXML(): Empty string supplied as

texts:
[![enter image description here][1]][1][![enter image description here][2]][2]I am trying to migrate data from magento 1 to magento 2. Magento 1 is on abc.com and magento 2 is on xyz.com domains. I am getting this error:

  Warning: DOMDocument::loadXML(): Empty string supplied as input in
  /var/www/siteurl/vendor/magento/framework/Config/Dom.php on line 392

After running this command :

sudo php /var/www/siteurl/bin/magento migrate:settings -r /var/www/siteurl/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/

Please help me what I am missing.


texts: How to get the total excluding tax of each tax class?

texts:
I want to display the amount excluding tax for each tax class, is there a variable ?

In my example :

The amount excluding tax for the 20% tax must be € 10.13
The amount excluding tax for the 5.5% tax must be € 24.11


texts:
We had followed the add order process of
Magento 2 - Create order using REST API on the process of "Place Order" using the API "$base_url/index.php/rest/V1/guest-carts/56241bf6bc084cd7589426c8754fc9c5/order" with the params of { "paymentMethod": {  "method": "checkmo"  } } as put Method we are getting "Please select a valid payment method." from Rest API.


texts: How to call a function only when user switched on my custom step?

texts:
How i can check if user is on my custom step?
I need to call certain function ONLY if he is on my custom step ( after shipping step, before payment ).
Now i created custom step by js-component and functions in this component are called as soon as checkout page is downloaded ( on shipping step ) but i need to perform logic only on next, custom step.


texts: Magento 1.8.1.0 WYSIWYG editor is not displaying thumbnails in image manager

texts:
I am posting this for comments about the bug, and to help anyone who have the same issue. (answer posted by myself)

When using the WYSIWYG editor and inserting images the image manager is not displaying the thumbnail images.

Looking at the image URL produced by magento I can see that the url is missing the /wysiwyg/ portion

http://site.domain/media//.thumbs/ex_logo_sm.jpg?rand=1392103618

It looks purely missing, as taken note by the double // in the url


texts:
I am getting this error after executing the follow commands in terminal (os x)

php bin/magento module:enable WeltPixel_Backend --clear-static-content
php bin/magento module:enable WeltPixel_OwlCarouselSlider --clear-static-content
php bin/magento setup:upgrade

I've installed all the right files in the right folders...
But whenever I execute one of these commands I get the following error:

Parse error: parse error in /Applications/magento-2.1.2-0/apps/magento/htdocs/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

Any idea how I can solve this?

I am using PHP 5.5.31


texts: I need to add some blocks on New Product view Page for Quick view

texts:
i am trying to create a new product detail page for only quick view section, rest of functionality i have completed and my final URL of product is like

https://example.com/product_quick_view/product/quickview/id/18295

I have added this functionality as a new module. most of things are working fine but few blocks are not loading because of those blocks are define in .xml file only for this <catalog_product_view> page.

i wonder is there any option in magento layout files that i can create above type of tag and import blocks into my new product view phtml file.

My Class name is: ProductQuickView_Block_Product

Template file is coming from /template/quick-view/product.phtml

i tried other method like this:

<?php echo $layout->createBlock('catalog/product_view_media')->setTemplate('catalog/product/view/media.phtml')->toHtml(); ?>

and its working fine but i don't think so its a clean way to do rest of stuff...i will appreciate if anyone can help me to do this in layout way.


texts: I would like to ask if there is a way to override the design of the custom 3rd party module in magento 2 where I can put my own design and still fetch the data from the database. I'd appreciate any help with regards to this. thanks!


texts: Pass Custom Data from Product View to Cart

texts:
I have a custom input on the product view page just below the options. This is visible for all products.

I want to show the contents of that input on the cart page in the list of product variants, shown below:

I know I could create a product option but I don't want to have to apply this option to every single product individually.

Is there a way to get this done and if so, how would I go about it?

If anyone needs any more information, please let me know.


texts: How to add foursixty app code to home page?

texts:
<script data-for-url="true"
    data-open-links-in-same-page="false"
    data-feed-id="courtney-allegra-swim"
    src="//foursixty.com/media/scripts/fs.embed.v2.js">
</script>

<style>div.fs-has-links { text-indent: -9999px; position: static; font-weight: 500; } .fs-has-links::after {  padding:  14px 21px; border: 2px solid #fff; color:#fff; content: "SHOP NOW"; text-indent: 0; display: block; font-size: 10pt; margin: 10px; }.fs-desktop .fs-timeline-entry div.fs-text-container { display: flex; flex-direction: column;align-items: center; justify-content: center; display: -webkit-flex;  -webkit-flex-direction: column;  -webkit-align-items: center;  -webkit-justify-content: center;  display: -ms-flexbox;  -ms-flex-direction: column;  -ms-flex-align: center;  -ms-flex-pack: center; transition: opacity .25s; } .fs-desktop .fs-timeline-entry .fs-text-container:hover { opacity: 1; } .fs-wrapper div.fs-text-container .fs-entry-title, div.fs-detail-title{font-family:Times New Roman, serif;font-style:italic;font-weight:normal;}div.fs-text-container .fs-entry-date, div.fs-detail-container .fs-post-info, div.fs-wrapper div.fs-has-links::after, .fs-text-product, .fs-overlink-text{font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-style:normal;font-weight:bold;}.fs-wrapper div.fs-text-container * {color:#fff}.fs-wrapper div.fs-text-container {background-color:rgba(0,0,0,0.8); margin: 0px}div.fs-entry-date{display:none}div.fs-entry-title{display:none}.fs-wrapper div.fs-timeline-entry{ margin: 5px }</style>


texts: How to exclude order and customer data while migrating from magneto 1 into magento 2?

texts:
How to skip order and customer data while migrating from magneto 1 into magento 2

Magento 1 version : 1.9.2.4

Magento 2 version : 2.3.4


texts: Run CSS queries against result in controller tests

texts: In Ecomdev_PHPUnit is there already the possibility to run CSS queries (assertions) against the output in controller tests or do I have to utilize Zend_Dom_Query manually?


texts: 20% Off one item in a category not working

texts: I'm trying to give 20% off one item in a particular category but the rule I set up is giving 20% off more every item from that category added to the shopping cart.  I have the rule set up to limit discount to one item but it's not working.  Any suggestions?


texts: How to use action method of core module (observer.php) in my custom module controller.?

texts:
As I am new to PHP as wel MAGENTO
I want to use core sitemap controller action in my own custom module.
 suggest me how.

  public function scheduledGenerateSitemaps($schedule)
  {
        $errors = array();

        // check if scheduled generation enabled
        if (!Mage::getStoreConfigFlag(self::XML_PATH_GENERATION_ENABLED)) {
            return;
        }

        $collection = Mage::getModel('sitemap/sitemap')->getCollection();
        /* @var $collection Mage_Sitemap_Model_Mysql4_Sitemap_Collection */
        foreach ($collection as $sitemap) {
            /* @var $sitemap Mage_Sitemap_Model_Sitemap */

            try {
                $sitemap->generateXml();
            }
            catch (Exception $e) {
                $errors[] = $e->getMessage();
            }
        }

        if ($errors && Mage::getStoreConfig(self::XML_PATH_ERROR_RECIPIENT)) {
            $translate = Mage::getSingleton('core/translate');
            /* @var $translate Mage_Core_Model_Translate */
            $translate->setTranslateInline(false);

            $emailTemplate = Mage::getModel('core/email_template');
            /* @var $emailTemplate Mage_Core_Model_Email_Template */
            $emailTemplate->setDesignConfig(array('area' => 'backend'))
                ->sendTransactional(
                    Mage::getStoreConfig(self::XML_PATH_ERROR_TEMPLATE),
                    Mage::getStoreConfig(self::XML_PATH_ERROR_IDENTITY),
                    Mage::getStoreConfig(self::XML_PATH_ERROR_RECIPIENT),
                    null,
                    array('warnings' => join("\n", $errors))
                );

            $translate->setTranslateInline(true);
        }
  }

This I have to use in my IndexController.


texts: Configurable Products Current Variations Grid Custom Attribute

texts:
When creating a configurable product does anyone know of a way to add a custom product attributes to the variations grid so you don't have to then go into to each simple product and enter it in seperately. Screenshot of the area I mean below.

I've seen this Magento 2: How to add a custom attribute column to the child products grid view in configurable product in backend however it no longer seems to work.


texts: magento CE 1.9 responsive theme - whats its base?

texts:
Does anyone know what the new responsive theme is based on? e.g. bootstrap, zurb, home grown etc?

Prior to the release i'd been looking hard at the waterlee project (http://waterlee.jakesharp.co/) which is a foundation 5 implementation, but i can't see anything that describes the new rwd theme from a standards\roadmap point of view.


texts: Magento 2 Collection path wrong but still module is working and saving the data,how possible?

texts:
I am developing a custom module to save data in custom table. I have created model and resourcemodel classes and also collection.php

<?php

namespace Vendorname\Modulename\Model\ResourceModel\test;

use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;

class Collection extends AbstractCollection
{
    /**
     * Define model & resource model
     */
    protected function _construct()
    {
        $this->_init(
            'Vendorname\Modulename\Model\Test',
            'Vendorname\Modulename\Model\ResourceModel\Test'
        );
    }
}

but I got strange when I forgot to gave the correct path in same file .
and it was the below
 namespace Vendorname\Modulename\Model\ResourceModel; (test folder was forgot), but code was working properly and was able to save the data.

Can anybody share how is the possible if namespace is wrong then why code is working?


texts: Compilation error "[ReflectionException] Class does not exist" - Magento 2.0.7

texts:
Yesterday I run the command:

sudo -u magento bin/magento setup:di:compile

And I've got a strange error, the site seems to be running 100% but before Yesterday I didn't use to get any error during compilation.

Is there any known issue about that? Magento version 2.0.7.

See image below:


texts: Displaying max price with grouped products

texts:
Is there a way for me to display the highest price rather than the lowest price on a grouped product.

I've had a look in price.phtml from template/catalog/product but can't quite see how this would be accomplished.


texts: magento 2 not working after the command bin/magento setup:di:compile

texts:
I ran below Command:

bin/magento setup:di:compile

I have tried to upgrade my module with:

$ php bin/magento setup:upgrade

The end result was:

  Please re-run Magento compile command

After doing this magento site is not working.


texts: How to add logic on default search database query to modify product collection?

texts: I wanted to fetch products on the basis of extra logic on search results? How can i do it?


texts: How to turn off / on the var/log/debug.log of Magento 2.x.x? Is there a way to set the log level?


texts: add custom section in admin sales order view in Magento

texts:
I am stuck in custom code. Actually I want to add custom information section on sales order view page in admin like Account Information', 'Billing Address', 'Shipping Address'.
But I don't want to edit any core file like phtml, xml etc.

Here I am attaching screen-shot for more clear to me.

Please help me to get resolve this issue.

Thanks in advance!


texts: PayPal Express Checkout 'Amount Paid' not showing

texts:
I have PayPal Express Checkout activated as a payment method on my store. When a customer orders I receive the money via PayPal and the order is stored in Magento, however the 'amount paid' shows as 0.00.

Is there a setting I am missing to get the payment amount to show?


texts: cron jobs were running, then not at some point

texts:
It doesn't seem like the cron job is doing anything.  I keep getting warnings in the admin panel that the indexes are invalid.  The crontab file is as expected.  The emails are not getting sent either.

#~ MAGENTO START
* * * * * /opt/plesk/php/7.2/bin/php /var/www/vhosts/steamspeed.com/httpdocs/bin/magento cron:run 2>&1 | grep -v "Ran jobs by schedule" >> /var/www/vhosts/var/log/magento.cron.log
* * * * * /opt/plesk/php/7.2/bin/php /var/www/update/cron.php >> /var/www/httpdocs/var/log/update.cron.log
* * * * * /opt/plesk/php/7.2/bin/php /var/www/httpdocs/bin/magento setup:cron:run >> /var/www/httpdocs/var/log/setup.cron.log
* * * * * /opt/plesk/php/7.2/bin/php /var/www/httpdocs/bin/magento php indexer:reindex
#~ MAGENTO END
* * * * * date >> ~/cron-test.txt

So, I added that cron-text.txt job, and it adds the date/time to that txt file.

~$ cat cron-test.txt
Tue Dec 24 01:30:01 UTC 2019

Currently, my crown config is set to defaults.  Any suggestion why nothing seems to be happening?


texts: Magento 2.2.5 Delete Url Rewrites older than 1 Year

texts:
Is it possible to delete Url_rewrites older than one year?

We have migrated from Magento1 to Magento 2 and kept all URLs for SEO reasons. BUT the table in Mage1 and Mage2 is really huge. Now we want to delete only the urls older  than 1year.


texts: Magento 1.9.0.1: I am getting this error when creating new store view. please help!

texts:
SQLenter code hereSTATE[21000]: Cardinality violation: 1241 Operand should contain 1 column(s)

Trace:
#0 /public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_st...', Array)
#4 /public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_st...', Array)
#5 /public_html/lib/Zend/Db/Adapter/Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 /public_html/app/code/core/Mage/Core/Model/Store.php(319): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_Store), Array, 'code')
#8 /public_html/app/code/community/Ameex/Adminlog/Model/Observer.php(29): Mage_Core_Model_Store->load(Array)
#9 /public_html/app/code/core/Mage/Core/Model/App.php(1338): Ameex_Adminlog_Model_Observer->getLog(Object(Varien_Event_Observer))
#10 /public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Ameex_Adminlog_Model_Observer), 'getLog', Object(Varien_Event_Observer))
#11 /public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#12 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(527): Mage::dispatchEvent('controller_acti...', Array)
#13 /public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#14 /public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#15 /public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('save')
#16 /public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#18 /public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /public_html/index.php(87): Mage::run('', 'store')
#20 {main}

NOTE: I disabled the Ameex_Adminlog module but the problem still exists.


texts: how to Store Values In Database for Custom Grid Serializer (Customer)?

texts:
I am Created Custom Module for Customer Grid Serializer and now I want to Store That Values in Diffrent Table.
Can Any one Help me? Any Kind of help will appreiciated.

My Grid Code : app/code/local/Sigmasolve/Recipe/Block/Adminhtml/Recipe/Edit/Tab

     <?php

class Sigmasolve_Recipe_Block_Adminhtml_Recipe_Edit_Tab_Customers extends Mage_Adminhtml_Block_Widget_Grid
{
   public function __construct()
    {
        parent::__construct();
        $this->setSaveParametersInSession(false);
        $this->setUseAjax(true);
        $this->setId('recipe_customers');
    }
    protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('customer/customer_collection')
            ->addNameToSelect();

        $this->setCollection($collection);
        return parent::_prepareCollection();
    }
    protected function _prepareColumns()
    {
        $this->addColumn('selected_customers', array(
            'header'    => $this->__('Popular'),
            'type'      => 'checkbox',
            'index'     => 'entity_id',
            'align'     => 'center',
            'field_name'=> 'selected_customers',
            'values'    => $this->getSelectedCustomers(),
        ));

        $this->addColumn('name', array(
            'header'    => $this->__('Name'),
            'index'     => 'name',
            'align'     => 'left',
        ));

        return parent::_prepareColumns();
    }
    public function getGridUrl()
    {
        return $this->getUrl('*/*/customersGrid', array('_current' => true));
    }
}


texts: Magento Store product image another domain?

texts:
How to store the product images in another domain?
for example, My site is www.mytestsite.com. We need to store the product image in subdomain as "media.mytestsite.com".
Is it Possible?

We also try to change the media url in backend. But image not uploading. It say as "Unable to create directory 'media.mytestsite.com/media/tmp/catalog/product'. "


texts: How to create fully custom module for sales person registration just like Add New Customer does in manage customer

texts:
I am using the magento version 1.9.1.0 I want to add new module for sales person registration in magento admin, where admin can add sales person and edit it. I have create the menu for that but don't know how will I do. I want to the same as Customer->manage customer->Add New Customer. I want to add sales person in my case. I am new in magento. Also I have tried many on internet but I can't find the exact solution, so I have posted here.

I have tried the following

http://www.silksoftware.com/magento-module-creator/#instructions

But I am confused, how will do the form and create attribues for database. I want to use only few filed just like name,username,password,email,address, country, city. So please help me to get this thing done.


texts: Run Integration/Functional Tests on an Existing Database for Customer Specific Projects

texts:
We develop customer specific projects in Magento 2.3.x, with different customer specific extensions.

Development is based on a copy of the production database (master.sql), so we do not usually use install scripts to setup the full customer data and products, but do this in the admin panel, if possible.

The master.sql contains the product catalog, but not the customer data.

Thus said, we did not do much automatic testing yet - for reasons.

We want to introduce automated testing now, on "all levels" Magento 2 provides.  But it would not make sense to reengineer the full project fixture wise. This is why we would like to base test tests for our custom modules on the master.sql database.

For ApiFunctional tests for example, we found out already, that we can set in phpunit_rest.xml

    <const name="TESTS_CLEANUP" value="disabled"/>
    <const name="TESTS_MAGENTO_INSTALLATION" value="disabled"/>

and in install-config-mysql.php we can use the MySQL credentials for the just imported master.sql and set 'cleanup-database' => false,

Next we found out, that when using fixtures from the sales module vendor/magento/magento2-base/dev/tests/integration/testsuite/Magento/Sales/_files/default_rollback.php cleans up all orders, products and stocks. That is why we would patch that file.

And here it begins to feel messy, that is why I asking here

Is anybody else using this approach?
Is it a very bad idea or could it work?
What are you "best practices" and tricks to make this work?


texts: Magento 2 How to Get selected data in innerlisting using ui component?


texts:
We can do db logging via

<preference for="Magento\Framework\DB\LoggerInterface" type="Magento\Framework\DB\Logger\File" />

But it's Module Wise.

How can we do whole Magento wise (Fronend/Backend) or display all queries at end of page?


texts:
In Magento 1.9.3 I created a custom product attribute called is_sample. Its a text field. When a product is added to the cart I am trying to set that value in my bbserver, but it is not working. Here is my code:

$item = $obs->getQuoteItem();
$item->setCustomPrice($price); // works
$item->setIsSample('1'); // does NOT work

Any idea what the problem might be?

Magento 1.9.3.x


texts: Magento 2 : What is beforeMethods & afterMethods in payments.html

texts:
From where template is coming -

<!-- ko foreach: getRegion('beforeMethods') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->

<!-- ko foreach: getRegion('payment-methods-list') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->

<!-- ko foreach: getRegion('afterMethods') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!-- /ko -->

Unable to find from where getTemplate is coming ?


texts: I want show price after edit a product(admin panel->catalog->products->edit product) in magento 2.3

texts:
On this1 online shop, the price("pret") for all variation is same.
I want that when I edit (and save) a product, to display the price on grid with products in admin.
I think that I must take price from variations and, after save, to put  this price in grid.

Thank you.


texts: Magento 2 Category Description not showing

texts:
I have a Magento 2 store and I am trying to get the category descriptions to be visable. I am not sure when I type in text to the category admin in the description text box and click save, clear cache it does not show? So I found this file desc_main_column.phtml which I believe contains the code to show a category description. So I tried to var_dump the

var_dump($this->helper('Magento\Catalog\Helper\Output')->categoryAttribute($block->getCurrentCategory(), $_description, 'description') );

However it shows not show any data. So I am not sure why and more importantly how to get the below code to show the category description content.

<?php
    $_category_desc = $this->helper('Smartwave\Porto\Helper\Data')->getConfig('porto_settings/category/category_description');
?>
<?php if ($_category_desc == "main_column" && $_description = $block->getCurrentCategory()->getDescription()): ?>
   <div class="category-description">
       <?php echo $this->helper('Magento\Catalog\Helper\Output')->categoryAttribute($block->getCurrentCategory(), $_description, 'description') ?>
   </div>
<?php endif; ?>


texts: Magento2 serialize data before displaying in grid

texts:
How can i unserialize data before displaying in Grid

    public function _construct()
    {
        parent::_construct();
        $this->setId('inquiryGrid');
        $this->setDefaultSort('inquiry_id');
        $this->setDefaultDir('DESC');
        $this->setUseAjax(true);
        $this->setSaveParametersInSession(true);
    }

    public function _prepareCollection()
    {
        $collection = $this->collectionFactory->create();
        $this->setCollection($collection);

        return parent::_prepareCollection();
    }

    public function _prepareColumns()
    {
        $this->addColumn(
            'inquiry_id',
            [
            'header'    => __('ID'),
            'index'     => 'inquiry_id',
            ]
        );

        $this->addColumn('product_id', ['header' => __('Product Id'), 'index' => 'product_id']);
        $this->addColumn('product_name', ['header' => __('Product Name'), 'index' => 'product_name']);
        $this->addColumn('product_sku', ['header' => __('Product SKU'), 'index' => 'product_sku']);
        $this->addColumn('first_name', ['header' => __('Name'), 'index' => 'first_name']);
        // $this->addColumn('last_name', ['header' => __('Last Name'), 'index' => 'last_name']);
        $this->addColumn('email', ['header' => __('Email'), 'index' => 'email']);
        $this->addColumn('telephone', ['header' => __('Phone Number'), 'index' => 'telephone']);

        // $this->addColumn(
        //     'published_at',
        //     [
        //         'header' => __('Published On'),
        //         'index' => 'published_at',
        //         'type' => 'date',
        //         'header_css_class' => 'col-date',
        //         'column_css_class' => 'col-date'
        //     ]
        // );

        // $this->addColumn(
        //     'created_at',
        //     [
        //         'header' => __('Created'),
        //         'index' => 'created_at',
        //         'type' => 'datetime',
        //         'header_css_class' => 'col-date',
        //         'column_css_class' => 'col-date'
        //     ]
        // );

        $this->addColumn(
            'action',
            [
                'header' => __('View Details'),
                'type' => 'action',
                'getter' => 'getId',
                'actions' => [
                    [
                        'caption' => __('View Details'),
                        'url' => [
                            'base' => '*/*/edit',
                            'params' => ['store' => $this->getRequest()->getParam('store')]
                        ],
                        'field' => 'inquiry_id'
                    ]
                ],
                'sortable' => false,
                'filter' => false,
                'header_css_class' => 'col-action',
                'column_css_class' => 'col-action'
            ]
        );

        return parent::_prepareColumns();
    }

    public function getRowUrl($row)
    {
        return $this->getUrl('*/*/edit', ['inquiry_id' => $row->getId()]);
    }

    public function getGridUrl()
    {
        return $this->getUrl('*/*/grid', ['_current' => true]);
    }
}


texts: Cached images are missing from frontend and product pages

texts: Certain images are missing from my frontend. The cached image location seems to be wrong however all the rest of the images are there and intact. I am just wondering why those images are not automatically generated upon visiting the product page? The issue is that I have 50K images if I generate those using bin/magento catalog:images:resize command it will take forever.


texts: Deprecated: The each() function is deprecated magento 2 php 7.1.25 vendor/colinmollenhour/cache-backend-file/File.php on line 81

texts:
Getting this error while moved files to another location on same server

Deprecated: The each() function is deprecated.

This message will be suppressed on further calls in:

  /vendor/colinmollenhour/cache-backend-file/File.php on line 81

Any help would be appreciated


texts:
I need to create the new store using this tutorial: http://blog.chapagain.com.np/magento-setup-multiple-website/

symbolic links, how can I do on windows localhost?

ln -s ../your-new-website/app ./app
ln -s ../your-new-website/errors ./errors
ln -s ../your-new-website/includes ./includes
ln -s ../your-new-website/js ./js
ln -s ../your-new-website/lib ./lib
ln -s ../your-new-website/media ./media
ln -s ../your-new-website/skin ./skin
ln -s ../your-new-website/var ./var


texts:
The rest documentation for Magento 1 make mention of an oauth_admin.php file

$callbackUrl = "http://yourhost/oauth_admin.php";
$temporaryCredentialsRequestUrl = "http://yourhost/oauth/initiate?oauth_callback=" . urlencode($callbackUrl);
$adminAuthorizationUrl = 'http://yourhost/admin/oAuth_authorize';
$accessTokenRequestUrl = 'http://yourhost/oauth/token';
$apiUrl = 'http://yourhost/api/rest';
$consumerKey = 'yourconsumerkey';
$consumerSecret = 'yourconsumersecret';

This appears to be the file/URL that oauth will redirect to after the User Authorization step.

The docs fails to clearly say what this oauth_admin.php program/script needs to do with the oauth_token and and oauth_verifier variables it receives in order to work with the rest of the code sample.

Does this file exist anywhere in the docs and/or elsewhere?  If not is there known science for getting Magento 1's three legged oauth working?


texts: Watermark get black background when transparent

texts:
I've installed PATCH SUPEE 9767 on my magento 1.9.2.4 shop.

Now i've uploaded a new Watermark but the background changes to black.

Is this a problem since the new update? On a other magento 1.9.2.4 installation where the update isn't installed there is the background still transparant.


texts: how to call a phtml file in the success page in a proper way?

texts:
I have a template in template/checkout/onepage/hello.phtml

I want to include this phtml file in the success page, i.e template/checkout/success.phtml

So I have created a block in the checkout.xml inside the "checkout_onepage_success" handle as:

<checkout_onepage_success translate="label">
    <label>One Page Checkout Success</label>
    <reference name="root">
        <action method="setTemplate"><template>page/2columns-right.phtml</template></action>
    </reference>
    <reference name="content">
         <block type="core/template" name="onepagehello" template="checkout/onepage/hello.phtml"/>
        <block type="checkout/onepage_success" name="checkout.success" template="checkout/success.phtml"/>
    </reference>
</checkout_onepage_success>

And this phtml file gets rendered in the success page on the top of the page.

When I write getChildHtml(onepagehello); in success.phtml page, then nothing comes.

I want to know when getChildHtml() works and when the block gets rendered ?
I want to get "hello.phtml" from getChildHtml(), so that I can put this block wherever necessary throughout the page.


texts: How Can I display All products in one cms page in Magento 1?

texts:
I am using Magento 1.9.3

There are 8000 products in my website and I want to display all of them in one cms page.

I have added below code in my cms page:

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}

But it didn't work. it displays only 9 products.

So what can I do to display all products in one cms page?


texts:
Once again apologies as this question has most definitely been asked before.

I have magento 1.9 2.1 If you are logged in as a guest and add an item to your shopping cart the shipping charge does not show up. where if you are logged in it appears.

my shipping is basic as i do not offer multiple shipping options, just spend under a certain amount and pay £* shipping or spend over a certain amount and get FREE shipping.

I was wondering if there is a way that allows any customer to see the shipping charge in there shopping cart before going through the checkout process.

Hope that makes sense.


texts: How to move page mail title after category description in magento 2.3.1

texts:
app/design/frontend/vendorname/modulename/Magento_Catalog/layout/catalog_category_view.xml
<move element="page.main.title" destination="main.category.col.1" after="category.description"/>

So how to category name after category description move in magento 2.3


texts: How to add a custom product collection like cross-sell, up-sell, related products in Magento 2.3?

texts:
I'm currently working on a shopping project for a water management company using Magento 2.3. The client asking a new product collection named consumable products for each product, like related, up-sell, cross-sell. I need to develop for adding consumable products of each product in the backend like related, up-sell and cross-sell. Please guide me to do this.

Thanks in Advance


texts: Warning: fwrite(): SSL: Broken pipe when sending mails from Magento messaging queue

texts:
We have to send multiple emails through Magento 2 messaging queue and for emails, we are using SendGrid SMTP, and the module used within Magento to integrate this is of Mageplaza.
When we start the queue, the first few emails send fine without any issue but after a few we receive:

Sendgrid SMTP connection timed out

After this, we start receiving the following error:

Warning: fwrite(): SSL: Broken pipe in vendor/zendframework/zend-mail/src/Protocol/AbstractProtocol.php on line 260

We have found this fix of the above error and override the Mageplaza SMTP module to apply this fix. This does fix the issue but now again after the first few emails, the emails are getting failed and we are getting the following error:

Cannot issue HELO to existing session

The method used to send emails is following:
public function sendEmail($data = null)
{
    try {
        $this->inlineTranslation->suspend();

        $sender = [
            'name' => $this->escaper->escapeHtml($data['sender_name']),
            'email' => $this->escaper->escapeHtml($data['sender_email']),
        ];

        $transport = $this->transportBuilder
            ->setTemplateIdentifier($data['email_template'])
            ->setTemplateOptions(
                [
                    'area' => \Magento\Framework\App\Area::AREA_FRONTEND,
                    'store' => $this->storeManager->getStore()->getId()
                ]
            )
            ->setTemplateVars($data['template_vars'])
            ->setFromByScope($sender)
            ->addTo($data['customer_email'])
            ->getTransport();

        $transport->sendMessage();

        $this->inlineTranslation->resume();

        return true;
    } catch (\Exception $e) {
        $this->logger->critical($e->getMessage());
    }

    return false;
}

We are using Magento enterprise 2.3.3, any help would be appreciated.


texts: Magento 2 customer_register_success event with Observer email template

texts:
I want to send an email to the admin of the website whenever a new user creates an account.

Everything works fine, except that the email sent does not contain the Customer Name and Store Name.

It looks like if the email is sent before the user is created in the database.

Here is  my observer

/**
 * @var TransportBuilder
 */
protected $transportBuilder;

/**
 * @var StoreManagerInterface
 */
protected $storeManager;

/**
 * @var LoggerInterface
 */
protected $logger;

/**
 * @param TransportBuilder $transportBuilder
 * @param StoreManagerInterface $storeManager
 * @param LoggerInterface $logger
 */
public function __construct(
    TransportBuilder $transportBuilder,
    StoreManagerInterface $storeManager,
    LoggerInterface $logger
) {
    $this->transportBuilder = $transportBuilder;
    $this->storeManager = $storeManager;
    $this->logger = $logger;
}

/**
 * @param \Magento\Framework\Event\Observer $observer
 * @return $this
 */
public function execute(\Magento\Framework\Event\Observer $observer)
{
   $customer = $observer->getEvent()->getCustomer();

    // If customer data is empty then doesn't need to process
    if (!$customer) {
        return $this;
    }

    /* Receiver Detail the person who is going to receive the info that user logged in*/
    $receiverInfo = [
        'name' => 'Admin',
        'email' => 'ovazquez@transom-group.com'
    ];

    $store = $this->storeManager->getStore();

    $templateParams = ['store' => $store, 'customer' => $customer, 'administrator_name' => $receiverInfo['name']];

    $transport = $this->transportBuilder->setTemplateIdentifier(
        'phpcuong_transactional_email_customer_register_success_template'
    )->setTemplateOptions(
        ['area' => 'frontend', 'store' => $store->getId()]
    )->addTo(
        $receiverInfo['email'], $receiverInfo['name']
    )->setTemplateVars(
        $templateParams
    )->setFrom(
        'general'
    )->getTransport();

    try {
        // Send an email
        $transport->sendMessage();
    } catch (\Exception $e) {
        // Write a log message whenever get errors
        $this->logger->critical($e->getMessage());
    }
    return $this;
}

}

The problem is in

 $customer = $observer->getEvent()->getCustomer();

It´s not giving any data about the customer.

This is my events.xml file

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">

<event name="customer_register_success">
    <observer name="phpcuong_transactional_email_customer_register_succes" instance="PHPCuong\TransactionalEmail\Observer\CustomerLoginSuccess" />
</event>

And finally this is the code for my email template

 {{template config_path="design/email/header_template"}}

{{trans "Hello %administrator_name," administrator_name=$administrator_name|row}}

{{trans 'The customer named %customer_name created an account in %store_name:' customer_name=$customer store_name=$store.getFrontendName()|row}}

{{trans "You don't need to do anything, this email helps you to track the activations of the customers."|row}}

{{template config_path="design/email/footer_template"}}

Thank you and regards!


texts:
I followed this instructions to enable captcha for registration form on site that use rwd custom theme:
https://magentoexplorer.com/how-to-enable-captcha-in-magento

And I read this post: CAPTCHA is not shown at Login/register form

and this: https://stackoverflow.com/questions/42516422/enable-captcha-on-magento-1-9

But the captcha not show.

Any suggest to solve this issue?


texts: Applying patch throws an error, but no .rej file created

texts:
When I applied today's patch (https://magento.com/security/patches/supee-7405), it thrown this error:

  Hunk #1 FAILED at 227. 1 out of 1 hunk FAILED -- saving rejects to
  file lib/Varien/Io/File.php.rej

However there is no such file called File.php.rej.

I am not sure what does this mean?


texts: What is the correct way to update the admin favicon? I assume copying over skin/adminhtml/default/default/favicon.ico is incorrect.


texts:
I have display description on product view page using xml
below:

<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="product/view/attribute.phtml" group="detailed_info">
    <arguments>
        <argument name="at_call" xsi:type="string">getDescription</argument>
        <argument name="at_code" xsi:type="string">description</argument>
        <argument name="css_class" xsi:type="string">description</argument>
        <argument name="at_label" xsi:type="string">none</argument>
        <!--argument name="title" translate="true" xsi:type="string">Details</argument-->
    </arguments>
</block>

but I want to display product listing page? how to display it.


texts:
Is there any way to store checkout custom field data to checkout session? If possible how can I retrieve data?

Created an event

<?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="checkout_onepage_observer" instance="Mageplaza\HelloWorld\Observer\TestObserver" />
    </event>
</config>

Observer code-

 <?php
    namespace Oye\Deliverydate\Model\Observer;
    use Magento\Framework\Event\Observer as EventObserver;
    use Magento\Framework\Event\ObserverInterface;

    /**
     * Class SaveDeliveryDateToOrderObserver
     * @package Oye\Deliverydate\Model\Observer
     */
    class SaveDeliveryDateToOrderObserver implements ObserverInterface
    {
        /**
         * @var \Magento\Framework\ObjectManagerInterface
         */
        protected $_objectManager;

        /**
         * @param \Magento\Framework\ObjectManagerInterface $objectmanager
         */
        public function __construct(\Magento\Framework\ObjectManagerInterface $objectmanager)
        {
            $this->_objectManager = $objectmanager;
        }

        /**
         * @param EventObserver $observer
         * @return $this
         */
        public function execute(EventObserver $observer)
        {
            $order = $observer->getOrder();
            $quoteRepository = $this->_objectManager->create('Magento\Quote\Model\QuoteRepository');
            $quote = $quoteRepository->get($order->getQuoteId());
            $order->setDeliveryDate( $quote->getDeliveryDate() );
            //echo $quote->getDeliveryDate();
           // exit();

        }

    }

In the observer last line I tried to echo deliverydate custom field value
using echo $quote->getDeliveryDate(); but not getting that value. Can I use session to store these custom checkout field value?


texts: How to add custom tab in edit form in admin magento2?

texts:
In the custom edit form, I want to add a custom tab in admin form.

Someone plz help me to solve this


texts: Create custom image attribute for category size chart

texts:
I want to create an image attribute in category which maps to size chart in PDP.
Following is my install script and config.xml file.

My attribute is created in eav_attribute table but it is not mapped to category table. So I get an error while saving the field. Can anyone help me with right code to create category attribute as well as save in respective category table.

config.xml

<global>
<resources>
            <catalogsize_setup>
                <setup>
                    <module>XYZ_Catalog</module>
                    <class>Mage_Eav_Model_Entity_Setup</class>
                </setup>
            </catalogsize_setup>
</resources>
<global>

Install script

$installer = $this;
$installer->startSetup();
$attribute  = array(
    'type' => 'varchar',
    'label'=> 'Size Chart',
    'input' => 'image',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => true,
    'default' => "",
    'group' => "General Information"
);
$installer->addAttribute('catalog_category', 'size_chart', $attribute);
$installer->endSetup();

Error while saving attribute in category page back end:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'size_chart' in
  'field list', query was: INSERT INTO catalog_category_flat_store_2
  (entity_id,parent_id,created_at,updated_at,path,position,level,children_count,store_id,all_children,available_sort_by,children,custom_apply_to_products,custom_design,custom_design_from,custom_design_to,custom_layout_update,custom_use_parent_settings,default_sort_by,description,display_mode,filter_price_range,image,include_in_menu,is_active,is_anchor,landing_page,meta_description,meta_keywords,meta_title,name,page_layout,path_in_store,size_chart,url_key,url_path)
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE
  entity_id = VALUES(entity_id), parent_id = VALUES(parent_id),
  created_at = VALUES(created_at), updated_at =
  VALUES(updated_at), path = VALUES(path), position =
  VALUES(position), level = VALUES(level), children_count =
  VALUES(children_count), store_id = VALUES(store_id),
  all_children = VALUES(all_children), available_sort_by =
  VALUES(available_sort_by), children = VALUES(children),
  custom_apply_to_products = VALUES(custom_apply_to_products),
  custom_design = VALUES(custom_design), custom_design_from =
  VALUES(custom_design_from), custom_design_to =
  VALUES(custom_design_to), custom_layout_update =
  VALUES(custom_layout_update), custom_use_parent_settings =
  VALUES(custom_use_parent_settings), default_sort_by =
  VALUES(default_sort_by), description = VALUES(description),
  display_mode = VALUES(display_mode), filter_price_range =
  VALUES(filter_price_range), image = VALUES(image),
  include_in_menu = VALUES(include_in_menu), is_active =
  VALUES(is_active), is_anchor = VALUES(is_anchor), landing_page
  = VALUES(landing_page), meta_description = VALUES(meta_description), meta_keywords = VALUES(meta_keywords),
  meta_title = VALUES(meta_title), name = VALUES(name),
  page_layout = VALUES(page_layout), path_in_store =
  VALUES(path_in_store), size_chart = VALUES(size_chart),
  url_key = VALUES(url_key), url_path = VALUES(url_path)


texts: Magento 2.4.1 configurable product get simple product ID

texts:
We have a clean Magento 2.4.1 store with example 2 configurable products. We are building a plugin for calculating deliverytime.
I need to get the simpleProduct ID after the attributes are selected by the user.
On configurable product 1 I have a few attributes that are selectboxes/dropdowns and when i do this in my JS file:
var mageConfigurable = $('#product_addtocart_form').data('mageConfigurable');
console.log(mageConfigurable)

All is good and I get the mageConfigurable object which has a variable mageConfigurable.simpleProduct which is filled with the correct product ID when all attributes are chosen.
The weird thing i do not understand is that on the 2nd product (configurable product 2) i also have a few attributes like dropdowns. But in this case i also added a color swatch as configurable attribute.
At this point the mageConfigurable object is totally gone. Not present at all and i cant think off any reason why it suddenly is not there. We tried several configurable products but as soon as we add a swatch the mageConfigurable object object is gone.
When I console log $('#product_addtocart_form').data() I do see objects like mageProductValidate, mageValidation but not the one i really need... the "mageConfigurable" object.
Can anyone point me in a direction why the configurable product with a (color) swatch attribute does not return the mageConfigurable object? But it does when we use a regular dropdown.
Any advise on how to do this different is also very welcome.


texts:
I'm having a 500 error when I click to buy a product. I tried to reset folder permissions and I know that it isn't code error because I have production and development enviroment . In my development work. I read that can be a memory error, but this error not occur in development, that have less memory than production.

Please see a screenshot of error, the box don't load anything.

Thanks


texts: Magento 2 hide / show editor not working

texts:
Here is the pic the showing the tinyMCE is not showing and the button is not work

The browser console does not have any exception or error is showing, anyone know what is the problem?

Remarks tested on (xampp+windows and nginx+php7)


texts: Magento 2: Adding full text search to custom grid results in error on count query

texts:
I am trying to add full text search to a custom grid.
I have done the following steps

added full text indexes to related columns in the table
in the ui component xml file, added <filterSearch name="fulltext"/> node (tried with and without description)

The search bar appears on the grid page, but when I search for something I get the following error in exception log
[2020-07-24 10:05:59] report.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause', query was: SELECT COUNT(*) FROM `aw_helpdesk_ticket` AS `main_table`
 INNER JOIN `aw_helpdesk_ticket_grid_flat` AS `flat` ON main_table.id = flat.ticket_id
 INNER JOIN `aw_helpdesk_department` AS `department` ON main_table.department_id = department.id WHERE (((`department_id` = '1'))) AND (((`fulltext` = 'test'))) {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause', query was: SELECT COUNT(*) FROM `aw_helpdesk_ticket` AS `main_table`
 INNER JOIN `aw_helpdesk_ticket_grid_flat` AS `flat` ON main_table.id = flat.ticket_id
 INNER JOIN `aw_helpdesk_department` AS `department` ON main_table.department_id = department.id WHERE (((`department_id` = '1'))) AND (((`fulltext` = 'test'))) at /Users/fkhan/Sites/TPM2/app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'fulltext' in 'where clause' at /Users/fkhan/Sites/TPM2/app/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)"} []


texts: Where is Template Path Hints in Magento 2?

texts:
Just started playing about with Magento 2.

Can anyone tell me where I can find the "Template Path Hints" option that used to be in System > Configuration > Developer > Debug?


texts: Adding an extra step in checkout process in Magento 2.0.7

texts:
I am developing a website http://cheapmedicineshop.com/ similar to https://www.alldaychemist.com/

Before checkout page I need an extra page "Medical Condition" who takes few information and one file (Medical Prescription) from the customer same as ADC(alldaychemist)

My Magento version is 2.0.7 and Used Theme is Porto.


texts: Is there any advance product designer available with lots of features?

texts:
For one of my client I need a magento advance product designer which will have lots of features like cloth design, card design,gift design,skin design, sign and poster design.

Suggestion would be big help.


texts: Bug in bundle children product price calculation

texts:
I have a bundle with 2 simple product in it.

On the bundle product page, i click on "Add to cart". The cart sidebar resume show the quantity and the ATI price of the bundle.
If i "Add to cart" another time, the bundle price in the cart sidebar is now ET price * 2.
As a result the total cart price in the sidebar is : quantity * ( ET price * 2 )

Then i add to cart the same bundle with another option, the prices in the cart sidebar are now Ok.

The bug is only present in the cart sidebar, when i go the index checkout cart page (checkout/cart/), all the prices are ok.

Do you have any idea why this happen, or do you know how can i force the bundle product to recalculate it's prices ?