texts: How do I watch for a successful payment (or order)?

texts:
I need to run a very simple function when an order is set to complete and/or if the payment was successful.

If it's relevant we're using Global Transport for payment.  I mention it mostly because where I expect to see an order status go from "pending" to "complete" (as per documentation) it seems to stay as "pending"... this is possibly a red herring.

I'm almost losing track of the things I've tried:

sales_order_invoice_save_after
sales_order_payment_pay
sales_order_place_after
sales_order_payment_place_end

To be clear: I only need to run this function when payment is received for an order. These seem to run, but when I try to capture the order/payment object it's always "pending".


texts: Why do special characters in search terms are processed as encoded characters (only on Production Server)?

texts:
This issue only happens once the site has been deployed to Production Server.  On Development Environment works as expected.

Using Magento 1.6.2.0 CE, Locale: español (Spanish)

Search works just fine on Development Environment when using search terms that contain special characters (latin characters in this case: á, é, í, ó, ú, ñ, etc.), but when website is moved to Production Server, search breaks with special characters.

Everything else seems to be working fine, I haven't found any other encoding issue so far.

I tried adding AddDefaultCharset UTF-8 to .htaccess file with no avail.

I don't think it's a server configuration issue, because Production Server hosts other websites (mostly Joomla!) that fully support special characters in search terms.

For reference try to search for term with special characters like "brócoli" on http://caserisimo.mx

On Development Environment:

On Production Server:

Any ideas?

Your help will be much appreciated.

** UPDATE **

I use a 301 redirect in .htaccess for URL trailing slashes removal with directives:

RewriteCond %{request_method} ^GET$
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)$ %1 [L,R=301]

Thanks to @MatthiasZeis great suggestion, I added the NE flag to the last directive, so now the RewriteRule is:

RewriteCond %{request_method} ^GET$
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)$ %1 [L,R=301,NE]

Works as expected now!


texts:
I want to use integrated UPS as delivery option in Germany, but always get "This shipping method is currently unavailable" in the cart.

Is that integrated UPS option meant for US only? (Magento UPS Shipping Weird Problem)

Is there some alternative plugin that does the same? I wan't to calculate the shipping costs based on the delivery country.


texts: Magento 2 Visual Swatch Image: Background of image is removed after upload

texts:
This is the image that I upload to display on a visual swatch:

However, it uploads and displays like this:

How do I get the image to upload with the background intact?
You can view the uploaded image here: https://store.gnut.com.au/pub/media/attribute/swatch/swatch_image/30x20/c/r/cream1.png

I intend to increase the swatch size to 90x90px but I'll have to change themes away from Luma first.
Could the uploader be removing the background accidentally due to the small swatch size?


texts: 1.9 - Incorrect Configurable Product Price

texts:
I'm using Magento CE 1.9.0.1 and having an issue on a Configurable Product for a Jewellery store - refer image below.

I've set the price for the actual configurable product as the lowest price option of the associated products ($2400). I've then set the fixed price for each associated product for the Super product attribute. However, on the front-end, the price shows as $2400, but then when I Choose an Option from the attribute drop-down, it adds the price of the associated product option to the price of the configurable product, which then ends up being $4800 or $4873!

I then then tried setting the actual configurable product price to $0, but then this shows the product price as $0 in the catalog view and product detail page.

I've come across Simple Configurable Products extension, but this is only compatible up to CE 1.5.

Can anyone please help me out with this confusing dilemma?

EDIT: I am using the Dresscode theme from Themeforest.


texts: How change the format Weight in Magento?

texts:
I have the weight.
But I was interested in how to remove all the digits after the decimal point with her? Now, this situation...

I want it to be so.

And I have code in price.phtml

<span class="regular-weight"> <?php $pro=Mage::getModel('catalog/product')->load($_product->getEntityId()); ?>
                 <?php echo  $pro->getWeight(); ?><?php echo $this->__('grams');?>
            </span>


texts: Detect which block method (_prepareSpecificInformation) is in use

texts:
I have created a payment method and it has a _prepareSpecificInformation() that is extended under the Mage_Payment_Block_Info.  Just need to detect where this is being called from with in the function as there are some points that I want to show everything and others, like an email, that I don't.  This is what I have now.

protected function _prepareSpecificInformation($transport = null){
    $helper             = Mage::helper('centralprocessing');
    if ($this->_paymentSpecificInformation !== null) {
        return $this->_paymentSpecificInformation;
    }

    $info = $this->getInfo();

    $transport = new Varien_Object();
    $transport = parent::_prepareSpecificInformation($transport);

    $transData=array();

    $transData[Mage::helper('payment')->__('Card Type')]=$helper->getCardType($info->getCardType());
    $transData[Mage::helper('payment')->__('Masked CC Number')]='############'.$info->getMaskedCcNumber();

    $transData[Mage::helper('payment')->__('Response Return Code')]="".$info->getResponseReturnCode();
    $transData[Mage::helper('payment')->__('GUID')]=$info->getResponseGuid();
    $transData[Mage::helper('payment')->__('Approval Code')]=$info->getApprovalCode();

    $transport->addData($transData);

    return $transport;
}

So I wanted to add conditions on what is added to the $transData array depending if it's the admin or if it's in the email and such.

UPDATE
The reason is that I need to put a link in with the data in the admin page only.  Also turns out that

$transData[Mage::helper('payment')->__('GUID')]="
HELLO
";

Prints
HELLO
 so the html is escaped first?


texts: Magento2: Calling upsell block from phtml is not working.

texts:
I want get up-sell product block. when I am working with XML script block is working. but when I am trying to this in .phtml file it's showing nothing .I do not what is wrong with .phtml and XML data is working good .

step1: For xml  this code working good

<block class="Magento\Catalog\Block\Product\ProductList\Upsell" name="product.info.upsell" template="Magento_Catalog::product/list/items.phtml" after="product.info.media.video">
    <arguments>
       <argument name="type" xsi:type="string">upsell</argument>
    </arguments>
</block>

Step:2 for .phtml file this code is showing blank

 <?php echo $block->getLayout()->createBlock('Magento\Catalog\Block\Product\ProductList\Upsell')->setTemplate('Magento_Catalog::product/list/items.phtml')->toHtml();?>


texts: How do I configure Robots.txt in Magento?

texts:
I'm trying to setting up de robots.txt on our Magento store.
Actually, I have no idea of the best way to set up the robots.txt.


texts: Can't login to second store on subdomain

texts:
I have a Magento site I've acquired. It's been upgraded from 1.6.x to 1.9.0.1. There were a couple of issues related to the new form_key tag which were fairly easily resolved, however there's one persisting.

The site has two store fronts - their main http://[domain] store, and a second at http://international.[domain]. Both work perfectly for allowing orders to be placed/paid for/etc (after the fixes above).

I can log in to the main site at http://[domain]/customer/account/login/ no problems at all. Entering a valid username and password I get a POST to /customer/account/loginPost/, then a 302 redirect to /customer/account/, and I'm logged in.

If I try to log in at the international version with an incorrect password it correctly gives me an error message. If I log in with a correct password, it POSTs to /customer/account/loginPost/, then a 302 redirect to /customer/account/index/, then a second 302 redirect to /customer/account/login/. At this point I appear NOT to be logged in.

If I look in log_customer I can see the successful logins:

log_id  visitor_id  customer_id login_at            logout_at           store_id
1329    1059310     538         2015-01-26 02:03:09 2015-01-26 02:03:09 2
1328    1059300     537         2015-01-26 02:01:14                     1
1327    1059307     538         2015-01-26 01:53:38                     2
1326    1059300     537         2015-01-26 14:58:42 2015-01-26 01:58:42 1
1325    1059300     537         2015-01-26 14:47:43 2015-01-26 01:47:43 1
1324    1059303     538         2015-01-26 01:46:55                     2
1323    1059299     538         2015-01-26 01:43:04                     2
1322    1059300     537         2015-01-26 14:47:21 2015-01-26 01:47:21 1
1321    1059295     538         2015-01-26 01:39:48                     2
1320    1059289     538         2015-01-26 01:35:38                     2
1319    1059285     538         2015-01-26 01:32:26                     2
1318    1059275     538         2015-01-26 01:28:56                     2
1317    1059273     538         2015-01-26 01:11:06                     2
1316    1059270     538         2015-01-26 14:10:32 2015-01-26 01:10:32 2

Store 2 is the international one (with the issues), store 1 is the main (fine) one.

One thing leaps out at me here - the very first attempt today had me logging in at 14:10 (which is the correct local time), then logging out at 01:10 (which is the GMT time). All subsequent attempts have the login_at timestamp set to GMT.

There's also something weird with cookies which I can't quite reproduce. On my first attempt I could log in no problems. After deleting all my cookies I could not. Weirdness.

edit:
Found something interesting immediately after posting. There are several cookies, but notably two called frontend. One has the domain set at .[domain], the other .international.[domain]. Both had the same value. I deleted the former, and could now log in/out/in again no problems. Visiting the main [domain] site broke this again.

What appears to be happening is that the top-level cookie is overriding the international. version. The session is then invalid (or at least broken), because the domain/store is wrong.

I'm pretty sure if I change the main storefront to be www.[domain] that it'll fix the issue, but for vanity reasons we'd prefer to keep as is. Can I make the cookie stay within the main domain and NOT subdomains?

A possible red herring (or just an unrelated misconfiguration) - after deleting the cookie, the entries in the log_customer table are timestamped with LOCAL time, not GMT time.

edit 2: I tried forcing the cookie domain in configuration to .[domain]. This allowed me to log into the international version... but broke the main version. Definitely feels like this is the right track, just stumped as to how to actually resolve it.


texts:
Below cron setting worked in Magento 2.0.1 (fedora 22)

$ crontab -u www-data -e

*/1 * * * * /usr/bin/php -c /etc/php/7.0/apache2/php.ini /var/www/public/bin/magento cron:run >> /var/www/public/var/log/magento.cron.log&

*/1 * * * * /usr/bin/php -c /etc/php/7.0/apache2/php.ini /var/www/public/update/cron.php >> /var/www/public/var/log/update.cron.log&

*/1 * * * * /usr/bin/php -c /etc/php/7.0/apache2/php.ini /var/www/public/bin/magento setup:cron:run >> /var/www/public/var/log/setup.cron.log&

When I configure the same in Magento 2.0.8 (Ubuntu 16.04 - docker container). When I run cron it does not generate log file but it gives success message Ran jobs by schedule.  I have checked with cron_schedule table it gets update whenever I run cron manually. It is not yet run as per scheduled every one minute.

any changes in 2.0.8 cron configuration? am I missing something?


texts: Magento 2.3 How to edit existing Order without cancel?

texts:
I am trying to edit Order that includes the below possible cases:
Update Order Item Price
Increse Order Item Qty Or Cancel Order Item Qty
Add New Item into Order


texts: Price update in Add to cart functionality from product detail page to cart page

texts: Can anyone tell me in magento, when we click Add to Cart button in product detail page, where and how is Product Price and Qty input multiplied and updated in shopping cart page Subtotal column. I want to customize the action for my custom pricing module.


texts:
Is it possible and safe to run PHP 7 with Magento 1.9.3.4?

I tried installing Memcached via Module Installer in CPanel, but memcached requires PHP7.


texts:
I am trying to create a textarea element for admin forms that only reads data, but always shows up as empty to the user. It looks something like this:

class MyTextarea extends Textarea
{
    public function getEscapedValue($index = null) {
        return '';
    }
}

However, now I need to specify this as an element type in system.xml. The types are defined in Data/Form/Element/Factory.php, but I don't see an easy way to append to those types. What is the correct way to do this?


texts: Magento2, setItemCount for minicart does not work

texts:
To limit the number of product displaying in minicart, I wrote in

app/design/frontend/myVendor/myTheme/Magento_Checkout/layout/default.xml

below but I see no effect!

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
            <reference name="minicart">
                <action method="setItemCount"><count>3</count></action>
            </reference>
    </body>
</page>


texts: Magento 2 : By Default Checked Checkbox in Admin Form

texts:
I want to make my checkbox defaultly checked in admin form, I add checkbox field using fieldset using below code :

foreach ($services as $service) {
          $servCond = false;
          if(is_array($chosenServ)){
            if(in_array($service['courierservices_id'],$chosenServ)){
              $servCond = true;
            }
          }

          $value['value'] = $service['courierservices_id'];
          $value['label'] = $service['description'];
          $value['checked'] = $servCond;
          $values[] = $value;
        }
        $fieldset->addField(
            'courierservice'.$i,
            'checkboxes',
            [
                'name' => _('courier_service'.$i.'[]'),
                'label' => __('Services : '),
                'values' => $values,
                'checked' => true
            ]
        );
        $i++;


texts: error when error_reporting enabled in CE1.8

texts:
when I set error_reporting to be E_ALL E_STRICT.
Magento backend barfs with this error which I can only see in the apache logs, I get a white screen on my dashboard.

PHP Fatal error:  Uncaught exception 'Exception' with message 'Notice: Undefined index: CLIENT_IP  /includes/config.php(1) : runtime-created function(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code(1) : eval()'d code on line 157 in app/code/core/Mage/Core/functions.php:245

Is it something to do with compiler? Looking at includes/config.php bit and presuming that is the case BUT compiler is turned off and cleared so I am wondering what is going on.
includes/config.php has nothing in it, just two commented compiler lines as expected.

Can anyone advise how to proceed working this out, I can't follow that eval().d code bit of the error message and I can't debug other issues because when I enable error reporting this gets triggered first.


texts:
I have implemented the code to update existing products so that they get added to the new store website I have created.

    $websiteIds = array(1, 2);
    $skus = 'sku1, sku2';

    $skuArray = explode(',', $skus);

    $productIds = Mage::getResourceModel('catalog/product_collection')
            ->addFieldToFilter('sku', array('find_in_set' => $skuArray))
            ->getAllIds();

    Mage::getModel('catalog/product_website')->addProducts($websiteIds, $productIds);

The code works well and adds these products to the other website too, but when the product is viewed, it does not display the Buy Now option, now when I Reindexed the URLs then it started displaying the Buy Now. Is it something I can do programatically when updating the products, because I will be having huge products on my live website and Indexing will also take a lot of time.


texts: How do I get a custom customer attribute value from collection issue in Magento 1

texts:
I have a custom table and I want to join it with the customer table in order to  get a custom customer attribute value.
This is my collection:

$collection = Mage::getResourceModel('adyen_subscription/subscription_collection')
   ->addEmailToSelect()
   ->addNameToSelect();
$collection->getSelect()->joinLeft(
   ['cue' => 'customer_entity'],
    'cue.entity_id = main_table.customer_id');
$collection->getSelect()->join( array('ce2' => 'customer_entity_varchar'), 'ce2.entity_id=cue.entity_id', array('custom_customer_attribute_code' => 'value'));

Right now I m getting all of the values from all of the customer attributes.
The idea should be

select * from table A left join table customers where A.customer_id = customers.entity_id where custom_customer_attribute_code = 'my_custom_code'

How can I do that  ?


texts:
I'm relatively new to Magento. Just trying to move a block, and as far as I understand I can archieve that via layout XMLS.

I want the checkout.registration block to come BEVORE the checkout.success block on the checkout success page.

So I copied the "checkout_onepage_success.xml" in my theme under view/frontend/layout and changed it. But I can't see the changes on the frontend (overriding the success.phtml worked, dev mode, cleared cache, even upgraded).

Also, I think it would be better to move the block instead of overriding the whole file. How can I update the file without overriding it? Do I use the same location or somewhere else? Does the location decide wheather to override or is there a signal I give in the file? I found many re

Cheers
Valentin


texts: I want to migrate a Magento site to a new url that is on the same server

texts:
I have a Magento site on xyz.com and want to transfer it to abc.com on the same server, nothing is changing but the branding and the url. Can someone please give me a hand?

Thanks in advance, sorry for the n00bness

Mat


texts: Custom text in mail template depending on shipping description

texts:
I want to insert custom text in email template, if shipping title = 'Pickup'.
I have followed this guide to make if statement work in mail template.
https://stackoverflow.com/questions/4797394/magento-email-template-if-statements

I have inserted this in mail template.

{{block type='core/template' area='frontend' template='email/shippingmail.phtml' order=$order}}

I have created new phtml file called shippingmail.phtml
with this code

if ($this->getData('order')->getShippingDescription()=='Pickup') {
echo nl2br(Mage::getStoreConfig('general/store_information/address')); }

But for some reason i can not make it show my store address i mail if shipping description is 'Pickup'.

What am i missing here?


texts: How to get Associated Simple Product Id using Attribute Option Id of a Configurable Product Magento 2?

texts: How to get Associated Simple Product Id using Attribute Option Id of a Configurable Product in Product View Page in Magento2? For Ex: A Configurable Product with Attribute Size and Options L,M,S. How to get Simple Product Id of L,M,S ?.


texts: Magento 2 - How to create mobile responsive design using page builder

texts: Create a design using page builder good for web view, the responsive view totally collapsed in mobile view, how to achieve the responsive view, how to add bootstrap for the page builder?


texts: How to restrict specific Shipping methods by Geo Location?

texts:
I want to restrict specific shipping methods by Geo Location ? I have single store website but have multi shipping methods. Now I want to restrict shipping method on base of geo location.
For example customer have open store in US and he wants to ship outside of US, Then custom charges should be applied.
Thanks


texts: How to list all admin of a specific role

texts:
How can I retrieve the list of all admin that has the same role?

For example, I create a new role called "Seller" and assign some admin users to that role.

How to list all admin users with the role "Seller"?

Thank you very much


texts: What is .htaccess: Invalid command 'ess.swp'? Magento/Wampserver

texts:
I am trying to install our live Magento EE site on Wampserver but I am getting a 500 "Internal Server Error" and the below error in my Apache Error Log. I am being told on the Wampsever forum that I "may" have missed one or more Magento prerequisites seen in the link below but it "appears" I already met all the prerequisites?

So what exactly is .htaccess: Invalid command 'ess.swp'?

  5] [core:alert] [pid 7960:tid 848] [client 127.0.0.1:56866]
  C:/wamp/www/shopcandelabra/.htaccess: Invalid command 'ess.swp',
  perhaps misspelled or defined by a module not included in the server
  configuration, referer: [http://localhost/][1]

http://magento.com/resources/previous-magento-system-requirements


texts: (issue) Setting custom shipping address in "new-customer-address.js " sets same address for both billing and shipping address

texts:
I m trying to set custom shipping address in

"new-customer-address.js"

Magento_Checkout/js/model/new-customer-address.js

file but it sets same address for shipping and billing.

how can i set shipping address only ?


texts:
I need to add 1 input box and custom button in sale view section under admin.which send emails to those email ids which is in input box.
How can I do this?


texts: Widget to show a specific product with a custom template

texts:
I want to display a configurable product, with images and attributes + configurable fields, but without the tabs, reviews or anything else.

Just the basic information of the product with an add to cart link.

How would I do that?


texts: Magento2 How to update Base Real Amout (Tax) Of Order

texts:
Hello i have to update base real amount from sales_order_tax table
Does anyone have idea how i can update base real tax amount of order ?


texts:
I have an order id, i need to check if the order can be shipped or already has shipment and  but one of the order item has not been shipped or returned, roughly it will look like this:

$orderId = 6;
//get Order From order Id
$order = $this->loadOrder($orderId);
//check if this order has shipment or not
$hasShipment = $this->checkHasShipment($order);
//if the order has shipment it will check, if all the order item has been shipped
if($hasShipment){
 $allShipped = $this->checkAllHasBeenShipped($order);
}


texts:
I have Magento 1.8 (yeah, I know!), but the system.log is huge every day.

In the admin I all ready disable the logging, but Magento does it anyway.

So now I chmod system.log to no write. This works for a few days.

But then Magento renames the file to system.log.bak and creates a new system.log that has write rights and gets huge in two days.

Does anyone know a way to completely disable the system.log for good?


texts: Css and Js files are not loading in admin panel and storefront

texts:
I have setup Magento 2.2.3 enterprise edition store in my local windows system.

Previously, the CSS and JS were loading and the store was appearing fine.

But recently the CSS and JS files are not loading (shows 404 error when checked in chrome DevTools network).

I have tried giving commands like cache:clean, cache:flush, indexer:reindex, setup:di:compile and also setup:static-content:deploy but the issue is not resolved.


texts: Magento 1.9 product edit page add tab and grid inside that tab

texts:
I created simple custom module, from that i need to add a custom tab with grid in admin product edit page.

Still now I achieved the tab using following code.

notification.xml(admin layout)

<?xml version="1.0"?>
<layout>
    <adminhtml_catalog_product_edit>
        <reference name="product_tabs">
            <action method="addTab">
                <name>Customer Watch</name>
                <block>augment_notification/adminhtml_catalog_product_tab</block>
            </action>
        </reference>
    </adminhtml_catalog_product_edit>
</layout>

Tab.php(block)

public function canShowTab()
{
    return true;
}
public function getTabLabel()
{
    return $this->__('Customer Watch');
}
public function getTabTitle()
{
    return $this->__('Customer Watch');
}
public function isHidden()
{
    return false;
}
public function getTabUrl()
{
    return $this->getUrl('*/*/watchlist', array('_current' => true));
}
public function getTabClass()
{
    return 'ajax';
}

}

I want to know how to custom grid implemented with in this custom tab.
Thanks in advance for your idea and help.


texts: Magento 2.3.4 - After migration from M1 Category link and filterable attributes takes too much time to load

texts:
My M1 site consists of 30k products and 100's attributes.
Attributes like authors,edition,publisher etc.
After successfully migrated to M 2.3.4 If I click category links and left navigation filterable attributes to take too much time to apply filter.
How to increase the speed of category links and ajax filterable attributes?
Any help thanks.


texts: Can't access magento 2.1.3 admin getting some error

texts:
While trying to access the admin panel i got following error. This was shown up from yesterday up to that time i don't have any issue

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document
Element 'route': Duplicate key-sequence ['admin'] in unique identity-constraint 'uniqueRouteFrontName'.
Line: 7

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Document
Element 'route': Duplicate key-sequence ['admin'] in unique identity-constraint 'uniqueRouteFrontName'.
Line: 7

#0 /var/www/html/m2/vendor/magento/framework/Config/Reader/Filesystem.php(127): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#1 /var/www/html/m2/var/generation/Magento/Framework/App/Route/Config/Reader/Proxy.php(95): Magento\Framework\Config\Reader\Filesystem->read('adminhtml')
#2 /var/www/html/m2/vendor/magento/framework/App/Route/Config.php(82): Magento\Framework\App\Route\Config\Reader\Proxy->read('adminhtml')
#3 /var/www/html/m2/vendor/magento/framework/App/Route/Config.php(125): Magento\Framework\App\Route\Config->_getRoutes('adminhtml')
#4 /var/www/html/m2/vendor/magento/framework/App/Router/Base.php(274): Magento\Framework\App\Route\Config->getModulesByFrontName('admin')
#5 /var/www/html/m2/vendor/magento/framework/App/Router/Base.php(161): Magento\Framework\App\Router\Base->matchAction(Object(Magento\Framework\App\Request\Http), Array)
#6 /var/www/html/m2/vendor/magento/framework/App/FrontController.php(50): Magento\Framework\App\Router\Base->match(Object(Magento\Framework\App\Request\Http))
#7 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /var/www/html/m2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#9 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#10 /var/www/html/m2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#11 /var/www/html/m2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#12 /var/www/html/m2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#13 /var/www/html/m2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#14 /var/www/html/m2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#15 /var/www/html/m2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#16 {main}


texts: Collection fails when using a more restricted admin user

texts:
I have the following collection which helps implement a custom report.

<?php

class VMR_Customreports_Model_Resource_Productsordered_Collection
    extends Mage_Reports_Model_Resource_Order_Collection
{
    public function __construct()
    {
        parent::__construct();
        $this->_init('sales/order_item');
    }

    public function setDateRange($from, $to)
    {
        $this->_reset();
        $this->getSelect()
            ->joinInner(
                array('i' => $this->getTable('sales/order_item')),
                'i.`order_id` = main_table.`entity_id`'
            )
            ->where("main_table.created_at BETWEEN '" . $from . "' AND '" . $to . "'")
            ->where('main_table.status != \'canceled\'')
            ->where('main_table.customer_email NOT LIKE \'%@v2cigs.%\'')
            ->where('i.parent_item_id IS NULL')
            ->columns(array(
                'myname' => 'i.name',
                'ordered_qty' => 'sum(i.qty_ordered)',
                'ordered_money' => 'sum(i.`price`*i.qty_ordered)'))
            ->group('i.name');

        return $this;
    }

    public function setStoreIds($storeIds)
    {
        if ($storeIds)
            $this->addAttributeToFilter('i.store_id', array('in' => (array)$storeIds));

        return $this;
    }

}

When I login as full admin, it selects the right data but when I login as a more restricted user I get an error about, "Integrity constraint violation: 1052 Column 'store_id' in where clause is ambiguous".
I can understand that it's talking about store_id being present both in the order_item table and in the order table, but I am specifying the table to pull from when using store_id.

Furthermore, the error happens right at the join.  If I comment out the store_id code I still get the error.  Why?


texts: Magento 2.1: Display enabled paypal express checkout buttons in phtml file?

texts: I need to add direct paypal express checkout buttons of enable payment methods in phtml file. I want to use them under custom layout section on cart page.


texts:
Can you clearly tell if in 2021 the Magento 2 EBIZMARTS extension for Mailchimp is working well:

Mailchimp Customer Journey
Mailchimp Transactional email
Mailchimp Mandrill

Thank you


texts:
I need to create a module where it checks if the Customer has an order, and if he does check if its Paid(aka in Complete state), if yes let him order again, if not do not let him order.

I thought of using event-observer with this event: sales_convert_quote_to_order
And check there, and if he isn't allowed he is throwed back to the page where he can pay for it.

is that event good for what iam trying to do?
or should i do it differently? How?


texts: Magento 2.4 Message queue issue with Mass actions

texts:
We have install magento 2.4 successfully with Rabbitmq Server 3.8.8. All seems to work fine in server side.
But in admin when we try to update product attributes with magento native process we have issue with queue messages which never go to success status
Scenario is:

Select in admin catalog more than 1 products. No matter how many
Go to >Actions > Update Attributes
Change one or more attributes to change in the selected products
Save

We get the message:

Message added to queue

And magento creates in the upper section the bar with messages

The selected products attributes are changed successfully.
But magento message never go to success stage. It stays to pending, queue
We don't have any errors in magento logs. Crons are finished successfully without errors also.
In rabbitmq server also we don't have any error. We have successful connection when mass edit magento process is starting
Anybody has seen this please?
Any suggestion where to look to fix it?


texts: Magento2.3: This page isn’t working, 127.0.0.1 redirected you too many times

texts:
I'm facing one of the known issue that is 127.0.0.1 redirected you too many times and tried to solve it by following as per the solutions given but those are all not working for me:

Magento 2 : Too many redirects in admin login screen

Magento 2 Admin ERR_TOO_MANY_REDIRECTS

I'm not sure whether this problem is due to improper configuration.

Could anyone please guide me to rectify this issue?


texts: Grunt (Magento 2) - Why do I have to force my commands?

texts:
I've just installed grunt for the first time however I cannot run any commands in cmd wihtout using --force.

My error is:

  C:\wamp64\www\New_Mage2>grunt watch

  jit-grunt: Plugin for the "watch" task not found. If you have
  installed the plugin already, please setting the static mapping. See
  https://github.com/shootaroo/jit-grunt#static-mappings

  Warning: Task "watch" failed. Use --force to continue.

  Aborted due to warnings.

  Execution Time (2018-08-31 12:48:33 UTC+1) loading tasks  293ms
  ███████████████████████████████████████████████

  ████████████████████████████████████████ 100% Total 294ms

Any help is much appreciated.


texts: How to Save values into an existing table from UI-Component Form

texts:
My module contains a form which itself contains Store Information that is also in Stores > Configuration > General > Store Information

I have just followed this tutorial to create this form but it did not mention how to store the values of it. BTW I want to save values in the core_config_data table. I have already read this tutorial too but it did not explain the DataProvider which is necessary in ui-component.


texts:
I want to create a custom header and footer for email templates.
currently when the user receives an email the logo in the head redirects it to the store URL but I want it to redirect to somewhere else i.e custom URL from configuration
{{template config_path="design/email/header_template"}}

instead of the above line, I want to add my custom header
  {{template config_path="path/to/custom_header"}}


texts: How to use a modifier to disable an UI Component field?

texts: Hi i'm new at magento 2 and i want to disable an UI component field while edit a product, and shows the field while creating new product.


texts: Custom login redirect to default login page

texts:
I am new from Magento i want to custom login in cms page. so that i used default login in that cms page. But if i enter wrong password it redirect to default login page how to fix this thing.

My code

<?php /* Extensions placeholder */ ?>
    <?php echo $this->getChildHtml('customer.form.login.extra')?>

                <form action="<?php echo Mage::getBaseUrl();?>customer/account/loginPost/" method="post" id="login-form" class="market_place_login_ctrl">
                            <?php echo $this->getBlockHtml('formkey'); ?>
                            <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>

                                    <input type="text" name="login[username]" placeholder="Your Email ID (username)" value="<?php echo $this->escapeHtml($this->getUsername()) ?>" id="email" class="input-text required-entry validate-email" title="<?php echo $this->__('Email Address') ?>" />

                                    <input type="password" name="login[password]" placeholder="Password" class="input-text required-entry validate-password" id="pass" title="<?php echo $this->__('Password') ?>" />

                                <button type="submit" class="button" title="<?php echo $this->__('Login') ?>" name="send" id="send2"><?php echo $this->__('Login') ?></button>

                           <a href="<?php echo Mage::getUrl('customer/account/forgotpassword') ?>">Forgot password?

                             <?php echo $this->getChildHtml('form.additional.info'); ?>
                </form>


texts: Magento 2 - save custom attribute from Registration form

texts:
I added new custom attribute to customer form. i can save this attribute from magento admin panel. I included this attribute field in Customer Registration Form. How to map and save this attribute form frontend registration form to customer entity table.
.I think we can't use magic setters to save in magento2. How to achieve this using interfaces or any other methods

$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

$customerSetup->addAttribute(
    \Magento\Customer\Model\Customer::ENTITY,
    'example_attribute',
    [
        'label'            => 'Example Attribute',
        'required'         => 0,
        'system'           => 0,
        'position'         => 100
    ]
);

$customerSetup->getEavConfig()->getAttribute('customer', 'example_attribute')
    ->setData('used_in_forms', ['adminhtml_customer'])
    ->save();

I included this attribute field in Registration form

<fieldset class="fieldset">
    <legend class="legend"><?php /* @escapeNotVerified */ echo __('Additional Information') ?></legend>

        <?php /* @escapeNotVerified */ echo __('Example Attribute') ?>

            <input type="text" name="website_url" id="example_attribute" title="<?php /* @escapeNotVerified */ echo __('Example Attribute') ?>" >

</fieldset>


texts: Set specific source inventory to customer with MSI

texts:
We currently have a B2B project with about 50 physical stores, and each store has its own independent inventory. Each customer is assigned to one or more physical stores. When the customer logged in, if they have only one store, they proceed to the site normally. However, if the customer is assigned to 2 or more stores, they need to choose the store they want to work with during that session. That is working fine right now.
What I want to know is how could I show on the site only the products with inventory in the selected store. I create each Source corresponding to each physical store, and they are assigned to one Stock and is assigned to the Main Website. When the customer chooses the store, I had identified the source that corresponds to it. However, the inventory showing in the frontend is ALL the inventory of the products in ALL the sources, not only the selected.
So, is there any way to assign in the session that the customer will use that source and not the others?
I know that the native answer could be that I need to create a website for each store and assign each source to one website only. However, that means that the site needs to have 50 websites or more, which could be very problematic in the long-term. Is there any other way by code that I could implement it?
I will appreciate any point of view or advice


texts:
I'm using a single theme for both the mobile view and desktop view.
I have used so much move elements or the desktop view.
It has affected for the mobile view also.

I don't think that responsive.js is not the solution

Is it is possible to use xml alone based on screen size layout on magento?


texts: How to create a login for Facebook or Google popup home page in magento 1.8.1?

texts: How do I create a login for Facebook or Google popup home page in magento 1.8.1?


texts:
I have a website where currently only 1 website/store/store view exists. I can therefore switch to "single store mode".

The general problem is, that data was partially edited in the "All Store Views" and partially in the dedicated store view.

My problem occurs, that after switching to the the "single store view":

In the frontend my store view (store_id=7) is visible, but in the backend only the admin store view (store_id =0) is editable. Is there any way to tell magento to use the proper store view? Or do I have to merge all my data from the store view 7 to the store view 0?


texts: Empty cart after login with Varnish enabled

texts:
My setup is:

Magento 1.9.1
NGINX + PHP-FPM 7
Varnish 4.0
Turpentine
FPC disabled

I can put the products on the cart and proceed to checkout (using Firecheckout). The error occurs when I enter my username and password: the cart is empty and I'm still logged out. If I remove Varnish, the site works fine.

Can anyone help me?

EDIT

I tried setting the cookie domain and disabled all caches except Varnish. When I enable "varnish bypass", everything works fine.

EDIT 2
My question was marked as duplicate, but the proposed solution didn't work for me.


texts: Magento 2 : Display cross sell products in products details page only for out of stock products:

texts: How to display cross sell products on the products details page for the out of stock products only?


texts: How to Auto Select The Color as Swatch Option for Products with Only One Color (on Magento 2.1 Product View)?

texts:
I'm trying to have swatch option value of color auto-selected for Products that only have one color.

If a user selects some product from the category page, the product page is displayed with attributes like Color, Shape, and Size. Some of the products only have one color though, but still require the user to click-select it. I want the color to be automatically selected for all single-colored products when the pages load.


texts:
When creating a sale (new order) from the ADMIN, we can assign a custom price to the item,
but if we then move the item to the customer's shopping cart, the custom price gets removed and the total reverts back to the item's original price.

Any idea how we can pass the custom price to the customer's shopping cart?


texts:
I have a custom module and i tried to extend this class in my Image.php file: Magento\Framework\Data\Form\Element\Image

namespace Vendor\Namespace\Block\Adminhtml\Form\Element;

class Image extends Magento\Framework\Data\Form\Element\Image
{
    /**
     * Get image preview url
     *
     * @return string
     */
    protected function _getUrl()
    {
        return $this->getValue();
    }
}

When i run the compile command i receive this err:
14% 1 sec 52.0 MiBPHP Fatal error:  Class 'vendor\namespace\Block\Adminhtml\Form\Element\Magento\Framework\Data\Form\Element\Image' not found in app/code/vendorm/namespace/Block/Adminhtml/Form/Element/Image.php on line 9.

Even this class exist at this path, i still receive this error.

Does anyone know why this happen?


texts: Miss some data in admin panel after transfer to linux server

texts:
I transfer my site from Windows server to Linux server and now i have some problem and miss some data in front-end and back-end.
1- some links in footer is empty and those are removed.
2- in admin panel some options like newsletter, search terms are removed and these space are empty!
How can i fix these problems?

Edit:

Also when i log in to the back-end i saw that the newsletter option in menu is disappear and i haven't newsletter option in menu!!!

I also set permissions to 777 but nothing has changed!!!

How can i fix this problem? Where is the problem? I searched so much about this but i couldn't get any solution for it.


texts:
I've setup a dataprofile for importing stock data into the webshop. File has approximately 2100 products that need to be updated. Once I start the import after a few seconds the following screen appears:

In this case I already tried a reduced amount of products. I had it going at around 900 products but that's it. Pasting the HTML appears the dashboard page of the Magento admin.

Does this have to do with memory settings? Why is the HTML generated?


texts: Call a block in layout.xml file with A/B type

texts:
This is about block type which I don't know exactly.

<block type="A/B" name="root" output="toHtml" template="">

What is "A/B" as block type there?

Any help appreciated.


texts: Magento 2.1.6 No confirmation emails sent from frontend

texts:
Our new installation is not sending confirmation mails of orders in the frontend. Once the order has been placed and there is a successful response from the payment gateway, the customer is shown a message success and that they will receive an email with the order information. This mail however is not sent and I cannot even find the mail when looking at our outgoing mail logs indicating that Magento isn't sending it.

I however do get registration emails sent and if I go into the order in the backend and click on "send email" the mail is delivered. Is this standard / how it's supposed to be or is there a way for me to force the email sent on completion of the order?

Also, if it's standard, how would we get a confirmation mail of a new order on the frontend?

Reference: Our shopping cart uses SMTP to send emails (we're using the https://github.com/magepal/magento2-gmailsmtpapp) and account is setup and working so doubt it's mail server configuration related.


texts: How to upload file to product on Magento 2?

texts:
I am developing a Magento 2.2.x e-commerce which requires some of the catalog's products to have an associated PDF (or any other file extensions).
At the start, I thought that it was possible to do using product attribute but there is no File upload field available.

How can I associate uploaded file to a product? Is there any good extension or a good tutorial to try to achieve this?


texts:
I am facing the issue with  Magento ver. 2.1.6. When I am login still showing me log in when I click on cart checkout button.

Refresh the browser solved the problem.

Did anyone face the smiler issue?


texts:
I need to create a nested category menu structure, something like this:

Product Groups

phones
cars
shoes

Product Segments

cheap
expensive

Product Types

electronic
old skool

A product can fit into any of these categories. It may exist in all for example, or maybe just 1 or 2.

Before I get to adding the products though, I'd like to create the category's. And there are about 100+ in total. Therefore, I am looking at using Magmi to do that.

However, I can only get Magmi running when I add products to 'new' categories at the same time. Is it possible to tell Magmi > OK, just create these empty categories > don't worry about the products for now... ?

Thanks!


texts: Magento 2: URL key for specified store already exists

texts:
I have got the issue when import the category for specific SKU.

General system exception happened
Additional data: URL key for specified store already exists.


texts: Error in Adding multiple custom tabs on product view page

texts:
I want to add two new custom tabs on product view page first one is added but when i add second tab i got error.
"product.category" is not a child of "product.info.details". Resolve the issue and try again.

catalog_product_views.xml

 <referenceBlock name="product.info.details">
      <block class="vendor\Module\Block\BlockName"
        name="products.tab"
        template="Vendor_Module::first.phtml"
        group="detailed_info">
          <arguments>
              <argument translate="true" name="title" xsi:type="string">Custom tab 1</argument>
                      <argument name="sort_order" xsi:type="string">200</argument>
          </arguments>
      </block>
       <block class="vendor\Module\Block\BlockName"
        name="product.category"
        as="additional"
        after="products.tab"
        template="Vendor_Module::second.phtml"
        group="detailed_info">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Custom tab2</argument>
                    <argument name="sort_order" xsi:type="string">220</argument>
                </arguments>
            </block>
  </referenceBlock>


texts:
I am trying to save form details using AJAX. Below is my Code.

etc/adminhtml/routes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="admin">
        <route id="adminpath" frontName="adminpath">
            <module name="My_Module"/>
        </route>
    </router>
</config>

view/adminhtml/templates/page.phtml

<form class="authorize-form">

                name:

                  <input type="text" name = "name" class="form-control" id="name" placeholder="Enter name">

                Email:

                  <input type="text" name = "email" class="form-control" id="email" placeholder="Enter email">

            <button type="button" id="submit" onclick="formsave()" class="btn btn-primary">Save</button>

        </form>

controller/adminhtml/Ajaxcontroller

<?php

namespace My\Module\Controller\Adminhtml;

class Ajaxcontroller extends \Magento\Backend\App\Action
{
    protected $resultPageFactory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    public function execute()
    {
        if($this->getRequest()->isAjax()){
            echo "Testing";
        }
        return false;
    }
}

Can anyone help me what's wrong here. It's not working for me.


texts: how to setTemplate in loadLayout - action controller

texts:
I try set my template in default layout, but it looks like:

How to move lower content blogpost.phtml?

I use this code in a controller action:

$this->loadLayout();
    $block = $this->getLayout()->createBlock('weblog/blogpost')->setSomething($data);
    $block->setTemplate('alanstormdotcom_weblog/blogpost.phtml');
    echo $block->toHtml();
    $this->renderLayout();


texts: Checkout process not proceeding after 2 step in magento 1.9.4

texts:
The customer get stuck in step2 of checkout proces (onepage-checkout).

All fields are filled in step 2 but no response using the next button.
What can causing this issue?


texts: Magento 2.3.2, Amazon Sales Channel: Invalid security or form key. Please refresh the page

texts:
I have installed amazon sales channel v2 for magento 2.3.2 store. Now when I try to click 'Connect to amazon store' from 'Setup Amazon Store' section,

I'm getting error 'Invalid security or form key. Please refresh the page.'

  Actually clicking 'Connect to amazon store' opens new tab with url
  http://backend_admin/channel/amazon/account_settings_credentials_irp/merchant_id/1/key/random_key_value/
  and it redirects to admin dashboard page with error message.

  So I can't proceed to 'Listing Settings' and stuck at 'Store
  Integration'. I have checked network tab and at new tab its trying to
  GET url
  http://backend_adin/https:/index/index/gp/mws/registration/register.html%3Fid%3Dc2f35854....

I have made following changes-

max_input_vars = 200000
max_input_time = 600
max_execution_time = 3600
Cleared the cache from var/cache directory.
Cleared browser cache

How to overcome this?


texts: Magento 2 Rest API get order details from customer id

texts: I am beginner on a magento rest api, I cannot see in the API files or docs on how to retrieve order details of customer from customer id.


texts: Blank page in Stores>Configuration>Sales>Tax

texts:
I have succesfully installed magento 2.3.3 following this guide https://digitalstartup.co.uk/t/how-to-install-magento-2-3-and-build-a-web-server/263#chapter2
Then installed the claue theme with a demo and enabled developer mode.
Everything works fine only when I try to configure Stores>Configuration>Sales>Tax it shows a blank page. I have already increased my memory_limit to 2G. Any idea how to fix this problem?

Thanks


texts: How to send an email programmatically from a custom Order Confirmation Page- Magento 2 CE

texts:
I am attempting to send an email from my custom success.phtml file that will contain some needed information.

Everything else in the success file works except for the email part.

I have tried sending email with a template and without one.

The Order Confirmation Page is blank when I use the email code.

I am still a Magento newbie.

I have looked at and used other examples and code, and even the Magento 2 github ones, but obviously I don't understand what is missing.

I used the code from the answer of this post as a guide:
how to send custom email no template in magento2?

Can anyone tell me what I need to change in my code?

This is what I have for my latest coding attempt:

In the web server, I made a file called email_templates.xml in
/home/userName/public_html/mySite/app/etc/ .

In that email_templates.xml file I pasted the code below:

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
    <template id="myemail_email_template" label="My Label" file="myemail.html" type="text"

module="Modulename_Namespace" area="frontend"/>
</config>

I then made a file called myemail.html in
/home/userName/public_html/mySite/vendor/magento/module-email/view/frontend/email

In that myemail.html file I pasted the code below:

<!--@subject Promopoup@-->
{{trans "My var: %myVar" myVar=$data.myvar}}

This is the email part that I pasted in my custom success.phtml file:

<?php

$emailTemplateVariables = array();
$emailTempVariables['myvar'] = $myvar;

$senderName = 'notARealName.com';

$senderEmail = 'notARealAddress@123.net';

$email = 'testemail@123.net';

$postObject = new \Magento\Framework\DataObject();
$postObject->setData($emailTempVariables);

$sender = ['name' => $senderName,'email' => $senderEmail];

$transport = $this->_transportBuilder->setTemplateIdentifier('myemail_email_template')-

>setTemplateOptions(['area' =>\Magento\Framework\App\Area::AREA_FRONTEND,'store'=>

\Magento\Store\Model\Store::DEFAULT_STORE_ID])
                ->setTemplateVars(['data' => $postObject])
                ->setFrom($sender)
                ->addTo($email)
                ->setReplyTo($senderEmail)
                ->getTransport();
                $transport->sendMessage();

?>

Thanks.


texts: Magento2 Model not loading complete data using Factory

texts:
Below is my construct function of controller -

public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Registry $coreRegistry,
        \Vendor\Faq\Model\ResourceModel\Faq\CollectionFactory $faqCollectionFactory,
        \Vendor\Faq\Model\LikeFactory $faqLikeFactory,
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
        \Vendor\Faq\Controller\Adminhtml\Faq\Save $save,
        \Vendor\Faq\Model\FaqFactory $faqModelFactory

    ) {
        $this->_coreRegistry = $coreRegistry;
        $this->_faqModelFactory = $faqModelFactory;
        $this->resultJsonFactory = $resultJsonFactory;
        $this->_faqLikeFactory = $faqLikeFactory;
        $this->_customerSession = $customerSession;
        $this->_save = $save;
        parent::__construct($context);
    }

And this is my execute function -

public function execute()
    {

        $data = $this->getRequest()->getPostValue();
        $_faqModel = $this->_faqModelFactory->create();
        $model = $this->_faqLikeFactory->create();
        $getFaqData = $model->load($data['faq_id'],'faq_id')->getData();
        print_r($getFaqData);
        die();

}

The data which is getting returned in print_r is

Array
(
    [like_id] => 83
    [user_id] => 4
    [faq_id] => 3
    [like_status] => 1
)

But the db table has 2 rows which corresponds to the table based on faq_id

The array which is formed from $data is

Array
(
    [faq_id] => 3
    [product_id] => 275
    [like_status] => 1
)


texts: Which file controls the 3. Shipping Method during checkout?

texts:
Magento 1.9.4
Porto theme

I am trying to setup a 2nd flat rate shipping method as per here:

How to add another flat rate shipping option?

and I'm already having problems with that which I wonder if they have to do with some difference in Magento version 1.9.1 versus 1.9.4?

Anyways, once I get that added on (we use one flat rate shipping price for deliveries in the city and another rate for everything outside our city), I previously setup a calendar from Amasty on the shipping page of the check-out.

Given the 2 scenarios:

flat rate for DELIVERIES in the city
flat rate for shipping outside the city

The calendar was used for only the local delivery option #1 in our city. Customers were getting confused, however, and they were selecting a date from the calendar for the nationwide delivery (option #2). So someone helped me set it up in such a way that the calendar would appear ONLY when the customer selected option #1. This was in our Magento 1.9.1 version. We just setup with a new install on Magento 1.9.4 and I cannot remember which file had those modifications.

What file/files could I possibly look for on our old Magento 1.9.1 system that would be responsible for this? (would potentially had that modified code to make the calendar appear/disappear based on which shipping option is selected?)

I know we spent a lot of time making this modification and my goal is to identify which file has that code and just copy that over from my old Magento 1.9.1 install into the Magento 1.9.4 new installation.


texts: I can't find the correct Model for Invoice

texts:
I'm trying to change the invoice model for making changes in invoice pdf but I can't find this.

I'm trying change /app/code/core/Mage/Sales/Controller/Abstract.php and /app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php but I can delete these files and everything works the same.

I searched in my local folder and community and I can't find what are overriding these files.

If I delete all /app/code/core/Mage/Sales/ folder (except the folder /app/code/core/Mage/Sales/etc/) all works. Why does everything work if I delete the files?


texts: I want to add 2 div just in product page and I add these in app\design\frontend\default\celebrity\template\page\1column.phtml but added in all pages and I want to add just in product page, how can I control it?


texts: Magento Contact Form: Unable to submit your request. Please, try again later

texts:
When visitors to our website try to fill in our contact form on our contact page, they are sent to /contact/index, and receive the error Unable to submit your request. Please, try again later.

At Magento Configuration, I see:

If I change Enable to Yes, I see a different form, which doesn't work.

I can't change it back to No now - it is stuck on Yes.

Web hosting support say:

  No errors are being generated and saved to server logs. I can
  see that any issue that exists occurs in the contact form application
  itself, as the mail server never receives any request to send email
  from it.

  Access logs showing contact form usage:
  185.93.231.8 - - [27/Nov/2017:09:42:39 +1100] "POST /contacts/index/post/ HTTP/1.1" 302 606
  "http://example.com/contacts/index/" "Mozilla/5.0
  (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like
  Gecko) Chrome/62.0.3202.94 Safari/537.36"

I'd really appreciate some suggestions on how to troubleshoot this.


texts: Define new argument for an extended class's method

texts:
in Magento 2.1.11 with PHP 7.0, I need to extend formatDate($date, $includeTime = true) method in Magento\Framework\Stdlib\DateTime and add third argument to it.

I created a new module and override this method by preference its class in di.xml:

<preference for="Magento\Framework\Stdlib\DateTime" type="MyVendor\MyModule\Framework\Stdlib\DateTime"/>

and MyVendor\MyModule\Framework\Stdlib\DateTime.php is:

namespace MyVendor\MyModule\Framework\Stdlib;

class DateTime extends \Magento\Framework\Stdlib\DateTime{

    public function formatDate($date, $includeTime = true, $myArg = false){

    ...}

}

But after use this method in my template file (order/recent.phtml) like this:

echo $block->formatDate(time(),true,true);

The third argument $myArg always is false!

What can I do for adding this third argument to this method!?

Thanks in advance.


texts: For Locale other than english, themes does not get applied

texts:
I was having a configuration where the setup was like below

Main Website
     ---->Store 1(store for XYZ sister company)
          ----> English Store View
     ---->Store 2(store for ABC sister company)
          ----> English Store View
     ---->Store 3(store for LMN sister company)
          ----> English Store View

And I have a custom theme, which is getting applied properly for all the store views.

But, recently, my client wanted three other store views for each store. Namely, german, french and dutch. Accordingly I created the store views and my current setup looks like this:

Main Website
     ---->Store 1(store for XYZ sister company)
          ----> English Store View
          ----> German Store View
          ----> French Store View
          ----> Dutch Store View
     ---->Store 2(store for ABC sister company)
          ----> English Store View
          ----> German Store View
          ----> French Store View
          ----> Dutch Store View
     ---->Store 3(store for LMN sister company)
          ----> English Store View
          ----> German Store View
          ----> French Store View
          ----> Dutch Store View

The custom theme is getting applied only for the english store view, but not the other ones. i.e., for german, french and dutch store views.

I have already checked in System->Configuration->Web , System->Configuration->General and System->Configuration->Design for the working ones as well as the non working ones, both are looking same.

Further, when I investigated, The template i,e., all the phtml files were being pulled from rwd/default instead of rwd/custom_theme, (custom_theme is the theme which I am using).

I tried adding the template path rwd/custom_theme for Templates, Skin (Images / CSS) and Layout in System->Configuration->Design for the german storeview of XYZ company. The page loads with no js and css. And the template i,e., all the phtml files were loaded from base/default, this time.

So I renamed the rwd/default to rwd/default_old and Copied rwd/custom_theme to rwd/default. And It started working. I am sure this is not the right way to do this.

Your help is highly appreciated, and thanks in advance.


texts:
Does anyone know how to add a custom color picker attribute to categories?
I've tried the following code in an upgrade-script, unhappily without success.

$this->startSetup();
$this->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'color', array(
    'group'         => 'General',
    'input'         => 'text',
    'type'          => 'text',
    'label'         => 'Farbe',
    'class'         => 'color {required:false, adjust:false, hash:true}',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));

$this->addAttributeToGroup(
    Mage_Catalog_Model_Category::ENTITY,
    $attributeSetId,
    $attributeGroupId,
    'color'
);


texts: Add CSS file to page.xml using Filename-based cache busting?

texts:
I am using Filename-based cache busting, to make sure every time I make a change to a file  resource revving happens (Steve Sounders Post).

For this matter I am using the following .htaccess file directive (HTML5 Boilerplate):

<IfModule mod_rewrite.c>
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpe?g|gif)$ $1.$3 [L]
</IfModule>

In other words, all requests to  "css/style-min.123.css" go to "css/style.css"

This is what I have in the page.xml file:

<action method="addCss"><stylesheet>css/styles-min.12.css</stylesheet></action>

The file "styles-min.css" is under my theme css folder (/skin/frontend/default/myTheme/css/styles-min.css)

However when I load the front page I get a not found error because magento searches for that file on the base theme css folder:

  The requested URL /skin/frontend/base/default/css/styles-min.css was not found on this server.

Of course, if I copy styles-min.css to that folder, the site works fine (which means the .htaccess directive is good)

Can I make Magento search for that file under my theme's css folder even though it does not exist as a real file?

Hope I made myself clear enough.

Thanks!


texts: SOAP API - Parsing WSDL Could not load from HTTP- 401 Authorization Required

texts:
(I believe this question is not quite a duplicate of the other Parsing WSDL questions, as I'm receiving a 401 Authorization Required error)

Every so often on Magento 1.13.1.0 when connecting to my soap API I'll receive the following error

SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://example.com/index.php/api/soap/index/?wsdl=1' : failed to load external entity "http://example.com/index.php/api/soap/index/?wsdl=1"

I dug into the apache error log and pulled this out

[Tue Jan 20 14:12:14 2015] [error] [client 192.168.200.11] PHP Warning:  SoapServer::SoapServer(http://example.com/index.php/api/soap/index/?wsdl=1): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required\r\n in /var/www/vhosts/magesite/lib/Zend/Soap/Server.php on line 762
[Tue Jan 20 14:12:14 2015] [error] [client 192.168.200.11] PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load external entity "http://example.com/index.php/api/soap/index/?wsdl=1" in /var/www/vhosts/magesite/lib/Zend/Soap/Server.php on line 762
[Tue Jan 20 14:12:14 2015] [error] [client 192.168.200.11] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://example.com/index.php/api/soap/index/?wsdl=1' : failed to load external entity "http://example.com/index.php/api/soap/index/?wsdl=1"\n in /var/www/vhosts/magesite/lib/Zend/Soap/Server.php on line 762

The problem is that this error is inconsistent, some times I am able to connect without issue and others I receive this error.

I created the following script to test the issue:

<?php

$url = 'http://example.com/api/soap/?wsdl=1';
echo "\nConnecting to\n$url\n";

for ($i=0; $i<100; $i++) {
    /** @var SoapClient $client */
    $client = new SoapClient($url);
    echo $i."\t";
    try {
        echo $client->login('username', 'key')."\n";
    } catch (SoapFault $e) {
        echo substr($e->getMessage(), 0, 50)."\n";
    }
    unset($client);
}

The output of which looks like:

Connecting to
http://example.com/api/soap/?wsdl=1
0   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
1   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
2   aa58f99c61e58e7f2366632886665352
3   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
4   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
5   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
6   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
7   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http
8   SOAP-ERROR: Parsing WSDL: Couldn't load from 'http

You can see that on run #2 we login successfully, making this a weird intermittent issue.

What is even weirder, is when I enable WSDL cache (System -> Configuration -> Magento Core API -> Enable WSDL Cache) it seems to fix the problem completley. I never receive the error again, and the program output looks like:

Connecting to
http://example.com/api/soap/?wsdl=1
0   4c89a4cb0ccc8d1ed8310067cde6bdaf
1   415bf4a7f89e9df66366c20c081569ef
2   6d339eb604244fe9a6f1df64aebd07ce
3   fa940c6b5561b5d248e0c458e3c68630
4   453c8a33c21404cba98a08c051852ba3
5   01f6a34924b7c7a3d80b2d8b66f6f31e
6   85baa98accdc480fd4cfda41c8ca3f50
7   931fa7574600f22d895fb47233fa91ce
8   72c40849df54d96e4af818a5e1e2ccd3

Can anyone shed any light on the issue, how is WSDL cache supressing this auth error, and what the correct fix might be?


texts: how to change login link to button on magento1.9

texts: I'm looking for changing log in the label to button!plz help I'm so lost with that tuto; without result!! :( !by the way, it's about login link on top links


texts: Magento 2 method call evrrytime on reload

texts: hi I am newb to magento and I am looking for certain process through which magento will call some method  every time whenever its frontend or backend reloads


texts: how to use simple product images as a color swatches

texts: I want to display custom images based on the simple products of the configurable product. Currently, it uses a select drop-down and displays the name of the colors.


texts: How to hide the credit card charging amount after choosing COD in onePage checkout

texts:
I've enabled the COD options in a magento ce 1.9.2.4 store. In the onePage checkout if the user choose the COD option it's still visible in the Order Review
 a table row telling Your credit card will be charged for and giving the final value in the base currency. For me I want to hide this row ONLY if the user chosen the COD.

is there's a direct option for that? code hints? and to tell I've thought about a simple jquery solution but IDK is it okay to do so or there's a magento recommended solution?
This image taken from fresh installation:


texts: How can I display a uploaded image with a modification

texts:
I have a Magento T Shirt product that allows users to upload their own artwork. I want to use php to display the artwork overlayed over the top of the base image. Is there any way I can achieve this?
How can I call the uploaded image and the base image?

For example, person uploads their artwork to product A. Underneath option loads the base image of that product along with the uploaded image laid on top of the product image.

Can this be achieved and if so, how can I call the base image?


texts: Magento Notifications Sent To Everyone or Just Me?

texts: I think the patches for the latest security issue with Magento has been installed, but I keep getting messages in the Admin area saying it is critical that I install the patches. Am I getting this messsage because the patch is not installed?


texts: How to actually set "Use Config Settings"?

texts:
I've been searching high and low for this answer and hope someone knows.We just upgraded to 1.9.  Prior, our inventory was preset.

How does one set the "Use Config Settings" for inventory?

We would like to set it to default to Manage Stock to Yes.  We like to set Minimum Qty to "1" and Maximum Quantity to "500".  Ideally, we would like to set everything to default to taxable goods.

If someone could steer us in the right directly, that would be awesome.  Thanks for your help!


texts:
I am working with Magento CE 1.9.0.1 and I like to extend the second controller from the first controller class.

First controller

class Federallawyer_Flphotos_SuggestController
    extends Mage_Core_Controller_Front_Action {
}

Second controller

class Federallawyer_Flphotos_ConnectController
    extends Federallawyer_Flphotos_SuggestController {
}

the second controller is extended from the first controller, but Magento is throwing an error.

the error is

  Call to undefined method Federallawyer_Flphotos_ConnectController::getCustomerSession(),

While I define this method in first controller file.

Any idea's or suggestions will help me


texts: Shopping cart rule : discount if 2 different sku are in cart

texts:
I'm looking to build the following Shopping Cart Rule and I have no idea how to do it.

I have multiple sku available, if you add 2 different sku in your cart, you get 10% off.  It can be any combination of sku, no matter the quantity, and the discount is only applied once.


texts:
I'm trying to make some attributes in product info details to link, to attribute search page to help customers search.

If my attribute is Armani, when a person clicks Armani in product info details, new page will display all products that have the Armani attribute.

I just found online code but it's for an older version of Magento and it doesn't work on Magento 2.0 version, somewhere in attributes.phtml file.

<?php foreach ($_additional as $_data): ?>
<?php $_attribute = $_product->getResource()->getAttribute($_data['code']);
if(!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>
<?php if(preg_match("/classification|manufacturer/i",($this->htmlEscape($this->__($_data['label']))))) { ?>

<?php echo $this->htmlEscape($this->__($_data['label'])) ?>
<?php $query = str_replace(' ', '+', trim($_helper->productAttribute($_product, $_data['value'], $_data['code']))); $query = str_replace('&amp;','%26', $query); ?>
<?php $base_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB); ?>
<?php echo "" . $_helper->productAttribute($_product, $_data['value'], $_data['code']) . ""; ?>

<?php } else { ?>

<?php echo $this->htmlEscape($this->__($_data['label'])) ?>
<?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']) ?>

<?php } ?>
<?php } ?>
<?php endforeach; ?>

So can anyone help me with code for newest version of Magento?

Thanks.


texts:
My question involves how the qty increment message is displayed on the frontend.

What I want to do is only display the message found in the qtyincrement.phtml file when the qty increment is greater than one. If the item is purchasable in a quantity of 1 I don't want the message displayed. What is the best way to achieve this?

I am currently on version 1.9


texts:
For some reason my Magento shop always redirect to https.
I set config -> web -> unsecure -> base url to http://, so that can not be the problem.
Changed also store view to check all views.

And htaccess is also not redirecting to https.

But I do not know where in my code the site is redirecting to https.
I already changed to the default Magento theme, but still the website is redirecting to https.

Maybe I edit a core file a time ago, but I do not know what file it can be.

Is there a way to find the location of this problem?


texts: How to create a one time purchase for each product?

texts:
I have used the below code. Please suggest me if I am wrong.

<?php

class Fooman_Example_Model_Observer
{

    public function AddProductSaveBefore($observer)
    {
        $quote = Mage::getSingleton('checkout/session')->getQuote();
        if (Mage::getSingleton('customer/session')->isLoggedIn()) {
            $customerData = Mage::getSingleton('customer/session')->getCustomer();
            $customerId = $customerData->getId();

            $time = time();
            $toDate = date('Y-m-d H:i:s', $time);
            $lastTime = $time - 100000000;
            $fromDate = date('Y-m-d H:i:s', $lastTime);
            $order = Mage::getModel('sales/order')->getCollection()
            ->addFieldToFilter('customer_id', $customerId)
            ->addAttributeToFilter('created_at', array('from' => $fromDate, 'to' => $toDate))
            ->addFieldToFilter('sku', array('in' => Mage::getSingleton('catalog/product')->getSku()))
            ->load();

        }

       if ((count($order->getItems()) - 1) >= 1) {
    Mage::throwException('You already ordered today');
}
    }
}


texts: Add Country Manually in Customer A/c Details

texts:
How can we set Country in Customer A/c Details Manually.

I am trying to execute code as following and

So Please Suggest Answer in that criteria :

 if (!$customer->getId()) {
                $customer->setEmail($email);
                $customer->setFirstname($name);
                $customer->setLastname($lastname);
                $customer->setPassword($password);
}


texts: Adding CSS/JS via controller magento 1.9.x

texts:
Can you please let me know how to add JS/CSS via a controller method

I tried this but isn't working

$head = $this->getLayout()->getBlock('head');
$head->setCanLoadExtJs(true);
$head->addItem('skin_adminhtml', 'adminhtml/testimonial.css');


texts: Magento 2 Error “URL key for specified store already exists

texts:
Basically i am adding a custom category the problem is when i add two child category with same NAME in to one parent category where child category is already present then this shows error of URL KEY.

My code is

$category->setPath($parentCategory->getPath())
            ->setParentId($parentId)
            ->setName('test1')
            ->setIsActive(true);
        $category->save();

Is it possible to add two categories with same NAME in one parent category? thanks in advance


texts: Invalid Form Key. Please refresh the page.External Script via Google Tag Manager

texts: When embedding external scripts with the Google Tag Manager, you always get the message "Invalid Form Key. Please refresh the page." CSP has inserted all rules and doesn't output errors anymore. We try to test Userlike and Crisp.chat, with both scripts we have the same problem, no errors in the developer console or in the logs. Anybody got any ideas? (Magento 2.3.5-p1)


texts: How to have a configurable product with 2 or more of the same color on Magento?

texts:
I am currently running Magento 1.9.  and have a question about product configurable.

I am selling a product with multiple colors. For example, i have Light Pink, Rose Pink, and Hot Pink, they are all variations of Pink.

So can I have them all in the variation of Pink color?


texts: Custom text option on configurable product

texts:
So here's an interesting requirement.

We're required to sell a item that comes in different sizes/colors and so for that a configurable product works great. However, now we want to add the ability for a customer to add their custom text to the product.

Is this possible in Magento by default (or via some ready made plugin)?


texts: Can't add product and manage categories in admin panel

texts:
Hi guys i am new to magento.while doing update to site.I figured out a abnormal error Can't add product and manage categories.It shows nothing.But the product that have already added have no problem they can be editable.what whould i do.Please help me.

nothing is showing...
Please help me.Thanks in advance..


texts: Magento 2.3: How to hide only free shipping method if postal code 2nd index is 0

texts:
I want to hide only the free shipping method on the checkout page if the postal code 2nd index is 0. I tried this but it's not removing from shipping methods.

require(['mage/url', 'jquery','domReady!' ,'jquery/ui'],function(url , $)  {

$("[name='postcode']").live('change',function(){
        postCode = $("[name='postcode']").val();
         // console.log(postCode);
             postCode = postCode.slice(1,2);
             console.log(postCode);

        if(postCode == 0){

            // $('.checkout-shipping-method').hide();
             jQuery("#label_method_freeshipping_freeshipping").closest('.row').hide();
           // console   .log('Hellow');

        }
        else{
            // $('.checkout-shipping-method').show();
            $('#label_method_freeshipping_freeshipping').closest('.row').show();
            $("#message").hide();

        }
    });

    });


texts: is it possible to call one static block from another

texts:
I want to ask a very basic question.
Is it possible to call one static block from within another using

{{block type="cms/block" block_id="your_block_id"}}

or can you only do this from a cms page?

i did this and my site now wont connect, but i don't see any errors. then my host said at the same time as i was doing this they had a problem with the upstream provider. but now i can barely connect or do anything on the backend of the site.

yet other sites on our server are moving fine. any thoughts?


texts: Order status changes to Processing after completed PayPal payment - but doesn't send New Order email

texts:
I was having an issue with capturing PayPal IPN messages, but I have fixed that and the Complete message is getting picked up by my store and changes the status of the order to Processing.

At this point I would expect the New Order email to be sent to us so that we can ship the order and to the customer as confirmation of the order. But these emails never get attempted to get sent. I don't know if the order status should be sent to something else to trigger the New Order email, but I can't even manually change the order status, the only option in the drop down is Processing.

I can go in to the order and click the Send Email button and this does add a row to the core_email_queue table, which doesn't send. I have set up SMTP Pro by ASchroder for emails so I would expect to go through it's queue (smtppro_email_log), password resets, customer register emails do go through the correct queue and get sent correctly. I don't know why the New Order email would get pushed through the other queue.

But this is a side issue, the New Order email should go out as soon as the payment confirmation comes back from PayPal, but it does get added to any queue. Should the order status get changed to Processing? Should this trigger the New Order email? Should I be able to manually change the status? Should the SMTP Pro module override all email queues and all email go through it?


texts: how to hide the filter in product listing page without modify the code base?

texts:
How to hide the filer in product listing page without touching the code?
Can I do it by CSS or javascript? Thank you


texts: Gallery images returns 0 images for product page Magento 2

texts:
For one product I am getting gallery images 0.

in gallery.phtml

<?php $galleryImages = $block->getGalleryImages(); ?>

gives me count 0.
I checked it database table catalog_product_entity_media_gallery_value_to_entity for row_id which gives me 7 value_id(which means 7 images) which is linked to catalog_product_entity_media_gallery.

Whats the reason. How can i get all media gallery images.

Gallery.php

 public function getGalleryImages()
{
    $product = $this->getProduct();
    $images = $product->getMediaGalleryImages();

    \Magento\Framework\App\ObjectManager::getInstance()->get(\Psr\Log\LoggerInterface::class)->info("in images " .$images );

    if (!$images instanceof \Magento\Framework\Data\Collection) {
        return $images;
    }

    foreach ($images as $image) {
        $galleryImagesConfig = $this->getGalleryImagesConfig()->getItems();
        foreach ($galleryImagesConfig as $imageConfig) {
            $image->setData(
                $imageConfig->getData('data_object_key'),
                $this->imageUrlBuilder->getUrl($image->getFile(), $imageConfig['image_id'])
            );
        }
    }

    return $images;
}

getMediaGalleryImages in file Product.php

 public function getMediaGalleryImages()
{
    $directory = $this->_filesystem->getDirectoryRead(DirectoryList::MEDIA);
    if (!$this->hasData('media_gallery_images')) {
        $this->setData('media_gallery_images', $this->_collectionFactory->create());
    }
    if (!$this->getData('media_gallery_images')->count() && is_array($this->getMediaGallery('images'))) {
        $images = $this->getData('media_gallery_images');
        foreach ($this->getMediaGallery('images') as $image) {
            if (!empty($image['disabled'])
                || !empty($image['removed'])
                || empty($image['value_id'])
                || $images->getItemById($image['value_id']) != null
            ) {
                continue;
            }
            $image['url'] = $this->getMediaConfig()->getMediaUrl($image['file']);
            $image['id'] = $image['value_id'];
            $image['path'] = $directory->getAbsolutePath($this->getMediaConfig()->getMediaPath($image['file']));
            $images->addItem(new \Magento\Framework\DataObject($image));
        }
        $this->setData('media_gallery_images', $images);
    }

    return $this->getData('media_gallery_images');
}


texts: Magento 2 product listing page extremely slow

texts:
I am using magento 2.1.13. Website is placed on a server with 20 dedicated cores and db is on a separate server with 28 dedicated cores.

All cache are enabled and are working fine. As soon as a few users start visiting the website, the website gets extremely slow. When you use the following query to check my db process:

show full processlist;

It shows me hundreds of queries and are stuck. The queries are mostly like below:

INSERT INTO `search_tmp_5b181fbcb526a2_18065532` SELECT
`main_select`.`entity_id`, MAX(score) AS `relevance` FROM (SELECT
`search_index`.`entity_id`, (((0)) * 1) AS `score` FROM
`catalogsearch_fulltext_scope3` AS `search_index`
 LEFT JOIN `catalog_eav_attribute` AS `cea` ON
 search_index.attribute_id
 = cea.attribute_id
 INNER JOIN `catalog_category_product_index` AS
`category_products_index` ON search_index.entity_id =
category_products_index.product_id
LEFT JOIN `cataloginventory_stock_status` AS `stock_index` ON
search_index.entity_id = stock_index.product_id AND
stock_index.website_id = 0 WHERE (stock_index.stock_status = 1) AND
(category_products_index.category_id = 153)) AS `main_select` GROUP BY
`entity_id` ORDER BY `relevance` DESC
LIMIT 10000

A screenshot is also attached.

Due to these queries, the whole website goes down and even if I restart mysql, these queries are generated again very fast.

I am not sure what is wrong. Can any body help in this issue?

Thank you


texts:
I have a task to create products programmatically using the JSON data.

I created a new module to make a custom controller. Then I hit the url using the http requester add on through Mozilla browser, and submitted the JSON data by POST method. But it does not fetch the submitted data.

If I am able to submit the JSON data through http requester to my controller, then I will be able to create the products using the same.

My controller code is updated here

<?php
class Probytes_Productcreate_IndexController extends Mage_Core_Controller_Front_Action {

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

    $this->getResponse()->setBody(json_encode($response));
    $params = $this->getRequest()->getPost('test');
    echo $params;
    //die();
    }

}
?>

Is there any solution to sumbit a JSON data to the custom controller in magento. I am using magento version 1.9. Any help would be appreciated. Thanks in advance.


texts: Magento2 2.3 Update Error Requirements not satisfied

texts:
When i try to run "composer update" i am getting following errors.

PHP 7.1.20

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires colinmollenhour/cache-backend-file ~1.4.1 -> satisfiable by colinmollenhour/cache-backend-file[v1.4.1, v1.4.2, v1.4.3, v1.4.4] but these conflict with your requirements or minimum-stability.


texts: Magento2 custom folder php scripts are not being executing 500 error

texts:
I have some PHP scripts for creating products using rest api.
All the script are under products_create_factory folder and this folder is in magneto2 root. When I execute a script from that folder from browser domain/products_create_factory/createproduct.php scripts gives 500 error.

BUT if I run the script from the console it executes.

Scripts are independent of app/bootstrap.php directory (use only rest api).

I have tried also this option even if scripts use only rest api.

How can I solve this problem?


texts: Custom module's block doesn't show up - xml layout file 'type' issue?

texts:
Block created inside custom module doesn't show up in the fron-end.

Namespace: Fmat

Module: FtPrices

Custom Block file: Fmat/FtPrices/Block/Product/View/Tierprices.php

custom block php file:

<?php
 class Fmat_FtPrices_Block_Product_View_Tierprices extends Mage_Core_Block_Template {
 }
?>

block's definition in module's config.xml (...etc/config.xml)

<global>
(...)
    <blocks>
        <fmat_ftprices>
            <class>Fmat_FtPrices_Block_Product_View_Tierprices</class>
        </fmat_ftprices>
    </blocks>
</global>

in module's layout file:

<catalog_product_view>
    <reference name="product.info">
        <block type="fmat_ftprices/product_view_tierprices" name="product.custom.tierprices" as="custom_tierprices" template="fmat/ftprices/product/view/tierprices.phtml"/>
    </reference>
</catalog_product_view>

in catalog/product/view.phtml I get the block via:

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

Once I change block type in module's layout file from type="fmat_ftprices/product_view_tierprices" to type="catalog/product_view" the template shows up in the front end. Can you see any errors in my files?

I'd appreciate your input.


texts:
I have a problem (duhh) with symlinks inside public_html.
Everything stopped working after this patch
https://github.com/magento/magento2/commit/202ce32dd4bed272a9ddb1a4618fa0e14a179dcb#diff-643a52d0419707fc6b1a9c95a9b5a632

We use our custom solution for deployment. We redeploy static content inside public_html/deployer/releases/... folder.
After all processes are done, we create symbolic links to three folders

public_html/deployer/generated  to
public_html/deployer/releases/88/generated

public_html/deployer/pub/static  to
public_html/deployer/releases/88/pub/static

public_html/deployer/var/view_preproccessed
public_html/deployer/releases/88/var/view_preproccessed

Problem happens when minified phtml file is checked whether it is exists or not.
Because it is created in the symlinked folder - it is not found and throws an error.
Previously, because filename wasn't using realpath() method to get path, it worked perfectly.
Now realpath() extracts symlink path and file is not found.

Example:
File: vendor/magento/framework/View/Element/Template/File/Validator.php:138

My testing script.

$realPathNotWorking = "/public_html/deployer/releases/88/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml";

$realPathWorking = "/public_html/var/view_preprocessed/pub/static/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml";

$directories = [
    "/public_html/var/view_preprocessed/pub/static/",
];

foreach ($directories as $directory) {
    if (0 === strpos($realPathNotWorking, $directory)) {
        echo 'Found';
        die;
    }
}
echo 'Not found';

As you can see
$realPathNotWorking is got when realpath is used.
$realPathWorking is got when realpath is not used (as it was before patch)

Question
What would be a better solution? Add custom solutions like add my custom directory or remove realpath function? Or maybe my custom static content deployment is not logical?

System info:
Magento open source 2.3.1
Php 7.1.28

P.s. I have also read about allow symlinks option in the admin, but since it is not recommended to use on the production env due to security reasons, we are not enabling it.


texts:
sorry for creating another 500 Internal server error thread but I couldn't find any solution for my problem yet.

We have a managed server from German provider 1&1 and we have a running magento website on it with 1.9.4.1 which works fine.

I installed a fresh Magento 2.3.1 on this server and installation completes without any problems, all requirements like php7.2, Apache 2.4, requested extensions and file permissions are fine.

After the installation the backend gives 500 Internal Server error and frontend is without any design. I figured out that for the frontend the rewrites for pub/static are not working and found a changed .htaccess for pub/static to get the design loading on the frontend.
But still any links in the frontend and the whole backend end with 500...

I tried solutions found on the web like deleting .htaccess, file permissions and disabling static rewrites in mySQL but they didn't help. I can not reach developer mode in ssh so I enabled developer mode with env.php, debug shows errors like:

  [2019-05-21 09:42:27] main.DEBUG: cache_invalidate:
  {"method":"GET","url":"http://test.tudi-billo.de/","invalidateInfo":{"identifier":"interception"}}
  []

  [2019-05-21 09:42:36] main.DEBUG: cache_invalidate:
  {"method":"GET","url":"http://test.tudi-billo.de/","invalidateInfo":{"identifier":"SYSTEM_CONFIG"}}
  []

  [2019-05-21 09:42:37] main.INFO: Broken reference: the
  'catalog.compare.sidebar' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []

  [2019-05-21 09:42:37] main.INFO: Broken reference: the
  'sale.reorder.sidebar' element cannot be added as child to
  'sidebar.additional', because the latter doesn't exist [] []

Now I'm stuck and the server provider won't help anymore as they say Magento is the problem, not their server. I guess there is an overall problem with rewrites and therefore the backend can not be found.

Any idea how to find the error or how to solve this?


texts: Loading Javascript for minicart in Magento 2

texts:
I want to make certain customization in minicart, for that purpose I have created a module which overrides Magento_Checkout/template/minicart/item/default.html.

Overriding html

I have created a module inside which I have a requirejs-config.js file:

var config = {
    map: {
        '*': {
            'Magento_Checkout/template/minicart/item/default.html':
                'Anime_Minicart/template/minicart/item/default.html'
        }
    }
};

My default.html

My default.html is a copy of core file except I've added a dropdown next to input field as follows.

            mydefault.html
            <input data-bind="attr: {
                   id: 'cart-item-'+item_id+'-qty',
                   'data-cart-item': item_id,
                   'data-item-qty': qty,
                   'data-cart-item-id': product_sku
                   }, value: qty"
                   type="number"
                   size="4"
                   class="item-qty cart-item-qty"
                   maxlength="12"/>
            <select id ='minicart-qty-select'>
              <option value="1">1</option>
              <option value="2">2</option>
              <option value="3">3</option>
            </select>

I'm pretty sure that core file is overridden by my file since I get to see the mydefault.html text on output.

Adding a Javascript file that loads in every page.

For this purpose I have created my custom theme and configured it through backend. I have created main.js file in location app/design/frontend/Anime/Mytheme/web/js, which needs to load in every page.

define([
  "jquery"
],
function($) {
  "use strict";

    $( "#minicart-qty-select").change(function() {
        var currentValue = $('.cart-item-qty').val();
        var selectedValue = $('#minicart-qty-select:selected').val();

        console.log(currentValue , selectedValue);
        alert($('.cart-item-qty').val());
    });
    console.log('Hola');
    console.log($('.cart-item-qty').val());

});

Configure magento to load main.js
Since Magento is configuration based framework we have to explicitly configure it to load main.js in whole site. I did that using requirejs-config.js in my theme as follows:

  var config = {

  // When load 'requirejs' always load the following files also
  deps: [
      "js/main"   ]

  };

Output
My main.js file is loaded in every page. And it outputs

  Hola
  undefined

  Since Hola is logged it is confirmed that custom js file is
  loaded. But undefined value in second line makes me think that the
  minicart element is not loaded when page is refreshed.

On changing the values in dropdown the change event is not triggered
since neither alert nor console.log outputs anything.

This concludes that my javascript file does not have effect for minicart. So what should be the right way to load javascript for minicart?


texts: Error "Cannot add the item to shopping cart" after upgrade magento 1.9.1.1 to 1.9.3.7

texts:
Getting error on all add to cart links on product listing page.

=> Please assist me. Thanks!


texts: Import csv using dataflow-profile image does not exists?

texts:
I am using Magento version is 1.8.1.0.

I am trying to import product using dataflow - profile. when I run the I got error image does not exists.

I place image into media/import/product/p1.jpg

my media folder permission is 777.

and I write image path into csv file like.

image               small_image          thumbnail
/product/p1.jpg   /product/p1.jpg    /product/p1.jpg

where I create mistake please help.

when I upload this csv and run i got this error.

Image does not exist.


texts:
Hi I was wondering if anyone could guide me to automating the sending of the shipping email, which will outline the tracking number etc... telling the customers that their order is out for delivery.

As, I am currently understanding is that you click the little checkbox then press send. A step that could go un-noticed or missed by accident leaving customers unaware that their item(s) is/are out for delivery


texts: Magento2 : Call getViewFileUrl() function in block file

texts:
How to call function getViewFileUrl() in block file?

For phtml it is $this->getViewFileUrl('images/img.jpg') but it's not working on block file.

what is syntax for block file which class I have to inject ?


texts: Magento2 : How to get product dimension units (cm/in)?

texts:
I need to get the dimension units for width, height and length. There are solution available only to get the value of these attributes like,

$product->getTsDimensionsLength();
$product->getTsDimensionsWidth();
$product->getTsDimensionsHeight();

How can I get the dimension unit (like cm or in) for these values?

Thanks in advance.