texts: Adding a Product to the Cart via Querystring using SKU in magento 1.9

texts:
Adding a Product to the Cart via Querystring using SKU

I tried above code at localhost but its not working in magento 1.9 as well magento 1.7

can anyone help me to resolve this issue in magento 1.9

I tried everything that you mentioned in post but could not success.

copied all three files and add one file for modules in app/etc/modules/Csr_Chekout.xml to for active extension but its not working


texts: Magento2 Event after Default Billing address change, How to send email if Billing address change?

texts:
I want to send an email to admin if the default billing address selection is changed or the values are changed by the customer.

How can I achieve this?


texts: New user registration Showing error " We Can't save the customer "

texts: Hello i am new on the magento 2 . suddenly i got the error when new user come on the site and try to register after filling information it is showing error as " We Can't save the customer "  . i am not able to understand why this is happening suddenly on my website. please let me know and suggest me any relevant answer for this query . my webSite Url is http://54.67.81.223/viewsonicstore


texts: How to display text on date tribute in case of null value or empty

texts:
I have a date attribute name"release" to display release date of product on product view page, I used below code which working fine, only required help is to display TBC (some text) in case if there is no value assign to attribute

<?php
$source = $_product->getdata('release');
$date = new DateTime($source);
echo $date->format('d M Y');
?>


texts: How to add link on menu items in magento?

texts:
I have added Offer section in menu items. I treated Offer has one of the category and added 2 sub section i.e 1) 100 and 2) 50 percent offer.

Now I want to add link for sub section 100 and 50 percent


texts: Magento 2 add content on the product page

texts: I'm using Magento 2, and I'm trying to move some content on the product page, so basicly I want to move the add to wishlist, add to compare and email to a friend under the product image, cause now they are under the add to cart button. I've tryed to move some code from addto.phtml into the gallery.phtml, but is not working properly. What file should I edit to do that?


texts:
How to delete order item from order object? For example:

$order = Mage::getModel('sales/order')->load(1);

foreach($order->getAllItems() as $item) {
    $order->removeByItemId($item->getId());
}


texts: Overriding default assets renderer in Magento2

texts:
There is a getAssetTemplate function in magento/vendor/magento/framework/View/Page/Config/Renderer.php.

I want to override it to make render things in a bit different way.

I don't want to update these files from vendor directory. What would be the proper way to make changes to this function?

The general question is what is the way to override classes under vendor/magento/framework?


texts: Magento 1.9.x after refresh cache, site not working

texts:
After refresh cache on admin page, site not working.
Just show this message.

Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found  in /home/jaspertradingllc/public_html/lib/Varien/Simplexml/Config.php on line 510

#0 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/home/jaspertra...', 510, Array)
#1 /home/jaspertradingllc/public_html/lib/Varien/Simplexml/Config.php(510): simplexml_load_string('{\\rtf1\\ansi\\ans...', 'Varien_Simplexm...')
#2 /home/jaspertradingllc/public_html/lib/Varien/Simplexml/Config.php(498): Varien_Simplexml_Config->loadString('{\\rtf1\\ansi\\ans...', 'Varien_Simplexm...')
#3 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/Design/Config.php(62): Varien_Simplexml_Config->loadFile('/home/jaspertra...')
#4 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Core_Model_Design_Config->__construct(Array)
#5 /home/jaspertradingllc/public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/design_con...', Array)
#6 /home/jaspertradingllc/public_html/app/Mage.php(477): Mage::getModel('core/design_con...', Array)
#7 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/Design/Package.php(105): Mage::getSingleton('core/design_con...')
#8 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Core_Model_Design_Package->__construct(Array)
#9 /home/jaspertradingllc/public_html/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('core/design_pac...', Array)
#10 /home/jaspertradingllc/public_html/app/Mage.php(477): Mage::getModel('core/design_pac...', Array)
#11 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/App/Area.php(155): Mage::getSingleton('core/design_pac...')
#12 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/App/Area.php(124): Mage_Core_Model_App_Area->_initDesign()
#13 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/App/Area.php(92): Mage_Core_Model_App_Area->_loadPart('design')
#14 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/App.php(789): Mage_Core_Model_App_Area->load()
#15 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(512): Mage_Core_Model_App->loadArea('frontend')
#16 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Controller/Front/Action.php(69): Mage_Core_Controller_Varien_Action->preDispatch()
#17 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Core_Controller_Front_Action->preDispatch()
#18 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#19 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#20 /home/jaspertradingllc/public_html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#21 /home/jaspertradingllc/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#22 /home/jaspertradingllc/public_html/index.php(84): Mage::run('', 'store')
#23 {main}

Please help me .


texts: Magento 2 - Size filters are not displayed when the configurable product is set to Not individually visible

texts:
I have this structure for my products, I have a grouped product that has two configurable products which are configured as Not visible Individually but in the filter section does not show any size, if I configure my configurable products as Visible or Search will show the sizes
i use this module to achieve grouped product with configurable products since Magento 2 does not allow it by default
Here is my website
I will appreciate any suggestions. Thank you!


texts: What is the proper way to extend the Enterprise_PageCache_Model_Processor

texts:
I am trying to extend Enterprise_PageCache_Model_Processor and found that I can do it by making sure that I either modify the enterprise.xml in the app/etc global configs but I wanted to do it in a separate XML file. I got it to work by adding my own file; however, I feel like it might not be the way to go. Since it appears that it just loops through all of the files in the directory, and it appears to do it alphabetically so if you start your file with an "a" it's going to get loaded first and not override.

Is it something that you just have to make sure you name it with a letter after the one you are trying to extend? Do you just modify the XML? What is the ways other people have dealt with this, like if you want to modify config.xml?


texts: FedEx Shipping Rate Error in Multi-Store

texts:
My store running in India, for courier service we using FedEx, using Magento-Fedex Extension, if my Magento website base currency is INR the rate calculation looking fine, supposed if my base currency is Dollar the rate is not converted to the Dollar price, the price like $1,700(Actually 1,700 is INR)

Other Services working Good,


texts:
I tried below step to merge and minify js and css

  bin/magento setup:upgrade

  bin/magento indexer:reindex

  bin/magento deploy:mode:set production -s

  php bin/magento setup:di:compile-multi-tenant

  bin/magento setup:static-content:deploy

when I open the website in browser along with merged file I can see all other js file also loading

please help me out

in admin side

  Enable Javascript Bundling :- Yes

  Merge JavaScript Files :- Yes.

  Minify JavaScript Files :- Yes


texts: Magento 2: SMTP Email gives error "Invalid sender data"

texts:
Using Magento 2 Version 2.1.0 on WAMP Windows 10

I'm using https://github.com/magepal/magento2-gmailsmtpapp

In magento Admin, then goto Stores -> Configuration -> Advanced -> System -> Gmail/Google Apps SMTP Pro.
I have configured things

Authentication method: LOGIN
SSL type: SSL (Gmail / Google Apps)
SMTP Host: smtp.gmail.com
Username: Gmail Account Username
Password: GmailAccount Password
Set Reply-to: Yes
Set Return-Path: Yes

I have below code in my Controller

 $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        $transport = $this->_transportBuilder->setTemplateIdentifier(1)
                ->setTemplateOptions(['area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE, 'store' => 1])
                ->setTemplateVars(['data' => $postObject])
                ->setFrom('XXXX@gmail.com', $storeScope)
                ->addTo('XXXX@gmail.com', $storeScope)
                ->setReplyTo('XXXX@gmail.com')
                ->getTransport();
        echo $transport->sendMessage();

When i run this code, it gives below error

  1 exception(s): Exception #0
  (Magento\Framework\Exception\MailException): Invalid sender data

Now it's causing

  Could Not Open Socket


texts: how to load phtml template after price in product details page magento 2 custom theme?

texts:
Actually i want to load phtml templates after price in product details page
  magento 2 custom theme


texts:
I am creating a product programmatically, trying to set the visibility with below code

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

$product = $objectManager->create('\Magento\Catalog\Model\Product');

$product->setVisibility(4);

$product->save();

The above code works perfectly, but it is not working when I use like below.

$product->setVisibility('Catalog, Search');

The product is saving, but visibility is not set when used like above. Can anyone suggest me how to update the visibility? I am reading it from the csv file and updating.


texts:
I have to maintain a Magento 1.9 e-commerce website.

I can see that URL is hard coded in database

web/secure/base_url
web/unsecure/base_url

Why this is recommanded ?

What could be unsecure to use {{base_url}} ?


texts: want to move the extra images section below the main image in all product pages

texts: I am building an ecommerce website named "bookslab.in". I want to move the extra images of product down below the main image of the product. I am attaching the screenshot of where i want to move the extra images. Any help will be appreciated. I want to move the images below the main big image.


texts: Invoice is not displaying in Invoice tab in admin order view - Magento 1

texts:
I have created an invoice. But it is not displaying in "Invoice tab".
please find attachment

Anyone have an idea , why it is not coming?


texts: How to put different brands in slider on homepage

texts:
I have displayed different brands on my home page, but i want them to be displayed in slider to view in customized form.
By the below code it takes images of manufacture and display on homepage, so what changes i need to do in this code so that they display in slide-bar.
I have used perficient extension to display brands on homepage

and code which i have added in home.phtml, app/design/frontend/base/default/template/perficient/manufacturer

<?php $_manufacturersCollection = $this->getManufacturersCollection(); ?>

        <?php echo $this->__('Shop By Manufacturer') ?>

        <form id="pollForm" action="<?php echo $this->getUrl('manufacturers') ?>" method="post" >
            <?php $_iterator = 0; ?>

                <?php foreach ($_manufacturersCollection as $_manufacturer): ?>
                    <li class="item<?php if (++$_iterator == sizeof($_manufacturersCollection)): ?> last<?php endif; ?>">
                        <a class="product-images" href="<?php echo $this->getUrl('manufacturers' . '/' . $_manufacturer->getIdentifier()) ?>" title="<?php echo $_manufacturer->getManufacturer() ?>"><img alt="<?php echo $_manufacturer->getManufacturerLogo() ?>" src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'manufacturer' . '/' . $_manufacturer->getManufacturerLogo() ?>" width="80" height="80">

                <?php endforeach; ?>

                <button type="submit" title="<?php echo $this->__('View All123') ?>" class="button"><?php echo $this->__('View All') ?></button>

        </form>


texts: Magento not sending shipment emails - other emails working

texts:
I am having problems with Magento emails:

The cron sends the Order Confirmation and Invoice emails fine - but NOT the shipment emails.

They are definitely enabled in Configuration/Sales/Sales Emails.
(I have also added a 'copy to' email address to check what is being sent out.)

Any idea how to solve this?


texts: Magento2: Get gallery images in knockoutjs?

texts:
How to get gallery images in knockoutjs in Magento2.3.0?

Any help would be appreciated.


texts: Magento 2 Difference between Order Invoice, Cancel, Void, Hold and Ship

texts: Can anyone explain with some examples that how Magento process any order for different steps in Invoice, Cancel, Void, Hold and Ship.


texts: Magento 2: use statement versus direct class path?

texts:
I may be missing a point but I'm just wondering why sometimes there is an "use" statement for a specific class and sometimes we don't.

Example: app\code\Magento\Email\Model\Template.php, we have at the top of file:

namespace Magento\Email\Model;

use Magento\Store\Model\ScopeInterface;
use Magento\Store\Model\StoreManagerInterface;

Then in the __construct method we have the following parameters:

public function __construct(
    \Magento\Framework\Model\Context $context,
    \Magento\Framework\View\DesignInterface $design,
    \Magento\Framework\Registry $registry,
    \Magento\Store\Model\App\Emulation $appEmulation,
    StoreManagerInterface $storeManager,
    \Magento\Framework\View\Asset\Repository $assetRepo,
    \Magento\Framework\Filesystem $filesystem,
    \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
    \Magento\Email\Model\Template\Config $emailConfig,
    \Magento\Email\Model\TemplateFactory $templateFactory,
    \Magento\Framework\Filter\FilterManager $filterManager,
    \Magento\Framework\UrlInterface $urlModel,
    \Magento\Email\Model\Template\FilterFactory $filterFactory,
    array $data = []
)

So we can clearly see that as we called use Magento\Store\Model\StoreManagerInterface; at the top of the class, we are able to do StoreManagerInterface $storeManager in the constructor parameters.

My questions are:

Why do we do this for only one class?
Why can't we add a use statement for every class of the constructor so we don't have to type the full class path ?
Or the other way around, why don't we get rid of the use statement and type the full path to StoreManagerInterface class ?


texts:
I am trying to include a different pager for the bottom toolbar. For this I have changed the template used by the bottom toolbar:

<?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/toolbar-bottom.phtml')->toHtml(); ?>

How can I change the template used for <?php echo $this->getPagerHtml() ?> within toolbar-bottom.phtml?


texts: Validation of unique value fails when updating record

texts:
I created a new field on the customer form in the admin. I did so, with an EAV attribute like this inside the InstallData:

$customerSetup->addAttribute(Customer::ENTITY, self::DOCUMENT_NUMBER, [
        'type' => 'varchar',
        'label' => 'Document Number',
        'input' => 'text',
        'required' => true,
        'visible' => true,
        'user_defined' => true,
        'searchable' => true,
        'visible_on_front' => true,
        'unique' => true,
        'sort_order' => 31,
        'position' => 31,
        'system' => 0,
    ]);

It worked and I can see and save data using the customer form. The problem is that whenever I try to edit a costumer, it throws an error saying: The value of attribute "Document Number" must be unique. This would make sense if I were trying to create a new customer with an already used 'Document Number' but since I'm doing an updated on an existing record it should not give me this error.

Am I missing some configuration? Thanks.


texts: Need to show discounted price of bundle in the cart page

texts:
I have a coupon code promo of 15 percent (shopping cart rule), when a user adds the product to the cart and applies the coupon code I need to show the original price and the discounted price of the bundle on the cart page

How to get the discounted price for a bundle on the cart page?


texts: Magento 2 : Update product price in plugin

texts:
I want to update product price each time customer open a page, so the price will be real time. I tried to use a plugin to change it when getPrice is called, but it always fails, here is my plugin code :

Plugin :

namespace Test\Show\Plugin;
use Magento\Catalog\Api\ProductRepositoryInterface;
class Product
{
    protected $productRepository;

    public function __construct(
        ProductRepositoryInterface $productRepository,
        array $data = []
    )
    {
        $this->productRepository = $productRepository;
        parent::__construct($context, $data);
    }

    public function getLoadProducts($id)
    {
        return $product = $this->productRepository->getById($id, true);
    }

    public function afterGetPrice(\Magento\Catalog\Model\Product $subject, $result)
    {
        $product = $this->getLoadProducts($subject->getId());
        $product->setPrice(1000);
        return $result;
    }
}

Is there any way to change product price from the plugin?


texts:
For one of my module I’m trying to rewrite the class Mage_Sales_Model_Quote_Address_Total_Subtotal.
I used to rewrite models, no problem with that. I understand that the abstract classes cannot be rewritten.
But this one, I’m stuck ...

My aim is to rewrite protected function _initItem($address, $item), I have failed, and tryed to rewrite every function (with parent:: replacement by grandparent class). No more luck for me.

Here is my config :

<!-- in app/code/local/Mynamespace/Mymodule/etc/config.xml -->
<?xml version="1.0"?>
<config>
<global>
    <models>
        <sales_quote>
            <rewrite>
                <address_total_subtotal>Mynamespace_Mymodule_Model_Sales_Quote_Address_Total_Subtotal</address_total_subtotal>
            </rewrite>
        </sales_quote>
    </models>
</global>
</config>

And my class :

# in app/code/local/Mynamespace/Mymodule/Model/Sales/Quote/Address/Total/Subtotal.php
class Mynamespace_Mymodule_Model_Sales_Quote_Address_Total_Subtotal extends Mage_Sales_Model_Quote_Address_Total_Subtotal
{
protected function _initItem($address, $item)
{
    Mage::log("rewrite");
}
}

Can anyone help me with that ? Seems to be the same problem as an abstract class so far.


texts: magento 2 Cannot add foreign key constraint while importing admin_user table

texts:
I'm trying to export admin_user table from one database and importing it into another database. But it shows the below issue.
#1215 - Cannot add foreign key constraint

I have also disabled foreign key check.


texts: How to View the Attribute Set of my Products

texts:
Is there any clear way to view the attribute set a product is already in?  I don't see a report, and I can't find a way to see what products are already listed in each attribute set.  I'm still in Magento 1.4.1.1

Thanks.


texts: Magento admin not displaying fully after module installation

texts:
Ok So I've had some issues with removing modules from Magento recently, so I decided to scrap what i had before and start again with a slight name change to the module.

So i created the module, set it into my site and it didn't work, Once I reloaded up the admin pages I only saw the logo, the global search, logged in, date, the logout options and the next grey bar, which usually contains the main navigation for the admin section, however it was devoid of any links... the content section was empty.

So I stuck it on my local test server and i got the same, however the empty nav bar now contained the following error:

  Fatal error: Class 'Chris_Homebanner_Helper_Data' not found in
  C:\xampp\htdocs\magento\app\Mage.php on line 547

I finally installed a fresh copy of Magento on my local server, and it worked fine, all installed correctly.

So somehow along the road of building this site something has been done to break this. I've not changed or extended any of the Magento core however. The only thing I've really done recently is remove an entry from the core_resouce table and delete local module files for another module. So no idea how I could have caused an error like this by doing that.


texts: How to compare customer password in magento 1.9.2

texts:
I want to implement functionality which restrict the customer to not enter his old password. Means customer can not enter the same password which is previously entered by customer.I am stuck in comparing the old password with the new password if they are same.

Any help will be appreciable.


texts: add CMS page link category menu in Magento 2

texts:
How to add cms page link category navigation menu Like

Example Like Home | About Us | Contact Us | Our Products

Please check screenshot


texts:
I'm trying to call a .phtml via an ajax call and I followed this example on stackoverflow but I'm either missing some aspect or just doing it wrong.
When the ajax runs it gets a 404 and I did try to view it directly through the browser and it could not find it. Based on this I assume some aspect of the file structure that I set up is wrong but I can't figure what exactly.
I have controller located at local/CheckoutAjax/controllers/AjaxController.php
    <?php
    class Checkoutajax_AjaxController extends Mage_Core_Controller_Front_Action {

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

In local/CheckoutAjax/etc/config.xml I have the following
    <?xml version="1.0"?>
    <config>
      <modules>
        <Checkoutajax>
          <version>0.1.0</version>
        </Checkoutajax>
     </modules>
    <frontend>
    <routers>
    <Checkoutajax>
      <use>standard</use>
      <args>
          <module>Checkoutajax</module>
          <frontName>Checkoutajax</frontName>
      </args>
   </Checkoutajax>
   </routers>
   <layout>
     <updates>
       <checkoutajax>
         <file>checkoutajax.xml</file>
       </checkoutajax>
     </updates>
   </layout>
 </frontend>
    </config>

I have this in mytemplate/default/layout/checkoutajax.xml
  <?xml version="1.0"?>
  <layout>
  <checkoutajax_ajax_index>
    <block type="checkout/checkoutajax" name="root" output="toHtml" template="checkoutajax/index.phtml" />
 </checkoutajax_ajax_index>
 </layout>

and finally I have in mytemplate/default/template/checkoutajax/index.phtml
   <?php
   echo 'this is a test'

Finally this is the ajax call
   JQuery.ajax({
            url: "/checkoutajax/ajax/index",
            type: "POST",
            data: data,
            success: function(data) {
            $j('#results').html(data);
            document.getElementsByClassName('minicart-content')[0].style.display = 'block';
            }
        });

All help is greatly appreciated.


texts:
After building a new Magento (2.3.5-p1) webshop and imported the products and categories from the old Magento 1 webshop, I have now the problem that a duplicated product is not showing in the frontend. The product is enabled in the backend.
When I wanted to add the product to an order in the backend, I got the notice the product was disabled.
I checked the product status attribute in th e backend and noticed that it had no values. Is it possible to restore the values with SQL? In the backend it is not possible.


texts:
The reviews are not submitting. In the frontend or the admin panel.
I already dropped and recreated all the tables that are connected to the reviews - and that did not help!

I have the formkey in the proper place.
Everything that is supposed to be enabled, is and not, isn't.

I also have it set that guest are Allowed to post.

I believe the next step would be to compare and contrast the originals with the ones in my site - ANY OTHER BETTER SUGGESTIONS??

error.log:

Cannot send headers; headers already sent in , line 0
#0 /var/www/vhosts/dev.silverspeck.com/lib/Zend/Controller/Response/Abstract.php(115): Zend_Controller_Response_Abstract->canSendHeaders(true)
#1 /var/www/vhosts/dev.silverspeck.com/app/code/core/Mage/Cms/controllers/IndexController.php(71): Zend_Controller_Response_Abstract->setHeader('HTTP/1.1', '404 Not Found')
#2 /var/www/vhosts/dev.silverspeck.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->noRouteAction()
#3 /var/www/vhosts/dev.silverspeck.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('noRoute')
#4 /var/www/vhosts/dev.silverspeck.com/app/code/community/ArtsOnIT/OfflineMaintenance/Controller/Router/Standard.php(46): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5 /var/www/vhosts/dev.silverspeck.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): ArtsOnIT_OfflineMaintenance_Controller_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#6 /var/www/vhosts/dev.silverspeck.com/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#7 /var/www/vhosts/dev.silverspeck.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#8 /var/www/vhosts/dev.silverspeck.com/index.php(87): Mage::run('', 'store')
#9 {main}


texts: how to display menu from the data of the Sutunam module in the weltpixel module in magento 2

texts:
comment identifier comment seront renseignés les liens dans weltpixel  pour recréer le menu à partir des données du module Sutunam (sutunam_menu pour les entrées de menu (avec sutunam_menu_store pour l'association avec le store Magento), sutunam_menu_section pour les sous-menus.
I have used the module of sutunam since we rely on the WeltPixel module which uses Magento categories


texts: Create new tab config in admin magento2 error sorting?

texts:
I had created new module in magento2, When I create new tab get error:

  Exception #0 (Exception): Warning: Invalid argument supplied for
  foreach() in
  ...\vendor\magento\module-config\Model\Config\Structure\Mapper\Sorting.php
  on line 34

This code in system.xml file.

   <?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="new_module" translate="label" sortOrder="100">
            New module
        </tab>

            Base Configuration
            <tab>new_module</tab>
            <resource>Custom_Base::config_module</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                Base
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enable Base
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
            </group>

    </system>
</config>

Many thanks!


texts: Magento 2 Pagination not working on search results - Porto Theme

texts:
Pagination works when I navigate to a page, but when I search, it doesn't. This is inconvenient when there are 100 results, but when there are 1000+, eventually it just times out and throws a 524 error.
How can I fix this?
This seems to be a theme issue. If I switch to Luma, this problem goes away.
Running Magento 2.4.1 and Elasticsearch 7.6


texts: Error: Braintree API Client Misconfigured: clientToken required. after switching from sandbox to production

texts:
I have been testing Magento with Braintree and everything was working fine.

Today I tried to switch to production, I changed the Merchant ID and Public/Private Keys, as well as the Merchant Account IDs for each currency in my multisite setup.

Everything seems to be set up ok but when I try to choose a payment method I get 'Sorry, but something went wrong'flashing up briefly followed by an eternal spinning wheel on the page.

The full JS error is:

Uncaught Error: Braintree API Client Misconfigured: clientToken required.
    at i (braintree-2.25.0.min.js:3)
    at Object.o [as _getConfiguration] (braintree-2.25.0.min.js:3)
    at Object.i [as setup] (braintree-2.25.0.min.js:6)
    at Object.setup (adapter.js:50)
    at UiClass.initBraintree (cc-form.js:180)
    at UiClass.onActiveChange (cc-form.js:141)
    at setNested (objects.js:43)
    at Object.nested (objects.js:117)
    at UiClass.set (element.js:301)
    at updateValue (links.js:57)

I am using Magento 2.1.11, if anyone has any indication what could be causing this I would be very grateful for your help.


texts: How to delete bunch of products in Magento2?

texts:
Is there a short and best way to delete bunch of products in Magento2.

I am having list if 1,20,000 SKUs and want to delete that.

Tried:

Read CSV
Delete products in loop by repository.

Problem:

But the problem is that it is taking too much time.

Any suggestions ?


texts: Magento 2 Is it possible to use same event in multiple Modules?

texts:
I wanted to use catalog_product_save_after event in 2 different modules, Is it possible to use it?

Please help me!


texts: Rest Api- get sales orders with authorizing only once

texts:
I have another website as admin panel which connects with magento store to fetch orders/products etc.
I don't want to authorize every time I call the Api. I want the system will ask me for authorization only once.
It might be possible if I could have a permanent oAuth access token or if somehow I can save the first token to the database for later use.
Please give me your ideas.

Thanks


texts: cannot read property 'section loadurl' of undefined

texts:
I'm getting this error on the firebug while loading homepage. Due to this error the pages are not loading fully. only the Header, Nav Menu and Footer and showing. The main content sections are not showing.

Tried a lot to debug the error but not successful. Any help ??

Google Chrome console error


texts: How to associate a static block with attribute values?

texts:
I want to create an multiselect attribute with 3 values. When I select the values during product creation It should display the content from the static blocks. So I entered  the identifier of the static block under default store view (which is English below) option during attribute creation like:

Now in view.phtml, I have added the below code:

<?php
getResource()->getAttribute('r_n')->getFrontend()->getValue($_product);
echo $this->getLayout()->createBlock('cms/block')->setBlockID($cmsstatic)->tohtml();
?>

where r_n is the attribute code.

But am getting error like:

Fatal error: Call to undefined function getResource()

Kindly someone help me to resolve this issue.


texts:
Hi we have one US website and one CA website

However, for some reason I have to find a Magento function for currency conversion.
I have CAD want to transfer to USD in the US store view. I did set up the Magento currency conversion rate table as well.

So, how do I call this function out to do the conversion?

THanks


texts: How to send Requests from Magento Soap Api to Firebase cloud messaging?

texts:
How to send notifications created in magento to Firebase Cloud messaging using soap API. Is there any curl method needs to be created for the message needs to be pushed into the Firebase like the below

  curl -X POST -d '{"user_id" : "jack", "text" : "test!", "message": "Hello world"}'  'https://.firebaseio.com/message_list.json'

Please any help of this point? Thanks


texts: Internal Server Error when viewing disabled product (Enterprise)

texts:
I'm running Enterprise 1.14.1 and have an issue with a "white screen", Internal Server Error whenever viewing a disabled product with compilation enabled.

If I disable compilation, and view the product, I see a 404 page as expected.

Unfortunately, I am not seeing any errors in my server log files either that would allow me to track down what's going on. I can replicate this both in the production environment and locally.  Developer mode is "On." Caching is disabled.  System and Exception logging are enabled.

To Replicate

Enable Compilation
Disable a Product.
Clear Cache (if enabled)
View product.

What I've Tried

I've tried uncommenting #ini_set('display_errors', 1); in the index.php file.  If I do this, I get a 200 response, but the error is not displayed on screen nor within the error logs.

I've obviously tried recompiling.

I'm going to start disabling Extensions one-by-one to see if there's some kind of conflict.

Update

I was able to replicate this on a clean install of Enterprise with a single configurable product.


texts: Magento - Set tax amount on quote from 3rd party data

texts:
I'm trying to set a tax amount on orders that are processed programatically with a custom controller, but can't figure out where to put the number.

what I have: A rest response from the 3rd party containing all the info for the order. It's setting the order with my controller just fine for all the attributes except tax (ie, price, shipping, item, addresses, etc) Tax is the last thing I need to figure out.

What I need: to take the number they give me in the xml and shove it into the "tax" field of the order.

What I would like: I'm hoping there's something very simple for this. All the info I've found in my searching is for things that are more complicated. Ideally I'm hoping there something like $quote->setTax('$myVariable'); that I just haven't been able to find yet.

As you can probably tell, I'm still quite new to PHP and even more new to Magento, so I really appreciate the help.


texts:
I'm using Magento ver. 2.3.2-p2 I have set document root /pub folder in my Apache, Now in my transaction logo  is no working due to wrong path:

Current : https://www.msite.com/pub/media/email/logo/stores/1/payment.png

Expected : https://www.msite.com/media/email/logo/stores/1/payment.png

Any solution for it?


texts: Updating stock levels before displaying the configurable product details

texts:
When a product is viewed I need to go to an external system (using a web service), query the actual stock values and update them in magento before displaying the page.  This is for a configurable product so I need to handle all the associated simple products.

I've implemented an event observer capturing the catalog_controller_product_init_before event and the Observer.php module has

public function loadBeforeProductObserve(Varien_Event_Observer $observer)   {
    $event = $observer->getEvent();
    $x = $event['controller_action'];
    $id = $x->getRequest()->getParam('id');
    $product = Mage::getModel('catalog/product')->load($id);

    $childProducts = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null,$product);

    foreach($childProducts as $child) {
        $stock = $child->getData("stock_item");

        if ($stock->getData("qty") == 0) {
            $stock->addData(array("qty"=>27, 'is_in_stock' => 1));
            //$stock->save();
        }
    }
}

Clearly this is running just to test the process in that it simply identifies any products with 0 stock and sets them to have 27 items.

My actual code is littered with print statements so I can see that it's finding all the right things and displaying the new values after the addData command (I've also tried setData) shows the values to be there.

When I try activating the save() function, the system fails and I get a 404 error for the page.

Without doing the save the product display is showing details as though the zero stock items are still zero and, indeed, capturing the catalog_controller_product_init_after event shows the value to be unchanged.

So what am I doing wrong?
What things could I be doing better?
How do I save the new stock value so that it will be used for the product display?


texts: How can I display all the reviews of the products on a single CMS page? I have found a module: http://www.magentocommerce.com/magento-connect/all-reviews.html, but it is nog compatible with 1.9.


texts: Elasticsearch 6.7.0 status Yellow in Magento 2.3.1

texts:
I have an Ubuntu 18.04 system installed on a Digital Ocean server. I have installed the Magento 2.3.1 version. I have installed Java and Elasticsearch using the following commands:

JAVA

sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get -y update
sudo apt-get install -y oracle-java8-installer

ELASTICSEARCH

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
sudo apt update
sudo apt install elasticsearch
Edit this file: /etc/elasticsearch/elasticsearch.yml and add this info: network.host: localhost
sudo systemctl daemon-reload
sudo systemctl start elasticsearch
sudo systemctl enable elasticsearch

If I execute this command:

curl -XGET -H "Content-Type: application/json" http://localhost:9200/_cluster/health?pretty=true

This is the result:

{
"cluster_name" : "elasticsearch",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 20,
"active_shards" : 20,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 20,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 50.0
}

The status is yellow and unassigned_shards is 20. How can I solve this problem? Please could you help me?


texts: Second domain on magento files not Ponting correctly

texts:
I have 2 different magento stores on 1 admin. I did this by creating shortcuts. Using this article.https://docs.nexcess.net/article/how-to-configure-multiple-magento-storefronts.html

It worked before but in the console I get "Failed to load resource: the server responded with a status of 403 (Forbidden)"


texts: Magento Customer Login is not working properly in chrome, but working fine in firefox

texts:
Magento Customer Login  is not working properly in chrome browser. But working fine in firefox.

While trying to login using chrome browser, it redirects to same page. After pressing F5 only it shows the dashboard.  But in firefox it is working fine without F5.

How to resolve this problem. Any idea?


texts: Add custom tab with dropdown in top header magento 2

texts:
I'd like to add another tab in the header next to the links Sign In and Create an account. If the tab is clicked, a dropdown field should appear, In which I can insert other information. Can someone tell me how I can implement this? Thank you in advance!

Edit: I use a custom theme what inherit from the blank theme. I would like to place shipping information in the dropdown box. If the tab is clicked the dropdown box should be opened. There should be no redirection as Sign In or Create an Account


texts: Product option not shown when out of stock?

texts:
In my Magento 2.2.3 shop the option images and dropdowns are not shown if the product is out of stock. I want them anyway but just the add to cart button should not be shown. The images are shown on the category page, which is correct.

Is there some setting for that by any chance?

Thanks


texts: "TypeError: $(...).fancybox is not a function" mobile menu button wont work (trying to fix)

texts:
I'm getting an error using magento.  I'm using this theme http://demo.magentech.com/themes/sm_igame/

The JavaScript error I get is

  TypeError: $(...).fancybox is not a function

  <anonymous>  opstrike.com:3849 m.Callbacks/j()  jquery-1.11.1.min.js:2
  m.Callbacks/k.fireWith()  jquery-1.11.1.min.js:2 .ready()
  jquery-1.11.1.min.js:2 J()  jquery-1.11.1.min.js:2

I searched for TypeError: $(...).fancybox is not a function and found there may be a problem with plugins interfering with my code.  So I removed plugins that I wasn't using, but I still have this error.

Can anyone help?


texts: products images are visible in admin but not in frontend

texts:
For few products images are visible but for some products images are not visible. After spending few hours i found that for the products whose images are missing is because their images are not getting cached, i cross checked the cache directory under media/catalog/product/cache

Images are not getting cached for few products only and for others images gets cached.

777 permission is given to all media directories.
These products are created programmatically


texts:
Currently my domain when switchable in English is

  www.mydomain.com/?___store=en&___from_store=it

I wish it was www.mydomain.com/en

How can I do?


texts: SQL Query - is this Query safe to run for my Magento 2 store

texts:
I want to change all my downloadable product from link_file to url_file, so I created a query for that.
Can I get advice if this query is safe for me to run.

UPDATE downloadable_link SET link_url = CONCAT('http://www.mywebsite.info/download/',(substring_index(link_file, '/', -1)) ) , link_file =NULL , link_type = 'url' WHERE link_id >=0 AND link_id<=1000;

Thanks


texts: How to do migration from Magento 2 EE to Magento 2 CE?

texts:
How to do migration from Magento 2 EE to Magento 2 CE ? Is there any way to do that ?

Can I do that ? If yes please let me now how to do that ? Which process I have to follow ?

Any help would be appreciated. Thanks in advance.


texts: Transactional email footer icons are not displaying as a row in mobile view

texts:
I have used the html table to create the footer for Transaction email.

I'm getting an expected view(Horizontal)in desktop view but vertical in mobile view.

Below is the code i have used to create and design the footer.

Unfortunately, the media query is not supporting for mail clients like yahoo, outlook.

Please comment with your suggestion. Thanks.


texts:
I have extracted the tar.gz from the official Magento website and uploaded it to my server without any problems. However, when I try to access the Magento installation I am shown an 'Autoload Error' where it seems to be trying to autoload files from /magento2/app/code/*/*/cli_commands.php where magento2 is the subdirectory in the public_html folder.

I'm not quite sure why it would be looking in this location as the /app/code/ folder no longer exists in Magento 2.

Anyone have any idea what the problem could be?


texts: Checkout-shipping - add placeholder to email input field

texts:
I'm trying to add placeholder to email input box.
For that I prepared layout overwrite in my custom theme in Magento_Checkout/layout/checkout_index_index.xml

                <item name="components" xsi:type="array">
                    <item name="checkout" xsi:type="array">

                        <item name="children" xsi:type="array">

                            <item name="steps" xsi:type="array">

                                <item name="children" xsi:type="array">
                                    <item name="shipping-step" xsi:type="array">

                                        <item name="children" xsi:type="array">

                                            <item name="shippingAddress" xsi:type="array">

                                                <item name="children" xsi:type="array">

                                                    <item name="customer-email" xsi:type="array">
                                                        <item name="config" xsi:type="array">
                                                            <item name="placeholder" xsi:type="string" translate="true">Please enter your valid email address</item>
                                                        </item>
                                                    </item>

Email is controlled by Amazon_Payment module, so I created in my theme
web/template/form/element/email.html
<form class="form form-login" data-role="email-with-possible-login"
      data-bind="submit:login"
      method="post">
    <fieldset id="customer-email-fieldset" class="fieldset" data-bind="blockLoader: isLoading">

                <input class="input-text"
                       type="email"
                       data-bind="
                            placeholder: placeholder,
                            textInput: email,
                            hasFocus: emailFocused"
                       name="username"

                       data-validate="{required:true, 'validate-email':true}"
                       id="customer-email" />

  .........

Crucial line is in data-bind where I'v put placeholder and value for it.
In chrome dev tools I can see placeholder value (with knockout extension)
but that value is not set in input.
https://prnt.sc/v4ia2p
How do I add custom text to email placeholder on checkout page (shipping)?
PS. label is edited correctly..added "ohohoh" to it and it shows


texts: Magento 2 pass argument in class from ui component

texts:
I want to pass boolean argument to class method from uicomponent_form.xml

My xml code is

<field name="allow_shipping_method">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Magento\Shipping\Model\Config\Source\Allmethods</item>
                <item name="config" xsi:type="array">
                    <item name="formElement" xsi:type="string">multiselect</item>
                    <item name="source" xsi:type="string">myform</item>
                    <item name="dataScope" xsi:type="string">allow_shipping_method</item>
                    <item name="label" xsi:type="string" translate="true">Allow Shipping Method</item>
                </item>
            </argument>
        </field>

This is calling public function toOptionArray($isActiveOnlyFlag = false)     method of Magento\Shipping\Model\Config\Source\Allmethods.

There is anyway to pass argument?? is magento is providing such kind of things?


texts: 1.9 Paypal Express get order review before redirect to paypal

texts:
I was searching for days to find a solution for this problem. I've read a lot about this problem but for me it seems like nobody ever solved it.

Before Magento PayPal Express (in PayPal Standard) the user experience was like:

Address & Billing Form
Shipping Method
Payment Method
Agreements & Order Review
-> Redirect to PayPal
Success

After Magento has introduced its Express Payment, it looks like this:

Address & Billing Form
Shipping Method
Payment method
-> redirect to PayPal
<- redirect to shop
Agreements & Order review
Success

This obviously is a really big problem. Even bigger than you might think.

I have updated an Onlineshop with an average of 400 orders per day from PayPal Standard to PayPal Express. Before the update, there was an order cancellation rate of 0.5% per day, after choosing a payment method. that means about 1-2 people per day cancelled after they've already chosen a payment method.

After the update from PayPal Standard to PayPal Express, the cancellation rate went up to 8%! This was measured over a time of 3 Months.
After we've installed screen recording tools, we found out that most of this people are just simply thinking they're already done after filling out their login credentials.

People also started calling the company and asking where their order is stucking at. They thought they have ordered, but they never did.

This is a really really big problem to be honest and i have no idea how to fix this. Anyone has an idea how to get back the order review before redirecting to PayPal?

BTW: Activating the "skip order review" is not working in the german market, because you always have terms & conditions, that you have to opt in before checkout.


texts: How to get newsletter in custom footer in magento 2.2.0?

texts:
I have a custom-footer in my website. I want to move newsletter to my custom footer. I tried the below code to move but nothing changes.

move element="form.subscribe" destination="custom_footer"


texts: is there a way to get all template names and all package names?

texts: I am curious to know if there is any function to get all themes and all package names of magento? I know about how to get the current one, wanted to show user all the packages and all the templates. is that possible? I know that by scandir I can have the names by scanning the folders in Mage::getBaseDir('design') but wanted to know if there exists any function which I do not know of and return all of them?


texts: Magento 2 pub/static files being deleted repeatedly. HELP!

texts:
For some reason, when certain changes are applied via backend, ALL files in pub/static are deleted - over and over again. I restore them, make a few changes - puff, they're gone.

Can someone help? What is going on?

Thanks!


texts: magento2, category products position in catalog product list widget

texts:
I have added positions to the products in category in the backend.

This position is working in Category page in Frontend. But this position of product is not working in Product list widget inside a CMS page.

How can this value of position be used in Product list widget?

This is value is stored in this table in magento2 database.


texts: How to redirect existing URL to new URL?

texts:
I want to redirect an existing URL to new URL. e.g.
current URL - http://localhost/blog/stltoday/
new URL - http://localhost/press/stltoday/

I tried URL Rewrite Management. But it is not working.

Please help


texts: Best practice with multi country set up - Magento 2

texts:
I'm opening my store using Magento 2 and looking for some advice as I don't really understand the differences between websites, stores and store views.

It's a single business running on different countries.

URL structure will be:
www.mystore.com/en-us/ - US store
www.mystore.com/en-uk/ - UK store
www.mystore.com/en-au/ - AU store
www.mystore.com/it-it/ - IT store
www.mystore.com - International store (everything but US, UK, AU and IT)

Inventory is shared across all stores
Product attributes are different in each country (description, images, price and currency - beware I need to set each price manually, not auto convert through currency converters)
Tax are different for each country
Shipping options are the same (we only use one warehouse), but shipping costs and timings are different
Static page content (images, text) is different
I don't mind if customer database is global or splitted, but I want to prevent any user to register an account in multiple countries.

If anyone would have any advices on how to configure Magento would be awesome.


texts:
I want that all product's view have the right column, i don't know if it can be done in the admin, but if the response is how to made it by code, i appreciate all the path to the files.

And i want the correct answer, no a code that do the work but in the worst way.


texts: Image Thumbnail in product not selected after product import

texts: I have problem with product thumbnail. When imported csv file of products I forgotten to add thumbnail column. So because I imported several files of products, I exported all products in one file and in thumbnail column I just copy small_image column links to thumbnail column. But when I import this csv file thumbnail still not selected in products (I did reindex data). What I'm doing wrong?


texts: Create new product with same URL as deleted product?

texts:
We had to delete a product and re-add it because we needed to remove a configurable attribute but now when I try to add the new product and use the same URL it generates a Page Not Found error.

http://www.gmesupply.com/tower-climbing/1113193-dbisala-exofitnex

I have already went in and deleted all the old rewrites. Is there something else I need to delete so that it will allow me to use the same URL as the old product or will I be forced to create a rewrite for the old URL?


texts: Magento 2.2.5: Blocks added to footer display in wrong order

texts:
I've been working on a magento theme, which inherits from Magento/blank, found at http://murkyapparel.com.

As you can see, the footer looks a bit of a mess. I might make some changes, so here is a screenshot for reference:

What I'd like, is something like this:

Or, this:

(Excuse the messy photoshopping... I'm being lazy)

I know that I can use the before="-" and after="-" attributes to re-arrange the order, but the comodo seal is always placed after the (broken) link to my website and isn't aligned properly.

I've tried editing the float and display attributes inline, using chrome's code inspector, through each possible combination of before and after attributes, but I can't find any configuration that will work.

The relevant blocks in my default.xml file are as follows:

<referenceBlock name="footer">
    <block class="Magento\Framework\View\Element\Template" name="jcf-link" template="Magento_Theme::html/jcf_ad_link.phtml" after="-">
        <arguments>
            <argument name="block_id" xsi:type="string" translate="true">jcf_footer_url</argument>
        </arguments>
    </block>
</referenceBlock>

<referenceBlock name="footer">
    <block class="Magento\Framework\View\Element\Template" name="comodo-secure-seal" template="Magento_Theme::html/secure_seal.phtml" after="footer_links">
        <arguments>
            <argument name="block_id" xsi:type="string" translate="true">comodo_secure_seal</argument>
        </arguments>
    </block>
</referenceBlock>

The jcf_ad_link.phtml file is currently as follows (tested with all possible options for the display option within the style attribute, so decided to remove it entirely whilst I (or somebody here) work(s) out the problem):

        Website designed by Joshua Flood

The secure_seal.phtml looks like this:

There are no custom CSS styles for either block anywhere else. I know it's not quite magento standard, but I'm planning to convert the majority of my theme's blocks into separate modules so I just want to get the basic layout sorted first and ensure it's all working properly.

The _extends.lessfile within my custom theme contains the following styles for the footer:

/* Footer */
.footer.links li {
    display: inline;
}
.footer.links li + li:before {
    content: " | ";
}
div[id^="st-"] .st-btn {
    margin-right: 16px !important;
}

There is no other custom styling applied to the footer or elements contained within it.

Thanks in advance!


texts: Digital Ocean Droplet Magento 2 Extension not recognized after setup:upgrade

texts:
I added an extension to a new magento 2 digital ocean droplet.  But when I run setup upgrade the extension is not added to app\etc\config.php.  I've added a folder in app called tomispepe and added a folder in it called checkout.

these are my files:
/var/www/html/magento/app/tomispepe/checkout/registration.php
DIR
    );

the module xml is here:
/var/www/html/magento/app/tomispepe/checkout/etc/module.xml

that's it.

Then I ran:
./bin/magento cache:flush
./bin/magento setup:upgrade

then this should have included my new extension
cat app/etc/config.php | grep tom
but it did not!

in my dev env this works but on my droplet it does not.  There must be something unique about my droplet.  Please help.


texts: Disable country field in checkout Magento 2

texts:
I tried to disable the country field in checkout but i can't.

I already disable few fields like company on checkout  page by adding this this

<item name="visible" xsi:type="boolean">false</item> code in  module_checkout/layout/checkout_index_index.xml.

<item name="company" xsi:type="array">
   <item name="visible" xsi:type="boolean">false</item>
    <item name="validation" xsi:type="array">
     <item name="min_text_length" xsi:type="number">0</item>
    </item>
</item>

If i try to do the same thing for country filed, this field dosen't disappear.

Does anyone know if it's any other solution for disable this field?


texts: Magento2 : How to Image upload and display form in custom admin module

texts:
I am trying to upload an Image and display a form in a custom admin-module using UI components

   <field name="events_url">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">event</item>
                    <item name="label" xsi:type="string" translate="true">Image</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">Scale_Events/image-preview</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="events/test/upload"/>
                    </item>
                </item>
            </argument>
        </field>

Controller

<?php
namespace Scale\Events\Controller\Adminhtml\Test;

use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Backend\App\Action;

class Upload extends \Magento\Backend\App\Action
{

    protected $_fileUploaderFactory;
    public function __construct(
        \Magento\MediaStorage\Model\File\UploaderFactory $fileUploaderFactory,
        Action\Context $context
    ) {
        $this->_fileUploaderFactory = $fileUploaderFactory;
        parent::__construct($context);
    }
    public function execute(){
        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'image']);
        var_dump($uploader); die();
        $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);
        $uploader->setAllowRenameFiles(false);
        $uploader->setFilesDispersion(false);
        $path = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA)
            ->getAbsolutePath('images/');

        echo $path; die();
        $uploader->save($path);
    }
}
?>


texts: Use require-config.js to load files needed on all pages

texts:
I know how to use require-config.js in custom theme, but I would like to use custom javascript file (myfile.js) on all pages. In which directory should I add require-config.js and how to use it, so that it will work as it should?

Please, don't reference to Magento Official page.


texts: How to: Translating language for multiple products/categories

texts:
My current setup is like this (new install).

main website

main website store

store view English
store view German

Using Magmi, I know how to create my category structure (on the fly) - and how to add my 100 products to the default category.

However, how should I handle it, when I want to have my same product catalog translated into German when that store view is selected?

From what I can tell, this is a two part problem.

How to handle from a Magento perspective:

Do I create two unique root categories for each language and duplicate the product list into each?
Do I have one list/category, by somehow manage the translation for name and description somewhere else??           .....  I'm a bit lost!

How to then manage that with Magmi... but maybe its better to resolve point 1 first. Hopefully it becomes clear and simple to me by then :)

Thank you!


texts: magento2.1 bottom pagination when there is no page

texts: When i set pagination to 60 and i have 55 items, so shows 55 items and it is nice, but still shows a bar of pagination on the bottom of the page. how can i remove it when there is no pagination page number?


texts: Magento 2 - Event Observer for user has downloaded downloadable product

texts:
I want to fire an action when a user has downloaded a downloadable product (i.e. they have clicked the link for the download).  I don't know what event I should be observing to do this.  I tried to search through the list of Events here:

https://www.simicart.com/blog/magento-2-events-list

But none of them seem to correspond to the event I'm looking for.  Any ideas on what event corresponds to this?  Or another way of observing this action? (i.e. via plugin perhaps?)


texts: Callback function for "contentUpdated" event in JS

texts:
In Magento 2 we are executing data-mage-init and x-magento-init in dynamic content (ajax response) using using contentUpdated:

<script type=“text/x-magento-init”>
    {
        "*": {
            "Magento_Ui/js/core/app": {
                "components": {
                        "messages": {
                            "component": "Magento_Theme/js/view/messages"
                        }
                    }
                }
            }
    }
</script>

container.trigger('contentUpdated')

I need trigger another callback function after contentUpdated event. Anybody know any callback method for this?


texts: Update SKU, Product Name, Product URL key via database

texts:
I would like to ask for a help or hint, how to update SKU, Product Name, Product URL Key via database. My reference (key) is old sku and I have all data in excel sheet. I have about 600 products to be updated so I don't want to do it manually and my developer quoted me 10 hours of work for creating a code which I don't think is fair for this type of work.
I used to work with Woocommerce for Wordpress and there I usually sent tasks to database and updated what was needed. In Excel I generated task code for each row (ex. UPDATE table_name SET name='value' WHERE id='xx') and copy-past it to myPHPAdmin.
I thought to create the same for Magento database and deliver this code to my developer to run in in database.
I can't find where SKU, Product Name and Product URL are stored in Magento database. Could anyone help me with this, please?
Or if you have a suggestion for any other solution, I will be happy for that as well, please.
Magento version: 2.4
Thank you very much in advance.
Matin


texts: Only the Homepage is showing after moving Magento

texts:
I've just moved a Magento website to another server and domain.
I adjusted the secure and unsecure url path in the cofig data table and also adjusted the config.xml. After that i've also cleared the cache.

Something strange happens now on the new domain.

When i enter the url in my browser it shows me the homepage, so i was happy at first.
Sadly it does only that. Al the links in the menu don't work and also the backend isn't approachable. I also checked this in de db-table, the path is correct.

So only the homepage is showing correct, everything else seems like it isn't there.

Does anybody have a clue on what's going wrong here?

TIA!


texts: Merge CSS and JS Files make my "add to cart" fail

texts: after i change Merge CSS and JS Files to yes, the add to cart button is not working so the customer can not add products to the cart.


texts: Choose Original Magmi vs Understanding Magmi

texts:
I just want to know what are you guys using Magmi tool?

I heard that original version is easy to be attacked from hackers so i have to change the directory name or set the access privilege but UnderstandingE version has login system to protect this security problem.
Btw i can't believe that version because they know my password what if i use this tool.

So what do you think of that?


texts: Magento : Remove Free Product from Cart on Applying Coupon Code

texts:
All the Free products need to remove from cart if customer apply coupon code. Actual product should remain same in cart.
I do have specific category for free products.

Help me to figure it out how to achieve this functionality.

Thanks.


texts:
https://amasty.com/blog/magento-2-api-updates-graphql/

General overview about GraphQL

https://larsroettig.dev/how-to-create-a-graph-ql-endpoint-for-magento-2-3

This Tutorial shows how to create an own Magento 2 GraphQL Endpoint.

Post here what should also cover in a Tutrial or if find helpful tutorial.


texts: How to use several Modal in the same page

texts:
i'm trying to find a way to use several modals on the same page,
could you help me ?

Here is the code I use, and only the first modal works :

<script>
    // Modals
    require(
        ['jquery','Magento_Ui/js/modal/modal'],
        function($, modal) {
            var options = {
                type                : 'slide',
                responsive          : true,
                innerScroll         : true,
                closeText           : $.mage.__('Fermer'),
                buttons             : []
            };

            // Modal Guest
            var popup = modal(options, $('.modal_guest'));
            $('.modal_guest').modal();
            $(".open__modal_guest").on("click", function (e) {
                e.preventDefault();
                popup.openModal();
            });

            // Modal User
            var popup = modal(options, $('.modal_user'));
            $('.modal_user').modal();
            $(".open__modal_user").on("click", function (e) {
                e.preventDefault();
                popup.openModal();
            });
        }
    );
</script>


texts: How to create sitemap exclude in magento 2?

texts: I need to create a custom module that allows excluding/skipping the Products, Categories and CMS Pages URLs from generating in sitemap.xml. How could I do it in Magento 2?


texts: magento 2 remove .html from URL through .htaccess

texts:
Now is: www.example.de/cool-shoes.html
Will be: www.example.de/cool-shoes

I want to remove .htmlfrom URL through .htaccess


texts: Fetch Dropdown Selected Value on "list.phtml"

texts: I am created one custom dropdown attribute , now i want to fetch dropdown selected value display in "list.phtml".


texts:
I am new to magento, and i am trying to make a simple ajax call in it

jQuery.ajax({
      url: url,
      dataType: 'json',
      type : 'post',
      data: data,
      async: true,
      success: function(data){
            //alert(data.status + ": " + data.message);
            if(data.status == 'SUCCESS'){
                jQuery('.loadingOverlay').hide();
                location.reload();
            }
      }
});

after response i need to reload the page to see the changes done by ajax call.
Are there any other ways and how to implement them.
Can anyone help.


texts: Different Shipping Costs within same country

texts:
I have only flat rate based on minimum order cost, and free shipping after certain price.

I send to Portugal and Spain.

Both these countries have islands where shipping costs are much more expensive... So I would like to exclude these islands or define specific costs for them...

I can't seem to work out how I will do that.


texts: Category error : Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "191" already exists

texts:
I know there is a similar issue regarding a product, but now I've got this error with a category.

I can't recall that I did something different, it just all of a sudden started throwing this error as soon as I got on a category page on the frontend.

Sometimes re-saving the category in the admin resolved the issue, but most of the time it doesn't. Where does this error come from? How to fix it? Did anyone else encounter this error too?

Edit

It looks like the category page asks the URL rewrite table for the URL's. It generates this query:

SELECT `e`.*,
   IF(at_is_active.value_id > 0, at_is_active.value,
   at_is_active_default.value) AS
   `is_active`,
   `url_rewrite`.`request_path`
FROM   `catalog_category_entity` AS `e`
   INNER JOIN `catalog_category_entity_int` AS `at_is_active_default`
           ON ( `at_is_active_default`.`entity_id` = `e`.`entity_id`)
              AND ( `at_is_active_default`.`attribute_id` = '46' )
              AND `at_is_active_default`.`store_id` = 0
   LEFT JOIN `catalog_category_entity_int` AS `at_is_active`
          ON ( `at_is_active`.`entity_id` = `e`.`entity_id` )
             AND ( `at_is_active`.`attribute_id` = '46' )
             AND ( `at_is_active`.`store_id` = 1 )
   LEFT JOIN `url_rewrite`
          ON ( url_rewrite.entity_id = e.entity_id )
             AND ( url_rewrite.is_autogenerated = 1
                   AND url_rewrite.store_id = 1
                   AND url_rewrite.entity_type = 'category' )
WHERE  ( IF(at_is_active.value_id > 0, at_is_active.value,
     at_is_active_default.value)
            =
            '1' )
   AND ( `e`.`entity_id` IN( '10', '170', '171', '172',
                             '173', '175', '176', '177',
                             '178', '179', '180', '189', '276' ) )
ORDER  BY `e`.`position` ASC

But if your url_rewrite-table is corrupted (which is most likely in my case), it ends up with having duplicate ID's.


texts: What methods typically go in Model, Resource and Collection

texts:
I'm fairly new to Magento, coming from a Symfony/Laravel background. Magento's ORM implementation seems a bit confusing at first. Most resource/collection classes only seem to have a _construct() method available. I am mainly wondering which methods typically are defined in the collection/resource classes and why?

E.g. Why is the method loadByEmail() in the Customer resource class and not just in the Model?


texts: How can we populate the default shipping address country and zipcode in cart page in magento 2 for logged in customers?

texts: Can we populate the default country and postcode for the logged in users using their default shipping address of the customer to get shipping estimates?


texts: convert any date into dateTimestamp in order to compare it

texts:
I’m trying to compare the current date timestamp with product special price end date.
to get current date I use :

$currentDate = Mage::getModel('core/date')->timestamp(time());

and for specialToDate :

$promoEndDate = strtotime($product->getSpecialToDate() );

the problem is that magento changes the date format when someone changes the admin locale and then strtotime for promo price returns null.
does anyone have an idea how can I retrieve getSpecialToDate() and convert it to timestamp ?

Thank you :))


texts:
I am making one custom pdf as per my requirements here https://prnt.sc/svwkhr
Can any one tell me how to get order details of the selected order https://prnt.sc/svwlvo  in Controller Index.php file.

I am overriding public function massAction(AbstractCollection $collection) method.


texts:
I am trying to install Magento2.x I've already installed percona and nginx the problem I am having is everytime I try to install the following packages it install httpd apache, not sure why how can I not install any of the apache and httpd tools ?

yum -y install php70u php70u-pdo php70u-mysqlnd php70u-opcache php70u-xml php70u-mcrypt php70u-gd php70u-devel php70u-mysql php70u-intl php70u-mbstring php70u-bcmath php70u-json php70u-iconv


texts: Override PrepareTemplate function of Magento\Sales\Model\Order\Email\Sender.php in Magento 2.3

texts:
I want to override PrepareTemplate function of Sender.php and have tried to override Sender.php with the help of link Override abstract class but its not working for me.

I have followed the exact steps mentioned in the above link which are as below:

di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Sales\Model\Order\Email\Sender" type="Module\Sales\Rewrite\Sender" />
</config>

Module\Sales\Rewrite\Sender.php

namespace Module\Sales\Rewrite;

class Sender extends \Magento\Sales\Model\Order\Email\Sender
{

 protected function prepareTemplate(Order $order)
 {
    $orderstatus = $order->getStatus();
    //here i want to send a custom email template if the order status is  complete
 }
}

The problem is that the overrided file is not called.

Can someone please help in here or can mention any other alternative.


texts: Custom Magento Shell Script - can't get argument value

texts:
I'm attempting to create a custom shell script that will extract a zip file in my media/tmp directory.

I've created a labeler.php file in the shell directory. It extends Mage_Shell_Abstract and run() looks like this:

/**
 * Run script
 *
 */
public function run()
{
    $_SESSION = array();
    if ($this->getArg('unzip')) {
        $zipFile = strval($this->getArg('unzip'));
        echo "Unzipping {$zipFile}";
    }elseif ($this->getArg('pendingList')) {
        echo "this\n";
    } else {
        echo $this->usageHelp();
    }
}

The command that I am executing from is php -f shell/labeler.php -- unzip file.zip. The output that I get is: Unzipping 1


texts:
I have been through all the tax settings several times now, without finding any solution to this problem.

When looking at the shopping cart, the subtotal is displayed with incl. tax, and is correctly calculated from the items in the cart. The Grand total has a value that is the same as the Subtotal excl tax, and if I choose to show Grand total both incl and excl tax, the Grand total excl will correctly be calculated excl of tax of the value of Grant total incl, tax, which as I said before, shows a value being equal to subtotal excl tax.

There are now shipping or discounts in the picture, so subtotal should be the same as the Grand total.
The setup is done for Norway, so the VAT is 25 %.


texts: How to print current year in Magento email footer in HTML

texts:
I need to print current year in HTML template . I tried several ways but there are not working for me.
These are the solutions what I tried.
Copyright &copy; <?php echo date('Y') ?>  All rights reserved.

Copyright &copy;   All rights reserved.

If anyone has a solution please share here


texts: Increase maximum chars for meta description

texts:
The Google's limit for the meta description, from some months to today, is around 300 characters.

So, I'd like to increase the limit of 255 chars in Magento 1.9

How can I do it in a clean way? :)

p.s.
My question is different from this 'cause I want to know if there is a way to maintain the meta description field on the DB as a numeric field, but only with an increased limit.


texts:
Having just installed 2.4.0 from scratch, I ran into an "issue" when logging into Magento Backend for the first time:

Failed to send the message. Please contact the administrator
You need to configure Two-Factor Authorization in order to proceed to your store's admin area
An E-mail was sent to you with further instructions

This implies, that I won't be able to log into Magento without first setting up SMTP on the server. Is there something I'm overlooking that allows me to set this up via the CLI? Therefore, not requiring SMTP to complete the 2FA login.
Edit 1/2
Having slapped the ability for SMTP onto my test server, I got to see what the email was that it was trying to send:

You are required to configure personal Two-Factor Authorization in order to login to Main Website Store
To do that please Click here

Clicking the link displayed the following

So, I'm starting to think that an SMTP enabled server should be considered a "prerequisite" for installing Magento. However, I'd prefer to see if anyone has another solution (that doesn't involve disabling 2fA).
Edit 2/2
I ended up reporting this as an issue with Magento. Having 2FA enabled by default was put in place as a security feature. Therefore, having to disable it to make Magento accessible makes that decision absolutely pointless. And yes, I could install SMTP facilities on my server but that seems overkill to send a single email.


texts: Magento 2: How to display Product Available QTY on checkout Order Summary

texts:
I would like to know if there is any way, to show the Product(Added to cart) Available Qty in checkout page under Product's name in Order Summary Section in Magento 2.

As per my knowledge so far, I can see that, to show this section Magento 2 uses knockout JS(details.js inside magento module-checkout). And I have already extended that JS and it's HTML to show the Product SKU at the same place successfully. I got the product object from the quoteItems and there I can find the Product's SKU, but there is no information for the Product's Stock and QTY available.

Below is the image for the reference:


texts: Problem logging into Magento 2 admin panel

texts:
I have installed Magento 2 while also playing with Docker dev environment. I have a problem logging into Magento2 admin panel.

After I enter the correct username and password, I am being redirected back to the login screen, but the URL changes to http://magento2.dev.local/admin_m11a7k/admin/dashboard/index/key/2481eca5d84c964ff31e222ca50c85d68593dfbbf0ed086af8082bd5c8c6a932/

var/session looks like this after trying to log in:

-rw-------   1 wjarka  www-data    0  5 lis 17:52 sess_125312a61b14e31b5d0857a1e30b80d2

-rw-------   1 wjarka  www-data    0  5 lis 17:52 sess_feb318bcf09cf6fc012e37ac72813f46

Session files are empty, so I guess this is some kind permissions problem? Looks like it's creating the files in a way that it's not able to read it later? It probably should be www-data:www-data, right? And for some reason it uses wjarka:www-data.

PHP-FPM runs as www-data, so that's... weird. Anything I might be missing?

I am using Docker containers for php 5.6-fpm and apache 2.4 from official repos.

UPDATE #1
It seems like I know a workaround, but I am still looking for a permanent fix.

Based on this: https://github.com/magento/magento2-docker/blob/master/etc/php-fpm.conf/www.conf

I have moved the session storage to a directory owned by www-data and that is in the container (and not shared through NFS). That worked just fine!

Then I tried to create a new dir on my local filesystem that would be owned by www-data:www-data (33:33). And share my local dir with the docker container in the new path. And then it fails.

So it seems like NFS sharing is messing it up.


texts: Hide Static Block from Category View on Layer Nav Click

texts: When I setup a category page I can set it to display products, a static block or both.  I would like to display a static block but when any option in the layered nav is clicked, I would like to hide the static block and only display the products.


texts:
i have tried change the currency position of my website cangurumoda.com.br/lojacangu/

it looks like: 200,00 R$

the corrency symbol should looks before the price, like this: R$ 200,00

well, have followed some tutorials, like:

http://php.quicoto.com/how-to-change-currency-position-in-magento/
http://www.everyuseful.com/programming/106-how-to-change-currency-symbol-position-in-magento

pls, need some help with that issue.

thanks!


texts: PayPal#10413: Transaction refused because of an invalid argument

texts:
My base currency is in Canadian Dollars (CAD)., when I go to PayPal express checkout, everything is working fine I can checkout in CAD.

PROBLEM IS: Whenever I switch currency to USD, USD is a conversion on my website.
PayPal express throws an error:

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

I debugged PAYPAL and here is the error I get when I checkout in USD (non base).. 110.00 USD ---> 150.00 CAD

[PAYMENTACTION] => Authorization
        [AMT] => 110.00
        [CURRENCYCODE] => USD
        [INVNUM] => 10000012
        [SOLUTIONTYPE] => Mark
        [LOCALECODE] => en_CA
        [ITEMAMT] => 150.00
        [TAXAMT] => 0.00
        [SHIPPINGAMT] => 0.00
        [METHOD] => SetExpressCheckout
        [VERSION] => 72.0
        [BUTTONSOURCE] => IWD_SI_MagentoCE_WPS
    )


texts: Magento 2 build in modules/functionality investigation workflow

texts:
I am new at writing difficult front-end modules like one page checkout or... . Associated with this i have a question.

When I want to investigate(find out) how magento 2 module located in vendor/magento/... or functionality from these modules works, what should I do? Example(just example): how Magento manages shipping methods - what files uses for display (only for that functionality), how validates those fields, sends or gets data...

Question: How can i get solid understanding of all aspects in specific magento 2 functionality or module? (I know developers use xdebug and PHPStorm but i am more interested about the process)

I know that this is a subjective thing, and there isn't going to be one way to do it, but i am having difficulties doing it and thought maybe there is some simple way do to it. Also I am not interested about the tools.


texts: GSTIN not showing in checkout shipping address page Magento 2

texts: I have installed codilar extension for the GSTIN number field I have installed it successfully and configured it in admin but it is not showing on the checkout page. It is working on the local server but not working in the dev environment. Can anyone help me, please?


texts: Price of products have a % up in the final price

texts:
I have a problem with a products of my store because if I have a product with price 889€ in the website I see 1075.

All products have a 12% up of inital price.

Any idea about this?


texts: Our Magento account was hacked; files deleted; hosting company is unable to restore

texts:
Magento 1.9.1
Porto theme
Managed VPS from Hostforweb
CentOS 7.x/WHM / Cpanel

We got hacked. Files were deleted and our site was and is down. I have a full cPanel backup which I made available to our hosting company (I gave them the last 2 I made) in order for them to restore the site to the way it was before the hack. It's been more than 20 hours now and it has not been restored yet. They tried to restore it but the site loads all broken (without images etc.) and they sent me this:

The uploaded backups do not contain the Magento installation.
However, I was able to gather some missing parts from the provided backups and forged a loading frontend:
https://www.ourdomain.com/index.php/
This website is still damaged and you have to proceed with a manual migration of the store to a fresh Magento installation. We do not provide such service, but you can hire a seasoned Magento web developer who will take care of the transition.
The store was hacked and the cPanel account infected due to security exploits found in this outdated Magento version.

We would like to continue running the same (1.9.1) version of Magento though because we tried the new 2.x version and it does not really run well on this server.

I do have another backup of the HTML files and the database I made some time back via Cpanel as well as all the files I just downloaded via FTP.

How to restore our site? What is the best course of action forward?

UPDATED on October 19th, 2018:

The hosting company restored the front page perfectly now but when I click on most of the products - it gives the following Error:
404 error: Page not found. (showing on a generic Magento page with Magento logo and Magento colors)

NEW update on October 19th, 2018:

The hosting company keeps trying to install this.

We now have the following Error on the front page:

There has been an error processing your request
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'product_product.mg_core_url_rewrite' doesn't exist, query was: SELECT COUNT(*) FROM `mg_core_url_rewrite` AS `rewrite` WHERE (request_path IN ('', '/')) AND (id_path LIKE 'category/%')

Trace:
#0 /home/product/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/product/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/product/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/product/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT COUNT(*)...', Array)
#4 /home/product/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT COUNT(*)...', Array)
#5 /home/product/public_html/lib/Zend/Db/Adapter/Abstract.php(828): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/product/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(1355): Zend_Db_Adapter_Abstract->fetchOne(Object(Varien_Db_Select))
#7 /home/product/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(361): Amasty_Fpc_Model_Fpc_Front->isCategoryPage()
#8 /home/product/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(411): Amasty_Fpc_Model_Fpc_Front->getNormalizedUrl()
#9 /home/product/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(778): Amasty_Fpc_Model_Fpc_Front->getCacheKey()
#10 /home/product/public_html/app/code/local/Amasty/Fpc/Model/Fpc/Front.php(1407): Amasty_Fpc_Model_Fpc_Front->fetch()
#11 /home/product/public_html/app/code/core/Mage/Core/Model/Cache.php(687): Amasty_Fpc_Model_Fpc_Front->extractContent(false)
#12 /home/product/public_html/app/code/core/Mage/Core/Model/App.php(340): Mage_Core_Model_Cache->processRequest()
#13 /home/product/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /home/product/public_html/index.php(87): Mage::run('', 'store')
#15 {main}

Error log record number: 1076426995669


texts:
I added Leaflet map to contact page like here:
Can't add custom script (leaflet) to Contact page
I used the solution with success. If you want to put it into an extension (not just in a theme):
contact_index_index.xml:
<css src="<Vendor>_<module>::leaflet/leaflet.css" />
<script src="<Vendor>_<module>::leaflet/leaflet.js" />

I did place all leaflet files in a seperate directory in app/code/view/frontend/web/leaflet to get it seperated from other code and to get it independend from themes.
But I got a Javscript Error in the console:
"Uncaught Error: Mismatched anonymous define() module: function(t){..."

Site is working as expected, but I would like it to work without errors to avoid future problems. As far as I see this error is from require.js but how do I fix it the right way preferable without modifications to the leaflet.js files?


texts:
Is it possible to add a dir to the url key in cms page?

For example:

CMS page - url key = test.html

I would like to show it as

www.domain.com/cms/test.html


texts: Hide Salse Order custom grid When module is disable in Magento 2

texts:
i have create a custom module for the employee data show in magento salse order and i have add column in salse order grid
i have create grid using UI component

So can anyone idea about that how can i disable this 2 column when my custom module is disable in store config.
Thanks.


texts: Passing variables to static block in magento2

texts:
I have used below code in magento1 to load the static block with custom variables.

Here is the code of my m1 Block file.

 {
 $customer =  Mage::getSingleton('customer/session')->getCustomer();

    $block = Mage::getModel('cms/block')
        ->setStoreId(Mage::app()->getStore()->getId())
        ->load('static_block_id');

    if($block->getIsActive()) {
        $array = array();

        $array['custom_value1'] = $formattedPrice = Mage::helper('core')->currency($customer->getNoofOrders(), true, false);
        $array['custom_value2'] = $formattedPrice = Mage::helper('core')->currency($customer->getSavingsToDate(), true, false);

        $array['registration_date'] = date('F Y', strtotime($customer->getRegistrationDate()));

        $filter = Mage::getModel('cms/template_filter');
        $filter->setVariables($array);

        // return the filtered block content.
        return $filter->filter($block->getContent());

}

Here getNoofOrders and getSavingsToDate are the custom customer attributes.

How can i use the same code in magento 2 format. If so please anybody help me with this how to set the custom variables and that is used in static blocks.
Thanks


texts: Add text under AddToCart Button in Product Description Page Frontend - Magento2.3.5-p2

texts:
I tried so many ways to add text under addtocart button in PDP page, but nothing works. My block  and phtml not getting called.
catalog_product_view.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="product.info.form.content">
        <block class="MyVendor\MyProject\Block\Product\Message" name="product.infor.message" after="product.info.addtocart"
template="MyVendor_MyProject::product/message.phtml">
        </block>
    </referenceContainer>
</body>
</page>

I tried with the following blocks and its not working.
name="product.info.options.wrapper.bottom"
name="product.info.addtocart.additional"

i think just because im referring child block or container, it's not working.


texts: Error after Magento 2.3.0 - $.mage.isDevMode is not a function

texts:
after upgrading from 2.2.6 to 2.3.0 I started to get this error, can't seem to find much info about this function.

I already cleared all cache folders, static files, regenerated them and nothing worked, all help is very much appreciated.

The log below is the only thing I got, generated on page load.

Using Magento 2.3.0 + PHP7.2 + MySql 5.3 + Nginx

VM142:5 Uncaught TypeError: $.mage.isDevMode is not a function
at $.(/anonymous function).(anonymous function)._create (eval at require.load (https://www.example.com/static/_cache/merged/0cea18d4374932b778cb47448cd0db91.min.js:182:216), <anonymous>:5:487)
at $.(/anonymous function).(anonymous function).eval [as _create] (eval at require.load (https://www.example.com/static/_cache/merged/0cea18d4374932b778cb47448cd0db91.min.js:182:216), <anonymous>:29:334)
at $.(/anonymous function).(anonymous function)._createWidget (eval at require.load (https://www.example.com/static/_cache/merged/0cea18d4374932b778cb47448cd0db91.min.js:182:216), <anonymous>:35:6)
at new $.(/anonymous function).(anonymous function) (eval at require.load (https://www.example.com/static/_cache/merged/0cea18d4374932b778cb47448cd0db91.min.js:182:216), <anonymous>:28:27)
at Object.$.(/anonymous function).(anonymous function) [as loaderAjax] (eval at require.load (https://www.example.com/static/_cache/merged/0cea18d4374932b778cb47448cd0db91.min.js:182:216), <anonymous>:27:241)
at eval (eval at require.load (0cea18d4374932b778cb47448cd0db91.min.js:182), <anonymous>:4:22)
at Object.execCb (0cea18d4374932b778cb47448cd0db91.min.js:112)
at Module.check (0cea18d4374932b778cb47448cd0db91.min.js:56)
at Module.enable (0cea18d4374932b778cb47448cd0db91.min.js:73)
at Module.init (0cea18d4374932b778cb47448cd0db91.min.js:54)


texts:
I've added a new column to an existing custom extension table via phpMyAdmin.

I then added the below to the form block and that's working fine:

    $fieldset->addField('exchange_rate_deposit', 'text', array(
        'label'     => 'Exchange Rate (Deposit)',
        'name'      => 'exchange_rate_deposit',
    ));

And was able to get the field to save to the db via:

    $data = $this->getRequest()->getPost();
    $model= Mage::getModel('custom/module')->load($data['id']);
    $model->addData(array('exchange_rate_deposit' => $data['exchange_rate_deposit'])->save());

So after doing that I needed to add a few more columns to the table, so I just duplicated the process, changing the field names etc (I added the columns to the table last) however I cannot get the other fields to save to the database and have no idea why!

Never done this before so not sure exactly what steps you're supposed to take, but it's as if the ORM mappings haven't been setup for the other attributes and it's just ignoring them, and unfortunately I don't really know how I got the original attribute saving to the db. I've cleared the cache to see if that works but to no avail.


texts: Change unsecure URL to secure including newsletter

texts:
I just installed the SSL cert on the server but now am getting an error saying the secure pages are loading unsecure content. Examples below. I do not know where to find the URL in the code so I can change "http" to "https". Thank you for your time.

Here are the URLs I need to find and change to "https":
http://www.everydayblade.com/newsletter/subscriber/new/
http://www.everydayblade.com/catalogsearch/result/


texts:
I am using magento 1.9 ver.

I need the xml code request which is sent from FedEx request. How to get it.


texts: Magento 2 Custom module error when changing constructor

texts:
I am creating a new custom module for Magento 2.1.x which some includes some Blocks. In one of them, at the beginning of the development, the constructor had onlt two parameters:

use \Magento\Framework\View\Element\Template;

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

Lately I had to add a new parameter to the constructor

use \Magento\Framework\View\Element\Template;

class Products extends Template
{
    protected $_productCollectionFactory;

    public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory,
        array $data = []
    )
    {
        $this->_productCollectionFactory = $productCollectionFactory;
        parent::__construct($context, $productCollectionFactory);
    }
}

If I reload the frontend I am getting the following error:

  Fatal error: Uncaught TypeError: Argument 2 passed to
  Magento\Framework\View\Element\Template::__construct() must be of the
  type array, object given, called in ...

What should I do to make the new constructor work? Should I delete something? Should I run some command via CLI? (I am using the developer mode)


texts:
Customer will get the search form to search order by "order_id", "Date"
Once the customer clicks on the search button then load all order which will match with the criteria.

Load the "Re-order" button with the search result
Once the customer click on "Re-Order" button add to cart the product which is with the order.

I have added screenshot


texts: How can i avoid overall page load during Search filter

texts:
Supposed to search by filter in my site loads all pages, i need to load only my contents not all my pages.

screen shots :


texts: using javascript:void(0) to replace category link

texts: I want a menu item in main menu which the hyperlink is # or javascript:void(0), instead of by default it will show the category products, any method i can do that?


texts: I magento 1 i can call {{block type="Xanka\Slider\Block\Slideshow" template="slideshow.phtml"}}. how do it in magento2?


texts: Who Bought This Also Bought in Magento 2

texts: I run an affiliated website that is related to the electronics. As I see at Amazon, there is a row of products at the end of description of every product that is "Peoples also bought these items after buying this". I also want this feature on my website. need someone to recommend any Extension for this thing please.


texts: (SOLVED) Magento - Fully disable shipping service

texts:
I have an operating magento store which doesn't provide shipping at all, can i fully disable shipping (not showing in the "One Step Checkout Page" and more importantly not needing a shipping method or address to confirm the checkout).

I have tried so far to :

Disable all shipping methods through back-end
Enable the free shipping method and customize message to " Shipping not available " and not only i get the message under the shipping method tab : " Please specify the shipping address to see available options. " but even after putting an address the message doesn't update or anything wich makes the checkout impossible as i need a shipping address/method.
I checked " Use Billing Address as Shipping Address " OSP settings in the back-end that only removed the checkbox at the bottom nothing else.

Is there a solution so i can fully remove shipping as my store doesn't provide it.

I know that shipping method makes calculations based on address and taxes, but i disabled them and made the calculations based on billing address and not shipping address. Did i make something wrong ?


texts: Magento 2 : Display Customer Attribute in Grid

texts:
I have a Customer Attribute with Image Type.

Its working Good all in all areas. I would like to display that attribute in Customer Listing same as Product Image.

How to do this? Any ideas will be appreciated.

Update

public function install(
    ModuleDataSetupInterface $setup,
    ModuleContextInterface $context
) {
    $setup->startSetup();

    $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
    $setup->startSetup();
    $attributesInfo = [
        'photo_id' => [
            'label' => 'Photo ID',
            'type' => 'text',
            'input' => 'select',
            'position' => 1000,
            'visible' => true,
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
            'required' => false,
            'system' => 0,
            'user_defined' => true,
            'position' => 1000,
        ]
    ];
    $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
    $attributeSetId = $customerEntity->getDefaultAttributeSetId();

    $attributeSet = $this->attributeSetFactory->create();
    $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);
    foreach ($attributesInfo as $attributeCode => $attributeParams) {
        $customerSetup->addAttribute(Customer::ENTITY, $attributeCode, $attributeParams);
    }
    $magentoUsernameAttribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'photo_id');
    $magentoUsernameAttribute->addData(
        [
        'attribute_set_id' => $attributeSetId,
        'attribute_group_id' => $attributeGroupId,
        'used_in_forms' => ['adminhtml_customer','customer_account_edit','adminhtml_checkout','adminhtml_customer_address','customer_address_edit','customer_register_address'],
        ]
    );
    $magentoUsernameAttribute->save();