texts: Get all orders/purchased products for each customer

texts:
In Magento 1.7, I need to get all products that each customer bought. I already know how to obtain them but the problem is that the code returns orders, but not separated by customers. I have the following:

//Start Magento application
    include('app/Mage.php');
    Mage::app();
    //Get all ordered items
    $col = Mage::getModel('sales/order_item')->getCollection();
    foreach($col as $item)
    {
        echo $item->getOrder()->getCustomerName().' bought '. $item->getProduct()->getSku()."\n";
    }

So, I am obtaining orders and from there I see which is the customer that ordered it. But I wonder if there is some method that allow me to, first, obtain the list of all customers, and then for each customer, obtain all the orders and then all products inside the order.
For obtaining customers I have:

$customers = Mage::getModel('customer/customer')->getCollection();
    foreach($customers as $customer)
    {

And I tried $order = $customer->getOrders(); because in recent.phtml it is used and works fine, but here getOrders() is returning null.

I would like to know if there is a simple way to accomplish my purpose. Any help will be appreciated.


texts: How to use blue foot cms in magento 2.3 cms

texts:
I am trying to use blue foot cms in magento 2.3 but in default package
  it is not available.If anyone have any idea please guide me.


texts: Magento 2.3: Re-save all products programatically

texts:
I need to re-save all products programatically without modifying any attribute. (Only re-save)
How to do that ?


texts: How I can search where is my module situated from URL?

texts:
I have a URL and I would like found where is module situated.
For example index.php/agentdeposit/adminhtml_order/finalize/order_id/. How I can find it?


texts:
I created custom form module, if customer submit the form i need to get all values by email.

My module files are

  Customform\ReturnRequest\Block\Index.php

<?php

namespace Customform\ReturnRequest\Block;

class Index extends \Magento\Framework\View\Element\Template
{

public function __construct(
    \Magento\Backend\Block\Template\Context $context,
    array $data = []
)
{
    parent::__construct($context, $data);
   }

  public function getFormAction()
 {
  return '/returnrequest/index/index';
 }
}

  Customform\ReturnRequest\Controller\Index\Index.php

<?php

namespace Customform\ReturnRequest\Controller\Index;

use Magento\Framework\Controller\ResultFactory;

class Index extends \Magento\Framework\App\Action\Action
{
 protected $_pageFactory;

 public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $pageFactory)
 {
    $this->_pageFactory = $pageFactory;
    return parent::__construct($context);
 }

 public function execute()
 {
    $post = (array) $this->getRequest()->getPost();

    if (!empty($post)) {
        // Retrieve your form data

        // Display the succes form validation message
        $this->messageManager->addSuccessMessage('Sucessfully you had done your returns order !');

        // Redirect to your form page (or anywhere you want...)
        $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
        $resultRedirect->setUrl('/returnrequest/index/index');

        return $resultRedirect;
     }

    return $this->_pageFactory->create();
   }
 }

  Customform\ReturnRequest\etc\frontend\routes.xml

 <?xml version="1.0" ?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
   <router id="standard">
    <route frontName="returnrequest" id="returnrequest">
        <module name="Customform_ReturnRequest"/>
    </route>
  </router>
 </config>

  Customform\ReturnRequest\view\frontend\layout\returnrequest_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
 <referenceContainer name="content">
    <block class="Customform\ReturnRequest\Block\Index" name="helloworld_index_index" template="Customform_ReturnRequest::index.phtml" />
 </referenceContainer>
</page>

  Customform\ReturnRequest\view\frontend\templates\index.phtml

   <form id="contact-form" class="form-horizontal" method="post" enctype="multipart/form-data" action="<?php echo $block->getFormAction()?>">

      <input name="name" id="name" class="input-text" type="text" />
      <input name="email" id="email" class="input-text" type="email" />

      <button type="submit" id="add" title="" class="action submit primary">
            <?= $block->escapeHtml(__('Request Return')) ?>
        </button>

    </form>

My form displaying good. i need to set only email function.
Please let me know . Thanks


texts: change lastname as optional in Magento-2?

texts:
I want to change last name as optional. so

  Vendor\magento\module-customer\view\frontend\templates\widget\name.phtml

override into

  mycompany\custommodule\view\frontend\templates\widget\name.phtml

Removed class required, required-entry
Changed in DB also

UPDATE eav_attribute SET is_required = 0 WHERE attribute_code = 'lastname'

Also, null the lastname value in customer-address-entity table.
I can create new customer without given lastname, but I can't proceed the customer address registration. Lastname is required field error throw in given customer address .(any other table contains last name field?)

If anyone knows please explain me...


texts: Custom Indexer, TYPE_MASS_ACTION and TYPE_DELETE

texts:
I am building a custom indexer and quick search based on a mysql table with fulltext indices and having some difficulties in understanding the Mage_Index_Model_Event::TYPE_DELETE in conjunction with TYPE_MASS_ACTION.

The Indexer is build very similar to Mage_Catalog_Model_Product_Indexer_Flat.

A single delete event is working just fine, the ID got passed with the data object and I can get it with getId() to proceed the deletion. But when I go to the Backend Catalog -> Manage Products List and mark a few products (via checkbox) for deletion and select the delete action, just one product ID out of the selected set will get deleted, the others remain in my index (via Mage_Index_Model_Event::TYPE_DELETE). I supposed that the deletion of multiple products would be of TYPE_MASS_ACTION, just as it is for status change of products, but it seems not.

What event type gets triggered with multiple products deletion? Even though I would expect to get these to be deleted product IDs with $product = $event->getDataObject(); and $product->getProductIds(). Or is there another way to solve this?

If been digging in Catalog/Model/Product/Indexer/Flat.php, the models and resources and can not find out how it is done.

Been sitting over this a few hours now, I might oversee it. Maybe somebody could shed some light on that question.

Any help and hints are appreciated!


texts: Is there any option to migrate only orders from magento1 to magento2?

texts:
My scenario is :
I have migrated all data from Magento1 to Magento2 using live DB backup. So I could not use delta migration for the incremental changes. But I need to migrate the newly created orders from magento1 live to my existing magento2 migrated site. Can you please suggest an option for this?


texts: Manage hundreds of product attributes in a simple way

texts:
For the type of products that I manage in my eCommerce I should create about 300 product attributes to create a complete technical sheet.
Is there a way to create feature in a product page tab, like: "Add item" to add only the attributes that affect that single product? it would be very difficult to keep a page with 300 fields legible.


texts: why some product has details and the others not in magento 2

texts:
Hello everyone i am new in Magento 2 ,and i want to know why some product shows the details and the other  no like in the picture :

  even if they have the same details , is something that i have to customize in the html as below ?:


texts: magento 2 how to upload images and videos in custom module

texts:
I am using magento 2.1

I need to upload multiple images and video using ui component

Like magento-admin -> products -> caralog -> product

what do i need to do to  achieve this ?


texts: Discount attribute is not visible in attributes set

texts:
I am new to Magento 2 and I am wondering why discount attribute is not visible in the store -> Attribute set -> Default -> Groups.
I checked that the discount attribute is present in the Database.

What can I do? How can I show it also on the frontend?

I appreciate any kind of help. Thanks

Admin  attribute sets


texts:
Hi guys I would like to export categories from one of my magento installations and import it into another:

version for the export is 1.9.2.1 and 1.9.2.4 for the import, so should have pretty much same database structure.

What tables do I need to export to "transfer" the categories as they are in 1.9.2.1 over to the 1.9.2.4 magento.

So, I guess what I am after is a list of the tables that I have to export from my Magento that houses the categories I require ?

I have just attempted the following but didn't work:

firstly took a data only dump of the tables:

Then I went and truncuated the following:

SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;

SET FOREIGN_KEY_CHECKS = 1;

Then using the mysql command to restore from a dump I ran my dump.

Now going into the backend manage category page it shows all funny:


texts: Magento 2: Override Product description and cart functionality

texts:
Want to change price-option calculation on the custom option.

  For eg: If customer selects cotton as material, width and height

Cotton is 10$
Width : 12
Height :20
Base Price : 75$

Current Calculation : 75+10+1+2 (Base price+Cotton +width price+height price)

  But i want  75*10*12*20 (Base price * Cotton * width * height )

Can anybody help me?

How to Use Absolute Pricing for Custom Options in Magento 2 programatically


texts: In Magento 2 - How to remove a column in customer_entity table?

texts: In Magento 2, How to remove a column in customer_entity table?


texts:
Shipping price not applied in configurable product in magento 2.1

I have used Flat rate shipping method for shipping price calculation in my project.

When I add simple product in shopping cart shipping price was applied successfully.

When I add configurable product in shopping cart shipping price was not applied.

In magento 1.9 its working perfectly.

Any new settings for configurable product?

Please help me to sort out this issue.

Thanks in advance.


texts:
I have many hundred products and I want to create a product attribute to apply to all of them but with different value.

But I don't want to change the attribute product by product, it would take so much time.

How can I do that ?


texts: Magento2 Module installable through composer

texts:
We are in the middle of the process to submit an extension to the Magento Marketplace.
We have one question about composer installation.
Right now, we test our module copying files by hand, is it mandatory to make the module installable using composer?
Once our module is on Magento Marketplace, are they going to host the repo files on their composer repository, or should we create a private repo to host the module's files?


texts:
Im using Magento 2.1.3 and PHP 7.0.8.

I would like to test some Magentos 2 import api.

When I'm trying to connect to swagger by http://localhost/swagger error 500 is received:

I'm also trying to connect to http://localhost/rest/default/schema?services=all
and return:

I am worried about that it doesn't works.
However I am able to connect via rest to eg. http://localhost/index.php/rest/V1/integration/admin/token and get user token.

I also tried to install https://www.npmjs.com/package/magento2-swagger
result:

root@2d426841549e:/var/www/html# npm install magento2-swagger --save
npm WARN saveError ENOENT: no such file or directory, open '/var/www/html/package.json'
/var/www/html
`-- magento2-swagger@0.0.8

npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/package.json'
npm WARN html No description
npm WARN html No repository field.
npm WARN html No README data
npm WARN html No license field.


texts: I need to get feeds from cache in magento if exist and if not run function to bring them in

texts:
The problem is that I have a News and Updates feed on my homepage and it is causing my ip to call the site an excessive amount of times over the day and causes the server to crash if the site is busy (at least that is what I suspect the problem to be). A way I have thought of solving the problem is in Magento for my custom-blog-feed to come from the cache if exists in there. If not then it will run the function the normal way.

My question is how do I get Magento to look for it in the cache and if it finds it display the feeds if not then the function will come in to play and bring them in.

I am sorry if I haven't explained this too well as I do not 100% know if this is even possible but its the only thing I can think of to solve my problem. Let me know what other information you may need to help answer this question & I apologies if its not 100% clear what I am trying to do. I need help :(


texts: How to maintain the status of each order item in magento2.1?

texts: In magento-2.1, If an order has multiple items, it gives the only status of the order. In Flipkart, Myntra etc. it shows order status of each item of an order. I want to know Magento give this functionality or not?


texts: Export Reviews Details With SKU - Magento ver. 1.9

texts:
I want to export reviews details with product data from Magento 1 I am trying to transfer product reviews from M1 to M2. can you please give me any solution how to i'll do this ?
Which Mysql query i'll run for export all reviews details with product data ?
if someone has does already please share with me that code.
Thanks


texts: The word "From" missing for configurable products

texts:
In my Magento 2 instance I have a few configurable products however on the frontend the word "From" is missing before the price on both the listing and detail pages of the catalog.

The actual configurable products function as expected eg the price changes when the user selects different options.

Could someone advise if there is a setting which needs to be enabled for the wording "From" to be shown on 1st page load


texts: How do i solve this error created while i was installing a blog plugin?

texts:
There has been an error processing your request

  Exception printing is disabled by default for security reasons.

Error log record number: 950942407820


texts:
I need to override a crontab.xml from:

vendor/magento/module-integration/etc/crontab.xml

    <job name="expired_tokens_cleanup" instance="Magento\Integration\Cron\CleanExpiredTokens" method="execute">
        <schedule>0 * * * *</schedule>
    </job>

To

    <job name="expired_tokens_cleanup" instance="Magento\Integration\Cron\CleanExpiredTokens" method="execute">
        <schedule>*/15 * * * *</schedule>
    </job>

The question is... Which is the best way to do it?

I have already created a file in the path app/design/frontend/[Vendor]/[theme]/Magento_Integration/etc/crontab.xml but nothing change.

Greetings.


texts: Magento 2: Image in custom email module?

texts: I have created a custom module email template, but I am unable to load the images in custom.html file for email templates.


texts: Magento2 : hsbc payment gateway extension to be compatible with magento2

texts:
I have hsbc payment gateway extension which is compatible with Magento 1.9 but any have hsbc payment gateway extension which is compatible with magento-2. how i can convert this module magento 1.9 to 2.

Any have any idea or some reference for the achieve this functionality.


texts: Adding custom block to catalog product view

texts:
I'm currently making my own module, but i'm having trouble with just displaying a block in the catalog product view.

I've added this line to default/layout/catalog.xml

<block type="catalog/product_view" name="product.info.rating" template="rating/rating.phtml"/>

and my template/rating/rating.phtml looks like this

halp


texts: Magento 2 EE : Override Layered Navigation Template

texts:
I want to override layered navigation template in my module(layer/view.phtml).

I created catalog_category_view_type_layered.xml file in Companyname/Modulename/view/frontend/layout/

  catalog_category_view_type_layered.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="catalog.leftnav">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Companyname_Modulename::view.phtml</argument>
            </action>
        </referenceBlock>
        <referenceBlock name="category.products">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">Companyname_Modulename::products.phtml</argument>
            </action>
        </referenceBlock>
    </body>
</page>

Above file works proper in community edition but not working in enterprise edition.


texts: How to check if custom product attribute exists

texts:
I want to check if my custom product attributes exist before I attempt to utilize it in any way. Whats the best way to check it in Magento 2.

Note that I don't want to check if specific product has the attribute. I want to check if that attribute exists in Magento.

I've found partial answer on stackexchange https://magento.stackexchange.com/a/107993/14809

but that answer is very limited. Especially the code example is very scarce:

try {
   $attribute = $this->attributeRepository->get($entityType, $attributeCode);
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
    //  attribute is not exists
}

It's not clear what to enter in $entityType.
What will get return if the attribute does not exist?
I don't know where to find example implementation of the methods (e.g. get(...)) defined in the interface \Magento\Eav\Api\AttributeRepositoryInterface.php


texts: How to add an input field with a date to the checkout page?

texts:
I'm studying Magento2, downloaded the module https://github.com/ecomteck/module-delivery-date   and added it to the app / code / vendor / module-delivery-date folder
I cannot understand in which files and what needs to be changed in order to display my input and connect with the checkout module.
I hope for your help


texts: I want to have a admin extension to put store on vacation

texts:
The way Shopify etc simply allows a static front end page that doesn’t allow people to access your site and you can display custom messages

Like

We are closed for a stock take till 10 june 2018
Or
We are on Easter vacation till xyz

Etc


texts: How to call a function from a local helper in <img src

texts:
This is my code to take the images from the server using ASIN , the database only has the SKU and no ASIN.

<?php
    class Bundle_LocalHelpers_Helper extends Mage_core_Helper_Abstract{

    public function getImageUrl($product)
{
    $storeId = Mage::app()->getStore()->getId();
    $sku = Mage::getResourceModel('catalog/product')->getAttributeRawValue($product->getId(), 'sku', $storeId);
    $asin = substr($sku,0,10);

    if ($sku != null) {
        $asin = $product->getAsin();
    }
        return "http://productimages.bundle.com/images/$asin.jpg";
    }
    else
    {
        return error;
    }
 }
?>

I would like to use the owl-carousel which is a slider for the product images, so I am using this code:

 <?php
 /**
 * @var Bundle_LocalHelpers_Helper_Basic $localHelper
 */
    $localHelper = Mage::helper('localhelper/basic');
 ?>

 <?php

   $categoryId = 2; // this is the category holding your products
   $products = Mage::getSingleton('catalog/category')->load($categoryId) //load the category
           ->getProductCollection() // and the products
           ->addAttributeToSelect('image'); // tell Magento which attributes to get

     foreach ($products as $product) ?> { // iterate through the entire   collection

    <img src="<?php echo $localHelper->getImageUrl($product);?>">

  // print the image url inside of the required Owl markup
  }
  ?>


texts: How to make custom shopping cart rule in magento 1.9.1.0?

texts: Apart from all the existing shopping cart rules, we need to add our own attributes in the shopping cart rules and provide discount based on the values of that attribute. Is it possible? How can I do this ? please help me!


texts:
You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different
depending on the selected language.
Keeping simplicity in mind, how do you add this attribute?
A. Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported languages
B. Use a Data Patch to create a new EAV attribute
C. Add a new column to the catalog_product_entity table using declarative schema
D. Use the admin panel to create a new extension attribute
can anyone please answer?


texts: Magento 2.3.4 Category Image loading from /pub/media/catalog/tmp/category/

texts:
We just found that all categories images are loading from /pub/media/catalog/tmp/category/ instead of /pub/media/catalog/category/ directory in Magento 2.3.4 latest version.

Does anyone know why category loading from temp folder?

Is this permission issue or bug in Magento 2.3.4?

Any help or suggestion will be appreciated

Edit:
Found that, it's default Magento issue in version 2.3.4


texts: How to sort product collection based on manufacturer options?

texts:
I'm trying following code for  sorting by manufacturer options(for example sony, nokia, samsung).

But unfortunately its not working.Can you help me any one .

$prodCollection = Mage::getResourceModel('catalog/product_collection')
->addAttributeToSelect('*')
->addAttributeToSort('manufacturer', 'ASC');


texts:
I am trying to add a second, non-default, theme to our storefront. I read how to properly identify the templates, css, etc. in the configuration settings, and I have copied over what seems to be the correct folder structure for my new theme, but I didn't actually install anything. Is this a step I have missed? All I really did was add a new folder and use that folder's name in the config settings.

Can someone help me figure out what I've done wrong?


texts: The first row is skipped when loading product by SKU

texts:
This looks very simple but I have been pulling my hair on this for the last hour. I just want to load products data from a PHP array that looks like this:

array
  0 =>
    array
      'sku' => string '1HC220'
      'qty' => string '2'
  2 =>
    array
      'sku' => string '4LANT'
      'qty' => string '2'

The piece of code:

foreach ($products_arr as $row) :
    $sku        = trim($row['sku']);

    $product    = Mage::getModel('catalog/product')->setStore($store_id)
        ->getCollection()
        ->joinField('qty',
            'cataloginventory/stock_item',
            'qty',
            'product_id = entity_id',
            '{{table}}.stock_id = 1',
            'left'
        )
        ->addFieldToFilter('sku', array('eq' => $sku))
        ->getFirstItem()
        ;
        (...)
endforeach;

But the first product in the array always returns NULL. If I var_dump $products_arr I have X products, but in the loop the first is never returned.

If I load the product individually, it is loading, but not as a first row of the array.

I know I am missing something, but can't figure out what.


texts: Override template and block from a module?

texts:
I am developing a newsletter extension. I try to override the template

  /vendor/magento/module-customer/view/frontend/templates/account/dashboard/info.phtml

and the block Magento\Customer\Block\Account\Dashboard\Info to replace the Newsletter block with my own.

How can I do this? Thanks in advance.


texts: Search Results: List categories and products

texts:
In magento, it is not possible to search for categories.

Currently it shows only the products in the list.

I need Categories and products in the search result.

Search results for categories should be related to searched query and not to the category of products that are listed in the result.

Otherwise how to show the categories name associated with search result products?

Help me find the file, In which file to we can edit the search query?


texts: Change estimate shipping country programatically

texts:
I want to change the country in estimate shipping (cart page) programatically in my module (meaning user clicks on a button in footer on homepage and I change the shipping country on cart page for that session):

However it doesn't work if I do it with the session object.

// Magento\Checkout\Model\Session;

$quote = $this->session->getQuote()
$quote->getShippingAddress()->setCountryId('GB')->save();
$quote->getShippingAddress()->getCountryId() // returns GB which is right, but the sidebar on frontend is still showing US on refresh.


texts:
I've been poking around the web looking for a solution to this, but I can't seem to find anything concrete. I have a site that has a non-Magento frontend. We're using the cart,  checkout, and users from Magento only. We also have the Magento portion on a subdomain (i.e., store.domain.com), whereas the rest of the site has the standard 'www'.

Right now we're using the method where we include Mage.php and call Mage directly. We'd rather use the API across the board, though.

I have added my own methods for logging in, and they work, but subsequent calls to the api show that the user is no longer logged in:

public function __construct()
{
  // Change to the default store so we
  // can grab the frontend user session
  Mage::app()->setCurrentStore('default');

  // Get the customer session
  $this->_session = Mage::getSingleton('customer/session');
}

public function login($email, $password)
{
  try {
    $passed = $this->_session->login($email, $password);
    if ($passed) {
      return $this->_session->getCustomerId();
    }
    return false;
  }
  catch (Exception $e) {
    Mage::logException($e);
  }
}

public function isLoggedIn()
{
  return $this->_session->isLoggedIn();
}

Has anyone successfully implemented logging in via the API?


texts:
I'm currently using the 1.9.1 RWD theme, and having issues with the currency-switcher that shoes up in the footer.

The currency-swticher in the header works fine, but the one in the footer has the following issue.

Say for example I have 3 currencies set up. £, € and $ (Pounds, Euros and Dollars). When I load up the page on a mobile (or resized in a browser) the default selected value is always my default currency (Pounds in this case). If I select Euros, it will change the pages currency to Euros, however when I go to select another currency - the selected currency is still pounds. Meaning that I am unable to swap the currency back to pounds.

Any thoughts as, as far as I can tell - it should be the same bit of code no?

Update: I've tried moving the currency-selector that works in the header to the footer, and the same issue happens.

Doing some further research by using $this->getCurrentCurrencyCode() throughout the page. While in the header, this variable holds the correct information, but somehow by the time it reaches the footer - it is no longer this value, and is instead what appears to be the websites default value.


texts: I was just evaluating whether it's worth shifting to Magento commerce solely to use their pre-built modules. I don't want to look at their site documentation because they have an obvious bias, so I'm looking for objective insights on why its better. Also, if anyone could give me a few sources to approximate how many people are migrating and why, that would be great. Thanks!


texts: Check producs barcode before shipping product

texts:
We use magento 1.8.1ce

All items already have an attribute (barcode). We use this with a POS extension. And that works great.

I am looking for a solution where the product's barcode should be scanned before shipping the product. This to verify the right product is being shipped.

Order handeling

An order is placed
The order is being picked based on the sku/picture of the product
Our wish: The packing begins. The barcode of the item must first be
    scanned to verify its the right item. When its the wrong item the
    orderpicker must be notified
The order is shipped

We want an extra validation that the right item is being shipped, so the chance a client receives a wrong items is being norrowed down.

Is there an extension what can do this?


texts: Magento 2.1.2 placeholder image for product details page

texts:
I am running into the issue of product details page with the default placeholder image.

I have changed the placeholder in the 4 sections available under:
Stores > Configuration > Catalog > Catalog > Placeholder images.

I have flushed the cache, removed static files, redeployed static content. Nothing. My custom placeholder image is applied everywhere throughout the site, except on the product details page.

Am I missing something? This should be part of the settings I have already changed.


texts: Best way to create new Magento 2 theme based on Luma, which parent theme?

texts:
I am having a theme made for Magento 2 and the developer wishes to use Luma as the parent theme to keep the styling like Luma for all elements not changed in our design.

I also plan on regularly updating Magento 2 to latest versions as new bugs are fixed and wish to keep upgrade issues to a minimum.

Previously I read from the Magento team that Luma should not be used as a parent theme and only use Magento Blank, but now I see they say it is ok.

Would it be better to:

1) Use Luma as parent theme and create child theme for all our changes?

or...

2) Clone the Luma theme to our new child theme (use Magento Blank as parent) and make all changes to our new child theme?


texts: Invalid column data type when reindex Magento 2

texts:
I'm using Magento 2.3.4 for my website, when I try to reindex, the category flat was not reindex and appear error like this:

I search some post in here and try this solution:
magento 2.3.4 installation issue in localhost
But it's still not work.
How I can fix this?
Thank you very much!


texts:
So my website currently has a "Register" button and a "Sign Up" button.  The "Sign Up" button doesn't show up on mobile devices no matter what, so I figure removing it is my best option.  I can remove "Register" successfully, but again, mobile view wouldn't have either one then.

I've checked and tested in two files:
local.xml and customer.xml

For local.xml I tried commenting out the following reference:

<customer_logged_out>
    <reference name="top.links">
            <action method="addLink"
                ifconfig="ultimo/header/signup" translate="label title"><label>Sign Up</label><url>customer/account/create</url><title>Sign Up</title><prepare>true</prepare><urlParams/><position>101</position><liParams>id="link-sign-up"</liParams></action>
        </reference>

    </customer_logged_out>

Which unfortunately did nothing. (I'm saving these in my custom theme, not in /base/default directory)

In customer.xml and local.xml I've tried removing it by adding the following removeLinkByUrl:

<customer_logged_out>
    <reference name="top.links">
       <action method="removeLinkByUrl"><url helper="customer/getRegisterUrl"/> </action>
    </reference>
</customer_logged_out>

Please point me in the right direction!


texts:
I have got Magento plugin from dev, but while using its giving exception, please help me.

 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3, query was: SELECT COUNT(*) FROM `askfordetailspro` AS `main_table`
 LEFT JOIN `catalog_product_entity` AS `prod` ON prod.entity_id = main_table.product_id
 LEFT JOIN `catalog_product_entity_varchar` AS `cpev` ON cpev.entity_id=main_table.product_id AND cpev.attribute_id=

Code:

    public function __construct() {
     parent::__construct();

    $this->setId('askfordetailsproGrid');
    $this->setDefaultSort('sent_date');
    $this->setDefaultDir('DESC');
    $this->setSaveParametersInSession(true);
}

protected function _prepareCollection() {
    $collection = Mage::getModel('askfordetailspro/askfordetailspro')
            ->getCollection();

    $prodNameAttrId = Mage::getModel('eav/entity_attribute')
            ->loadByCode('4', 'name')
            ->getAttributeId();
    $collection->getSelect()
            ->joinLeft(
                    array('prod' => 'catalog_product_entity'), 'prod.entity_id = main_table.product_id', array('sku')
            )->joinLeft(
            array('cpev' => 'catalog_product_entity_varchar'), 'cpev.entity_id=main_table.product_id AND cpev.attribute_id=' . $prodNameAttrId . '', array('name' => 'value')
    );

    $this->setCollection($collection);
    return parent::_prepareCollection();
}


texts: Magento 2 site optimization module and extensions needed. Paid or Free, any suggestions? SIte is around 64% optimized

texts: I have a magento 2.3 website i want to optimize it for best performance. Can anyone suggest some good extension or modules which actually gives good performance?


texts: How do I query on an extension attribute through the API?

texts:
I added an extension attribute to the Invoice class, and I want to be able to query the Invoice database data by my extension attribute.

My extension attribute (ExportedFlag) has these properties

entity_id The primary key
invoice_id The foreign key to the invoice table.
isExported A string value.

When an invoice gets created, it will not have a corresponding row in my extension attribute table.  I want to be able to query the database for a list of invoices that don't have a value for the extension attribute, using the API (and then insert the value for that extension attribute).

Here's the code that I have right now that adds the extension attribute to invoices.

public function afterGetList
(
    \Magento\Sales\Api\InvoiceRepositoryInterface $subject,
    \Magento\Sales\Model\ResourceModel\Order\Invoice\Collection $searchResult
) {
    /** @var \Magento\Catalog\Api\Data\InvoiceInterface $invoice */
    foreach ($searchResult as $invoice) {
        $this->addExportedFlagToInvoice($invoice);
    }
    return $searchResult;
}

private function addExportedFlagToInvoice(\Magento\Sales\Api\Data\InvoiceInterface $invoice)
{
    $extensionAttributes = $invoice->getExtensionAttributes();

    if (empty($extensionAttributes)) {
        $extensionAttributes = $this->invoiceExtensionFactory->create();
    }

    $exportedFlag = $this->exportedFlagProvider->getExportedFlag($invoice->getEntityId());
    $extensionAttributes->setExportedFlag($exportedFlag);
    $invoice->setExtensionAttributes($extensionAttributes);

    $exportedFlag = $extensionAttributes->getExportedFlag();
    $exportedFlag->setInvoiceId($invoice->getEntityId());
    $this->entityManager->save($exportedFlag);

    return $this;
}

The problem is that this code iterates through each invoice, and adds the extension attribute one-by-one.  Furthermore, it retrieves all invoices, regardless of whether or not they have a value for the extension attribute (I don't want to retrieve values that have a row in the extension attributes table).

I want to be able to retrieve all invoices in a single query.  Something like this

SELECT *
FROM sales_order_invoice
LEFT OUTER JOIN extensionAttribute
   ON sales_order_invoice.entity_id = extensionAttribute.invoice_id
WHERE extensionAttribute.isExported IS NULL

How can I do this within Magento?


texts: How can I add a category list on left side of page?

texts:
I saw this category bar on left side of many magento 2 websites.

What are the requirements to display this? I do not see categories in the layered navigation at all.

EDIT
I added my categories like this .


texts: magento 2.3.2 checkout order summery grand total after custom text add

texts:
I am trying to add custom text after grand total section in Order Summary

like

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged

but how can achieve this?
Note: which one correct way.. using module or vendor file override?
Any help would be appreciated.

Thanks.


texts: How to exclude app/code///vendor from code generation in Magento 2

texts:
I'm developing Magento 2 module. My composer.json file contains a dependency ("require") to netresearch/jsonmapper.

I run php composer update in app/code/<vendor>/<module> folder. It downloads jsonmapper package and puts into app/code/<vendor>/<module>/vendor folder.

When I run bin/magento setup:di:compile command it gives the error:

[RuntimeException]
Source class "\Json" for "JsonMapper" generation does not exist.

So my question is how to avoid of code generation for vendor folder?

And if I'm using external dependencies in my Magento 2 module in a completely wrong way, then please point me to the right direction.


texts: Need to show related products of simple product in configurable product

texts: I need to show related products block on configurable product page (as it is by deflault), but instead of related products of configurable product i need to show related products of simple products which are included in that configurable product.


texts: how to get order details in method-renderer for redirect payment gateway

texts:
I'm using Magento 2.2.1
I'm trying to create a new module for a custom payment gateway, I have created the module. But I didn't get the order details where in the method-renderer file, there I'm using a js file to redirection of payment gateway.

How to retrieve data here??


texts:
Cached images are not loaded in HTTPs

For example:

  mydomain.com/media/catalog/product/cache/1/small_image/182x/9df78eab33525d08d6e5fb8d27136e95/n/o/non_deco_mix_plus_1_candle_best.jpg

It does not load under https while ssl is active in site

Can anyone help me?


texts: Is there a way to swap cross-sells and up-sells easily?

texts: I'm the guy that does the data entry for our cross-sells and up-sells on our store page.  Unfortunately, the marketing person would like all cross-sells and up-sells to be swapped.  Is this possible?  Failing that, is there a better way to gather product ID's for copy and paste purposes?


texts: Implementing multi vendor Magento site. Should we create separate products with each vendor as attribute?

texts:
We have a requirement for multi-vendor Magento site. We need to develop custom module for this.

Seller can add his own products (simple and configurable)
Seller can sell existing product by adding his own SKU, price and quantity.

We are planning to make one entry in entity product table and then maintain separate entries for stock and price for each vendor.
By then SKU is different for each vendor.

Should we be creating multiple simple products with vendor as a attribute?


texts:
I've created an index.phtml page and it work on myWeb.id/brand link. Now I create edit.phtml on my brand folder but I can't access it on myWeb.id/brand/edit.phtml. My web says 404 not found. What should I do?

My module :

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

my brand.xml :

    <?xml version="1.0"?>
    <layout version="0.1.0">
      <brand_index_index>
        <reference name="root">
          <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
          <block type="brand/index" name="brand_index" template="brand/index.phtml"/>
        </reference>

    <reference name="product_list_toolbar">
            <action method="setTemplate"><template /></action>
        </reference>
      </brand_index_index>

    </layout>

my local block index.php

<?php
class myWeb_Brand_Block_Index extends Mage_Catalog_Block_Product_List {
}
?>

indexcontroller.php

<?php
class myWeb_Brand_IndexController extends Mage_Core_Controller_Front_Action{
    public function IndexAction() {

      $this->loadLayout();
      $this->getLayout()->getBlock("head")->setTitle($this->__("Brand"));
            $breadcrumbs = $this->getLayout()->getBlock("breadcrumbs");
      $breadcrumbs->addCrumb("home", array(
                "label" => $this->__("Home Page"),
                "title" => $this->__("Home Page"),
                "link"  => Mage::getBaseUrl()
           ));

      $breadcrumbs->addCrumb("brand", array(
                "label" => $this->__("Brand"),
                "title" => $this->__("Brand")
           ));

      $this->renderLayout();

    }

}

Helper :

<?php
class myWeb_Brand_Helper_Data extends Mage_Core_Helper_Abstract
{
}

Config.xml :

<?xml version="1.0"?>
<config>
  <modules>
    <myWeb_Brand>
      <version>0.1.0</version>
    </myWeb_Brand>
  </modules>
  <frontend>
    <routers>
      <brand>
        <use>standard</use>
          <args>
            <module>myWeb_Brand</module>
            <frontName>brand</frontName>
          </args>
      </brand>
    </routers>
        <layout>
          <updates>
            <brand>
              <file>brand.xml</file>
            </brand>
          </updates>
        </layout>
  </frontend>
  <global>
    <helpers>
      <brand>
        <class>myWeb_Brand_Helper</class>
      </brand>
    </helpers>
    <blocks>
      <brand>
        <class>myWeb_Brand_Block</class>
      </brand>
    </blocks>
  </global>
</config>


texts:
I have the following issue to installating magento 2.2.6 in local server

Please any one guide me to solve this issue:


texts: Magento 1.9.2.2 Fatal error: Call to a member function beginTransaction() on boolean on save

texts:
My Magento version is 1.9.2.2. My config.xml is

<global>
        <models>
            <homeslider>
                <class>Transformer_HomeSlider_Model</class>
                <resourceModel>homeslider_resource</resourceModel>
            </homeslider>
            <homeslider_resource>
                <class>Transformer_HomeSlider_Model_Resource</class>
                <entities>
                    <slider>

home_slider

                    </slider>
                </entities>
            </homeslider_resource>
        </models>

<resources>
    <slider_setup>
        <setup>
            <module>Transformer_HomeSlider</module>
            <class>Transformer_HomeSlider_Model_Resource_Setup</class>
        </setup>
    </slider_setup>
</resources>
    ...
    </global>

My Model in Models/Slider.php is

class Transformer_HomeSlider_Model_Slider extends Mage_Core_Model_Abstract
{
    public function _construct()
    {
        $this->_init('homeslider/slider');
    }
}

and resource file Models/Resource/Slider.php is

class Transformer_HomeSlier_Model_Resource_Slider extends Mage_Core_Model_Resource_Db_Abstract
{
    public function _construct()
    {
        $this->_init('homeslider/slider','slider_id');
    }
}

My database setup script perfectly working when module run i.e table created in database. But When I want to save data on database it says

Fatal error: Call to a member function beginTransaction() on boolean in C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Abstract.php on line 313

I Call Model by

$slider_model = Mage::getModel('homeslider/slider');

My controller function is

public function saveAction()
    {
        $slider_model = Mage::getModel('homeslider/slider');
        if ($data = $this->getRequest()->getPost()) {
            try {
                $slider_model->setSliderNumber($data['slider_number']);
                $slider_model->setUrlLink($data['url_link']);
                $slider_model->save();
                Mage::getSingleton('adminhtml/session')
                    ->addSuccess($this->__("Your Slider has been saved"));
            } catch (Exception $e) {
                Mage::getSingleton('adminhtml/session')
                    ->addError($e->getMessage());
            }
        }
        $this->_redirect('*/*/edit');
    }

I var_dump($data) where I get form-data that is ok. Where is my problem? Thank you.


texts:
We had redis installed on our remote server, so we had Cm_RedisSession <active> set to true. However, we always get an error when running local server due to Redis not installed.

Is there a way for magento to ignore it without modifying the xml file?

Note that I cannot install anything (including redis) on my local server due to user permissions.

Thanks.


texts: stock filter is not adding to layered navigation in magento 2.2.7

texts: Do all the setting but not get the filter in front end for stock


texts: Magento2: Reference 'copyright' design config field in email template

texts:
Is it possible to reference the copyright field found in design configuration within the footer section? I've checked here https://docs.magento.com/m2/ce/user_guide/marketing/variables-reference.html with no luck. I would ultimately like to add it to my email footer.

Thank you,


texts:
i have  rewritten fedex.php model file(collect rates method  only).

its working in front end cart and checkout pages.
But its not working in admin side order creation.Can you help any one?

update:

I added one custom product drop-down  attribute(special_shipping_group).

If at least one product contain option "Free 2nd Day Shipping" in cart items then FEDEX_2_DAY method price should be zero.

Step1: Rewrite class is

class Exinent_Freefedexshipping_Model_Usa_Shipping_Carrier_Fedex extends Mage_Usa_Model_Shipping_Carrier_Fedex {

    public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
        $originalResult = parent::collectRates($request);
        $cart = Mage::getModel('checkout/cart')->getQuote();
        $product = Mage::getModel('catalog/product');
        $flag = false;
        foreach ($cart->getAllItems() as $item) {
            if ($product->load($item->getProduct()->getId())->getAttributeText('special_shipping_group') == "Free 2nd Day Shipping") {
                $flag = true;
                break;
            }
        }
        if ($flag) {
            foreach ($originalResult->getAllRates() as $method) {
                if ($method->getmethod() == "FEDEX_2_DAY") {
                    $method->setPrice(0);
                }
            }
        }
        return $this->getResult();
    }

Step2:Create config.xml code :

<?xml version="1.0"?>
<config>
    <modules>
        <Exinent_Freefedexshipping>
            <version>0.1</version>
        </Exinent_Freefedexshipping>
    </modules>
    <global>
       <models>
       <exinent_freefedexshipping>
       <class>Exinent_Freefedexshipping_Model</class>
       </exinent_freefedexshipping>
          <usa>
            <rewrite>
       <shipping_carrier_fedex>Exinent_Freefedexshipping_Model_Usa_Shipping_Carrier_Fedex</shipping_carrier_fedex>
            </rewrite>
          </usa>
       </models>
    </global>
</config>

Step3: Module global config file

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


texts: Magento Music Shop - featured artist, producer, publisher tag

texts:
I need some help about tagging.

Is (and how) Magento able to make named tag (artist, producer, label) and create cms like page to these tags with product list?

For example:
Product: Depeche Mode - Exciter (CD)
Artist: Depeche Mode
Label: Mute Records

The Depeche Mode tag link to all DM album, Mute Records link to all products at Mute Records. The linked page should have a custom text (cms) and the related product grid.

Is there any bulit-in hack, or any extension, or I should make my own?


texts:
After logged in Magento frontend. I need to get ID of user on which account I am currently logged in.

Please help.


texts: Magento 2 why I can see products from other storeviews?

texts:
I have a website with many stores and storeviews. The thing is that when I search a product from another storeview or store in a different store, I'm able to see those products.
Also in the section of new or featured products, I can also see those products from different stores and storeviews. They are in different categories.
Greetings!


texts: Differences between Magento 1 and Magento 2 REST API?

texts:
What's the difference between endpoints and integrations?

My main question is for basic things like products, orders and customers, but also like an overview.


texts:
Having an issue with a custom module I have just built.

It's quite simple nothing heavy, but one day it outputted fine and now I get nothing whatsoever! It's driving me nuts!

EDIT

Here the module is on github in its entirety. The module has 2 bits of functionality, a simple custom widget with a phtml file to display videos on any of the widget hooks provided in magento. And the ability to add videos to products and to display them on the product page.

The module seems to install correctly etc, and i can see it in admin, but for some reason when adding a video to the product or adding a new video widget there is no output,

Any help will be much appreciated


texts: Magento 2.4.1 search, bulk action, paginition not working properly

texts:
I am having 3 problems on magento 2.4.1

Bulk action is in pending. I tried to run the command : php bin/magento cron:run , but it's not working.

On catalog page pagination is not showing
I am not using any infinite product module

When trying some search, it shows the product list, but when press enter the catalog page show that "Your search returned no results."

but the filters are showing that there are product here


texts: Magento 2 How to get rest API response as an object?

texts:
I am getting rest API response as like below,

[{
"field1" : "val1",
"field1" : "val2",
....
}]

How do I get API response as object, without braces []. It will return only one object every time, so there is no need of array.

{
"field1" : "val1",
"field1" : "val2",
....
}


texts: Recommended way to catch application-wide exceptions?

texts:
We have developed an extension to capture errors and exceptions in Magento and then forward them to a third-party (in this case Raygun.io).

We are able to use set_error_handler to capture errors without trouble, however set_exception_handler can not work as Magento captures all exceptions in app/Mage.php (this is the case with at least 1.8 and 1.9). Because of this we have resorted to asking users to make a small modification to app/Mage.php to forward the exception to our extension.

The code below is added to app/Mage.php:693:

    die();
} catch (Exception $e) {
    // BEGIN
    if (class_exists('Springtimesoft_Raygun_Helper_Data')) {
        self::helper('springtimesoft_raygun')->exceptionHandler($e);
    }
    // END

    if (self::isInstalled() || self::$_isDownloader) {

Obviously hacking core is bad, is there a better method? Following the logic line by line hasn't shown any alternatives so far, not even a very "hacky" method (for all intents and purposes we can't redefine functions in PHP).

One alternative is to fire a new event here so that at least other extensions are able to make use of this as well. Ideally Magento could add this in a future version (2.x?).

Edit

As per the answer below, it looks like the best way forward is to periodically check for new exceptions that have been added into var/log. This doesn't allow for catching exceptions at the time they occur but is close enough and doesn't require modifying Mage.php.


texts: Magento2 Admin Panel crashes after making any configuration change or even flushing cache

texts:
I am encountering issue with Magento stability.
Version 2.2.5. It is only a month old installation.
When I login to Admin Panel, I can navigate to any screen/page/configuration. However, if I make any configuration changes and save, or even click on 'flush cache management', the admin panel screen closes and then I can not access Admin Panel because I get 404 page not found error. Additionally my website loses all its images, and the web content formatting changes.

I keep a copy of Magento folder, that I use to overwrite the exisitng Magento folder to recover from the above crashes.


texts: Do I really need to upgrade a Magento 1.7.0.2 site to use a template that is meant for 1.8.x - 1.9.x?

texts: I bought a template that I realized after the fact is meant for 1.8 or 1.9 versions, but I am wondering how much of an issue this is. I am a newbie to Magento and I really am hesitating on upgrading because it sounds involved. This particular one is set up for multi site and uses the Enterprise Edition so don't know if I would have to purchase that too in order to upgrade? I appreciate any guidance, my searching hasn't turned up any results on this type of question.


texts:
hello everyone i have added a specific tag to all page of my website , but I want to add it to just the home page , can i achieve that ?
i have added the meta tag like below, but it appears on all website's pages when i inspect "View page source"
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <meta name="......" content="...." />
    </head>
</page>

can i add it only on home page ?


texts: Display custom billing address checkout fields in admin sales order grid

texts:
In my custom module, I have modified the checkout process a bit and added some custom fields in billing address section following the below tutorial:

http://excellencemagentoblog.com/blog/2011/10/06/magento-add-custom-fields-checkout-page/

Now, these custom fields here are saved in a different table in the form of a key=>value pair, based on order_id in sales_order_custom table created by my module itself.

Further, I want to get these values associated with the sales_order module and display some of these key=>value kind of fields in admin sales order grid.

How how do I join these two tables so that the keys also get converted into columns and I can retrieve them directly as "addColumn" index??

I tried following links, but I think they are somewhat not the right way I am approaching..

1) https://plugin.company/blog/join-eav-attribute-flat-table-collection-magento/ - trying this, I got this error : "Invalid entity_type specified: sales_order_custom"

2)http://blog.ki6i.com/magento-join-eav-and-flat-table/

Thanks in advance..


texts: How does M2 know what to inject based on our _construct?

texts:
public function __construct(
    \Magento\Catalog\Helper\Category $categoryHelper,
    ....

Let's say we have code like that. How does Magento know to inject category helper and lets us use it? It works like total magic.


texts:
I want to add product count to the toolbar.phtml. The current code results in a blank page. Can anyone suggest an edit to get it working?

<?php

                    <?php if($this->getLastPageNum()>1): ?>
                        <?php echo $this->__('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?>
                    <?php else: ?>
                        <?php echo $this->__('%s Item(s)', $this->getTotalNum()) ?>
                    <?php endif; ?>

  ?>


texts: How to create 2 magento stores with same data except the store URL? - Magento2

texts:
Actually I need 2 magento instances of same site. One is something like production site other is like dev site. I make all the changes in the dev site and show to client or some other.

I have set up main site.(http://example.com/magento) copied all the content and placced it in a new directory(http://example.com/magento2) also created a new database and imported the data from main site.

Changed database name env.php and changed store urls in core_config tbl in new database.

Now if I go to http://example.com/magento2, its working fine. But When I click the links or products it redirects to main site urls like http://example.com/magento/men.html instead of http://example.com/magento2/men.html

Even the admin login is redirected to main site url.

Any other changes are needed other than changing store url in db and db name in env.php?


texts: Fixed - can't log in or change admin password

texts:
Tried to log into magento 2 and received a message saying "it's time to change your password".
filled in all the info and chose a new password. Clikcked Save and got this error message:
1 exception(s):
Exception #0 (ReflectionException): Class Magento\Backend\Controller\Adminhtml\System\Account\Save\Interceptor does not exist

I have read posts on here on how to change password with a forgot password link but it doesn't give us any option other than to set a new password and then we get this error message.
can anyone offer any advice please?
Update - our hosting company was really helpful and solved this for us.  It was set to force password reset.  They disabled this and it allowed us to get access and change password.
thank you for the help!


texts: Magento 2 add custom shipping cost to order

texts:
How can i add custom shipping cost to the order

here is the code.

     $shippingAddress = $quote->getShippingAddress();
     $shippingAddress->setCollectShippingRates(true)
                ->collectShippingRates()
                ->setShippingMethod('flatrate_flatrate');


texts: How to add login form to homepage in Magento 2.1.9?

texts: I would like to know how to add the login form to the homepage in Magento 2.1.9


texts: Magento 2 - Pending Payment order lifetime issue

texts:
My cron is running correctly and I have configured the Magento 2 pending payment lifetime to 30 minutes.
This isn't working as stock levels aren't being reset and orders aren't changing in status.

Is this feature working for everyone else?

I'm running Magento ver. 2.1.11

Thanks


texts: Enable template path hints in production mode Magento 2

texts:
This seems like it should be straightforward, it seems as though it is not.

Is there any way to enable template path hints in production mode in Magento 2?


texts: How to change the categories at the top of the front page to look like this?

texts:
Magento 1.9.4.0
Porto theme

We have the Porto theme running on Magento 1.9. It displays the category drop-downs (when you hover over) in a certain way - mostly vertical.
We would like to change it to look more like this website has it:
https://www.1800flowers.com
What would be the best way to do that?


texts: Magento 2.3.3 | unable to save changes on imported products

texts:
I just imported a few products in my Magento 2.3.3 Shop and need to change a bit here and there. Unfortunatly i cant save theese changes. After editing everything i wanted to change i click on "save" as usuall but nothing happens. It looks like the save button is out of function.

Does anyone have experienced that before me?


texts:
I'd created a module for admin where I need to display a form. But its not appearing properly and the form is not submitting.
screenshot

directory structure

The code is as below

Excellence/PosImg/controllers/Adminhtml/IndexController

class Excellence_PosImg_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action {

    public function indexAction() {
        $this->loadLayout();
        $this->_setActiveMenu('catalog/posimg')
        ;
        $this->_addContent($this->getLayout()->createBlock('posimg/adminhtml_posImg_edit'))
                ->_addLeft($this->getLayout()->createBlock('posimg/adminhtml_posImg_edit_tabs'));
        $this->renderLayout();
    }
}

Excellence/PosImg/Block/Adminhtml/PosImg/Edit

class Excellence_PosImg_Block_Adminhtml_PosImg_Edit extends Mage_Adminhtml_Block_Widget_Form_Container {

    public function __construct() {
        parent::__construct();

        $this->_objectId = 'id';
        $this->_blockGroup = 'posImg';
        $this->_controller = 'adminhtml_index';

        $this->_updateButton('save', 'label', Mage::helper('posimg')->__('Export Data'));

        $this->_formScripts[] = "
            function toggleEditor() {
                if (tinyMCE.getInstanceById('posimg_content') == null) {
                    tinyMCE.execCommand('mceAddControl', false, 'posimg_content');
                } else {
                    tinyMCE.execCommand('mceRemoveControl', false, 'posimg_content');
                }
            }

            function saveAndContinueEdit(){
                editForm.submit($('edit_form').action+'back/edit/');
            }
        ";
    }

    public function getHeaderText() {
        return Mage::helper('posimg')->__('Export POS Images');
    }

}

Excellence/PosImg/Block/Adminhtml/PosImg/Edit/Tabs

class Excellence_PosImg_Block_Adminhtml_PosImg_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {

    public function __construct() {
        parent::__construct();
        $this->setId('posImg_tabs');
        $this->setDestElementId('edit_form');
        $this->setTitle(Mage::helper('posimg')->__('Item Information'));
    }

    protected function _beforeToHtml() {
        $this->addTab('form_section', array(
            'label' => Mage::helper('posimg')->__('Item Information'),
            'title' => Mage::helper('posimg')->__('Item Information'),
            'content' => $this->getLayout()->createBlock('posimg/adminhtml_posImg_edit_tab_form')->toHtml(),
        ));

        return parent::_beforeToHtml();
    }

}

Excellence/PosImg/Block/Adminhtml/PosImg/Edit/Form

class Excellence_PosImg_Block_Adminhtml_PosImg_Edit_Form extends Mage_Adminhtml_Block_Widget_Form {

    protected function _prepareForm() {
        $form = new Varien_Data_Form(array(
            'id' => 'edit_form',
            'action' => $this->getUrl('*/*/save', array('id' => $this->getRequest()->getParam('id'))),
            'method' => 'post',
            'enctype' => 'multipart/form-data'
                )
        );

        $form->setUseContainer(true);
        $this->setForm($form);
        return parent::_prepareForm();
    }

}

Excellence/PosImg/Block/Adminhtml/PosImg/Edit/Tab/Form

class Excellence_PosImg_Block_Adminhtml_PosImg_Edit_Tab_Form extends Mage_Adminhtml_Block_Widget_Form {

    protected function _prepareForm() {
        $form = new Varien_Data_Form();
        $this->setForm($form);
        $fieldset = $form->addFieldset('posImg_form', array('legend' => Mage::helper('posimg')->__('Export POS Images')));

        $fieldset->addField('skip', 'checkbox', array(
            'label' => Mage::helper('posimg')->__('Skip images already exists?'),
            'name' => 'skip',
            'onclick' => 'this.value = this.checked ? 1 : 0;'
        ));
        return parent::_prepareForm();
    }

}


texts: Store switcher url is not redirecting to the store

texts:
I'm working on store switcher in magento 2.3.3 I get the url but url is not redirecting to the particular store again get back to the same store

http://test.de/test_de/stores/store/switch/?SID=rl1ktd47ub1hmnmpid1e28e631&___from_store=test_de&___store=mystore_de&uenc=aHR0cDovL3NraXBob3AxMS5kZS9za2lwaG9wX2RlLw%3D%3D

Please anyone help me.

Thanks


texts: Magento2 : How to show New label in product list page

texts:
I want need to show New label on new product in product list page.

Help me for the achieve this task.

How can it will Show in magento2 ?


texts:
I am uploading XML file using $ftp->write function.

And in that function where I can pass a directory path where I want to upload my file on server?

Please advise


texts: How to send a review form in mail after buy products in magento?

texts:
I am using magento CE 1.9.2 and sending emails to the customers after buy a products. I want to send bought product's review rating form in mail to the customer, after fill form customer submit that form from mail and that review automatically save in magento database. Can anyone tell me how to achive this.

Thanks in advance..!

I have below peace of code which is send product detail like product image , name and sku in mail. after press "Leave feedback"  button it will redirect on review form of that products which i bought earlier.

I want to skip that step and send rating and review form directly in mail and after fill review and submit form from mail and that review directly save in database for particular products.

<?php

if (Mage::getStoreConfig('getcustomerfeedback_section1/general/custom_product_review_url'))
    {

    // custom product review url with review-form #

    $productReviewURL = Mage::app()->getStore($orderStoreID)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . Mage::getResourceSingleton('catalog/product')->getAttributeRawValue($cartProductID, 'url_key', Mage::app()->getStore($orderStoreID)) . '.html/#review-form' . $urlTrackingTags;
    }
  else
    {

    // standard review product url

    $productReviewURL = Mage::app()->getStore($orderStoreID)->getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'review/product/list/id/' . $cartProductID . '/#review-form' . $urlTrackingTags;
    }

?>


texts:
Is it possible to create a sub-attribute of an attribute?

Our website has started getting very complicated because it has thousands of products within many categories.

We've decided to start fresh with a brand new Magento installation and we're going to start making use of filters based on attributes to make the user experience much easier. How would we go about creating product attributes within attributes, for example:

We've got an attribute called manufacturer and within this we need model attributes:

iPhone - 4, 4S, 5, 5C, 6, 6S

You may be able to purchase a charger (for example) that fits both the iPhone 4 and the iPhone 4S, so when going to the "Chargers" category, there needs to be an option of "Apple, Samsung etc" and when clicking the "Apple" manufacturer, you'll have sub-attributes named "4, 4S" available to click.

Sorry if this makes no sense - I'm struggling to get my head around it myself!


texts: What is the purpose of additional_data column in quote_item table in magento2

texts:
I want to set custom data in quote item from plugin. i have shipping rates in an array.If i set data rates array array in  addition_data from that plugin it appears correctly in checkout_onepage_controller_success_action event.
Is that correct way to set custom data inside addition_data ?

i am doing something like this in plugin

$shipping_rates[$shiping['method_name']] = $shiping['fee'];
$item->setadditionalData($shipping_rates);

If i am doing wrong then please suggent me anyother way so that i set any custom array from plugin and retrieve that custom array during checkout event.
I also want to know the exact purpose of additiol_data colum in quote _item table.


texts: How can I put this button 'add to card' above the product image?

texts: How can I put this button above the product image?


texts:
I use Magmi Datapump to import my products. However, it seems Magmi does not update products properly. If I import the array below, current values of product with sku 90324/13 remain unchanged:

    Array
(
    [sku] => 90324/13
    [store] => admin,ledworld
    [status] => Enabled
    [bol_export] => 0
    [amazon_export] => 0
    [supplier_stock] => 0
    [supplier_expected_stock] => 18/07/2016
    [expected_delivery] => 19/07/2016
)

It doesn't matter if i reindex it, use update or create mode, no changes are made to the product, even though Magmi says the SKUS were imported succesfully.

Does someone have any ideas what i going on here?

EDIT: Even though the question is found to off topic I have some new info. It turned out it has something to do with the flat catalog for products, once the flat catalog is off, the field aren't updated. If the flat catalog is on, the field are updated. I hope this helps sombody.


texts: How to conditionally disable cart sidebar components

texts:
I want to disable a UI component conditionally in the cart sidebar.
I could do it as follows:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="minicart">
            <arguments>
                <argument name="jsLayout" xsi:type="array">
                    <item name="components" xsi:type="array">
                        <item name="minicart_content" xsi:type="array">
                            <item name="children" xsi:type="array">
                                <item name="item.renderer" xsi:type="array">
                                    <item name="children" xsi:type="array">
                                        <item name="checkout.cart.item.price.sidebar" xsi:type="array">
                                            <item name="config" xsi:type="array">
                                                <item name="componentDisabled" xsi:type="boolean">true</item>
                                            </item>
                                        </item>
                                    </item>
                                </item>
                            </item>
                        </item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

But that isn't condittionally.


texts: Magento 2 : How the product setting "Notify for Quantity Below" will work?

texts:
I want to set the email template  to Notify if the product quantity below particular quantity and I found this setting in product.

  Notify for Quantity Below

But not sure how this will work and where we can define the email template for this. Is it for the same ?


texts: Client and Admin not receiving Sales Email Notifications

texts:
I've configured notifications in System -> Configuration -> Sales Emails
But still, I'm not receiving any email notification.


texts: As when I change in .html file do I need to run setup:upgrade, setup:static-content:deploy and permissions to get changes.


texts: Magento2 customer login and registration session not working in frontend in chome?

texts:
I have successfully logged in firebox but customer session not working in chrome browser.
Can anyone help me to get the solution?

It's not localhost , am checking on linux server.


texts: Enable backcolor (background color) button for Fishpig Wordpress Magento 2

texts: I would like to enable the background color button for Wordpress text editor in Wordpress admin. The button is disabled by default. Is there any way to enable it? I've looked for guides/tutorials online, but there are none for Magento specifically.


texts:
I want to extend the Magento\ConfigurableProduct\Helper\Product\Options\Loader as per this github issue https://github.com/magento/magento2/issues/21663#issuecomment-477966963
My di.xml file is
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  <preference for="Magento\ConfigurableProduct\Helper\Product\Options\Loader" type="Vendor\Mymodule\Helper\Loader" />
</config>

My Loader.php is in Helper folder in my module. The code is below
  <?php

    namespace Vendor\Mymodule\Helper;

    use \Magento\Catalog\Api\Data\ProductInterface;
    use \Magento\ConfigurableProduct\Api\Data\OptionInterface;
    use \Magento\ConfigurableProduct\Model\Product\Type\Configurable;
    use \Magento\ConfigurableProduct\Api\Data\OptionValueInterfaceFactory;
    use \Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface;

    /**
     * Class Loader
     */
    class Loader
    {
        /**
         * @var OptionValueInterfaceFactory
         */
        private $optionValueFactory;

        /**
         * @var JoinProcessorInterface
         */
        private $extensionAttributesJoinProcessor;

        /**
         * ReadHandler constructor
         *
         * @param OptionValueInterfaceFactory $optionValueFactory
         * @param JoinProcessorInterface $extensionAttributesJoinProcessor
         */
        public function __construct(
            OptionValueInterfaceFactory $optionValueFactory,
            JoinProcessorInterface $extensionAttributesJoinProcessor
        ) {
            $this->optionValueFactory = $optionValueFactory;
            $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor;
        }

        /**
         * @param ProductInterface $product
         * @return OptionInterface[]
         */
        public function load(ProductInterface $product)
        {
            $options = [];
            /** @var Configurable $typeInstance */
            $typeInstance = $product->getTypeInstance();
           if (strstr(get_class($typeInstance), 'Magento\Catalog\Model\Product\Type\Simple') !==
   false || strstr(get_class($typeInstance), 'Magento\Bundle\Model\Product\Type') !==  false) {
            return null;
        }
            $attributeCollection = $typeInstance->getConfigurableAttributeCollection($product);
            $this->extensionAttributesJoinProcessor->process($attributeCollection);
            foreach ($attributeCollection as $attribute) {
                $values = [];
                $attributeOptions = $attribute->getOptions();
                if (is_array($attributeOptions)) {
                    foreach ($attributeOptions as $option) {
                        /** @var \Magento\ConfigurableProduct\Api\Data\OptionValueInterface $value */
                        $value = $this->optionValueFactory->create();
                        $value->setValueIndex($option['value_index']);
                        $values[] = $value;
                    }
                }
                $attribute->setValues($values);
                $options[] = $attribute;
            }

            return $options;
        }
    }

But I get this below issue.
Type Error occurred when creating object: Magento\ConfigurableProduct\Model\Product\ReadHandler,
Argument 1 passed to Magento\ConfigurableProduct\Model\Product\ReadHandler::__construct()
must be an instance of Magento\ConfigurableProduct\Helper\Product\Options\Loader, instance
of Vendor\Mymodule\Helper\Loader given,
called in /var/www/html/master/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on
line 116 [] []

I could find the mistake.


texts: How to create Dynamic rows in custom admin form?

texts:
I want to create a form field which has dynamic rows in that page.
Also, I want to store the form data in database table.
I already referred this link >> https://github.com/bbakalovGlobal/Bss_DynamicRows Anyone has any demo extension for that


texts: Magento 1.9, memory exhausted when calling cart.info api

texts:
i tried to call cart.info api, but it said memory exhausted bla bla bla. Any idea to fix this ?

i've tried to increase the memory limit to 4 gb, but it doesn't seem to fix anything.

thanks!


texts: Place order with authorize.net without capture offline

texts:
I want to place an order with authorize.net. But here is one twist.

Customers are not charged while placing an order. Instead of this, execute API calls for get/create Customer profile Id and Payment Profile Id. So I can charge them later.

Please help me, is it possible? How?

Thank you in advance.


texts: How can I add a Google Content Attribute (Google Shopping)

texts:
I am using the following google shopping extension:

http://www.magentocommerce.com/magento-connect/google-content-api-for-shopping.html

This extension works great for me, but I want to add a new google content attribute, because I want to import a special product price for products too. Currently I can't mapping a special price because only the google content attribute "price" is selectable, but I need a seperate attribute for special prices. Hope you can help me :)

UPDATE: I have changed the config.xml of Google Shopping Extension and now the sale_price is also available for other countries then US. Product Synchronisation works, but I can't see the special price in google merchant center.

                    <sale_price translate="name">
                        <name>Sale Price</name>
                        <required>0</required>
                        <!--<country>US</country>-->
                    </sale_price>
                    <sale_price_effective_date_from translate="name">
                        <name>Sale Price Effective From Date</name>
                        <required>0</required>
                        <!--<country>US</country>-->
                    </sale_price_effective_date_from>
                    <sale_price_effective_date_to translate="name">
                        <name>Sale Price Effective To Date</name>
                        <required>0</required>
                        <!--<country>US</country>-->
                    </sale_price_effective_date_to>


texts: How to remove modal.js from all pages in magento 2.2

texts:
because of this file modal.js

define([
    'jquery',
    'underscore',
    'mage/template',
    'text!ui/template/modal/modal-popup.html',
    'text!ui/template/modal/modal-slide.html',
    'text!ui/template/modal/modal-custom.html',
    'Magento_Ui/js/lib/key-codes',
    'jquery/ui',
    'mage/translate'
], function ($, _, template, popupTpl, slideTpl, customTpl, keyCodes) {
    'use strict';
..

in website all pages these modal-popup content is being called but when you see its source code there is no modal.js exist.
please help me remove this.


texts: Dependency Injection (di.xml) - (virtualType vs type) Magento 2 xsi:type='object'

texts:
Can someone please explain when you would use <type/> or <virtualType in your di.xml file?

I want to make sure I understand it correctly..
At the moment, this is what I sort of think the difference is, especially with xsi:type='object' as arguments.

Type:

    <type name='Some\File\Object'>
       <arguments>
          <argument name="someText" xsi:type="string">String Value for This Arg</argument>
          <argument name="someArg" xsi:type="object">Some\Object\Arg\For\This\Arg</argument>
       </arguments>
    </type>

Virtual Type:

<virtualType name='instance1' type='Some\File\Object'>
   <arguments>
      <argument name="someArg" xsi:type="object">Some\Object\Arg\For\This\Arg</argument>
   </arguments>
</virtualType>
<virtualType name='instance2' type='Some\File\Object'>
   <arguments>
      <argument name="someArg" xsi:type="object">Some\Other\Object\Arg\For\This\Arg</argument>
   </arguments>
</virtualType>

So the questions I guess:  - This is what I think it does:

<type/> vs </virtualType> usage:

<type/> : This is a singular instance, and everywhere Magento 2 references this type, would it replace the argument given for every other class that use this object (argument)?
<virtualType/> : These ones you are able to call by name=, (in my example instance1, or instance2) to differentiate their usage at different places.  I then call them and give them different argument values, so they do not interact with each other?

Is this how you would use type and virtualType.... one/more objects and then 'override' them for use in other places that do not have any dependency on each other.  For example: creating different log files, Magento has the main xsi:type=object referenced somewhere, then using virtualTypes I call them using the name?
Do I do this (based on instance1 or instance2 above) example usage:

Use Type

   <type name='Some\Other\ObjectB'>
       <arguments>
            <argument name="ObjectInstance" xsi:type='object'>instance1</argument>
       </arguments>
   </type>
   <type name='Some\Other\ObjectB'>
       <arguments>
            <argument name="ObjectInstance" xsi:type='object'>instance2</argument>
       </arguments>
   </type>

OR
VirtualType:

   <virtualType name='Some\Other\ObjectB'>
       <arguments>
            <argument name="ObjectInstance" xsi:type='object'>instance1</argument>
       </arguments>
   </virtualType>
   <virtualType name='Some\Other\ObjectB'>
       <arguments>
            <argument name="ObjectInstance" xsi:type='object'>instance2</argument>
       </arguments>
   </virtualType>

I think the confusion is when do I use <virtualType/> elements do I use them in conjunction with  AND / OR , especially when I want to use multiple virtualTypes with just arguments different (log files for sake of this discussion)


texts: how to magento2 forgot password api in graphql?

texts:
<?php
require_once('baseurl.php');
error_reporting(E_ALL ^ E_NOTICE);
$userData = array("username" => "", "password" => "");
$ch = curl_init($baseUrl . "rest/V1/integration/admin/token");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));
$token = curl_exec($ch);

    $url=$baseUrl . "rest/V1/customers/password?email=".$emailId."&template=email_reset&websiteId=1";
    //echo $url;
     $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

        $result = curl_exec($ch);

     if($result=='true'){

        $response='{
            "status":"true",
            "message":"Password reset link has been sent to your email id"
        }';
        echo $response;
     }
     else{
        $response='{
                "status":"false",
                "message":"This email address is not registered"
            }';
                        echo $response;
    }


texts: How to show Discount amount on shopping cart page below Total order in Magento 2?

texts: I want to show Discount amount after applying coupon code below total order on shopping cart page.


texts: Difference catalog category - default and layered

texts:
This is something I did not understand and could not find satisfying answers for.

What ist the difference between catalog_category_default and catalog_category_layered in catalog.xml?
When is catalog_category_defaultused? Does it have to be enabled somewhere?

All I've seen rendered is catalog_category_layered with the layered navigation.


texts:
I add a checkbox input to the checkout page in magento 2. The way I add it is really simple, just add an item in checkout_index_index.xml.
When clicking on the checkbox, I want to call a PHP function. My plan is to create a controller. But I don't know what should be the URL of the controller. I can create a route but how to get that value in the js file?
If I set the URL to 'custom/index' then it automatically POST to shop_url/checkout/custom/index. How to do AJAX in checkout page?
define([
    'Magento_Checkout/js/view/summary/abstract-total',
    'Magento_Checkout/js/model/totals'
], function (Component, totals) {
    "use strict";

    return Component.extend({

           handleCheckbox: function() {

                $.ajax({
                    method: "POST",
                    url: 'WHAT SHOULD BE THE URL HERE',
                    data: {form_key: window.FORM_KEY},
                    dataType: "json",
                    showLoader: true,
                }).done(function( response ) {
                   console.log('GOT RESPNSE: ', response)
                });
            },

        /**
         * Order totals
         *
         * @return {Object}
         */
        totals: totals.totals(),

        /**
         * Is display reward points totals
         *
         * @return {boolean}
         */
        isDisplayed: function() {
            return this.getPureValue() !== 0;
        },

        /**
         * Get total value
         *
         * @return {number}
         */
        getPureValue: function() {
            var price = 0,
                fee;

            if (this.totals) {
                fee = totals.getSegment('fee');

                if (fee) {
                    price = fee.value;
                }
            }
            return price;
        },

        /**
         * Get total value
         *
         * @return {string}
         */
        getValue: function() {
            return this.getFormattedPrice(this.getPureValue());
        }
    });
});


texts: How do I get just the product additional information in the custom module

texts:
Hi i am trying to create a page which will search a product and show the product
there. Everything is working fine but i can't show the product additional information tab in the product.

Here is my block code:

 <?php

namespace Custom\Module\Block\Product;

use Magento\Catalog\Model\Product;

use Magento\Catalog\Model\Category;

class Create extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Magento\Catalog\Model\Product
     */
    protected $_product;

    /**
     * @var \Magento\Catalog\Model\Category
     */
    protected $_category;

    /**
     * @var \Magento\Cms\Model\Wysiwyg\Config
     */
    protected $_wysiwygConfig;

    /**
    * @param \Magento\Catalog\Block\Product\Context $context
    * @param \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig
    * @param Product $product
    * @param Category $category
    * @param array $data
    */
    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Cms\Model\Wysiwyg\Config $wysiwygConfig,
        Product $product,
        Category $category,
        array $data = []
    )
    {
        $this->_wysiwygConfig = $wysiwygConfig;
        $this->_product = $product;
        $this->_category = $category;
        parent::__construct($context, $data);
    }

    public function getWysiwygConfig()
    {
        $config = $this->_wysiwygConfig->getConfig();
        $config = json_encode($config->getData());
    }

    public function getProduct($id)
    {
        return $this->_product->load($id);
    }

    public function getCategory()
    {
        return $this->_category;
    }

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

Here is template code:

<?php

$helper = $this->helper('Webkul\Marketplace\Helper\Data');

/** @var $this \Magento\Framework\View\Element\Template */
/** @var $helper \Magento\Search\Helper\Data */
$helper_search = $this->helper('Magento\Search\Helper\Data');
 $product_id=$this->getRequest()->getParam('pid');
$product_coll = $block->getProduct($product_id);
$pname = $product_coll->getname();
$desc = $product_coll->getDescription();
$pSku = $product_coll->getsku();

$attributes = $product_coll->getAttributes();

foreach ($attributes as $attribute) {
    echo $attribute->getAttributeCode(); echo '
';
    echo $attribute->getStoreLabel(); echo '
';
    echo $attribute->getFrontendLabel(); echo '
';
    echo $attribute->getFrontend()->getLabel(); echo '
';
    echo $attribute->getFrontend()->getValue($product); echo '
';
}
?>

Above code shows the product name, description and sku but it's now showing
product additional data.


texts: How to get product attributes detail in magento 1.9

texts:
I want to get the product custom attribute value for all the products in each order.
How can i get the product attribute value using both order id and product id in magento 1.9


texts:
I have some trouble when i get data with function getChildHtml() .
Here is my layout.xml file

<?xml version="1.0"?>
<layout version="0.1.0">
    <hello_index_index>
          <reference name="content">
               <block type="hello/hello" name="title" template="hello/title.phtml">
                      <block type="hello/hello" name="title1" template="hello/title1.phtml">
                            <block type="hello/hello" name="title2" template="hello/title2.phtml"/>
                      </block>
               </block>
          </reference>
    </hello_index_index>
</layout>

when i try print data in file title2.phtml to the screen with code is

echo $this->getChildHtml('title2');

OR

echo $this->getChildHtml('title1');

In the first way is no data displayed on the screen .
In the second way have data displayed on the screen but only data in file title1.phtml .
So how to display the data in file title2.phtml
Thank everybody .


texts: Magento 2 not displaying payment methods on frontend

texts:
I am having this problem on my magento 2 website.

Whenever a logged in or guest user adds a product to cart and then proceeds to checkout , all payment methods are displayed correctly on the checkout page.

However, in another scenario if  a logged in or guest user adds a product to cart and then proceeds to checkout and before proceeding to actually doing the payment if the user clicks "Edit" tab to edit his/her personal information and comes to back to the payment page then "No Payment methods" is being displayed on the frontend.

Errors displayed in cosole are as follows :

  1.) Uncaught TypeError: items is not a function
      at collection.min.js:8
      at Function..each..forEach (underscore.min.js:7)
      at UiClass._updateCollection (collection.min.js:8)
      at UiClass.removeChild (collection.min.js:5)
      at UiClass. (element.min.js:19)
      at Array.forEach ()
      at UiClass._clearRefs (element.min.js:19)
      at UiClass.destroy (element.min.js:18)
      at UiClass._super (wrapper.min.js:3)
      at UiClass.destroy (collection.min.js:7)

  2.) Uncaught ReferenceError: Unable to process binding "blockLoader: function (){return isLoading }" Message: isLoading is not defined
      at blockLoader (eval at createBindingsStringEvaluator (knockout.min.js:268), :3:64)
      at update (block-loader.min.js:7)
      at ko.dependentObservable.disposeWhenNodeIsRemoved

  3.) Uncaught SyntaxError: Unexpected end of JSON input
      at JSON.parse ()
      at Object.process

  4.) Facebook Pixel Error: Error: Duplicate Pixel ID: 1165366550167867

Can anyone help me out in solving out this problem ?


texts: Magento 2: Add custom field to Admin Store edit

texts:
I am trying to add a custom field to Admin Store Edit
I have overridden the block function _prepareStoreFieldset locate in vendor/magento/module-backend/Block/System/Store/Edit/Form/Website.php
This is my etc/adminhtml/di.xml
    <?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Backend\Block\System\Store\Edit\Form\Website">
        <preference for="Magento\Backend\Block\System\Store\Edit\Form\Website" type="Vendor\Module\Block\System\Store\Edit\Form\Website" />
    </type>
</config>

Then I created a file in Vendor\Module\Block\System\Store\Edit\Form
<?php

namespace Vendor\Module\Block\System\Store\Edit\Form;

/**
 * Adminhtml store edit form for the website
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 *
 * @SuppressWarnings(PHPMD.DepthOfInheritance)
 */
class Website extends \Magento\Backend\Block\System\Store\Edit\Form\Website
{
    /**
     * @param \Magento\Backend\Block\Template\Context $context
     * @param \Magento\Framework\Registry $registry
     * @param \Magento\Framework\Data\FormFactory $formFactory
     * @param \Magento\Store\Model\GroupFactory $groupFactory
     * @param array $data
     */
    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\Data\FormFactory $formFactory,
        \Magento\Store\Model\GroupFactory $groupFactory,
        array $data = []
    ) {
        parent::__construct($context, $registry, $formFactory, $groupFactory, $data);
    }

    /**
     * Prepare website specific fieldset
     *
     * @param \Magento\Framework\Data\Form $form
     * @return void
     */
    public function _prepareStoreFieldset(\Magento\Framework\Data\Form $form)
    {
        $fieldset = $form->getForm()->getElement('website_fieldset');

        $fieldset->addField(
            'website_type',
            'text',
            [
                'name' => 'website[type]',
                'label' => __('Type'),
                'value' => 1,
                'required' => true,
                'disabled' => false
            ]
        );
    }
}

But it did not work. Anywhere I am wrong? Please help me. Thanks


texts: How/where do I change the getFieldParams for magento forms from required-entry to just required?

texts:
I'm TRYING to convert a magento template to use Foundation 5, running into all kinds of issues with forms.

How/where do I change the getFieldParams for magento form validation from required-entry to say "required"?


texts: How to hide add to cart button from product page of a specific product?

texts:
Magento version 1.7.0.2

I am looking for a solution to hide add to cart button from product page? I got this hide price plugin from amasty but it hides the button only from shop page and not from the product page. I am able to hide the button sitewide by commenting out functions from view.phtml but that is not what I want.

I also tried this post but didn't work for me. I am not so good at writing php functions. Can anyone help me what functions do I put and in which file so that I am able to hide add to cart button from the product page of specific products.


texts: Configurable product page is showing price twice in magento

texts:
I am using flaton magento template. I have replaced the catalog.xml  code

From

<reference name="product.info.options.wrapper">
 <block type="catalog/product_view_type_configurable" name="product.info.options.configurable" as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml"/>
 </reference>

To

<reference name="product.info.options.wrapper">
            <block type="catalog/product_view_type_configurable" name="product.info.options.configurable"[![enter image description here][1]][1]
            as="options_configurable" before="-" template="catalog/product/view/type/options/configurable.phtml">
            <block type="core/text_list" name="product.info.options.configurable.renderers" as="attr_renderers" />
            <block type="core/text_list" name="product.info.options.configurable.after" as="after" />
        </block>
    </reference>

Now this showing price twice


texts: How can I create a discount code which allows the customer to get a specific item free if they spend over £300?

texts:
Either by having this item in their basket anyway and subtracting the value from the order or it would be great if the code added the item on to the order for free, without them having to search for it and place it in there themselves.

I've followed some advice I've found around the web for similar questions but nothing has worked. Thanks!


texts: Magento 2 What method should I use instead of deprecated getCollection when fetching data from custom database table?

texts:
I created a custom database table and now want to fetch data, but getCollection method is deprecated and I can't find any other method that suits my case. Here's the example of my code:

use Magento\Customer\Model\ResourceModel\Customer\CollectionFactory;
use <MyName>\<MyModule>\Model\UserUpdateFactory;

class CustomerChangeTracker
{

private $customer;

private $previousCustomer;

private $current = [];

public function __construct(CollectionFactory $customer, UserUpdateFactory $previousCustomer)
{
    $this->customer = $customer;
    $this->previousCustomer = $previousCustomer;
}

public function getChangesSinceLastTime(): array
{
    $current = [];
    $collection = $this->customer->create();
    foreach ($collection as $customer) {
        $current[$customer->getId()] = $customer->getData('updated_at');
    }
    $this->setCurrent($current);

    $previous = [];
    foreach ($this->previousCustomer->create()->getCollection() as $customer) {
        $previous[$customer->getData('customer_id')] = $customer->getData('updated_at');
    }


texts: Can't retrieve entity config Error join credit_memo collection

texts:
I'm trying to join the collection of refunds and refunds items in this way:

$collection = Mage::getModel('sales/order_creditmemo')->getCollection()
        ->join(array('item'=> 'sales/order_creditmemo_item'),
            'item.parent_id = main_table.entity_id',
            array('sku'=>'item.sku')
        );

But I don't understand why is returning this error:

Fatal error: Uncaught exception 'Mage_Core_Exception' with message 'Can't retrieve entity config: sales/order_creditmemo_item' in /var/www/html/app/Mage.php:603 Stack trace: #0 /var/www/html/app/code/core/Mage/Core/Model/Resource.php(282): Mage::throwException('Can't retrieve ...') #1 /var/www/html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(276): Mage_Core_Model_Resource->getTableName('sales/order_cre...') #2 /var/www/html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(488): Mage_Core_Model_Resource_Db_Abstract->getTable('sales/order_cre...') #3 /var/www/html/app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(569): Mage_Core_Model_Resource_Db_Collection_Abstract->getTable('sales/order_cre...')

After searching for a solution all day long still stuck at this point.
Any idea why this behaviour?


texts: Remove only one coupon from multiple from cart in magento 2

texts:
I am using magento 2.3.4 and and I have added one coupon code by default. I want to remove this on select of payment gateway but may be customer could add multiple coupon code , but I want to remove only one not all. So how we can do this?
I dis some google and get this solution
 $quote = $observer->getEvent()->getQuote();
//remove coupon code
$quote->setCouponCode('');
$quote->collectTotals()->save();

But this will remove all the coupon. I want only one, if 2-3 coupon applied.


texts: Set different static cms block to each different product

texts:
I have a created different CMS static blocks. I need to call the respective static block for each product.

I thought of getting the URL key and then assign it to the respective Products.
How could I achieve this ?

Thanks in advance for the answers