texts:
A customer of us has a special need for his site.He wants each customer to be able to download his wishlist as CSV.

Now my question is:

I know how to do that on the back-end for my module using in the controller the function exportCsvAction() . Is there anything similar i can do with the front-end? Or if not does Magento has something similar i can use or i should do something like getting the wishlist and add it to a CSV??
Thanks in advance.


texts: how to add custom amount to shipping & handling in cart

texts:
How to add custom amount to shipping & handling  in cart on Magento 1.9?
Here I did it but shipping charge was added two times to grand total.

Here is my code:

<?php
class modelname_Model_Sales_Total_Quote_Ccfee extends Mage_Sales_Model_Quote_Address_Total_Abstract
{
    public function __construct()
    {
        $this->setCode('ccfee');
    }

    public function collect(Mage_Sales_Model_Quote_Address $address)
    {
        parent::collect($address);
         $shipping_charge = $this->calculateCustomTax($address);
           if ($shipping_charge){
                $address->setShippingAmount($shipping_charge);
                $address->setBaseShippingAmount($shipping_charge);
           }
            $address->setGrandTotal($address->getGrandTotal() + $address->getShippingAmount());
            return $this;
    }
    protected function calculateCustomTax()
    {
              $shipping_charge = 0;
              $cart = Mage::getModel('checkout/cart')->getQuote()->getAllItems();
                foreach ($cart as $item){
                $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
                $select_ship[] = $options['info_buyRequest']['select_ship'];
                }
                $ship = $select_ship;

           if($ship != 0)
           {
                $cart = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
                foreach ($cart as $item)
                {
                    $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
                    $select_ship[] = $options['info_buyRequest']['select_ship'];
                }
                $shipping_charge = $select_ship;
            }

            else{
                    $cart = Mage::getModel('checkout/cart')->getQuote()->getAllVisibleItems();
                    foreach ($cart as $item)
                    {
                      $options = $item->getProduct()->getTypeInstance(true)->getOrderOptions($item->getProduct());
                      $select_ship[] = $options['info_buyRequest']['select_ship'];
                    }
                 $shipping_charge = max($select_ship);
               }
            return  $shipping_charge;

        }


texts: Magento 2: How to add css in system config field

texts:
I need to add phtml file for the following path.

\app\code\Abc\Mkt\view\adminhtml\templates\validation.phtml

How do I add this?

  Validation.phtml

<?php $enable  = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\App\Config\ScopeConfigInterface')->getValue('abc_auth/abc_settings/expiry_date');
$helper = $this->helper('Abc\Mkt\Helper\Data');
$expiry = $helper->checkExpiry();
if($enable == "failure" || $enable == "invalid" || $enable == "" || !$expiry ){ ?>
<style>
li.admin__page-nav-item.item._last{ display: none; }
</style>
<?php } ?>


texts: Magento2 - Reload JS file after ajax call

texts:
After the ajax call my new elements which are created are not recognized by the event handlers in my jQuery code.

Is there a way to reload the JS file when the ajax URL is called?


texts: When installing Magento 2 on xamp, extracted all the files into htdocs. When I go to localhost/magento I get a fatal error

texts:
Fatal error: Declaration of
  Zend\Mvc\Controller\PluginManager::get($name, ?array $options = NULL)
  must be compatible with
  Zend\ServiceManager\AbstractPluginManager::get($name, $options =
  Array, $usePeeringServiceManagers = true) in
  G:\wampfebeighteen\htdocs\pehnava\vendor\zendframework\zend-mvc\src\Controller\PluginManager.php
  on line 211


texts: Disable cache for block Mage_Catalog_Block_Product_Price

texts:
I want to disable cache for block Mage_Catalog_Block_Product_Price.
I know that if it was a different block I can disable it with this:

<action method="setCacheLifetime">
        <s>null</s>
    </action>

But I can't do it on Product Price, I tried with this code on /app/code/local/Mage/Catalog/Product/Price.php

public function __construct() {
        $this->addData(
            array('cache_lifetime'    => false)
        );
        $this->setCacheLifetime(false);
        parent::__construct();

    }

But it does not work, it works on my local but not on the live server and I do not know why.

Basically what i want to do is show a different price based on the visitor referal and with block cache enabled i can't.

Someone knows what can I do?


texts: How can I auto select the Configurable product dropdown option if only one option is available?

texts:
Can anyone let me know that in the configurable product dropdown attribute have only one option available so it should be auto select ?

In the screenshot you can see that only A is available so after selection of other attribute it should auto select.


texts: Magento2 display header compare link after custom block in header

texts:
Magento2 move header compare link after custom block in the header
I have added custom block in header as follows
<referenceContainer name="header.topcontent">
            <block class="Magento\Cms\Block\Block" name="Blockname" after="-">
                <arguments>
                    <argument name="home_page_top_content_block" xsi:type="string">home_page_top_content_block</argument>
                </arguments>
            </block>
        </referenceContainer>

I need to display this block catalog.compare.link after my custom block


texts: Magento 2 - Can't print off pdf of invoice

texts:
Under sales > Invoices I'm clicking the "Print" button to get a pdf of a invoice (see link) but it no longer works.

https://i.stack.imgur.com/1OLfQ.png

ERROR:
There has been an error processing your request

  Warning: strspn() expects parameter 1 to be string, object given in /home/dragoni5/public_html/vendor/magento/zendframework1/library/Zend/Pdf/StringParser.php on line 162

Cheers.
Mike.


texts:
I'm looking for an extension that allows my customers to receive an automated invoice based on their order.
Also, only a selected number of customers should have this option.


texts: I Have Need to change products price and currency store wise?

texts:
I have 2 stores for my site one for India and other store for other countries.

i will show price in india in INR and for other countries in DOLLAR.

and product price will be put according us in admin. no need to Currency conversion automatically.


texts: Magento : How to Check if Mysql Column Exists?

texts:
I want to prevent error that column in database table exits.

How can I add column to table only if column does not exist?


texts: POST product with REST API doesn't save manufacturer attribute

texts:
I'm able to save a product with a POST request to my REST API endpoint. Now I would like to save manufacture attribute,too. I prepare this json structure

{
    "product": {
        "sku": "code",
        "name": "name",
        "price": 5,
        "attribute_set_id": 4,
        "status": 1,
        "visibility": 1,
        "extension_attributes": {
            "stock_item": {
                "qty": 0,
                "is_in_stock": false,
                "is_qty_decimal": false,
                "min_qty": "0",
                "qty_increments": "0"
            }
        },
        "custom_attributes": [{
            "attribute_code": "barcode",
            "value": "############"
        }, {
            "attribute_code": "family",
            "value": "product family"
        }, {
            "attribute_code": "description",
            "value": "product description"
        }, {
            "attribute_code": "category_ids",
            "value": ["1", "2", "41", "53", "87"]
        }, {
            "attribute_code": "manufacturer",
            "value": "213"
        }]
    }
}

This product is saved on my catalog but without manufacturer value, indeed the response about above request is

{
    "id": 2059,
    "sku": "code",
    "name": "name",
    "attribute_set_id": 4,
    "status": 1,
    "visibility": 1,
    "type_id": "simple",
    "created_at": "2019-06-17 08:02:23",
    "updated_at": "2019-06-17 08:02:23",
    "extension_attributes": {
        "website_ids": [1],
        "category_links": [{
            "position": 0,
            "category_id": "1"
        }, {
            "position": 0,
            "category_id": "2"
        }, {
            "position": 0,
            "category_id": "41"
        }, {
            "position": 0,
            "category_id": "53"
        }, {
            "position": 0,
            "category_id": "87"
        }]
    },
    "product_links": [],
    "options": [],
    "media_gallery_entries": [],
    "tier_prices": [],
    "custom_attributes": [{
        "attribute_code": "description",
        "value": "description"
    }, {
        "attribute_code": "url_key",
        "value": "name-of-product"
    }, {
        "attribute_code": "options_container",
        "value": "container2"
    }, {
        "attribute_code": "barcode",
        "value": "###########"
    }, {
        "attribute_code": "family",
        "value": "product family"
    }, {
        "attribute_code": "required_options",
        "value": "0"
    }, {
        "attribute_code": "has_options",
        "value": "0"
    }, {
        "attribute_code": "category_ids",
        "value": ["1", "2", "41", "53", "87"]
    }]
}

any suggestion?


texts:
I am new to php/magento to for warn you. I am making a script to grab some quick info. I am using magento 1.7.0.2. This script works fine until the telephone number is empty and then it stops. It is in a php file. see anything?

    <?php

require_once('app/Mage.php'); //Path to Magento
umask(0);
Mage::app();

$collection = Mage::getModel('customer/customer')->getCollection();
$sz=$collection->getSize();
echo "$sz total customers
";
$count=0;
echo '
 ';
echo '
';
echo '&nbsp;	ID 	Qty 	Name 	 Email	  Phone	';
echo '
';
foreach ($collection as $user){
    $orders = Mage::getModel('sales/order')
                ->getCollection()
                ->addFieldToSelect('increment_id')
                ->addFieldToFilter('customer_id',$user->getId());
    if($orders->getSize() >= 5){
        $u=Mage::getModel('customer/customer')->load($user->getId());
        $tmpID=$u->getId();
        $name=$u->getName();
        $email=$u->getEmail();
        $phone='NA';
        //$pri;
        $ordercount=$orders->getSize();
        try{
            $phone=$u->getPrimaryBillingAddress()->getTelephone();
        }
       catch(Exception $e){
            echo $e->errorMessage();
            $phone='NA';
        }

        $count++;
        echo '
';
        echo " $count 	";
        echo " $tmpID 	";
        echo " $ordercount 	";
        echo " $name 	";
        echo " $email 	";
        echo " $phone 	";
        echo '
';
        //echo "$count-ID: $tmpID  Number Of Orders: $ordercount $name $email $phone
";

    }
}
echo '
';
?>


texts: Undefined index: id in vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 63

texts: I am having this issue when I try to install the extension ...


texts:
I think i have a problem with robots.txt in magento 1.9.3.4
In Search Console at Index Status of https version i see this:

Is it a issue? and if yes, how can i solve it?
http:

Robots.txt
# Website Sitemap
Sitemap: https://domain/sitemap.xml

# Crawlers Setup
User-agent: *
#Crawl-delay: 10

# Allowable Index
# Mind that Allow is not an official standard
Allow: /*?p=
Allow: /index.php/blog/
Allow: /catalog/seo_sitemap/category/
# Allow: /catalogsearch/result/
Allow: /media/catalog/

# Directories
Disallow: /404/
Disallow: /app/

Disallow: /cgi-bin/
Disallow: /downloader/

Disallow: /errors/
Disallow: /includes/
Disallow: /js/
Disallow: /lib/
Disallow: /magento/
# Disallow: /media/
Disallow: /media/captcha/
# Disallow: /media/catalog/
#Disallow: /media/css/
#Disallow: /media/css_secure/
Disallow: /media/customer/
Disallow: /media/dhl/
Disallow: /media/downloadable/
Disallow: /media/import/
#Disallow: /media/js/
Disallow: /media/pdf/
Disallow: /media/sales/
Disallow: /media/tmp/
Disallow: /media/wysiwyg/
Disallow: /media/xmlconnect/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /scripts/
Disallow: /shell/
#Disallow: /skin/
Disallow: /stats/
Disallow: /var/

# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalog/product/gallery/
Disallow: /catalogsearch/
Disallow: /checkout/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /poll/
Disallow: /review/
Disallow: /sendfriend/
Disallow: /tag/
Disallow: /wishlist/

# Files
Disallow: /cron.php
Disallow: /cron.sh
Disallow: /error_log
Disallow: /install.php
Disallow: /LICENSE.html
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /STATUS.txt
Disallow: /get.php # Magento 1.5+

# Paths (no clean URLs)
#Disallow: /*.js$
#Disallow: /*.css$
Disallow: /*.php$
Disallow: /*?SID=
Disallow: /rss*
Disallow: /*PHPSESSID


texts: How to show images stock out product in programticallly magento?

texts: Product same as show as images in product page magento...


texts:
For our sport supply products (still in testing mode). Main interface / user language will be Dutch.

We have put a minimum order amount of ERU 50 to receive free shipments. When I test with my Cart filled with products worth a value over EUR50 it still prompt me as part of check out procedure the shipment methods Free Shipment and Flat Rate. In the tab configuration / shipment methods / free shipping i put the field  to 50.


texts: 1.9.1 CE Search Box does not work with Umlauts

texts:
I've a big problem,
I tried to fix that problem in /app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php
but it did not work i've added after:

$words = Mage::helper('core/string')->splitWords($queryText, true, $query->getMaxQueryWords());

Those 2 Arrays:

$umlaute = array('Ä','Ö','Ü','ä','ö','ü','ß');
$htmlumlaute = array('&Auml;','&Ouml;','&Uuml;','&auml;','&ouml;','&uuml;','&szlig;');

and in the foreach line where it searchs the entered word i've added:

$like[] = $helper->getCILike('s.data_index', str_replace($umlaute,$htmlumlaute,$word), array('position' => 'any'));

So what do i have to do, that the searchbox would work with german Umlauts?


texts: How to call Mage_Page_Block_Html_Pager class in list.phtml

texts:
I am wanting to include a larger than normal 'next page' type button in the list.phtml template whilst still having the normal pagination from pager.phtml

The function I'm wanting to use is found in code/core/Mage/Page/Block/Html/Pager.php:

public function getNextPageUrl()
    {
        return $this->getPageUrl($this->getCollection()->getCurPage(+1));
    }

This can be called in pager.phtml by performing $this->getNextPageUrl(). I'm wanting to call this function inside list.phtml but I'm not sure how to get it. Using $this->getNextPageUrl() doesn't work.

I've also tried variations of Mage::getModel('page/html_pager')->getNextPageUrl() without luck.


texts: Remove Trailing Zero's getGrandTotal - Email Order Conformation

texts:
I'm using this code here to pull in the total price

{{var store.getCurrentCurrencyCode()}}
{{if order.getGrandTotal()}}
  {{var order.getGrandTotal()}}
{{else}}
  0.00
{{/if}}

what I get as a price value in return is,
32.9800

adding two extra 00's at the end. How can I remove these? I'm using Magento 1.9 and this is my order confirmation email


texts:
I'm working on a site where we have two types of customers, agents and sites.  A customer logs on as an agent then chooses a site that they can order for (these are in a custom customer attribute).  The agent customer adds items to the site customer basket and can check out (the site user selection actually changes the customer session from being the agent customer to the site customer).

Now, if the agent customer has items in their basket and then changes the site customer we want to keep the basket contents intact but because they are in reality changing the logged on customer from one site customer to another the basket contents are lost.  Anyone have any ideas on how I can keep the basket contents intact between site customers?


texts: Magento Send Attachment With Order Email

texts: We need to attach a custom pdf file with an order email.


texts: Display ONLY the product name in 3 languages

texts:
This is my very first project in Magento 1.9, this is all about online grocery store. Where fruits & vegetables, rice & wheat, dry fruits, spices, etc etc are sold.

I am through with the installation process of Magento and 3rd party Template on server, setting up of categories & products. I passed this phase and successfully done it on my testing server.

Now what I need is to display ONLY the name of products in 3 different languages (English, Hindi, and Bangla). I don't require the translation of whole website or web page, ONLY the name product example: Black Brinjal (રીંગણ ગોળ)(बैंगन). I know there are many tool/extension available for translation, but I think those all are for translating the complete store, which is in my case not required.

So I need some guidance on How can I get what actually I need. For better understanding kindly refer the images below which are from this website truemart-

It will be highly appreciable if any suggestion, advice or guidance is given to me.


texts: Simple Product Thumbnail Not Displaying Correctly in Shopping Cart

texts:
I'm trying to show the correct image for each product that is in the shopping cart (One Step Checkout). Currently when a customer chooses a product, if the product has multiple colour options, it loads the configurable product thumbnail.

So if a customer has the option between a black and red shirt, if they choose the red one, it should show the red shirt thumbnail, and vice verse. I've investigated some other posts:

Post One,
Post Two

However none of the solutions worked. I have System > Configuration > Checkout > Shopping Cart > Configurable Product Image > "Product Thumbnail Itself"

Currently I try to retrieve the image by doing the following in checkout/cart/item/default.phtml :

<?php

$_item = $this->getItem();
$product_id = $_item->getProductId();
$_product = Mage::getModel('catalog/product')->load($product_id);

<img
     data-image2x="<?php echo $this->getProductThumbnail()->resize(200, 300); ?>"
     src="<?php echo $this->getProductThumbnail()->resize(100, 150); ?>"
     alt="<?php echo $this->htmlEscape($this->getProductName()) ?>"
/>

?>

Can anyone help my solve this? Thanks!


texts: How to make a product sell only as a bunch and not individually in magento

texts:
Hi Iam quite new to Magento i use Magento 1.8 CE, now i have a doubt i need to sell a product only as a set (for eg:- keyboard,monitor,mouse etc) whereas i sell keyboard,monitor and mouse individually too. Now if i want to sell my product only as a bunch (i.e) the user must not be able to select or buy any one or two of the products they must be only able to buy as a bunch.
Using grouped product option provides user to select products individually.

Please suggest me some option to achieve this.

Thanks in advance.


texts: Magento 2 - Images are not getting loaded after changing Media Base Url

texts:
I have two projects:

relaunch.company.de
redesign.company.de  (clone from relaunch.company.de)

Note: The base url of both projects is set to their pub directory.
I want to setup redesign.company.de to make it load images from relaunch.company.de so that I don't always have to upload the media to both projects.
So In redesign.company.de I added the URL https://relaunch.company.de/media/ to
Stores -> Settings: Configuration -> General -> Base Url's -> Base URL for User Media Files
and to
Stores -> Settings: Configuration -> General -> Base Url's (Secure) -> Base URL for User Media Files
Then I flushed the cache.
But there are almost no images loaded in redesign.company.de
So I compared the same product on both servers and inspected the image urls.
On relaunch.company.de I get:
https://relaunch.company.de/media/catalog/product/cache/1d080bca42fb631e749cc3891d555069/h/a/handschuh-pu-feinstrick-6618.jpg

and on redesign.company.de I get:
https://relaunch.company.de/media/catalog/product/cache/183b11492b2e7b20f5c77f31599df17c/h/a/handschuh-pu-feinstrick_6618.jpg

As you can see the cache keys are different.
I also cant upload new images, it just looks like this:

and the images does not get loaded in the frontend either.


texts: Magento 2: Add CSS class for country input in address?

texts:
In the address section at My account dashboard, there is a field
called Country. I want to change the CSS for that country's input.

Where do I need to add CSS class in order to change it?

    <?= /* @noEscape */ $block->getAttributeData()->getFrontendLabel('country_id') ?>

        <?= $block->getCountryHtmlSelect() ?>

Any help will be appreciated!


texts: Mage registry key already exist error "_singleton/plumbase/feed"

texts:
>
  https://www.activaboualaa.com/errors/report.php?id=414409631915&skin=default

    >

There has been an error processing your request
Mage registry key "_singleton/plumbase/feed" already exists

Trace:

#0 /home/activ/public_html/app/Mage.php(225): Mage::throwException('Mage registry k...')
#1 /home/activ/public_html/app/Mage.php(479): Mage::register('_singleton/plum...', false)
#2 /home/activ/public_html/includes/src/__default.php(22325): Mage::getSingleton('plumbase/feed')
#3 /home/activ/public_html/app/Mage.php(450): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#4 /home/activ/public_html/includes/src/__default.php(14225): Mage::dispatchEvent('controller_acti...', Array)
#5 /home/activ/public_html/includes/src/Mage_Adminhtml_Controller_Action.php(167): Mage_Core_Controller_Varien_Action->preDispatch()
#6 /home/activ/public_html/includes/src/__default.php(14116): Mage_Adminhtml_Controller_Action->preDispatch()
#7 /home/activ/public_html/includes/src/__default.php(18849): Mage_Core_Controller_Varien_Action->dispatch('login')
#8 /home/activ/public_html/includes/src/__default.php(18379): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home/activ/public_html/includes/src/__default.php(21354): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home/activ/public_html/app/Mage.php(686): Mage_Core_Model_App->run(Array)
#11 /home/activ/public_html/index.php(82): Mage::run('', 'store')
#12 {main}


texts: How to block @xxxx.ru email from registering on my magento2 site

texts:
Since I migrated from M1 to M2.1.9, I have been bombarded with spam registrations from .ru domains. Is there a way of preventing this without a module ? I found this : Magento 2: Restrict customer registration by specific mail extension
which is totally beyond my competence...


texts:
I am currently setting up a store but
I don't have all the product prices yet, however the price fields is required I wanted to know if it is possible to change this

Thank you guys.


texts: Magento 2 - Difference between Model, ResourceModel. Collection and Repository

texts:
I'm studying Magento and I'm confusing about the differences between these four layers. What I have understood is the following:

Model

Is the entity class with ONLY getters/setters and magic methods.

ResourceModel

Is the layer responsible of C.R.U.D operations. This class should contains ONLY the _construct method to map my entity with the database table.

Collection

As the name suggested, it's a class that implements IterableInterface and give me only a list of Entity.

Repository

It's a class that expose API methods to the external and it's also used to execute operations to database. It's used to save/load/delete entity (internally I think that for these CRUD operations it should use the ResourceModel) and to expose methods to get collections of results.

EntityNameInterface

It's the interface that Model should implement.

EntityNameRepositoryInterface

It's the interface that Repository should implement.

But not all Magento modules work in this way, so there are modules that don't use this approach yet, but for compatibility reasons they use the old approach. Is it correct what I learned to it?


texts: Magento 2 find bundle items parent products

texts:
I've simple product assign in bundle items of Bundle product.

Now I've simple product ID and I'm trying to find in which bundle product it's given in bundle items using following code but it returns an empty array.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$parent = $objectManager->create('Magento\Bundle\Model\Product\Type')->getParentIdsByChild($product->getId());
var_dump($parent);


texts: Design magento2 theme with css instead of Less

texts:
i can add my custom css and over-ride theme's defaut css etc, Can i go this way and not use LESS.

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <link src="//fonts.googleapis.com/css?family=Raleway:400,500,500italic,600,600italic|Indie+Flower|Dosis" src_type="url" />
        <css src="css/bootstrap.min.css" />
        <css src="css/custom.css" />
        <css src="css/styles-m.css" />
        <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <css src="css/print.css" media="print" />

  </head>
</page>


texts: Magento 2 Item (Magento\VersionsCms\Model\Hierarchy\Node) with the same ID "1" already exists

texts:
When clicking on Add New CMS page or open an existing page in backend below error appearing.

Item (Magento\VersionsCms\Model\Hierarchy\Node) with the same ID "1" already exists.

Could someone help asap, please?


texts: Is anyone running product retargeting ads? If so, through what provider?

texts: Does anyone have experience with using any of the retargeting platforms with their Magento store that they could share? We're interested in doing some retargeting to bring customers who have browsed back, but aren't sure which provider to go with. Any pros/cons/gotchas would be super helpful, as well as any data on efficacy. We're a little concerned that simple "hey, come back to our site" retargeting is a waste of time and money, but would love to hear from someone that's implemented it on their store before we jump to conclusions.


texts: Using css/javascript on email payment block (New Order Email)

texts:
I'm developing an payment module that shows a button with an action performed with javascript.

This is the code exibed on frontend:

        <button type="button" class="form-button" target="new_window" onclick="someAction(true)">
                     Exibir Boleto
        </button>

On frontend (success page, customer page) shows OK and in backend too, but when this block is sent by email, the code sent is:

Boleto Bancário

       <button type="button">
           Exibir Boleto
       </button>

My question is:
What happened to my javascript and part of html properties ?


texts: PHP Extension intl. missing for magento v 2.2.25

texts:
I've removed the comment from php.ini file
;extension=php_intl.dll like this
extension=php_intl.dll still it's showing thatPHP Extension intl is missing.


texts: How to Change "All Categories" text in Search box in Magento 2.4.1 Porto Theme

texts:
I'm working with Magento 2.4.1 Porto theme and want to change/translate the search box default category "All Categories". Is there any way to do this?
Thank you for your help.


texts: what is the exact use of interface in real time?

texts:
I know how to declare and rules to create interface.

i'm trying to understand exact need of interface in real time.I'm reading many articles with examples.still i'm not satisfied.

Can any one explain clearly taking our  Magento as a Case Study.

For example in shipping module

interface Mage_Shipping_Model_Carrier_Interface
{

    /**
     * Check if carrier has shipping tracking option available
     *
     * @return boolean
     */
    public function isTrackingAvailable();

    /**
     * Get allowed shipping methods
     *
     * @return array
     */
    public function getAllowedMethods();

}

class Mage_Shipping_Model_Carrier_Freeshipping
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface
{
.......................some code...............
public function getAllowedMethods()
    {
        return array('freeshipping' => $this->getConfigData('name'));
    }
}


texts: Fatal error: Class 'Mage_Themeframework_Helper_Theme' not found in app/mage.php

texts:
For debugging our site ,  in app/etc/local.xml we set :

<disable_local_modules>true</disable_local_modules>

but now we are getting this error  :

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

backend is working fine


texts: Resize different images to square without white space

texts:
I am trying to force all the images in the product grid to square. The database serves images from ultra wide to ultra high ratios.
i'm trying the following:
$productImage = $imagehelper->init($product, 'category_page_grid')
                ->constrainOnly(false)
                ->keepAspectRatio(true)
                ->keepFrame(false)
                ->resize(400, 400)
                ->getUrl();
            ?>

But whatever i try i always seem to be getting white space for the images that have a high image ratio (side note i do not want the aspect ratio to be distorted) .. what i want is magento to look for a square in the middle of the image and just cut off the rest, no matter if it's high or wide.
anyone have an idea?


texts: Why does Magento remove my frontend cookie after using customer/session

texts:
I'm using Nginx and HHVM, I'm also using custom php files to interact with Magento.

When I run any PHP file the frontend cookie gets set properly, also the shoppingcart works fine.

However, whenever I use:

$session = Mage::getSingleton( 'customer/session' );
$session->login($login, $pass);
$session->setCustomerAsLoggedIn($customer);

The frontend cookie gets removed.

Question: why is that and what can I do to solve it?

Settings:

Complete example:

include_once('../app/Mage.php');
    ob_start();
    umask(0);
    Mage::app();
    Mage::getSingleton('core/session', array('name'=>'frontend'));
    $login = $v[0]; //username as email
    $pass  = $v[1]; //user password
    try {
        $customer = Mage::getModel("customer/customer");
        $customer->website_id = Mage::app()->getWebsite()->getId();
        $customer->loadByEmail($login);

        $session = Mage::getSingleton( 'customer/session' );
        $session->login($login, $pass);
        $session->setCustomerAsLoggedIn($customer);

    } catch(Exception $e) {
        $returnJson['success']  = false;
        $returnJson['error']    = $e;
    }


texts: Frontend category only showing last 3 grouped products

texts:
So i have a problem with 1 category in my shop that is displaying only the last 3 items. The reason why is unknown.

Explanation

I have a total of 20 grouped products in this category and a total of 100 products under those 20 grouped products (5/grouped product). Now when i go to `

  products->categories->the category-> products in category

i can choose which products are displayed within that category. If i select 4 items only the last 3 will display (last 3 in that list according to ID).

So :

Product 1 -> not show
Product 2 -> shown
Product 3 -> shown
Product 4    -> shown

If i add another product then :

Product 1 -> not show
Product 2 -> not show
Product 3 -> shown
Product 4    -> shown
Product 5    -> shown

And so on.

Even more so if i put the indexing to 'on save' it has not issues but that not ideal for sending emails as far as i understand. I would need to resave every product in order to show them. But as soon as the php bin/magento indexer:reindex runs (trough cron or manual) it would go back to only showing the last 3 items.

Even more weird is that this is only withing 1 category as far as i can see (a lot of category's so i can't be 100% sure).

I have this problems since updating to magento 2.1.7

anyone any idea?

Note

If i add another simple product it shows 3 products (2 grouped and that single product). So i this is for all products and not only grouped


texts: Error: No heartbeat task found. Check if cron is configured correctly in localhost

texts:
When i am in my localhost, i got this error.

No heartbeat task found. Check if cron is configured correctly.

Because of this my cron job not working.

How i fix this Issue ?


texts: update price Observer is not working on cart page

texts:
Here is the modules config file: app\etc\modules\Cart_Updates.xml

<?xml version="1.0" encoding="UTF-8"?>
  <config>
     <modules>
       <Cart_Updates>
         <codePool>local</codePool>
         <active>true</active>
       </Cart_Updates>
    </modules>
  </config>

Here is my config file : in app\code\local\Cart\Updates\etc\config.xml

<?xml version="1.0"?>
  <config>
   <modules>
     <Cart_Updates>
       <version>1.0.1</version>
     </Cart_Updates>
   </modules>
   <global>
       <models>
         <Cart_Updates>
           <class>Cart_Updates_Model</class>
         </Cart_Updates>
       </models>
       <events>
          <sales_quote_add_item>
              <observers>
                 <cart_updates_model_observer>
                    <type>singleton</type>
                    <class>Cart_Updates_Model_Observer</class>
                    <method>updatePrice</method>
                 </cart_updates_model_observer>
             </observers>
          </sales_quote_add_item>
      </events>
  </global>
 </config>

And here is the Observer: in app\code\local\Cart\Updates\Model\Observer.php

<?php

    class Cart_Updates_Model_Observer {

      public function modifyPrice(Varien_Event_Observer $observer) {
        //exit;
      $order = Mage::registry('current_order'); //For getting current order
      echo $orderid = $order->getRealOrderId(); // For getting orderid
      $quote_item = $observer->getQuoteItem();
      $payment = 30; //add your custom product price here and do your logic here
      $quote_item->setOriginalCustomPrice($payment);
      $quote_item->save();
      return $this;
      }
      }
    ?>


texts:
In magento 1, the following line will be used for require php lib very often

    require_once(Mage::getBaseDir('lib') . DS . 'test/test_submit.class.php');

How about in magento 2?
- where should i place the php files?
- what lines of code should we use to require the php files?


texts: Special Price not showing in cart or checkout

texts:
I'm running Magento 1.9.2.4, you can see it live here: http://pleb.city/studio

We've set up special prices for each product such that 2 days before each booking, prices get reduced by 10%. You can see the prices for the next two days are reduced on the site. But when you add them to your cart or checkout, you get charged the normal amount.

I've found other answers which refer to the getFinalPrice()function but I can't work out which code to change in the backend.


texts: After successful Klevu-Magento integration, I am not able to search results. Although it shows powered by Klevu, but still it doesnt work?


texts: Products intrusion in multistore installation

texts:
I have a Magento installation with 2 stores, 2 languages each.
I have a custom home page for all the stores for which I use a 2 dedicated featured-products.phhml for each (2) custom templates (ITA-ENG) with a custom block template in the home page content like

{{block type="catalog/product_list" category_id="397" template="catalog/product/featured_products.phtml" sort_by="price" default_direction="desc"}}

Store 1 Language 2 home page shows products from a different store (different category root, of course)


texts: Bypass inventory validation on a non-MSI store

texts:
For the last couple of weeks, I have been trying to find a way where a product is a backorder only on the main stores while being able to be freely ordered one store in particular. We cannot use MSI as it interferes with our operations on the fulfillment side, so we can only use the global catalog.
I know that there is only one global quantity for all products outside of MSI (referring to this question), so my only other option (that I am aware of) is bypassing the quantity and stock check that the Catalog module uses when it adds a product to the cart (referring to the Validate function in the file QuantityValidator.php) or (answered in a different question) use setIsSuperMode to elevate the product above any validation functions? What is the correct way to approach this problem without using MSI for a solution?


texts: In Magento How to Show the Bundle Products Option in Front end Tab (Product View Page)

texts:
In the front end product view page, I need to show the bundle product options in the custom Tab.

I have added the new custom tab in front end product view page.

I have pasted the below code in this file.

  template/catalog/product/view/custom-tab.phtml

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>
    $_product = $this->getProduct();
    echo $_product->getName();

Here product name is showing, But bundle product option is not showing.

Please assist me. How to achieve this.


texts:
i have question if is possible make complete checkout process without ajax (in one action of controller)

currently i have some this code:

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

    // Create customer
    $customer = $this->prepareCustomer($data);
    // Create customer address from form
    $address = $this->prepareCustomerAddress($data,$customer);
    // Add product i want to car
    $cart = $this->prepareCart($data['package']);

    // Checkout start
    $this->_getOnepage()->saveBilling($address->getData(), $address->getId());
    $this->_getOnepage()->saveShipping($address->getData(), $address->getId());
    $this->_getOnepage()->saveShippingMethod('flatrate_flatrate');
    $this->_getOnepage()->getQuote()->collectTotals()->save();
    $this->_getOnepage()->savePayment(array('method'=>$data['payment']['method']));
    $order = $this->_getOnepage()->saveOrder();

    $order_id = $this->_getOnepage()->getLastOrderId();
    $order = Mage::getModel('sales/order')->loadByIncrementId($order_id);

    if($customer) {
        $order->setCustomerId($customer->getId());
        $order->setCustomerIsGuest(false);
        $order->setCustomerGroupId($customer->getGroupId());
        $order->save();
    }
    $redirectUrl = $this->_getOnepage()->getCheckout()->getRedirectUrl();
    if($redirectUrl) {
        $redirect = $redirectUrl;
    } else {
        $redirect = Mage::getUrl('checkout/onepage/success');
    }
    $this->_redirectUrl($redirect);
} catch (Exception $e) {
    echo $e->getMessage();
}

My problem is: the code works, but after completion the order have 0 in price and items in order too (price: 0)

I cannot see where is problem.
The product i want is Virtual if its matter

Also if there are other methods (without external modules, or external module as reference can be answered)

Thanks

EDIT:

code for add to cart

public function prepareCart($sku) {
    $cart = Mage::getSingleton('checkout/cart');
    $cart->truncate();
    $cart->save();
    $cart->getItems()->clear()->save();
    $cart->init();

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

    $productId = $product->getIdBySku($sku);
    if ($productId) {
        $product->load($productId);
    }
    $cartParams = array(
        'qty'=>1
    );
    if ($product->getOptions()) {
        $ts = Mage::getModel('core/date')->timestamp();
        foreach ($product->getOptions() as $o) {
            if ($o->getDefaultTitle() == 'Date From') {
                $cartParams['options'][$o->getId()] = array(
                    'day' => intval(date('d',$ts)),
                    'month' => intval(date('m',$ts)),
                    'year' => intval(date('Y',$ts))
                );
            } elseif ($o->getDefaultTitle() == 'Date To') {
                $cartParams['options'][$o->getId()] = array(
                    'day' => intval(date('d',$ts)),
                    'month' => intval(date('m',$ts)),
                    'year' => intval(date('Y',$ts)+1)
                );
            }
        }
    }
    $cart->addProduct($product,$cartParams);
    $cart->save();
    return $cart;
}


texts:
In the luma theme, in the home block, it starts with the code
div class="blocks-promo".

I would like to learn more these block classes so that I know how to use them going forward. i.e. I need some documentation, or at least the code so that I can figure out how to use, extend, modify, etc.

Can someone point me in the right direction?

Thanks


texts:
Every time I run this script. I get an error.
I placed this file in the root directory of my magento.

  soapexample.php:

<?php

error_reporting(E_ALL);

ini_set('display_errors', 1);

require('vendor/zendframework/zend-server/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client/Common.php');

$wsdlurl = 'https://www.chemcopharmacy.com/soap/default?wsdl&services=salesOrderRepositoryV1';

$token = 'u46losnl6ia01ctmxxxxxxxxxxxxx'; //access token

$opts = ['http' => ['header' => "Authorization: Bearer ".$token]];
$context = stream_context_create($opts); //$arguments = $serviceArgs =
$serviceArgs = array('searchCriteria'=>
    array('filterGroups' =>
        array ('filters' =>
            array('field' =>'increment_id',
                  'value' => '000000002' ,
                  'condition_type' => 'eq')
            )
     ) );
 $soapClient = new \Zend\Soap\Client($wsdlurl);
 $soapClient->setSoapVersion(SOAP_1_2);
 $soapClient->setStreamContext($context);
 $result = $soapClient->salesOrderRepositoryV1GetList($serviceArgs);

//array('searchCriteria' => $serviceArgs)); //$result = $soapClient->customerCustomerRepositoryV1GetById(array('customerId' => 1));

Error:

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
WSDL: Couldn't load from 'https://www.chemcopharmacy.com/soap/default?
wsdl&services=salesOrderRepositoryV1' : failed to load external entity
"https://www.chemcopharmacy.com/soap/default?
wsdl&services=salesOrderRepositoryV1" in
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client/Common.php:33 Stack trace: #0
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client/Common.php(33): SoapClient-
>SoapClient('https://www.che...', Array) #1
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client.php(1070): Zend\Soap\Client\Common->__construct(Array,
'https://www.che...', Array) #2
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client.php(1245): Zend\Soap\Client->initSoapClientObject() #3
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client.php(1156): Zend\Soap\Client->getSoapClient() #4
/var/www/html/chemcopharmacy/soapexample2.php(29): Zend\Soap\Client-
>__call('salesOrderRepos. in
/var/www/html/chemcopharmacy/vendor/zendframework/zend-
soap/src/Client/Common.php on line 33

What I have done?

I have edited the /etc/hosts file and added the MY.IP.ADDRESS DOMAIN.COM
I have also set necessary setting in php.ini files for soap like

extension=php_soap.dll;
extension=php_openssl.dll;


texts:
I'm trying to import configurable products with the price corrections. The products and the relations are already in, but I can't seem to get the price corrections working. This is what the configurable look like with the price corrections. Does anyone have any ideas what's going wrong? Any advice is appreciated, thank you!

sku,price,_super_products_sku,_super_attribute_price_corr
product_1_11CONF,76,product_1_15,0
,,product_1_12,15
,,product_1_13,9
,,product_1_14,4
product_2_11CONF,63,product_2_11,36
,,product_2_15,0
,,product_2_12,12
,,product_2_13,7
,,product_2_14,3

Update
I updated the import to look more like this:

sku,price,_super_products_sku,_super_attribute_code,_super_attribute_option,_super_attribute_price_corr
product_1-11HOME,395,product_115,ac_license_level,100-249,0
,,product_1-14,,10-24,30
,,product_1-13,,25-49,57
,,product_1-11,,50-99,68
,,product_1-12,,1-9,94

But it is still not working. Any other ideas?


texts: HTTP Error 500 when trying access Admin System Configuration

texts:
In the system log I get the following error:

2018-04-09T14:03:13+00:00 ERR (3): Warning:
include(Mage/Mailchimp/Helper/Data.php): failed to open stream: No such
file or directory  in
/Applications/MAMP/htdocs/www/nilil/lib/Varien/Autoload.php on line 94
2018-04-09T14:03:13+00:00 ERR (3): Warning: include(): Failed opening
'Mage/Mailchimp/Helper/Data.php' for inclusion

  (include_path='/Applications/MAMP/htdocs/www/nilil/app/code/local:/Applications/MAMP/htdocs/www/nilil/app/code/community:/Applications/MAMP/htdocs/www/nilil/app/code/core:/Applications/MAMP/htdocs/www/nilil/lib:.:/Applications/MAMP/bin/php/php5.6.32/lib/php')  in /Applications/MAMP/htdocs/www/nilil/lib/Varien/Autoload.php on line 94


texts: Why does the 'Container Widget Header' appear twice in my grid in my ajax grid?

texts:
I've built an admin grid following this tutorial: http://inchoo.net/magento/how-to-create-a-custom-grid-from-scratch/

My issue is that when I use any of the grid controls (pagination or filters), and it uses ajax to get the updated list, then adds a second instance of the text "Some Sample Header Text"?

The text itself comes from the class Ebuynow_Ebnreports_Block_Adminhtml_Shipments_Report

public function __construct()
{
    $this->_blockGroup = 'ebuynow_ebnreports';
    $this->_controller = 'adminhtml_shipments_report';
    $this->_headerText = Mage::helper('ebuynow_ebnreports')
        ->__('Some Sample Header Text');
    parent::__construct();
    $this->removeButton('add');
}

In controllers/Adminhtml/Shipments/ReportController, I have these methods responsible for building the initial grid and replying with contents for the ajax option, respectively.

public function indexAction()
{
    $this->_title($this->__('Incoming Shipments'))
        ->_title($this->__('sub title?'));
    $this->loadLayout();
    $this->_setActiveMenu('sales/sales');
    $block = $this->getLayout()
        ->createBlock('ebuynow_ebnreports/adminhtml_shipments_report');
    $this->_addContent($block);
    $this->renderLayout();
}
public function gridAction()
{
    $this->loadLayout();
    $block = $this->getLayout()
        ->createBlock('ebuynow_ebnreports/adminhtml_shipments_report');
    $this->getResponse()->setBody($block->toHtml());
}

To me, this looks correct, but I am hoping that someone with some magento experience can point out something that could cause this issue.


texts: I am attempting to pull out short description using sku code and Mage::getModel('catalog/product') in ajax and it isn't working

texts:
$product_sku = $mpn;
        $obj = Mage::getModel('catalog/product');
        $product_id = $obj->getIdBySku( $product_sku );
        $_product = $obj->load($product_id); // this is the problematic line

The above code is in a ajax controller. I am attempting to pull in the short description using the. The sku is fine and the product id is fine. The problem occurs when we get to $obj->load($product_id). The page load times out when I include this line though I have read numerous tutorials which instruct you to use this same sequence of methods. I thought that it might be because some of the products don't have a short description?? The next stage would be to use $_product->getShortDescription() but I can't get any further. I have tried everything I can think of. Has anybody got any ideas on why this is wrong?


texts:
I have old shop -  based on shopware, I need import in magento 2500 products, I have csv file with products, but import magento - not working, just error (no attributes or not what else to import properties), how I can do this best?

Thanks


texts:
Hello.php

app/code/Magento/Hello/Block/Hello.php

namespace Magento\Hello\Block;
class Hello extends \Magento\Framework\View\Element\Template
{
public function _prepareLayout()
{
    return parent::_prepareLayout();
}
}

Index.php

namespace Magento\Hello\Controller\Index;

class Index extends \Magento\Framework\App\Action\Action {
    protected $resultPageFactory;
    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    public function execute() {
        return $this->resultPageFactory->create();
    }
}

routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
<router id="standard">
    <route id="hello" frontName="hello">
        <module name="Magento_Hello" />
    </route>
</router>
</config>

module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
     <module name="Magento_Hello" schema_version="0.0.1" setup_version="0.0.1"/>
  </config>

hello_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
        <block class="Magento\Hello\Block\Hello" name="hello" template="Magento_Hello::success.phtml">
        </block>
    </referenceContainer>
</body>
</page>

success.phtml

<?php echo ‘Successful! This is a simple module in Magento 2.0′; ?>

registration.php

<?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        'Test_HW',
        __DIR__
    );

I have added the  'Magento_Hello' => 1 to the etc/config.php.

I am running Magento 2 on localhost.


texts: How can solve Magento 2 Custom REST API returns Error?

texts:
REST API returns Error:
{
    "messages": {
        "error": [
            {
                "code": 500,
                "message": "Fatal Error: 'Uncaught Error: Cannot instantiate interface MyCompany\\Slider\\Api\\SlidesRepositoryInterface in /var/www/html/magento.lan/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50\nStack trace:\n#0 /var/www/html/magento.lan/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\\Framework\\ObjectManager\\Factory\\Dynamic\\Developer->create('MyCompany\\\\Adva...')\n#1 /var/www/html/magento.lan/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(90): Magento\\Framework\\ObjectManager\\ObjectManager->get('MyCompany\\\\Adva...')\n#2 /var/www/html/magento.lan/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\\Webapi\\Controller\\Rest\\SynchronousRequestProcessor->process(Object(Magento\\Framework\\Webapi\\Rest\\Request\\Proxy))\n#3 /var/www/html/magento.lan/vendor/magento/framework/Interception/Interceptor.php(58): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#4 /var/www/html/magento.lan/vendor/magento/framework/Interc' in '/var/www/html/magento.lan/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php' on line 50",
                "trace": "Trace is not available."
            }
        ]
    }
}

I also run all Cli :
rm -rf var/cache/* var/tmp/_cache var/composer_home/cache/* var/view_preprocessed/* var/page_cache/* var/report/* var/log/* generated/code/*  pub/static/frontend/* pub/static/adminhtml/* pub/static/_cache/*
php bin/magento setup:di:compile
php bin/magento s:up
php -d memory_limit=2G bin/magento index:reindex
php bin/magento c:f

cat /var/log/nginx/error.log
Stack trace:
#0 /var/www/html/magento.lan/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('MyCompany\\Adva...')
#1 /var/www/html/magento.lan/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(90): Magento\Framework\ObjectManager\ObjectManager->get('MyCompany\\Adva...')
#2 /var/www/html/magento.lan/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))
#3 /var/www/html/magento.lan/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/magento" while reading response header from upstream, client: 127.0.0.1, server: www.magento.lan, request: "GET /rest/default/V1/apps/abanners HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.2-fpm.sock:", host: "www.magento.lan"


texts: Magento 2 visibility "catalog" not saving in default store view

texts:
Magento 2 visibility "catalog" not saving in "default store view" but when store is "All store view" it is saving "catalog" but in default store view when visibility set "catalog" after save it is showing "catalog,search"
Using Magento 2.3.5p1

Anyone how to solve this?


texts: I need to increase the number of records displayed in the Bestsellers report

texts: I am told I need to do this by going to /app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php  however I am not sure how to get there.  Am I to assume that I begin with the site URL say XXXXX.co.uk/app/code/core/Mage/Sales/Model/Resource/Report/Bestsellers/Collection.php  If so I am told the page is forbidden.  Can yo help this newbie  ...please.


texts: Why does Magento limit Newsletter sending to 20?

texts:
I am currently midst sending a newsletter to 12782 subscribers, it has been going since 3:00am this morning and now it is 22:41, but has only sent 4740 emails.

Investigating further it has come to my attention that the rate has been limited to 20 here:

 public function scheduledSend($schedule)
{
    $countOfQueue  = 3;
    $countOfSubscritions = 20;

    /** @var Mage_Newsletter_Model_Resource_Queue_Collection $collection */
    $collection = Mage::getModel('newsletter/queue')->getCollection()
        ->setPageSize($countOfQueue)
        ->setCurPage(1)
        ->addOnlyForSendingFilter()
        ->load();

     $collection->walk('sendPerSubscriber', array($countOfSubscritions));
}

In app\code\core\Mage\Newsletter\Model\Observer.php

I have tried searching online but cannot find why there is such a limit.

Moreover, not sure if it has a contributing factor but my cron and smtp pro settings are as such:


texts: Magneto 2.2.2 upgrade to 2.3.2 Getting Error

texts:
We are trying to upgrade a Magento 2.2.2 site to Magento 2.3.2, when executing php bin/magento setup:di:compile we get the error...

  Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec 72.5 MiBPHP Fatal error:
      Declaration of Bss\MultiStoreViewPricing\Model\Quote\Item\Collection::_assignProducts()
      must be compatible with Magento\Quote\Model\ResourceModel\Quote\Item\Collection::_assignProducts():
      Magento\Quote\Model\ResourceModel\Quote\Item\Collection
       in /var/www/html/app/code/Bss/MultiStoreViewPricing/Model/Quote/Item/Collection.php on line 124


texts: Magento 1 make all cookies secure and HttpOnly

texts:
Is there any way to make all the cookies to secure at a time In Magento 1

I tried the following Setting in Magento 1 configuration

System->configuration->(General) > Web > session cookie management->use HTTP Only->Yes

But still, cookies are not set to HTTPOnly

I want both attributes HttpOnly and secure should be set

Let me know if anything I can do for this.

Thank You.


texts: Magento 2.2.0 checkout regenerate session id very slow

texts:
Session saving in memcache. Сheckout page is load 16sec. From xdebug profiling i found out that the problem in function Magento\Framework\Session->regenerateId() session_start() exec 15 sec.

Why it so?

p.s if session save path set to file then problem is solving.


texts: Missing CSS and JS files In magento2 Git Repository

texts:
I have Successfully Install the Magento2 But when I try to run Homepage I getting below Errors in the console.

Then I have checked in Magento git Ripo https://github.com/magento/magento2/tree/master/pub/static

I have found the below Image All Folders are missing.

If some has that folders then please provide us...


texts:
I'm trying to extend Magento\Catalog\Block\Product\View to add some functionalities. I have let PHPStorm generate the constructor method for me and that worked fine.

public function __construct(
    Context $context,
    \Magento\Framework\Url\EncoderInterface $urlEncoder,
    \Magento\Framework\Json\EncoderInterface $jsonEncoder,
    \Magento\Framework\Stdlib\StringUtils $string,
    \Magento\Catalog\Helper\Product $productHelper,
    \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
    \Magento\Framework\Locale\FormatInterface $localeFormat,
    \Magento\Customer\Model\Session $customerSession,
    $productRepository,
    \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
    array $data
){
    parent::__construct($context, $urlEncoder, $jsonEncoder, $string, $productHelper, $productTypeConfig, $localeFormat, $customerSession, $productRepository, $priceCurrency, $data);
}

But as soon as I add a custom class factory to the constructor it breaks and I get 404 page when I try to visit the product view page.
I used the same factory in Adminhtml blocks and observers, so I figured this should work the same way.

protected $_awesomeModelFactory;

public function __construct(
    Context $context,
    \Magento\Framework\Url\EncoderInterface $urlEncoder,
    \Magento\Framework\Json\EncoderInterface $jsonEncoder,
    \Magento\Framework\Stdlib\StringUtils $string,
    \Magento\Catalog\Helper\Product $productHelper,
    \Magento\Catalog\Model\ProductTypes\ConfigInterface $productTypeConfig,
    \Magento\Framework\Locale\FormatInterface $localeFormat,
    \Magento\Customer\Model\Session $customerSession,
    $productRepository,
    \Magento\Framework\Pricing\PriceCurrencyInterface $priceCurrency,
    array $data,
    \MyAwesome\Mobule\Model\AwesomeModelFactory $awesomeModelFactory
){
    $this->_awesomeModelFactory = $awesomeModelFactory;
    parent::__construct($context, $urlEncoder, $jsonEncoder, $string, $productHelper, $productTypeConfig, $localeFormat, $customerSession, $productRepository, $priceCurrency, $data);
}


texts: In admin form after edit and save a form in db, already stored image save as blank in db in magento 2

texts:
when a edit admin form, Previously saved image path become blank in db how to solve this problem in magento 2
I m done a image upload and save into db by using this code

In form upload and save a image in database

after edit and save a form again, image will be blank

Please someone help me solve this issue

Updated
Controller file: Save.php

<?php

namespace Cm\Productlabel\Controller\Adminhtml\Label;
use Magento\Backend\App\Action;
use Magento\Framework\App\Filesystem\DirectoryList;

class Save extends Action
{

    public function __construct(
      Action\Context $context

     )
    {
        parent::__construct($context);

    }

    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Cm_Productlabel::save');
    }

   public function execute()
   {
      $isPost = $this->getRequest()->getPostValue();
      $resultRedirect = $this->resultRedirectFactory->create();
      if ($isPost) {
            $model = $this->_objectManager->create('Cm\Productlabel\Model\Productlabel');
         $postId = $this->getRequest()->getParam('productlabel_id');

         if ($postId) {
            $model->load($postId);
         }
         $formData = $this->getRequest()->getParam('label');
        if(!empty($post['proimage']['value']))
       {
            $imageName = $post['proimage']['value'];
            $post['proimage'] = $imageName;
        }
         $model->setData($formData);

    $imagePost = $this->getRequest()->getFiles('proimage');
    $fileName = ($imagePost && array_key_exists('name', $imagePost)) ? $imagePost['name'] : null;
   if($imagePost && $fileName) {
    try {
        $uploader = $this->_objectManager->create(
            'Magento\MediaStorage\Model\File\Uploader',
            ['fileId' => 'proimage']
        );
        $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png']);
        $imageAdapterFactory = $this->_objectManager->get('Magento\Framework\Image\AdapterFactory')
            ->create();
        $uploader->setAllowRenameFiles(true);
        $uploader->setFilesDispersion(true);
        $uploader->setAllowCreateFolders(true);
        $mediaDirectory = $this->_objectManager->get('Magento\Framework\Filesystem')
            ->getDirectoryRead(DirectoryList::MEDIA);

        $result = $uploader->save(
            $mediaDirectory
                ->getAbsolutePath('Cm/Productlabel')
        );
        $model->setProimage('Cm/Productlabel'.$result['file']);
    } catch (\Exception $e) {
        if ($e->getCode() == 0) {
            $this->messageManager->addError($e->getMessage());
        }
    }
}

         try {

         // var_dump($model->setProimage( $prev_img ));exit;  // before saving

            $model->save();

            // Display success message
            $this->messageManager->addSuccess(__('The label has been saved.'));

            // Check if 'Save and Continue'
            if ($this->getRequest()->getParam('back')) {
               $this->_redirect('*/*/edit', ['id' => $model->getId(), '_current' => true]);
               return;
            }

            // Go to grid page
            $this->_redirect('*/*/');
            return;
         } catch (\Exception $e) {
            $this->messageManager->addError($e->getMessage());
         }

         $this->_getSession()->setFormData($formData);
         $this->_redirect('*/*/edit', ['id' => $postId]);
      }
   }

}


texts:
Yesterday, I updated my production site from 1.9.0.1 to 1.9.3.8 and have run into a hangup with product images.

Uploading photos works (as in they are added to the /tmp folder) but they do not show up in the list of images in the admin panel.
NONE of my products do not have any of the radio buttons selected for the Base Image, Small Image, Thumbnail settings -- and when I try to set them, the page refreshes but the radios are still not selected. Weird. (screenshot)

My staging site (same version of Magento) has not of the issues above. Which makes me think it could be db related.


texts: Getting an issue working with Grunt in Magento 2

texts:
I'm getting this issue after run grunt exec:<theme>, this shows up:

  Processed Area: frontend, Locale: en_US, Theme: Ids/prueba, File type: less.
   [Magento\Framework\Exception\FileSystemException]

  Cannot create a symlink for "/usr/local/devs/magento2/htdocs/vendor/magento/theme-frontend-blank/web/css/source/_reset.less" and place it to "/usr/local/devs/magento2/htdocs/pub/static/frontend/Ids/prueba/en_US/css/source/_reset.less" Warning!file_get_contents(/usr/local/devs/magento2/htdocs/var/cache//mage-tags/mage---e39_INTERCEPTION): failed to open stream: No such file or directory

  dev:source-theme:deploy [--type="..."] [--locale="..."] [--area="..."] [--theme="..."] [file1] ... [fileN]

  Exited with code: 1.
  Warning: Task "exec:prueba" failed. Use --force to continue.

And after i run grunt refresh, shows the same after it cleans all the paths.

Now, running the command for the bin/magento dev:source-theme:deploy got this:

  Processed Area: frontend, Locale: en_US, Theme: Magento/luma, File type: less.

  [Magento\Framework\Exception\FileSystemException]

  Cannot create a symlink for "/usr/local/devs/magento2/htdocs/vendor/magento/theme-frontend-blank/web/css/source/_reset.less" and place it to "/usr/local/devs/mage
    nto2/htdocs/pub/static/frontend/Magento/luma/en_US/css/source/_reset.less"

  dev:source-theme:deploy [--type="..."] [--locale="..."] [--area="..."] [--theme="..."] [file1] ... [fileN]

I was triyng to fix this by following a lot of instructions on other issues already, nothing worked.

Any ideas why this might be happening?
I have a VM configured running of Ubuntu 14.04.3 LTS , and have node 5.4.1 with npm 3.3.12


texts: Is it possible to display OOS products in last even product sort by name/price etc

texts:
We have to display all In stock products in starting position even if we sort by name or any other criteria, we have to display out of stock product in last position.

How can we do this in all type of listing pages?


texts: Magento 2 How to get Controller Result in phtml file?

texts:
I am submitting my form data to controller and getting filtered product collection using helper function.But Now I want that result data (from execute()) in my phtml file.Then I can display those filtered products.

  Note : No need that data directly from controller to phtml, We can also use block or helper but the result collection I need in phtml file.

Can you help me on this?


texts:
I would like to fill my cart with one virtual product by default (permanent).

It should work like this:
The user visits my shop. When he opens the empty cart, he should always find one article there. The article should be a virtual product as a present free of charge.

Has anybody an idea how to solve this in a simple way, or with an extension?

I tried so much, but could not find a solution.


texts: Magento 2.1.15 - PHPSESSID changes from page to page

texts:
I am having an issue with Magento seemingly losing sessions and thereby logging users out.

I have also noticed that the PHPSESSID cookie value seems to change within one user session. Is that the expected behavior?

I do have AJAX calls that check if a user is logged in or not, and I am wondering if somehow the cookie value that the AJAX calls get back from the controllers are causing the logout issue?

I am using Redis for session management on AWS


texts: When creating invoice the order status is always Suspected Fraud

texts:
My order status are like this:

What's wrong with it?

happens with all kinds of payment methods!

Magento see. 2.2.11


texts: How do I add "Pay as little as $/month" on product view page based on the final price?

texts:
I would like to display what the monthly payments would be for our monthly payment option, based on the final price of the product (including configurable products).  Here is a screenshot of something I would like:

Essentially, I would like to be able to grab the final price and split it into monthly payments and output the text after the "product.info.price".

I tried overriding the catalog_product_view.xml in my theme and specify a different .phtml to use, but I was not able to grab the final price... or any price for that matter.

I also tried specifying the block class="Magento\Catalog\Pricing\Render" in the catalog_product_view.xml, but it just repeated the product price with a lot of underlying html with no way to modify it.

So, how can I override the catalog_product_view.xml to grab the price, do a calculation based on it, then output custom text based on that calculation after the "product.info.price" block?


texts: Generate XMl File and upload the Xml file in the FTP server using FTp connection progrmatically

texts:
I have created custom XML file into a local server and connect FTP using programmatically in Magento 2 Now I want to upload that generated xml file into FTP server in specific location.but I need to upload in a particular directory How I can archive this?
Any idea related to this

thanks


texts: I want to remove disable attribute from price (admin panel->catalog->products->edit product) in magento 2.3

texts:
I have products with variations (size, heel size... etc.) Every product has the same price for all variations. I want to remove the disabled attribute from price(it is called "pret" in the picture below) input in every situation.

price input is disabled:

Thank you.


texts: Quickbook Desktop + Magento 2 Integration

texts:
I have installed an extension Magenest QuickBooks Desktop Integration in Magento 2 and working fine with Quickbook desktop app.

Extension Synchronise data from Magento 2 to Quickbook Desktop application, But is it possible to fetch or synchronise data from Quickbook Pro desktop app to Magento 2?

Let's say I'm going to create an order from Quickbook Desktop application and that order should sync to Magento 2. So Is it possible in my case?


texts: Can't Login Wordpress in Magento Fishpig : WordPress Auto Login Failed

texts:
I'm Getting 500:Internal Server error.

When checked via admin panel below error is showing:

  WordPress Auto Login Failed: HTTP/1.0 500 Internal Server Error Date:
  Mon, 18 Jul 2016 13:04:28 GMT Server: Apache/2.4.7 (Ubuntu)
  X-Powered-By: PHP/5.5.9-1ubuntu4.17 Content-Length: 0 Connection:
  close Content-Type: text/html

But my local version is working fine.

Tried Updating Fishpig version, but still the problem persist.

Error Log

Log {main}
2016-07-18T13:04:28+00:00 DEBUG (7): exception 'Exception' with message 'WordPress Auto Login Failed: HTTP/1.0 500 Internal Server Error
Date: Mon, 18 Jul 2016 13:04:28 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.17
Content-Length: 0
Connection: close
Content-Type: text/html' in /var/www/html/app/code/community/Fishpig/Wordpress/Helper/System.php:373
Stack trace:
#0 /var/www/html/app/code/community/Fishpig/Wordpress/controllers/Adminhtml/WordpressController.php(34): Fishpig_Wordpress_Helper_System->loginToWordPress('username here', '*******', 'http://54.186.8...')
#1 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Fishpig_Wordpress_Adminhtml_WordpressController->loginAction()
#2 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('login')
#3 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /var/www/html/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#5 /var/www/html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /var/www/html/index.php(83): Mage::run('', 'store')
#7 {main}


texts: Google trusted store not generating badge at checkout

texts:
We switched OnePage Checkouts (Checkit Out!) and after switching GTS stopped working. Google has a way of previewing the GTS badge and we can see the badge on the site until we get to the checkout process. I don't see any JS error in the console. We are using the Turnkey GTS module.

This is in the OnePage Checkout - Note missing Badge in right corner

We have confirmed that the code is GTS code is there and there are no re-write conflicts


texts: Unable to place the order - Invalid block type?

texts:
Recently my site have encountered a problem that some customers are not able to place order at the Review Order page.

The usual flow is like this: add products to cart --> view cart page --> one page check out --> PayPal page --> Review Order. Actually the last step is not necessary as long as the payment can go through successfully. But some products have got the problem that, right after the PayPal page, it turns to Review Order page and then when customers press "Place Order", nothing happens (and no payment is made). The admin then received an email saying that Payment transaction failed and "Unable to place the order".

What I mean by "some products" is that some other products do go through successfully. For example, when product "Red Umbrella" has encountered the aforementioned issue, then I duplicated the same product (with different SKU of course) and purchased it and there is no such error. (But I do not find anything unusual with the products themselves.)

I have checked the exception.log at var/log and it shows something strange:

  2016-03-27T16:52:58+00:00 ERR (3):  exception 'Mage_Core_Exception'
  with message 'Invalid block type:
  Mage_Braintree_Payments_Block_Datajs' in
  /home/public_html/uk/app/Mage.php:595

......

  2016-03-27T16:52:58+00:00 ERR (3):  exception 'Mage_Core_Exception'
  with message 'Invalid block type: Mage_Braintree_Payments_Block_Form'
  in /home/public_html/uk/app/Mage.php:595

I have tried to allow these blocks (at System --> Permission --> Blocks) but with no luck.

  opc/braintree_form

  opc/braintree_datajs

  braintree_payments/datajs

  braintree_payments/form

I am using the IWD One Page Check Out extension and it used to be fine (at least for the past two months). So I think it is not about a conflict of extension.

Anyway, I then tried to look into iwd_opc.xml and only found that the braintree stuff is under "PAYPAL EXPRESS LIGHTBOX" and I do not think there is any unusual here as well.
I am not using this extension but I have tried to find an solution from their answer. But it doesn't help I am afraid: http://store.lotusbreath.com/review/product/view/id/13/.

I am almost burned out with this issue (customers have enter their credit card info but they cannot place order and they think it is somehow a scam - even though no payment has been gone through)! Would be really appreciate if any master can help! Thank you very much!

P.S. I am using Magento 1.9.2.2 and the payment method is PayPal Express.


texts: Check if product got CustomLinkedProducts on view.phtml

texts:
I use the following extension:
https://github.com/Marko-M/Inchoo_CustomLinkedProducts

But now I want to check in the file /app/design/frontend/theme/theme/template/catalog/product/view.phtml if the product got CustomLinkedProducts.

I load the custom template file, by using the following code in view.phtml: <?php echo $this->getChildHtml('customlinkedproducts') ?>

And that loads the file: app/design/frontend/theme/theme/template/inchoo/catalog/product/list/custom.phtm

Inside that file there is a php check line like: <?php if($this->getItems()->getSize()): ?>

But now I want to check in the view.phtml file if the product really got CustomLinkedProducts. What php line do I need for this?

<?php if($this->getItems()->getSize()): ?> does not work in the view.phtml file.


texts:
I created a simple hierarchy of attribute sets, basing each one on its parent attribute set, adding attributes in each level.

Now I discovered that one ancestor attribute set needed another attribute.

I went to the children of this ancestor after adding the attribute, and for my surprise the attribute isn't added to the children.

Is this intentional ? What am I missing ?

Thanks.


texts: Magento design inconsistancy between sites

texts:
I have recently been noticing that despite having a consistent colour scheme configured for all of our magento stores ( Main site/School site), there are major differences in colour appearing in quite important places. The biggest issue is the Add To Cart button, which correctly is green on our school site, but is however grey on our main site. I have looked deep into this issue however cannot get the sites to act in unison.

Secondly the footer (correct as configured via custom css file & magento config on school site) is only correct on our main site until a link has been clicked. For example if you where to go to our homepage via URL you will see the newsletter text in the footer as white; however if you are to click on a link such as "corporatewear" you can see that the text changes to black and the social media icons change to a dark grey as configured in the past.

I have checked the custom css file and there are no lines of code which are isolated to either pages or sites.
Any help would be greatly appreciated.

Homepage

Corporatewear

Main site product- example of grey add to cart button

School site product- example of correct green add to cart button


texts: Unable to overcome the "Can't retrieve entity config" error

texts:
I have been working on a simple module and have been stuck with the error

Can't retrieve entity config

for too long. I am assuming that this is to do with the way I have set my config.xml files up?

The module is to extract information from a table that I have put in to the database. I guessed this would be an easy and basic project for me but i'm really struggling.

My two questions are

How should I go about de-bugging projects in Magento (many of my
problems have been with the xml). So far I have been using var_dump()
and die() commands, is there a better way?
How do I resolve this problem? (I have added my xml code below)

namespace/module/etc/config.xml

<global>
    <models>
        <prefcentre>
            <class>Ps_Prefcentre_Model</class>
            <resourceModel>prefcentre_mysql4</resourceModel>
        </prefcentre>

        <prefcentre_mysql4>
            <class>Ps_Prefcentre_Model_Mysql4</class>
            <entities>
                <prefcentre>

prefcentre

                </prefcentre>
            </entities>
        </prefcentre_mysql4>
    </models>
    <resources>
        <prefcentre_write>
            <connection>
                <use>core_write</use>
            </connection>
        </prefcentre_write>
        <prefcentre_read>
            <connection>
                <use>core_read</use>
            </connection>
        </prefcentre_read>
    </resources>
</global>

======EDIT=====

Cache is disabled.

class Ps_Prefcentre_Model_Mysql4_Preferences
extends Mage_Core_Model_Mysql4_Abstract
{
    protected function _construct()
    {
        $this->_init('prefcentre/preferences', 'prefcentre_id');
    }
}


texts: Product package with quantity 0 continues to appear in the cart

texts: Guys I need help with something in magento, I look everywhere and I couldn't solve it and since I'm a novice I decided to resort to you. On the page of bundle products when setting the input of a product to 0 and clicking on buy it continues to appear in the cart. How can I solve this? I need to resolve this and I need help.


texts: Magento 2 : Admin : Change order status from pending to complete

texts: I have created new order from admin. Now it is in Pending state. I need to print invoice pdf but for this order should be in Completed state. I am not able to figure out the way to make it completed from Admin. Any help will be appreciated.


texts:
I have set up a second website under the same magento installation which will be used as a pos for a physical store. I want to however restrict access to the website as it is not formatted for public access and there are products on there that I dont want people to purchase.

The only access we need to the 'pos' website is through an extension i.e. domain.com/pos/webpos/....

Everything else needs to be completely closed to the public (and google for SEO reasons)

Does anyone know how to go about this? Or perhaps create a redirect so everything gets directed to the 'actual' website

The actual online website for the 'public' to buy items is mydomain.com. The other 'offline pos website' is mydomain.com/pos I say 'offline' because it has products that are only sold offline in the physical store.

Therefore anyone who accesses mydomain.com/pos/....... should be directed back to mydomain.com. except if they are a store employee accessing mydomain.com/pos/webpos/ which is the only part of the 'pos' website that needs access.


texts:
I need to limit the shipping to some specific states on Magento.

Magento version is CE 1.9.2 most recent.

I found an article for this issue ( http://doejo.com/magento-how-to-remove-certain-states-from-state-region-list-at-checkout-or-registration/ )

According to article, I need to modify the /app/code/core/Mage/Directory/Model/Mysql4/Region/Collection.php file in a following way.

At around line 50, change the code below:

$this->_select->from(array('region'=>$this->_regionTable),
array('region_id'=>'region_id', 'country_id'=>'country_id', 'code'=>'code', 'default_name'=>'default_name')
);

To following:

$exclude_regions = array ('AS','AK','AA','AC','AE','AK','AM','AP','FM','GU','HI','MH','MP','PW','PR','VI','AF');

$this->_select->from(array('region'=>$this->_regionTable),
    array('region_id'=>'region_id', 'country_id'=>'country_id', 'code'=>'code', 'default_name'=>'default_name')
)
->where('code NOT IN (?)', $exclude_regions);

Now, I tried to duplicate the same file at the local pool first, since editing the magento core files is never a good idea... However, That file has only 3 lines of code:

class Mage_Directory_Model_Mysql4_Region_Collection extends Mage_Directory_Model_Resource_Region_Collection
{
}

Any ideas where the code is moved? Which file do I need to modify on recent magento version? :))

Thank you


texts:
I am using magento 2.1.3. I am trying to enable inline translation for front end. but any how it is not working. Any js error is also not coming.

Can you please tell me why inline translation is not working in magento 2 ?

Any help will be appreciated.

Thanks.


texts:
I have a problem with my site processing email templates.

When I click preview on any email template it just produces a blank document.
I have tried this with standard inbuilt templates and very simple templates with no variables, it always comes up blank.

When I make an order on the site, when it returns to the site from the payment provider, it tries to send the email, generates a 500 error and indicates that the order has failed.

In fact the payment has gone through, and the email has been sent multiple times, up to 9 times in one case.

> [16-Nov-2019 15:21:37 UTC] PHP Fatal error:  Uncaught TypeError:
> Argument 1 passed to Magento\Email\Model\Template::setVars() must be
> of the type array, null given, called in
> /vendor/magento/framework/Mail/Template/TransportBuilder.php on line
> 368 and defined in /vendor/magento/module-email/Model/Template.php:403
> Stack trace:
> #0 /vendor/magento/framework/Mail/Template/TransportBuilder.php(368): Magento\Email\Model\Template->setVars(NULL)
> #1 /vendor/magento/framework/Mail/Template/TransportBuilder.php(380): Magento\Framework\Mail\Template\TransportBuilder->getTemplate()
> #2 /vendor/magento/framework/Mail/Template/TransportBuilder.php(337): Magento\Framework\Mail\Template\TransportBuilder->prepareMessage()
> #3 /vendor/magento/module-sales/Model/Order/Email/SenderBuilder.php(91):
> Magento\Framework\Mail\Template\TransportBuilder->getTransport()
> #4 /vendor/magento/module-sal in /vendor/magento/module-email/Model/Template.php on line 403

Any ideas?


texts: How to import product images programmatically with the use of custom script in magento 2?

texts:
I have all product images in one folder. Images are in path like - pub/media/Fotos/MA/{{ sku }}/
So need to import images as per SKU folder. I want dynamic script for it.


texts: Cart page - Get Related Product with URLs (including the category)

texts:
For each product in the cart I'm loading its related products.

$related_product_collection = $_product->getRelatedProductCollection()
                                        ->addUrlRewrite()
                                        ->AddStoreFilter();

But I'm getting the URL of these related products without the category name

<?php echo $relatedProduct->getProductUrl(); ?>

I'm getting

http://myDomain/product1 instead of http://myDomain/categ1/product1

The courses can belong to several categories.

What's the best approach here? Add a rewrite manually?
http://myDomain/product1 --> redirects to --> http://myDomain/cat1/product1

Add a loop through all the categories to get the right one for that related product?

Thanks in advance!


texts: Default quantity on product page for configurable product with MOQ

texts:
I currently have my site setup with simple products with custom options but would like to change them to configurable products and take advantage of the Magento 1.9.1 swatch feature.

The problem I am seeing is that with configurable products the displayed default quantity on the product page is always "1" even though I have a minimum order quantity (MOQ) set on each simple product page.

All my products have a MOQ. The simple products of the configurable product always have the same MOQ. Is there anyway to display the MOQ on the configurable product page as the default quantity instead of "1"?


texts: Retrieve Values passed in Ajax Magento 1.9

texts:
After making the ajax call, i try to recover the values, but returns null

this is function inside controller

    public function checkAction()
{
    # Retrieve value
    //$checkbox = Mage::app()->getRequest()->getPost('checkbox');
    //$checkbox = Mage::app()->getRequest()->getParam("checkbox");
    //$checkbox = $this->getRequest()->getParam("checkbox");
    $checkbox = $this->getRequest()->getPost("checkbox");

    Mage::log($checkbox);

    //response
    $response = array('namecheck' => $checkbox);

    # Send response Json
    $this->getResponse()->setHeader('Content-type', 'application/json');
    $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($response));
}

this is ajax call

    new Ajax.Request('<?php echo $ajaxUrl; ?>', {
    method: 'POST',
    data: {
        ajax : true,
        checkbox : id_var,
        value : value_var,
        },
    onSuccess: function(transport) {
        alert('Sent notification.');
    },
    onFailure: function(transport) {
        alert("Couldn't send a notification. ");
    }
});

tips ?
I tried both getPost & getParams
and method: 'POST' & method: 'GET'

Log: null

Payload response: {"namecheck":null}


texts:
I have tried this

[shell]$ php -d memory_limit=2048M indexer.php --reindex catalog_url
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in lib/Varien/Db/Adapter/Pdo/Mysql.php on line 858
[shell]$ php -d memory_limit=4096M indexer.php --reindex catalog_url
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in lib/Varien/Db/Adapter/Pdo/Mysql.php on line 858
[shell]$ php -d memory_limit=8192M indexer.php --reindex catalog_url
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in lib/Varien/Db/Adapter/Pdo/Mysql.php on line 858
[shell]$ php -d memory_limit=16384M indexer.php --reindex catalog_url
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in lib/Varien/Db/Adapter/Pdo/Mysql.php on line 858
[shell]$ php -d memory_limit=32768M indexer.php --reindex catalog_url
PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 523800 bytes) in lib/Varien/Db/Adapter/Pdo/Mysql.php on line 858

I think the server only has 32gb of memory. But really should take that much... 24k URLS in the table

EDIT: I modified the .htaccess and increased my memory and now I get this error

[shell]$ php indexer.php --reindex catalog_url
Segmentation fault


texts: Magento2 Price sorting not working with special price

texts:
Price(Low to High) Sorting not working correctly with the special price.
Any one have idea?


texts: Magento2 - Add custom attribute in transactional sales e-mail

texts:
we are using magento 2.1.9ce.

In the ordermails are now (by default shown) the name, sku, qty, price and the size attribute.

Now I would like to add a custom attribute to this.
The name of the attribute is 'artikelnummer'.
But only the parent product has this attribute.

How can I add this to the transactional e-mail? So it reads this attribute from the parent product


texts: Author name and user fields when packaging magento extension

texts:
I am echoing an unanswered question here.

What exactly goes in the 3 fields displayed on in the Magento packaging guide "Section C:  Authors"?   The guide has a screenshot that includes 3 fields, Name, User, and Email and specifically instructs me to enter the "User Name" from my MagentoCommerce.com account.

When I login to my Magentocommerce.com account and click "MY ACCOUNT" - there is NO user name field.   There is only my First Name, Last Name, Email, and Screen Name (which I am not to use per online wiki).

It is very unclear what exactly is to go in the NAME field and the USER field in the packaging section.

Thank you!


texts: Stop auto play home page slider in Magento 1.9.1

texts: I have used the default home page slider functionalities. the slider is running one by one. Need to stop the automatic slider running. I have checked the js file skin\frontend\rwd\default\js\lib\jquery.cycle2.min.js and skin\frontend\rwd\default\js\lib\jquery.cycle2.swipe.min.js files to stop the transition. But not able to stop the transition.


texts: Magento2 Ajax change store currency and refresh total on Checkout page when change address

texts:
I want to change the current store currency by ajax and refresh the total when changing the address on the checkout page. I have successfully changed store currency by below code:
$this->storeManager->getStore()->setCurrentCurrencyCode($currencyCode);

But problem is that when I am trying to refresh the total then the amount converted as per currency successfully but the currency symbol not changed. Below is the js code of refresh total:
cartCache.set('totals',null);
defaultTotal.estimateTotals();


texts:
I would like to add a static path to product URLs. Something like 'product/regular-product-path'. I would like this to be a rule, not something I have to add manually in Catalog >> URL Rewrite Manager.

I have found this post http://www.placementedge.com/blog/how-to-add-a-prefix-to-magento-product-urls/ where a solution is suggested. It apparently works, but it is probably targeted towards an earlier version of Magento because the script the writer suggests to edit doesn't exist in my 1.8.1 version.

He suggests editing /app/code/local/Mage/Catalog/Model/Url.php, but the close I could find was /app/code/local/Mage/Catalog/Model/Product/Url.php. If /app/code/local/Mage/Catalog/Model/Product/Url.php is the file I should be editing, which lines should I change to add my static URL prefix? Thank you.


texts: Magento 2 Currency Setup - Allowed Currencies programmatically

texts:
How to set 'Allowed Currencies' for each store programmatically in Magento2.

Options in Admin Panel are placed here:

System -> Configuration -> General -> Currency Setup

Also I'm not sure where exactly these informations are stored in magento database.


texts: Add validation of 30 alphabets allowed to new shipping address form field. Magento 2

texts:
How do i add validation of maximum 30 alphabets allowed to shipping address form field
in checkout page magento 2 ?
https://prnt.sc/rz0n58


texts: Move breadcrumb Block purely via local.xml

texts:
I want to move the breadcrumb block purely using local.xml.

It needs to be moved from its default location to the content block somewhere for me to output.

Usually when moving blocks i would unsetChild and then insert, however, this is making the breadcrumb block appear twice and also its not actually moving it anywhere.

<reference name="root">
    <action method="unsetChild"><name>breadcrumbs</name></action>
    <reference name="content">
        <action method="insert"><child>breadcrumbs</child></action>
    </reference>
</reference>


texts: Load default address when logged in on magento2

texts:
I want to load magento2.1 default address on my cart page address box when i'm logged in.

mean that, when i'm in one step checkout page and logged in, in my address part, see default address instead of please select your address...


texts: Magento2.2 - - Failed to read session data

texts:
If you open the front end with multiple tabs in the browser, the following error is output:.

Exception #0 (Exception): Warning: session_start(): Failed to read session data: user (path: /var/opt/remi/php71/lib/php/session) in /var/www/html/primary/vendor/magento/framework/Session/SessionManager.php on line 189

The www.conf file specifies the location of the session as follows:.

php_value[session.save_path]    = /var/opt/remi/php71/lib/php/session

The permissions for saving sessions are set as follows:.

total 0
drwxr-xr-x 5 www-data www-data 53 May 14 20:17 .
drwxr-xr-x 7 root     root     71 May 14 20:06 ..
drwxrwx--- 2 www-data www-data  6 May  1 18:33 opcache
drwxrwx--- 2 www-data www-data  6 May  1 18:33 session
drwxrwx--- 2 www-data www-data  6 May  1 18:33 wsdlcache

The configuration problem is complete, but an exception message is printed.
Please tell me how to fix it.

Additional information.
I also set up Redis.
The settings are as follows:.

'session' => [
        'save' => 'redis',
        'redis' => [
            'host' => '127.0.0.1',
            'port' => '6381',
            'password' => '',
            'timeout' => '2.5',
            'persistent_identifier' => '',
            'database' => '2',
            'compression_threshold' => '2048',
            'compression_library' => 'gzip',
            'log_level' => '3',
            'max_concurrency' => '6',
            'break_after_frontend' => '5',
            'break_after_adminhtml' => '30',
            'first_lifetime' => '600',
            'bot_first_lifetime' => '60',
            'bot_lifetime' => '7200',
            'disable_locking' => '0',
            'min_lifetime' => '60',
            'max_lifetime' => '2592000'
        ]
    ],


texts: Magento 2 - REST API - Property "0" does not have corresponding setter

texts:
I made an API route that will take an array of CartItemInterface objects and modify them with just one call (to reduce multiple calls). The problem I am facing is that it is giving me this error in the logs:

  Property "0" does not have corresponding setter in class "Magento\Quote\Api\Data\CartItemInterface".

I do have a feeling the API is thinking that part of the request data is just a single object, not an array of objects hence thinking "0", which might be the array index 0.

{Vendor}/{Module}/etc/webapi.xml

<route url="/V1/foo/carts/mine/items" method="PUT">
    <service class="{Vendor}\{Module}\Api\Magento_Quote\CartItemRepositoryInterface" method="saveAsUser" />

    <resources>
        <resource ref="self" />
    </resources>

    <data>
        <parameter name="cartId" force="true">%cart_id%</parameter>
    </data>
</route>

{Vendor}/{Module}/Api/Magento_Quote/CartItemRepositoryInterface

namespace {Vendor}\{Module}\Api\Magento_Quote;

interface CartItemRepositoryInterface
{

    /**
     * Add/update an array of cart items
     *
     * @param int $cartId
     * @param \Magento\Quote\Api\Data\CartItemInterface[] $cartItems
     * @return \Magento\Quote\Api\Data\CartItemInterface[]
     */
    public function saveAsUser($cartId, \Magento\Quote\Api\Data\CartItemInterface $cartItems);

Request Data

{
    "cartItems": [
        0: "--Cart Item--",
        1: "--Cart Item--"
    ]
}

I had looked around for questions similar in nature:

Property "0" does not have corresponding setter in class "Magento\Sales\Api\Data\OrderPaymentInterface"

But the question did not have any solid answers.

How to set Interfaces for custom module API creation in Magento2

Tried something similar to this question:

  you cant sent an array at very first object.

I modified the request data to:

{
    "cartId": '123',
    "cartItems": [
        0: "--Cart Item--",
        1: "--Cart Item--"
    ]
}

Still getting the same error.


texts:
We have few queries related to cloud features, Infra and support to get clarity on it.  Could someone help review and provide answers for below queries.  Thanks in advance.

Can we restrict ssh connectivity based on IP in cloud?
Is cloud default support auto scale feature(scaling - vertical / horizontal scaling), if not how to upgrade server to support traffic(scaling - vertical / horizontal scaling)?
Maximum number of domains can be mapped to cloud single instance, Is there any limitation on no. of domains it supports on cloud server ( like create virtual hosts and IP map to domains)
What are the limitations if we want to sync Amazon orders to the magento cloud through any available extensions or AWS
API's?
Is there are any limitation on number of api requests to ERP/CRM systems?
Does it supports integrating system with other cms systems like drupal, wordpress etc.
Are there any limitation of out going / incoming request like fedex, paypal , third party mail campaign systems etc.


texts: Difference Between "page" and "layout" Root Tags in Magento 2

texts:
In Magento 2, some layout handle XML files open with the

<page.../>

root tag.  Others open with the

<layout.../>

root tag. Does using either of the above tags introduce any functionality differences to a layout handle XML file?  Or is this pure window dressing? Or something in between.

Two examples

<!-- File: vendor/magento/module-weee/view/frontend/layout/default.xml -->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

and

<!-- File: vendor/magento/module-widget/view/adminhtml/layout/adminhtml_widget_loadoptions.xml -->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">


texts: How to get product price from \Magento\Quote\Model\Cart\Totals\Item $item

texts:
I need to get the product price from \Magento\Quote\Model\Cart\Totals\Item $item.

I tried this but it doesn't work

/** @var  \Magento\Quote\Model\Cart\Totals\Item $item */
$item->getProduct()->getPrice()

as getProduct() is not a function for $item.
I don't need $item->getPrice() or $item->getBasePrice() .

How to get the product price.

I am already in another loop

foreach ($totals->getItems() as $item) {
        $item->getItemId() // use this id to get product price from sql query
        $item->setData("base_old_price",$item->getPrice());
        $items[] = $item->__toArray();
    }