texts:
This problem is driving me crazy and after hours of reading and trying all possible suggested solutions I feel I have to give it a go here.

We always had problem changing the backend session timeout from default 3600 to 86440 (24 hours). Just change the settings in backend/admin don't do it. Before we upgraded Magento from 1.6.2 to 1.9.1 we managed to change timeout in varien.php and php.ini.

We have changed settings in htaccess, php.ini, varien.php and in system Magento configuration now. But I still get logged out after 1 hour (3600).

What makes it even more strange is that on the same server we made the update on our dev URL, and when sure all was working we transfered the files to the live/production URL.

On the dev, the timeout is working as we want, but not on live. And the files and settings are exactly the same.

I had a Magento expert and also my server admin looking at the files, and also for them it's a mystery. Really, what's going on?!?

-- UPDATED POST WITH INFORMATION! --

Dedicated server:
DELL PowerEdge R210 II
Processor: Intel(R) Xeon(R) CPU E31220 @ 3.10GHz
RAM:2x42GB DDR3 - 1333MHz LV
Hard Disk OS: 2x256GB DELL 10000rpm - RAID 5
Operating System: CentOS 6.5 64Bit
DirectAdmin: 1.45.4
Apache: 2.4.10
MySQL: 5.6.20
PHP (mod_php): 5.3.28

E-commerce platform:
Magento CE 1.9.0.1 multistore


texts: How to save the form values in magento2 controller

texts:
How to save new attributes values in the Magento2 controller from registration form.

Please, Anyone guide me how to save value?


texts: Upgrade M2.4.1 Error: Cannot instantiate interface Magento\LoginAsCustomerApi\Api\GetLoggedAsCustomerAdminIdInterface

texts:
When running upgrade we see no errors but on running the frontend we are surprised with this nice errror statement
Error: Cannot instantiate interface Magento\LoginAsCustomerApi\Api\GetLoggedAsCustomerAdminIdInterface
Is this a know problem or is there a smart way to solve it?

Error: Cannot instantiate interface Magento\LoginAsCustomerApi\Api\GetLoggedAsCustomerAdminIdInterface in /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 Stack trace:
#0 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create()
#1 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get()
#2 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument()
#3 /vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument()
#4 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime()
#5 /vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments()
#6 /vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create()
#7 /vendor/magento/framework/Interception/PluginList/PluginList.php(250): Magento\Framework\ObjectManager\ObjectManager->get()
#8 /vendor/magento/framework/Interception/Interceptor.php(144): Magento\Framework\Interception\PluginList\PluginList->getPlugin()
#9 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\PageCache\Model\Config\Interceptor->Magento\Framework\Interception\{closure}()
#10 /generated/code/Magento/PageCache/Model/Config/Interceptor.php(65): Magento\PageCache\Model\Config\Interceptor->___callPlugins()
#11 /vendor/mirasvit/module-cache-warmer/src/CacheWarmer/Plugin/Debug/OnHitPlugin.php(139): Magento\PageCache\Model\Config\Interceptor->isEnabled()
#12 /vendor/magento/framework/Interception/Interceptor.php(135): Mirasvit\CacheWarmer\Plugin\Debug\OnHitPlugin->aroundAroundDispatch()
#13 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->Magento\Framework\Interception\{closure}()
#14 /generated/code/Magento/PageCache/Model/App/FrontController/BuiltinPlugin/Interceptor.php(26): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->___callPlugins()
#15 /vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin\Interceptor->aroundDispatch()
#16 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#17 /generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#18 /vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#19 /generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#20 /vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch()
#21 /pub/index.php(40): Magento\Framework\App\Bootstrap->run()
#22 {main}


texts:
I need to get html radio button data and call upgradeschema.php file, because to my data to database.

This is my html(template) file.

    <form **action**="..........">
<input type="radio" name="type" value="html" checked> Html

<input type="radio" name="type" value="text"> Text

<input type="submit" name="button" value="submit">

</form>

This is my form, When click  submit button get data from form and call to upgradeschema class file then store the form data to database.

My question is which action class i put into form action part, CaI i call directly upgradeschema call in magento2. or how to get data from form and store database in magento 2 way.


texts: Create a custom index with product information

texts:
I'm trying to create a custom index where I want to index product information. I having trouble finding some real good information about this.
Documentation or really good commented example needed.

I have googled a lot and just found some short example how to do this and a github module that has no explanation in it.

Any suggestions?

I'm using EE 1.12.0.2


texts:
I want to translate the text in prompt boxes on my magento shop (CE 1.9), but can't seem to find the location(s) / file(s) in which I can change it. I've searched in the locale folder and various phmtl-files but with no luck. Some of the prompt boxes I want to change:

In the Cart, confirmation that you want to remove item from shopping cart.
On the (configurable) product page, not having selected a variant of the product when clicking the 'add to cart' button.

Can someone point me in the right direction where the files that need to be modified are on the server?

Thanks!


texts: different texts are added at the end of url for multi store site

texts:
we have many stores in our site but except main default site, i disabled every store.

but these kind of urls ?  = > at the end = "?___SID=U"

http://www.kidsdial.com/slr-camera-tripod.html

http://www.kidsdial.com/slr-camera-tripod.html?___SID=U

please help me to remove those kind of urls

thanks in advance


texts: Magento 2 - Disable the compare function in admin panel

texts: Is there a way to disable the compare function in admin panel?


texts: Scope Store not working for custom category attribute

texts:
We are using Magento 2.2.6 and created a new category attribute. But the store_view scope is not working. I searched already in the database and also diverse blogs on the internet but don't get a reason why.

We did reindex and upgrade. The value of our attribute is also saving to the database - but seems to use globally.

<?php

namespace Vendor\Module\Setup;

use Magento\Framework\Setup\InstallDataInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{

    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory)
    {
        $this->eavSetupFactory = $eavSetupFactory;
    }

    public function install(
        ModuleDataSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Category::ENTITY,
            'vendor_short_description',
            [
                'type' => 'varchar',
                'label' => 'vendor_short_description',
                'input' => 'textarea',
                'required' => false,
                'sort_order' => 3,
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_STORE,
                'wysiwyg_enabled' => true,
                'is_html_allowed_on_front' => true,
                'group' => 'Content'
            ]
        );

    }
}


texts:
I want to ask how to customize and add extra cost to customer basket for select payment "cash on delivery:".

I created file in vendor/magento-offline-payments/adminhtml/system.xml with following content

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>

            <group id="cashondelivery">
                <field id="extra_fee" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="1" showInStore="0">
                    Extra Fee Charge
                    <validate>validate-number validate-zero-or-greater</validate>
                </field>
            </group>

    </system>
</config>

In this field I add extra amount:https://prnt.sc/rqy3dr

How can I add this amount to the basket if the customer chooses this option when ordering?


texts: change status order to "pending payement"

texts:
I just created a custom payment method and I would like that when the invoice is generated to change the status of the order.
What function do i rewrite.

thanks


texts: Magento2 Quickview Slider and Swatches Issue List Page

texts:
I have added quick view on list page. But I could not load slider in image thumb in quick view also configurable options/swatches are not visible.

Does any one have faced this issue? Below is the screen shot for both the issues,

https://drive.google.com/file/d/0B1aJL9nhfbfFN1Q0RGR6cTNBaFk/view?usp=drivesdk
https://drive.google.com/file/d/0B1aJL9nhfbfFcDZvZERtTnZZZTQ/view?usp=drivesdk


texts:
I have overrided Magento\Sales\Model\Order\Email\Sender\InvoiceSender and tried the below code to add the attachment

$filename = 'e:\tushar\smtp_gmail.pdf';
$this->attachFile(file_get_contents($filename),'test.pdf');

public function attachFile($file, $name) {
        if (!empty($file) && file_exists($file)) {
            $this->message
            ->createAttachment(
                file_get_contents($file),
                \Zend_Mime::TYPE_OCTETSTREAM,
                \Zend_Mime::DISPOSITION_ATTACHMENT,
                \Zend_Mime::ENCODING_BASE64,
                basename($name)
                );
            }

        return $this;
    }

but it's not working


texts:
How to enable /disble module in admin configuration setting .....

I also refer Magento 2 - add Enable / Disable field for custom module how to enable/disable full module

Thanks....


texts: What classes/methods to hook up to do an action after customer's profile is updated?

texts:
I intend to make a call to an API endpoint after a customer's profile information, such as name, date of birth, etc, are updated. The update can be done either by the admin through the admin panel or by the user himself through his account on the frontend.

I'm very new to Magento2. I read up on Magento2 modules and if I understood correctly, it seems like I could do this by hooking up my method with the relevant core classes in the di.xml and create my own after*() method. If this is the case, which are the classes and methods should I be hooking up with to do something after a customer's profile information is updated?


texts: I use magento 2.0.7 is it possible to custom the checkout page city field(text) to dropdown list?


texts: How can I split order based on the vendor?

texts:
I want to split the order based on the vendor selling the item. I have created a custom attribute sold_by in the the product details page. The order should be split on the  basis of the said attribute. This splitting should not affect the payment.

The order should be created in such a way that different order id(s) are created for the different items of different vendors.

Like, for example, if someone orders Product1, Product2 and Product3, where Product1 and Product2 are sold by Vendor1 and Product3 is sold by Vendor2.

Then, 2 orders with different Order Ids must be created where the Order1 will have details regarding the order of Product1 and Product2 and the Order2 will have the details regarding the order of Product3.

How can I achieve this ?


texts:
For the last four hours I have been trying to save data to two tables. I realise that this should be a simple task, due to Magento's style of saving data, but I cannot work out how to do it.

On a previous practice module I put together some code that worked(I must have changed something as it does not work now). The code I did write seemed to be very smelly code and this time I want to do things the right way.

I can save data to a single table, but what I am unable to work out is how to use the id from table 1 and apply that to table two as the foreign key? also does it go in a save action in the controller or is it put somewhere else?


texts: What logic uses magento 2 for checking user login in account pages? I know about solution like $this->session->isLoggedIn(), but I need more globally for several controllers. What I need to use?


texts:
I have a module and I am trying to get my module config data ( from system.xml ) within my module controller. It works when I get it in a template file but not when I try to access it in the controler I get this error

Fatal error: Call to undefined method Modzinc\Productpdf\Controller\Index\Index\Interceptor::helper() in ..... public_html/modzinc/app/code/Modzinc/Productpdf/Controller/Index/Index.php on line 18

Here is my controller file located at Modzinc/Productpdf/Controller/Index.php

<?php

namespace Modzinc\Productpdf\Controller\Index;
use FPDF;
use Modzinc\Productpdf\Helper\Data;
use Magento\Framework\App\Action\Action;
use Magento\Framework\Controller\ResultFactory;

class Index extends Action
{
    public function execute()
    {
        ### Settings from Mod Config

        $topTel = $this->helper('Modzinc\Productpdf\Helper\Data')->getConfig('dynamicpdf/general/topTel');

        $pdfFont = 'Arial';

        $product_id=$_GET['id'];
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $product = $objectManager->get('Magento\Catalog\Model\Product')->load($product_id);

        $pdf=new FPDF();
        $pdf->AliasNbPages();

        $pdf->SetTitle($product->getName());
        $pdf->AddPage();
        $pdf->SetFont($pdfFont,'',12);

        $pdf->Cell(80);
        $pdf->Cell(210,0,$topTel,1,2,'C');

        $pdf->Output();
    }
}

And my helper file contains the following

<?php

namespace Modzinc\Productpdf\Helper;

class Data extends \Magento\Framework\App\Helper\AbstractHelper
{
    public function getConfig($config_path)
    {
        return $this->scopeConfig->getValue(
        $config_path,
        \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
}

Everything works fine apart from when I try to use the helper to get the config value.

Can someone tell me what I am doing wrong please, I am rather new to Magento 2


texts: Magento 2.1.7 static content deploy creates _temp.min.js file instead of .js file

texts:
In Magento 2.1.7 when I have customized some js as per our requirement
in app\design\frontend\vendor\theme\Magento_ProductVideo and then fire following commands

php -dmemory_limit=6G bin/magento setup:upgrade
php -dmemory_limit=6G bin/magento setup:static-content:deploy

Then I found the files are renamed xxx_temp.min.js instead of xxx.js in pub/static area.

Thanks.


texts: Add CURLOPT_HTTPHEADER to Magento 2 curl

texts:
Currently i'm using magento 2 curl framework to connect to rest api like this:

public function __construct(\Magento\Framework\HTTP\Client\Curl $curl
  ) {
      $this->_curl = $curl;
  }

private function post(){
      $url = "https://pro.test.com/api/test";
      $params = array("invoice"=>"SOCAG00183235715","method"=>"ups");
      $this->_curl->post($url, $params);
      $response = $this->_curl->getBody();
      return json_decode($response);
  }

from the above code, i can add parameter to the post field, the problem is i need to add the array option to curl header, for example if i use basic curl php, the code structure will look like this:

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://pro.test.com/api/test",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "invoice=SOCAG00183235715&method=ups",
  CURLOPT_HTTPHEADER => array(
    "content-type: application/x-www-form-urlencoded",
    "key: 212thisismykey6969"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);


texts:
I have noticed that when I'm surfing my website, where it appears the Waiting for www.whatever.com... on the left-bottom corner from google chrome it appears suddenly a Waiting for mc.yandex.com... which I don't know why is it appearing there. I've googled it and it seems to be a bot that act as google.analytics does, but I don't want this from yandex. Is it possible to block it from .htaccess? I've tried doing:

BrowserMatchNoCase "yandex" bots
Order Allow,Deny
Allow from ALL
Deny from env=bots

But it still shows up. If there is any way for me to block it. How can I block this?


texts: What variable (or how do we get) the Delivery Date and the customer comment onto the outgoing customer order confirmation email in Magento 2?


texts: How create all suborder invoice from order

texts:
I need to create all suborder invoice of an order in magento.
i used this code but my amount is coming 0 .

$order = Mage::getModel('sales/order')->loadByIncrementId(100000067);
$items = $order->getItemsCollection();

$items = array(); //this will be used for processing the invoice

   foreach ($order->getAllItems() as $item) {
    $items[$item->getId()] = $item->getQtyOrdered();
    }

$invoice = Mage::getModel('sales/service_order', $order)->prepareInvoice($items);

// The rest is only required when handling a partial invoice as in this example
$amount = $invoice->getGrandTotal();
echo $amount;
$invoice->register()->pay();
$invoice->getOrder()->setIsInProcess(true);

$history = $invoice->getOrder()->addStatusHistoryComment(
    'Partial amount of $' . $amount . ' captured automatically.', false
);

$history->setIsCustomerNotified(true);

$order->save();

Mage::getModel('core/resource_transaction')
    ->addObject($invoice)
    ->addObject($invoice->getOrder())
    ->save();

How to create all suborder invoice of an order....
like if my order id 110101 and if contain 5 sku (101,102,103,104,105)
for this i want to create suborder invoice of order in magento......

but when i apply the given  answer my amount is coming 0.


texts: How to show/hide a magento block in javascript

texts:
I want to show/hide a block on button click event.
I am using javascript for this.
Here is my code, but its not working

$(".btn-block").click(function() {
            if( $('.sidebar-main').css('display') == 'block' && $('.sidebar-additional').css('display') == 'block' ) {
            $(".sidebar-main").css('display', 'none');
            $(".sidebar-additional").css('display', 'none');

                $layout = $this->getLayout();
                $layout->unsetElement('category.products.list');

            }

The code which i have use to hide the block works fine outside script, but giving error when placed inside script. How to overcome this?


texts:
I am running Magento 2.2 on php7.1 and getting the following errors in my var/report and on my error log:

>     {"0":"Warning: SessionHandler::read(): The session id is too long or contains illegal characters, valid characters are a-z, A-Z, 0-9 and
> '-,' in \/home\/home1\/public_html\/vendor\/magent
>     o\/framework\/Session\/SaveHandler\/Native.php on line 22","1":"#0 [internal function]: Magento\\Framework\\App\\ErrorHandler->handler(2,
> 'SessionHandler:...', '\/


texts: Check for true or false with AddFieldToFilter method in Magento 2

texts:
I want to get the records from database where 'isDefault' returns True.

$project  = $this->modelProject->getCollection()
->addFieldToFilter(
'isDefault',
 ['eq' => true]
);

I tried like this but it doesn't work.


texts: SOLVED : Magento 2 : Any Specific Solution for "Front Controller Reached 100 Router Match Iterations" Error

texts:
I m using magento 2.1.3. Looking Specific Solution for "Front controller reached 100 router match iterations" Error...?
I checked some answers on stackexchange but not working for magento 2.1.3.

public function match(\Magento\Framework\App\RequestInterface $request) {

    $identifier = trim($request->getPathInfo(), '/');

    /** @var \Magento\Cms\Model\Page $page */
    $page = $this->_pageFactory->create();
    if (strpos($identifier, 'xyz.html') !== false) {
        $request->setModuleName('My_Module')->setControllerName('mymodule')->setActionName('index');
    }
    if (strpos($identifier, 'pqr.html') !== false) {
        $request->setModuleName('My_Module')->setControllerName('mymodule')->setActionName('testing');
    }
    $request->setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $identifier);
}


texts:
My problem is as follow, my script except ajax in working (no problem with giving value or console.log) but my ajax doesn't give me the result expected (remove hidden class and fill a drop list with an array in the controller), it just does ... well ... nothing.
Below my code :

  app/code/Vendor/ZipCode/view/frontend/web/js/ajax.js

define([
    'jquery',
    'underscore',
    'mage/template',
    'mage/url'
    //'jquery/list-filter'
], function (
    $,
    _,
    template,
    url
) {
    'use strict';
    $(document).ready(function() {
        var ajaxurl = url.build('zipcode/Controller/Zipcode');
        var param = 'ajax=1';
        $('#zip_btn').val("not clicked");
        $('#zip_btn').on('click', function () {
            console.log("Test click");
            $('#zip_btn').val("clicked");
            $.ajax({
                showLoader: true,
                url: ajaxurl,
                data: param,
                type: "POST",
                dataType: 'json'
            }).done(function (data) {
                $('#test').removeClass('hideme');
                var html = template('#test', {posts: data});
                $('#test').html(html);
            });
        });

    });
});

  app/code/Vendor/ZipCode/Controller/Zipcode/Index.php

<?php
namespace Vendor\ZipCode\Controller\Zipcode;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
class Index extends Action
{
    public function __construct(
        Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
    ) {

        $this->resultJsonFactory = $resultJsonFactory;
        parent::__construct($context);
    }

    public function execute()
    {
        $result = $this->resultJsonFactory->create();
        if ($this->getRequest()->isAjax())
        {
            $test=Array
            (
                'Firstname' => 'What is your firstname',
                'Email' => 'What is your emailId',
                'Lastname' => 'What is your lastname',
                'ZipCode' => 'Your Zip Code'
            );
            return $result->setData($test);
        }
    }
}

  app/code/Vendor/ZipCode/view/frontend/templates/ziptemplate.phtml

<input type='button' id='zip_btn' name='zip_btn'>
<style>
.hideme{display:none;}
</style>
<script type="text/x-magento-init">
        {
            "*": {
                "Vendor_ZipCode/js/ajax": {
                    "AjaxUrl": "<?php echo $block->getAjaxUrl(); ?>"
                }
            }
        }
</script>
<div id='test' class="hideme">
    <select>
      <% _.each(posts, function(text,value) { %>
         <option value="<%= value %>"><%= text %></option>
      <% }) %>
     </select>
</div>

  app/code/Vendor/Zicode/etc/frontend/routes.xml

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

My hypothesis is a problem with the url but I don't know what : I have 404 error for dev.mywebsite.com/zipcode/Controller/Zipcode in the network console.

I Don't know what is wrong in my code. if anybody has an idea they are welcome.
PS: In case of minus please let me know in a comment so that I can improve the post.


texts:
I want to get the Magento Store id using Store Name as Search.

I tried below code but failed.

$vendortitle = $vendortitle . " Store";
$name = Mage::getModel('core/store')->load($vendortitle)->getStoreId();
echo "<br>Store Name> ". $name;


texts: Magento2 handling of downloadable product filetypes

texts:
If I offer downloadable products on Magento2, some of them are corrupted after download, I cannot open them. It sais things like "this zip

Working fine: PDF, EPUB

Corrupted file after download: ZIP, MOBI.

I have not tried other filetypes. Any idea how to fix that?

Magento 2.3.5-p1, PHP7.3 on Ubuntu 20.04


texts: Call static block into another static block through template

texts:
I want to call a static block into another static block if the right conditions are met. I believe that my main problem is how to register the template in XML, as I never worked with it before.

First off I have a static block with the code: footer02-links.
Here I'm trying to call my template file. I realise that the code below is missing the XML tags.

{{block template="custom/employee-links-template.phtml"}}

Then in the themes template folder in /custom/employee-links-template.phtml I have my conditional statement.

<?php if (Mage::getSingleton('customer/session')->isLoggedIn() && Mage::getSingleton('customer/session')->getCustomerGroupId() == "4") :?>
    <?php echo $this->getChildHtml('employee-links') ?>
<?php endif;?>

So if the customer is logged in and part of customer group with ID 4, they will be shown the static block with the code: employee-links.
In this static block I simply have a link to a otherwise hidden category.

Employee Monthly Offers

So I guess my problem is how to register the block in the local.xml file, which I really have no idea of how to do. Furthermore there might be a better way to do what I'm trying to achieve?


texts: Get all attributes group of a specific resource model?

texts: How I can get all attributes group name of a specific eav resource model?


texts:
My difficulties with RWD continue.

The recurring theme is: An extension works fine on any theme but RWD.

The extension Product Inquiry (http://www.magentocommerce.com/magento-connect/product-inquiry-1.html) creates a form on the bottom of the product page.

It works fine on a clean install of CE 1.9 on any theme that is not RWD.

But it does not appear on the front end for RWD. I checked the template path hints, and the page doesn't call this extension.

Can anyone lend a hand?


texts: Single webstore with multiple fullfilment locations

texts:
I have a store franchise who want a single web presence for their stores but want the orders to be sent to a local fulfilment location for postage. There are multiple fulfilment locations across the country, and these can be identified by the delivery address. How can the Magento framework be utilised so that the agents doing fulfilment at each site can access a list of orders that they can action?

I have heard that multi-site is an option, but this appears to set up multiple websites via domain or subdirectory and is designed for different product sets, languages or locations. So it appears that this does not meet the brief.


texts: Changed PHP 5.6 to PHP 7 with Magento 1.9

texts:
I changed the version of PHP [5.6.30] to PHP [7.0.17]. But now Magento 1.9.2.1 returns the following error:

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

I tried the following solutions:

https://gist.github.com/MageMechanic/66449504110fbbd96214
http://afilina.com/magento-1-9-on-php7/

But the error is still there.


texts: Magento 2.3: Add Attachment with email (Magento 2.3 use zendframework 2)

texts:
I am working on a module in which I need to attach an attachment with sales email. However, Magento 2.3 use zendframework2 so email attachment is not the same as zendframework1 (in Magento 2.2).

Can anyone help me to achieve the same task? How to implement attachment functions in Magento 2.3

I have searched in google and read several questions but I didn't find the solution.


texts:
how can I remove the telephone number from everywhere so that it doesn't appear by filling an address and from everything else.

Thanks!


texts: Magento 2 Sizes showing in a wrong order for configurable products

texts:
I have just upgraded my Magento to 2.2.5 via composer.

I realized that the Sizes from the dropdown on product page is displaying in a wrong order, see screenshot.

But in Admin, under product attributes, the sizes are listed in a right order.

What went wrong?


texts: What is the right way for using git and composer for modules in Magento 2?

texts:
Each of my module has a repository. I have dependency for my modules in composer.json in project folder.
For deployment I need:

in production: git clone, composer install.
in develop: git clone, composer install and prepare my modules to develop.

After composer install magento create folders for my modules in /vendor and in /app/code/. Also developers recommend to use /app/code/ for developing instead /vendor.

But how I can add git tracking for modules?
What do with a modules if need to execute composer install?


texts: How to get rules for particular product in magento2

texts:
I need to get the eligible cart rule for a product(Before add to cart) in magento2?

public function getOfferRuleId($productId)
    {
        //Get the rule id for product and list page offer notifier ajax call
        $ruleId = '';
        $customRuleIds = [];
        $product = $this->_productFactory->create();
        $rules = $this->ruleCollection->create();
        $product->setProductId($productId);
        $customRules = $this->getOfferRules();
        foreach ($customRules as $rule) {
            $customRuleIds[] = $rule->getId();
        }
        /** @var \Magento\SalesRule\Model\Rule $rule */
        foreach ($rules as $rule) {
            try {
                if ($rule->getActions()->validate($product)) {
                    if (in_array($rule->getId(), $customRuleIds)) {
                        return $rule->getId();
                    }
                }
            } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
                continue;
            }
        }
    }

I got the answer...its taking whole cart rules in foreach... so it takes times to load...How to solve this


texts: Magento2 : add custom module to config.php is not working

texts:
I am creating front-end module i.e. (abc/helloworld) and adding module in app/etc/config.php

Screenshot :

after that run following command in terminal

  bin/magento setup:upgrade

but the custom module  is not showing in module listing.

Screenshot :

Here is the module.xml file

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <module name="Abc_HelloWorld" setup_version="2.0.0">
   </module>
 </config>

& registrarion.php

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

Thanks in advance.


texts: Two Custom Options combined: Tier Price doesn't work

texts:
I'm setting up products and tier prices in Magento, but I've noticed that a in Simple Product with Custom Options (example: blue t-shirt, red t-shirt), the Tier Price won't work if we combine them to reach the quantity.

Tier Prices seem to work only when the quantity is reached from one product variation, but not a combination of two.

I've read several answers on Stack Overflow and the Magento forums, and they recommend to create configurable products.
However this can be pretty hard if a store has lots of products, or lots of variations.

Do you know some workaround to get the Tier Price apply - with a combination of variations?


texts: Magento 2.3.4 multi-store customer session transfer

texts:
I have installed Fresh Magento 2.3.4, and set multiple store with websites on sub-domains.
I want customers to signin in one store and then automatically signedin on another store on sub-domain.
I have set cookie domain to like example.com (where sub-domain is sub.example.com). It isn't working. Plus also did set cookie-domain to ".example.com", it then makes customer and admin signin pages reload to again signin page. Anyone has idea about it?


texts: Cart items not shows in cart on using Magento 2 REST API

texts:
I am using Magento 2 REST API for add to cart item in guest but after checking on cart page it's just empty.
Why it is empty.
http://127.0.0.1/mag/rest/V1/guest-carts/Hkt4RC38lJX1rAalFoPlsk2suRwb8Fnp/items

when i check the response of that call it gives me
[
{
    "item_id": 41,
    "sku": "test",
    "qty": 1,
    "name": "test",
    "price": 100,
    "product_type": "simple",
    "quote_id": "Hkt4RC38lJX1rAalFoPlsk2suRwb8Fnp"
}
]

that response means the product is in cart but doesn't show on frontend.
Any idea regarding that.
Any help is appriciated.


texts: Magento2 new customer assignment to group for Valid VAT ID doesn't seem to work

texts:
As I understood, enabling in 'Stores > Configuration > Customer configuration > Create new account options' the assignment to a customer group according to valid/invalid Vat ID should suffice to the proper customer handling on registration.

As for now, it is not working, so I am forced to do that manually for each new customer.
Am I missing something?


texts:
Currently we use this code to display the price of products on our homepage. But this does load the price excluding tax.

How can I edit the code that the price will be including tax?

<?php
$first_amount_before_split = substr($_product->getPrice(), 0, -2);
$my_array = explode(".", $first_amount_before_split);
?>
<a href="<?php echo $_product->getProductUrl() ?>">

            <?php echo $my_array[0]; ?>,
            <?php echo $my_array[1]; ?>

EDIT:

The price is displaying including tax with this code.
But it skips the last 0's. So $49,90 becomes $49,9
How can I display 2 decimals

<?php $first_amount_before_split = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice());
$my_array = explode(".", $first_amount_before_split); ?>

Thanks.


texts: Magento 2.3 - Add product to cart issue with store view

texts:
I have two stores with id 1 and 2. Am trying to add product programmatically using below code
$params = array(
            'form_key' => $this->_formkey->getFormKey(),
            'product' => $productId, //product Id
            'qty'   => $qty //quantity of product
            );
        $this->_cart->addProduct($product_coll, $params);
        $this->_cart->save();

Checkout flow works well for the store 1.
But for store 2, when I add any product to cart using above script. It is adding it to the store 1. I found out this when I looked into the magento quote table . Even though am in store 2, when i add product to cart the quote tables shows it is assigned to store 1.
So the order was also place in store 1 instead of store 2.

Can anyone please help me with this ASAP?


texts: Customer logged out when clicking 'Go to checkout' from basket

texts:
Customers are being logged out when they click 'Go to checkout' before the basket page has fully loaded.

It also looks like guests are having their basket emptied when they follow the same process.

We're running Magento 2.2.5 and using Mageplaza_Osc 2.5.0.


texts: In shipping addresses list step, of checkout. How to not show a specific shipping address in the list. Magento version 2.3.3

texts: The list is of shipping addresses from the address book. But, how can I skip one specific address to be shown in the list. Any help would be much appreciated.


texts: PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Framework\\Data\\Collection\\AbstractDb::setConnection() must implement interface

texts:
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to
  Magento\Framework\Data\Collection\AbstractDb::setConnection() must
  implement interface Magento\Framework\DB\Adapter\AdapterInterface,
  boolean given, called in
  /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php
  on line 124 and defined in
  /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php:183\nStack
  trace:\n#0
  /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Model/ResourceModel/Db/Collection/AbstractCollection.php(124):
  Magento\Framework\Data\Collection\AbstractDb->setConnection(false)\n#1
  /var/www/stg.bulk.ls1/public_html/app/code/FishPig/WordPress/Model/ResourceModel/Collection/AbstractCollection.php(24):
  Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection->__construct(Object(Magento\Framework\Data\Collection\EntityFactory),
  Object(Magento\Framework\Logger\Monolog),
  Object(Magento\Framework\Data\Collection\Db\FetchStrategy\Query),
  Object(Mag in
  /var/www/stg.bulk.ls1/public_html/vendor/magento/framework/Data/Collection/AbstractDb.php
  on line 183


texts:
Implementing Magento's Authorize.net DPM solution I noticed that it isn't a 'true' DPM implementation.

A true DPM implementation submits the credit card collection form directly to Authorize.net (via https://secure.authorize.net/gateway/transact.dll). The website is notified via the redirect URL that the transaction is completed then goes through the order completion process.

Magento submits the credit card information to itself, creates and submits the transaction to Authorize.net, deals with the response -- all on the Magento server.

This means that Magento 'handles' credit card information, which defeats the primary advantage of DPM -- to keep the card number off the server by directly submitting it to Authorize.net.

MY QUESTIONS:

Is there a a reason Magento took this approach?
Isn't this approach considered less secure then submitting directly to Authorize.net?
Is there an extension that implements DPM they way it was intended (direct post to auth.net, close order view relay url response)
If not, is there a reason why there is no extension that implements DPM the way it was intended (perhaps there is no reliable way to deal with the relay URL response within Magento)


texts: Why does Magento 2 download "blank.html" file

texts:
Every time I go to Products > Categories I get a "blank.html" file downloaded to my local machine. Then, as I setup categories and click the Save Category button another "blank.html" file downloads to my local machine.

Here is a screen shot of what happens when I go to the Categories section of the backend (notice all the download "blank.html" files in the browser status bar) --> https://drive.google.com/open?id=0Bytqhoir_Tt5dFYwcUxGeExGUHM

Here is a screen shot of my downloads folder on my local machine --> https://drive.google.com/open?id=0Bytqhoir_Tt5SDU5b3FjZVdmYkE

How to shut that feature off?


texts: I am following this article. I would like to retrieve all Orders from Database. Can anyone say how can I do that??


texts:
In Magento 2 I want to call the grandchildren of the parent category.

CURRENT CODE

<?php
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$request = $objectManager->get('Magento\Framework\App\Action\Context')->getRequest();
//echo $request->getFullActionName();
if($request->getFullActionName() === "catalog_category_view"){
?>

<?php
 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
 /*echo $category->getName();*/
 $SubCategories = $category->getChildrenCategories();
?>

Can anyone please suggest an update to the above to call the grandchildren rather than children?


texts: Product's custom options are not appearing

texts:
IF I'm adding a product manually in Magento, it's custom options are appearing on Product page.

If I'm importing products using Magmi, custom options are appearing in Magento admin and has options is set to 1 on product's view.phtml but custom options are not appearing.

if ($this->hasOptions()) {
echo 'inside loop';
echo $this->getChildChildHtml('container2', '', true, true);
}

I'm not getting any html content from echo $this->getChildChildHtml('container2', '', true, true); for products which is imported through magmi.

I see in catalog_product_entity_varchar table with records with value container2 for products which are created using Admin panel but this value is container1 if they are imported using Magmi. What might be the issue?


texts: How to send 'alert' from controller in json?

texts:
I am currently trying to stop redirecting to product view page if someone forgets to select configure option and click on 'add to cart', instead of that it will just send popup message or alert.

Here is the Controller:

File Name: Add.php

File Path:

  Magento\Checkout\Controller\Cart\Add

protected function goBack($backUrl = null, $product = null)
{
    $result = [];

    if ($backUrl || $backUrl = $this->getBackUrl()) {
        $backUrlas = "test";
        $result['backUrl'] = $backUrlas;
    } else {
           //some code
      }

    $this->getResponse()->representJson(
    $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)->jsonEncode($result)
    );
}

as you can see if I pass value "test" it will redirect to ../test instead of that ../product.

I am not good in json, any help would be appreciated!


texts:
I want to create a shipping method on magento 1.9 that shows some options when the customer select this shipping method.
Its like credit card payment, when you select this option you will have the form to insert your card data.
I want to create a pickup service, when you choose the shipping method for pickup it will show the available pickup points for your address.
How can i do this?


texts: Magento 2.3.2 How to redirect customer on login page if he hit custom customer dashboard link in browser without login?

texts:
I have created customer dashboard custom tab and the path is 'inquiry/customer/' which is working fine.

Issue is that If the user hit the direct that url in the browser without login in his account then user is getting an error.

I want to redirect the user to login page if he is not logged in.

How can I do?

My Code:

  customer_account.xml:

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-inquiry-link">
                <arguments>
                    <argument name="label" xsi:type="string" translate="true">My Question</argument>
                    <argument name="path" xsi:type="string">inquiry/customer</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

  Controller:

<?php
namespace  Vendor\Inquiry\Controller\Customer;

class Index extends \Magento\Framework\App\Action\Action
{
   /**
  * Index Action*
  * @return void
  */
  public function execute()
  {
    $this->_view->loadLayout();
    $this->_view->renderLayout();
  }
}


texts: How big should the admin_user password column be?

texts:
I have been having an issue where the self::HASH_SALT_LENGTH constant is 32 in /magento/app/code/core/Mage/Admin/Model/User.php.

So the hashed password is: 65 characters long.

Yet in the database that column is set as varchar(40) so it is always failing.

How big should that column be?


texts: Undefined variable: /vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php while save configurable product in magento2

texts:
When I save configurable product with big length sku then error showing

  "0":"Notice: Undefined variable: product in
  /MASKED_DIR/2018-08-06_12-56-07/htdocs/vendor/magento/module-catalog/Controller/Adminhtml/Product/Save.php
  on line 156"


texts: What does output="toHtml" layout.xml mean ? - Magento 1.9

texts:
I know that when we add output="toHtml" to some block, he displays it at the bottom of the page outside the </html> but i don't know why, what is his utility and in which case it can be used ?

for exemple:

<company_index_index>
    <block type="company/myblockclass" output="toHtml"/> //What's going to happen here
</company_index_index>


texts: Shopping cart promotion. Total quantity of different SKU condition

texts:
I want to create a shopping cart promotion but can not get it to work.
What I need is that for a subset of products, when the total quantity in the cart is higher than 50, it should give a discount. I tried multiple promotions but somehow it always looks at the item quantity and not the total of all products.

Example of what is not working


texts: Magento2 Recently viewed widget not working

texts:
I am working on a new Magento2 website and need to implement the recently viewed section on a page.

I tried using Magento's default widget and double checked all configurations but its output is not showing on the page.

I have created a container in My theme on Home page and assigning a widget in the same container. I can assign static blocks and output shows fine but not recently viewed widget.


texts: error after uninstall manthan markeplace extension

texts: Error after uninstall manthan marketplace,Error occur when i tring to add product or edit existing product


texts: Configurable product tax issues on asscoaiated products

texts:
We have some configurable products that we need to apply tax to but only on the chosen associated product.  For example we have a price of £89.95 on the configurable product itself but the associated products have different prices (say £89.9 and £29.95).  If the £29.95 associated product is chosen then tax should only be calculated on the £29.95 but for some reason it is being calculated on the headline configurable product price of £89.95 which obviously gives an incorrect tax amount being charged.

Has anyone else come across this and if so is there anyway of getting Magento to apply tax to only the associated product price?


texts: PayPal seller email has changed in the admin

texts:
I believe a site I've been working on has been hacked.

Here's what I know:

PayPal seller address has changed to a random address
This is not a PayPal bug
Going through the logs - this wasn't changed through the Magento admin
No one has access to the AWS EC2 instance besides me
What is being changed is the row with path paypal/general/business_account under the core_config_data table
Chances of MySQL injection seems fairly low. I've grepped through the nginx and Varnish logs for 'select' - should I be grepping for anything in particular?

I would appreciate advice on the next steps to take as an answer.


texts: Magento 2 : Symbolic links to pub/static files

texts:
A while ago when I was working on a project with Magento 2, I noticed that my CSS and JavaScript files in pub/static of my theme were actually symbolic links to the actual files. This was also when I ran a setup:static-content:deploy action from the shell.

However, I recently migrated to a new system and checked out the code and the database of the project, but now when I deploy my static content, they are copies rather than Symbolic links.

Is something changed? Or am I missing some configuration setting here? It's not very productive to have to re-compile the static content every time I make a change to the JS or CSS.

I'm using Magento 2.0.6


texts: How to check existing options for an attribute in database from script in magento 2

texts: I need to import color options to a Color Attribute via script. I need to to check existing options which is already exists in database and update new options via script. (I am using phpMyAdmin)


texts: magento add product with selectable dropddown field

texts:
I want user selectable drop down attribute .

below is my case
i want to create product say shirt of different size s,m,l,xl. where user can select any of size and add it to cart .

As price of all shirts will be same so i do not want to create configurable project , then how can i do it please guide me i checked magento doc there does not seem any option to do that

there is custom option in add product form where it can be done but issue i that i will be using that product in bundled project also as far as i know magento does not allows products with custom option in bundled products.

how can i do it please guide me way for it


texts: Insert new block for installment information in catalog_product_view

texts:
I have two situations that I cant solve and need help.

I'm trying to show installments information in my product page, so I've created a new module, with a block, a helper (to get module configs) and a simple template file, so I link the template with a block throuh the catalog_product_view.xml layout file:

<?xml version="1.0"?>
<page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
        <referenceContainer name="product.info.price">
            <block class="Vendor\Module\Block\Parcelamento" after="product.price.final"
                name="product.info.price.parcelamento.block"
                template="Vendor_Module::list.phtml">
            </block>
        </referenceContainer>
    </referenceContainer>
</body>

The first situation is: See the after property, the block should be showed bellow the price info, but it is showed on top, see the arrows in my print:

The second situation is: In my print, see de price value as zero (red marked), this occurs because my Block PHP needs my product instance, and how can I pass the product object to my block using layout files? Is that possible? I've read somethings about <arguments> tags inside a <block>, but I think it is just for simple arguments, like strings.

Any help is apreciated.

Thanks in advance.


texts: Get custom variable in phtml file - Magento 2 theme Luma | HELP

texts:
I created this custom variable

Path: Stores -> Attributes (Product)

Code Variable: time_di_consegna_modulo

Now I want to print the variable inside the product page.

Path: public_html / vendor / magento / module-catalog / view / frontend / templates / product / view / attribute.phtml

I tried in every way but I can not print the value of the variable.
I managed to print only the label.

How can I do?

This is code page with me code for print label variables

    <?php
/**
 * Copyright © 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/**
 * Product view template
 *
 * @see \Magento\Catalog\Block\Product\View\Description
 */
?>
<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
$_call = $block->getAtCall();
$_code = $block->getAtCode();
$_className = $block->getCssClass();
$_attributeLabel = $block->getAtLabel();
$_attributeType = $block->getAtType();
$_attributeAddAttribute = $block->getAddAttribute();

if ($_attributeLabel && $_attributeLabel == 'default') {
    $_attributeLabel = $_product->getResource()->getAttribute($_code)->getFrontendLabel();
}
if ($_attributeType && $_attributeType == 'text') {
    $_attributeValue = ($_helper->productAttribute($_product, $_product->$_call(), $_code)) ? $_product->getAttributeText($_code) : '';
} else {
    $_attributeValue = $_helper->productAttribute($_product, $_product->$_call(), $_code);
}
?>

<?php if ($_attributeValue): ?>
<div class="product attribute <?php /* @escapeNotVerified */ echo $_className?>">
    <?php if ($_attributeLabel != 'none'): ?><?php /* @escapeNotVerified */ echo $_attributeLabel?><?php endif; ?>
    <div class="value" <?php /* @escapeNotVerified */ echo $_attributeAddAttribute;?>><?php /* @escapeNotVerified */ echo $_attributeValue; ?>

<?php endif; ?>

<?php
// Stampa varibile giorni per la spedizione
// tempi_di_consegna_modulo
$tempiconsegnamod ="tempi_di_consegna_modulo";
$_test = $_product->getResource()->getAttribute($tempiconsegnamod)->getFrontendLabel();
echo $_test;
?>

Please help me


texts: Javascript actions not working on category page

texts:
I deleted : -

jquery-1.7.2.min.js

and

jquery-noconflict.js

From the mangeto installation folder js/ias/

As I saw there was an error / conflict being read when using Inspect Element on the category page. Maybe due to using AdBlockPlus. Very stupid of me anyway.

After I put the files back all javascript actions have ceased to operate on the category page however they still work elsewhere on the website.

I have tried flushing the cache and other things but functionality on the category page has not returned.

What can I do?


texts: 1.8.1 Error when trying to edit products

texts:
I am getting the horrible

  There has been an error processing your request

when I go to Catalog\Manage Products in the backend.

I'm using Magento ver 1.8.1.0.

This is what I get in the Error Log:

    **a:5:{i:0;s:88:"Source model "s2a/entity_attribute_source_measure" not found for attribute "s2a_measure"";i:1;s:3422:"#0 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(43353): Mage::exception('Mage_Eav', 'Source model "s...')
#1 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/Mage_Adminhtml_Block_Widget_Form.php(201): Mage_Eav_Model_Entity_Attribute_Abstract->getSource()
#2 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes.php(70): Mage_Adminhtml_Block_Widget_Form->_setFieldset(Array, Object(Varien_Data_Form_Element_Fieldset), Array)
#3 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/Mage_Adminhtml_Block_Widget_Form.php(144): Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes->_prepareForm()
#4 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(2591): Mage_Adminhtml_Block_Widget_Form->_beforeToHtml()
#5 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs.php(79): Mage_Core_Block_Abstract->toHtml()
#6 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(1966): Mage_Adminhtml_Block_Catalog_Product_Edit_Tabs->_prepareLayout()
#7 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(27705): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#8 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(27721): Mage_Core_Model_Layout->createBlock('adminhtml/catal...', 'product_tabs')
#9 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(27488): Mage_Core_Model_Layout->addBlock('adminhtml/catal...', 'product_tabs')
#10 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(27454): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#11 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(27459): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#12 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(13895): Mage_Core_Model_Layout->generateBlocks()
#13 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(13820): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#14 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/Mage_Adminhtml_Controller_Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(Array, true, true)
#15 /home2/nimbusxv/public_html/cdpupstienda.com.mx/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php(250): Mage_Adminhtml_Controller_Action->loadLayout(Array)
#16 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(13969): Mage_Adminhtml_Catalog_ProductController->editAction()
#17 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(18331): Mage_Core_Controller_Varien_Action->dispatch('edit')
#18 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(17865): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home2/nimbusxv/public_html/cdpupstienda.com.mx/includes/src/__default.php(20465): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home2/nimbusxv/public_html/cdpupstienda.com.mx/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home2/nimbusxv/public_html/cdpupstienda.com.mx/index.php(87): Mage::run('', 'store')
#22 {main}";s:3:"url";s:81:"/index.php/admin/catalog_product/edit/id/26/key/2519e6f549ccb50fe82ead35ec124a56/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}**

Any help Would be appreciated.

Everything seems to be in order, /TMP route, cache, don't know what it could be.


texts:
I'm using the code below to add an SKU field to the Orders page in the Magento Backend.

For the most part, the code works fine. SKU's are displayed in a column in the Orders page.

However, I've experienced an issue when searching orders using Magento's backend filter. When inputting a date and searching, the admin is redirected to the dashboard, and trying to access 'Sales > Orders' gives the following error:

  There has been an error processing your request Exception printing is
  disabled by default for security reasons. Error log record number:
  1404938437855

Code I'm using in grid.php (in app/code/core/mage/adminhtml/block/sales/order/grid.php  - is this the right place for this code?)

public function callback_skus($value, $row, $column, $isExport) {
    $increment_id = $value;
    $_order = Mage::getModel('sales/order')->loadByIncrementId($increment_id);
    $_items = $_order->getAllItems();
    $skus="";
    foreach ($_items as $item) {
        $skus .= $item->getSku()."<br/>";
    }
    return $skus;
}

public function filter_skus($collection, $column) {
    if (!$value = $column->getFilter()->getValue()) {
        return $this;
    }

    $this->getCollection()->getSelect()->where(
        "sku like ?"
        , "%$value%");

    return $this;

}

and then

protected function _prepareCollection()
{

    $collection = Mage::getResourceModel($this->_getCollectionClass())
        ->join(
            'sales/order_item',
            '`sales/order_item`.order_id=`main_table`.entity_id',
            array(
                'skus'  => new Zend_Db_Expr('group_concat(`sales/order_item`.sku SEPARATOR ",")'),
            )
        );
    $collection->getSelect()->group('entity_id');
    $this->setCollection($collection);
    return parent::_prepareCollection();
}

and finally

    $this->addColumn('sku', array(
             'header' => Mage::helper('sales')->__('SKU'),
             'index' => 'increment_id',
             'frame_callback' => array($this, 'callback_skus'),
             'filter_condition_callback' => array($this, 'filter_skus'),
    ));

EDIT:

I also tried using this code:

public function filter_skus($collection, $column) {
    if (!$value = $column->getFilter()->getValue()) {
        return $this;
    }
    $this->getCollection()->getSelect()->join( array('table_alias'=>'sales_flat_order_item'), 'main_table.entity_id = table_alias.order_id',array('table_alias.sku'));
    $this->getCollection()->getSelect()->where("sku like ?", "%$value%");

    return $this;
}


texts: my custom admin .phtml file not showing?

texts:
I created adminhtml controller under practice->test->controllers->adminhtml->indexController.php it's working fine. But I created one menu in back-end and it's showing when I click on menu i created action to redirect my custom afficher.phtml, it's not redirecting given 401 error.

can anyone tell me where I went wrong?

my code is

practice->test->controllers->adminhtml->indexController.php

<?php

class Practice_Test_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
        //echo 'admin test';
    }
}

practice->test->etc->config.xml

<admin>
        <routers>
            <test>
                <use>admin</use>
                <args>
                    <module>Practice_Test_Adminhtml</module>
                    <frontName>practiceadmin</frontName>
                </args>
            </test>
        </routers>
    </admin>
    <adminhtml>
        <layout>
            <updates>
                <test>
                    <file>test.xml</file>
                </test>
            </updates>
        </layout>
        <menu>
            <test translate="title" module="adminhtml">
                <title>My Plugin</title>
                <sort_order>100</sort_order>
                <children>
                    <set_time>
                        <title>Address Book</title>
                        <action>practiceadmin/adminhtml_index</action>
                    </set_time>
                </children>
            </test>
        </menu>
    </adminhtml>

adminhtml->default->Practice->layout->test.xml

<?xml version="1.0"?>
<layout version="0.1.0">
    <test_adminhtml_index_index>
        <reference name="content">
            <block name="template1" type="test/template" template="test/afficher.phtml"></block>
        </reference>
    </test_adminhtml_index_index>
</layout>

adminhtml->default->Practice->test->afficher.phtml

<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>"  />

<Div>
    Admin Html
</Div>

thanks in advance.


texts: Magento 1.9.2.1 problem with onestepcheckout in custom theme

texts:
I've got a problem. I'm designing a theme on the basis of CoonCook theme.
The problem is that when I go to the onestep checkout the accordion won't load. only the HTML is shown and all steps are displayed. So I can't order anything.

Help me please


texts: Extending a community extension not picking up my class

texts:
So I am trying to override an extension that we installed from MagentoConnect. Its just a tiny little nuance but its important to our plans. So this is what I have so far.

Blizzardlabs/Block/Affiliateplusext.php

class Blizzardlabs_Affiliateplusext_Block_Affiliateplusext extends Magestore_Affiliatepluscoupon_Block_Affiliatepluscoupon {

  public function getListProgram() {die();
    $listProgram = array();
    if (floatval($this->_getConfigHelper()->getGeneralConfig('discount')) >= 0) {
      $listProgram['default'] = new Varien_Object(array(
          'name' => $this->__('Affiliate Program'),
          'commission_type' => $this->_getConfigHelper()->getGeneralConfig('commission_type'),
          'commission' => $this->_getConfigHelper()->getGeneralConfig('commission'),
          'discount_type' => $this->_getConfigHelper()->getGeneralConfig('discount_type'),
          'discount' => $this->_getConfigHelper()->getGeneralConfig('discount'),
          'coupon_code' => $this->getAccount()->getCouponCode()
      ));
    }
    if ($this->isMultiProgram()) {
      $collection = Mage::getResourceModel('affiliateplusprogram/program_collection')
              ->setStoreId(Mage::app()->getStore()->getId());
      $programCoupons = Mage::registry('program_coupon_codes');
      foreach ($collection as $item) {
        if ($item->getStatus() && isset($programCoupons[$item->getId()])) {
          $item->setCouponCode($programCoupons[$item->getId()]);
          $listProgram[$item->getId()] = $item;
        }
      }
    }
    return $listProgram;
  }

}

Here is my configuration

Blizzardlabs/etc/config.xml

<config>
  <modules>
    <Blizzardlabs_Affiliateplusext>
      <version>0.1.0</version>
    </Blizzardlabs_Affiliateplusext>
  </modules>
  <global>
    <blocks>
      <affiliatepluscoupon>
        <rewrite>
          <coupon>Blizzardlabs_Affiliateplusext_Block_Affiliateplusext</coupon>
        </rewrite>
      </affiliatepluscoupon>
    </blocks>
  </global>
</config>

Here is my module declaration:

app/etc/modules/Blizzardlabs_Affiliateplusext.xml

<config>
    <modules>
        <Blizzardlabs_Affiliateplusext>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
              <Magestore_Affiliatepluscoupon />
            </depends>
        </Blizzardlabs_Affiliateplusext>
    </modules>
</config>

So, I am calling a  on the original module in the module declaration. I THINK im overwriting it correctly in my config and im also extending the original class in my class. Yet it refuses to pick it up. I have a feeling my issue is in my configuration. I think I am overriding it wrong there but I am not sure how. This is my first time so I apologize if its glaringly obvious.


texts: Which runs first, install-upgrade script or data-upgrade script?

texts:
I'm upgrading a module to version lets say 0.1.3. Say I have these files:

data/mymodule_setup/data-upgrade-0.1.2-0.1.3.php
sql/mymodule_setup/upgrade-0.1.2-0.1.3.php

Will the sql upgrade script run first? The data upgrade script requires a column that will be added in the other script, so if it's not there yet it will fail.


texts: Categories lock up and will not accept additional products

texts:
This is an ongoing problem. I am adding new products to a category using the Admin Panel and suddenly it stops updating with the new products. It has happened with as few as 6 products in the category and as many as 600.
My only solution has been to delete the category and rebuild it.

Any thoughts would be appreciated.


texts: AWS ElasticSearch configure in Magento 2

texts:
Is anyone tried using AWS ElasticSearch in Magento 2.3.4.

When i tried to configure it in Magento, connection failed.

AWS ElasticSearch give the https endpoint, does Magento support HTTPS for elastic search?

Also, anyone tried ElasticSuite?

Thanks.


texts: Error when rewriting classes: call to member function on non-object

texts:
Pre

I'm trying to do a very basic rewrite just to see if I can make it work. Unfortunately, no matter what class I rewrite I get fatal errors somewhere in magento.

This is my code for trying to rewrite the class Mage_Catalog_Model_Product. There are fatal errors for this in the admin panel under

Catalog/Manage Products:

  Fatal error: Call to a member function getResource() on a non-object in
  /home/domain/public_html/magento/includes/src/Mage_Adminhtml_Block_Catalog_Product_Grid.php
  on line 179

and Catalog/Manage Categories:

Fatal error: Call to a member function getCollection() on a non-object in /home/domain/public_html/magento/includes/src/Mage_Adminhtml_Block_Catalog_Category_Tab_Product.php on line 76

My code

app/etc/modules/Test_Catalog.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Test_Catalog>
            <active>true</active>
            <codePool>community</codePool>
        </Test_Catalog>
    </modules>
</config>

--

app/code/community/Test/Catalog/etc/config.xml

<config>
    <global>
        <models>
            <catalog>
                <rewrite>
                    <product>Test_Catalog_Model_Product</product>
                </rewrite>
            </catalog>
        </models>
    </global>
</config>

--

app/code/community/Test/Catalog/Model/Product.php

<?php
class Test_Catalog_Model_Product extends Mage_Catalog_Model_Product {

}

My thoughts

These errors appear to go away when I delete or comment out the entire Test_Catalog.xml file. Deleting or commenting out the Product.php file keeps these errors. It's the combination of the initiator xml file in app/etc/modules/ and the config.xml having a rewrite in it. See the Edit heading.

I've tried placing a require statement above the class declaration in Product.php but these errors remained.

I originally had a function in Product.php but I took it out and the errors stayed the same.

I can add more files like the ones with the errors if anyone wants, but those are unaltered from installation.

Edit

Following this tutorial: http://code.tutsplus.com/tutorials/understand-overriding-in-magento-models--cms-23354

I now get this error under Catalog/Manage Categories

Fatal error: Call to a member function setStoreId() on a non-object in /home/domain/public_html/magento/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php on line 52

The problem is apparently something to do with the permissions(?) on my domain. I've already set mostly every permission to 755. Does anyone have an idea what specific file permissions should be changed, if this is the problem?

Through some playing around I've narrowed the problem down to specifically being the product node in config.xml. Here's an example of what causes the error and what doesn't.

<!-- This still causes the error -->
<config>
    <global>
        <models>
            <catalog>
                <rewrite>
                    <product>This_Is_Not_A_File_Path</product>
                </rewrite>
            </catalog>
        </models>
    </global>
</config>

<!-- No error -->
<config>
    <global>
        <models>
            <catalog>
               <rewrite>
                   <notproduct>Test_Cat_Model_Product</notproduct>
               </rewrite>
            </catalog>
        </models>
    </global>
</config>

Final Note

Maybe something of interest is that my Magento files don't have a local folder under code - Just community and core. Could this be caused by an incomplete installation, or is this correct for Magento version 1.9.2.4?


texts: Magento 2 Cart Pricing Rule not getting applied when customer is already login and i am making change in rule from magento admin. In order to apply rule i have to logged out customer first, then login again. After this discount start getting applied. I am not sure about it. Magento version is 2.1.9 and it is in development mode.


texts: Adding product to wishlist without redirect to wishlist page stay on same page

texts:
I'm trying to add product to wishlist without redirecting in to wishlist page i need to stay it on same page here is my code that how i tried

app/code/local/Wish/Mwishlist/etc

<?xml version="1.0"?>
<config>
    <modules>
        <Wish_Mwishlist>
            <version>0.1.0</version>
        </Wish_Mwishlist>
    </modules>

    <frontend>
        <routers>
            <wishlist>
                <args>
                    <modules>
                        <Wish_Mwishlist before="Mage_Wishlist">Wish_Mwishlist</Wish_Mwishlist>
                    </modules>
                </args>
            </wishlist>
        </routers>
    </frontend>
</config>

app/code/local/Wish/Mwishlist/controllers/Wishlist/IndexController.php

  <?php
require_once Mage::getModuleDir('controllers', 'Mage_Wishlist') . DS . 'IndexController.php';
class Wish_Mwishlist_IndexController extends Mage_Wishlist_IndexController
{
/**
 * Add the item to wish list
 *
 * @return Mage_Core_Controller_Varien_Action|void
 */
protected function _addItemToWishList()
{
    Mage::log("control get",null,"wish.log");
    $wishlist = $this->_getWishlist();
    if (!$wishlist) {
        return $this->norouteAction();
    }

    $session = Mage::getSingleton('customer/session');

    $productId = (int)$this->getRequest()->getParam('product');
    if (!$productId) {
        $this->_redirect('*/');
        return;
    }

    $product = Mage::getModel('catalog/product')->load($productId);
    if (!$product->getId() || !$product->isVisibleInCatalog()) {
        $session->addError($this->__('Cannot specify product.'));
        $this->_redirect('*/');
        return;
    }

    try {
        $requestParams = $this->getRequest()->getParams();
        if ($session->getBeforeWishlistRequest()) {
            $requestParams = $session->getBeforeWishlistRequest();
            $session->unsBeforeWishlistRequest();
        }
        $buyRequest = new Varien_Object($requestParams);

        $result = $wishlist->addNewItem($product, $buyRequest);
        if (is_string($result)) {
            Mage::throwException($result);
        }
        $wishlist->save();

        Mage::dispatchEvent(
            'wishlist_add_product',
            array(
                'wishlist' => $wishlist,
                'product' => $product,
                'item' => $result
            )
        );

        $referer = $session->getBeforeWishlistUrl();
        if ($referer) {
            $session->setBeforeWishlistUrl(null);
        } else {
            $referer = $this->_getRefererUrl();
        }

        /**
         *  Set referer to avoid referring to the compare popup window
         */
        $session->setAddActionReferer($referer);

        Mage::helper('wishlist')->calculate();

        $message = $this->__('%1$s has been added to your wishlist. Click here to continue shopping.',
            $product->getName(), Mage::helper('core')->escapeUrl($referer));
        $session->addSuccess($message);
    } catch (Mage_Core_Exception $e) {
        $session->addError($this->__('An error occurred while adding item to wishlist: %s', $e->getMessage()));
    }
    catch (Exception $e) {
        $session->addError($this->__('An error occurred while adding item to wishlist.'));
    }

    //$this->_redirect('*', array('wishlist_id' => $wishlist->getId()));
    $this->_redirectReferer();
}

}

But this code not working for me can anybody help me to do this?

Here is the code how i call add to wishlist url in catalog page

<a  href="<?php echo $this->helper('wishlist')->getAddUrl($_product) ?>" title="Add to Wishlist">


texts: Round price before apply any catalog price rules to it

texts:
I've been struggling with a rounding issue lately.
We have a product at 40.65. With a tax of 23% it gets up to 49.99 and rounding that up it goes to 50.

Now i want to apply some price rules. A rule of 10% discount here.

Problem is how Magento applies to discounts.

Instead of rounding up the price to 50 and then do the discount ( 50 - 50*10% = 45 ) what it does from what I understood is it applies the discount to the non-rounded price.

To the 49.99 and it calculates the discount as 4.99.
After that, it applies that discount to the product getting it to 45.01 instead of 45.

I want to know if there is any way to access the part where those price rules are applied and round up the price before any catalog price rules are applied to it.

Thank you


texts: Adding CMS Blocks to a Products, not programatically - Magento 2

texts:
I would like to add additional information to specified products, we would like to use the block as a template where we would just need to add this block to the product content so it would appear without problem in the products we desire.

This is the block:

Here is the product content:

But it doesn't show up after the text we already have:

We would like this to not be programatically, so someone who doesn't have acces to the code, only to the magento website can manage  to make all the changes needed.


texts: Magento 2 check which catalog rule is applied to cart product

texts:
I have created 3 catalog rules for category.

Shoes Category:  5% Off ,  Catalog Rule Name:  Shoes Offer
Toys Category:   10% Off,  Catalog Rule Name:  Toys Offer
Fashion Accessories: 8% Off, Catalog Rule Name:  Fashion Acc. Offer

So all the product of that categories are showing discounted price in category.
On cart page i want to show which catalog rule is applied to item.

Is there any way to check on cart item that which catalog rule is applied to it?

How can i check which catalog rule is applied to item and how much discount is applied?

Any help would be appreciated.


texts: Magento 2.2 CRUD(Add,Update,Delete,Inline Edit) with ui component

texts:
My Concern is i want to develop basic extension with ui component with simple crud operation so i am referencing cms-page.

What i have achived so far:

Grid is properly working(with filter,column view & pagination).

Things don't work for me:

When i click on add new page it's give me 500 error.
When i edit the page also it's give me 500 error.
Inline Editing in grid also give me 500 error after click on save button.

I have also enabled the error_log and put error_reporting(E_ALL) ini_set('display_error','1') into index.php.

Please note that the 500 error log are not stored in system.log or exception.log files or not even in setup:di:compile command.

So let me know any good reference to create basic crud extension with uicomponent or else what is the possiblities of these error.


texts: Validation of checkboxes in custom forms does not work

texts:
Check this below code. I have added one checkbox on newsletter footer subscribe.phtml. If we are custom add checkbox on this then form submit without form fill up.
Site Link : http://kkmag2.dev-site.me/

<form class="form subscribe"
          novalidate
          action="<?php /* @escapeNotVerified */
          echo $block->getFormActionUrl() ?>"
          method="post"
          data-mage-init='{"validation": {"errorClass": "mage-error"}}'
          id="newsletter-validate-detail">

                <input name="email" type="email" id="newsletter" class="form-control" placeholder="<?php /* @escapeNotVerified */
                echo __('Email address') ?>" data-validate="{required:true, 'validate-email':true}"/>

            <input type="checkbox" title="<?php echo __('Sign Up for Newsletter') ?>" value="1" id="is_subscribed_footer" class="form-control checkbox required-entry" style="width: auto;" data-validate="{required:true}"/>
            <?php echo __("Yes, I would like to sign up to find out about Kilkenny's Exclusive Offers**") ?>

            <button class="btn-novetty action subscribe "
                     type="submit">
             <?php /* @escapeNotVerified */
                    echo __('Sign Up') ?>
            </button>

    </form>


texts: Magento 2: Disable/Remove "ship" Button from sales->order->view (click) -> Ship

texts:
I tried to disable or remove Ship  button option from the admin sales orders.
commented code Back, Cancel, Send Email, Hold, Invoice, Ship, Reorder, Edit from thebelow file path but the trick did not work. a little clue will be appreciate please  help.
1> /opt/lampp/htdocs/Shopcore/vendor/magento/magento2-base/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/CreateVaultOrderBackendTest.xml:
2> /opt/lampp/htdocs/Shopcore/vendor/magento/magento2-base/dev/tests/functional/tests/app/Magento/Braintree/Test/TestCase/UseVaultOnCheckoutTest.xml:
3>/opt/lampp/htdocs/Shopcore/vendor/magento/magento2-base/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/CreateVaultOrderBackendTest.xml:
4>/opt/lampp/htdocs/Shopcore/vendor/magento/magento2-base/dev/tests/functional/tests/app/Magento/Paypal/Test/TestCase/UseVaultOnCheckoutTest.xml:


texts:
I have a category, for arguments sake lets call it Beans.

Beans has a title, and it has a description.

If I make a change to the title of Beans, it gets reflected on the front end fine.

If I make a change to the description of Beans, it does NOT get reflected on the front end. If I completely delete the description of Beans, I can still see the old description on the front end. No changes I make to the description comes thru to the front end what-so-ever.

I have all the cache's turned off.

I have cleared the cleared the caches from the Admin Panel.

I have manually deleted the contents of /var/cache/.

I have disabled and re-enabled the category.

I have disabled the category, deleted the contents of /var/cache/, cleared the caches from the Admin Panel, and then re-enabled the category.

The old description for the Beans category still shows, but any changes I make to the title is reflected fine each time.

How can I stop the description for the category Beans from being cached? Other categories are unaffected by this, only Beans seems to want to keep hold of its old description.

This is in Magento 1.9


texts: stop to redirect on customer/account/login/ magento 1.9

texts: When I am opening this http://websitedomain.com/ domain name, then it directly       redirects to this link http://websitedomain.com/customer/account/login/ but I want that  it redirect on websitedomain.com/ only.


texts:
I installed an existing Magento installation on a clean CentOS server.
This installation was running fast, with no problems and without any caching module.

Now, suddenly over the weekend, the speed dropped down from 2s/page to 5s/page.

Where do i have to look for a reason?

Update: I cleared the Magento cache folder, and now it's running fast again.
How to avoid this in the future?


texts: How to Edit an Order on Magento After it is Shipped

texts:
Is there a way to edit an order on Magento after its shipped.

Instances where customers return the products and change it for another product.

Thank You

Currently on Magento 1


texts:
I was woundering if any could help me find a way to set the Meta description for the customer/account/login page?

Cant find an xml file where I can change it and not sure how to do it in the login.phtml file.


texts: Magento 2.3.5 Order Status not showing in admin order view

texts:
I have below orders status and are correctly assign to state. However it is not showing in Admin Order view page.

Below are my database entries -

Above order status should show in Admin Order View page as below. Only Open Order status show in dropdown.


texts: What MySQL Collation should I use for Magento?

texts: It appears I normally use 'utf8_unicode_ci'.   However, I don't know if that is the best collation to use.   I searched Magento StackExchange and was suprised I didn't see a question/answer on this topic, so thought I would post this to see if there is a consensus view on this question.


texts:
I really need to have custom or even magento validation for my input field.

Problem is, there is no form in my field, there is only input field.

<input id="item_custom_payment_" name="pay_part_payment" value="" style="" class="input-text item-price validate-greater-than-zero">
<button .... >Submit</button> //calling custom controller action

For example: Comment section in order view page in admin area.

This var customForm = new VarienForm('custom_form'); doesn't work because there is no <form> in my section.

Is there anyway around to validate the input field?

UPDATE

My button looks like this:

<button id="id_5bb6f3992cb320bf703ed93f702dd64a" title="Submit Paid Amount" type="button" class="scalable save paid-amount" onclick="submitAndReloadArea($('order_paid_block_wrap').parentNode, '[admin_url]'); javascript:reload(); return true" style="">Submit Paid Amount</button>


texts: Apply discount on highest price in the cart

texts:
I am working a project a where i need to set discount on the highest price in the cart i have looked in to shopping cart price rules for this but cant find such a thing like this.

Is there i need a custom coding for this? Any one having any idea for on this.


texts: Hide out of stock products but show out of stock swatches on a product

texts:
Magento version 2.3.4
What I want to achieve:
Don't show products that are fully out of stock,  but show out of stock swatches of products.
What I tried:

Stores > Configuration > Catalog > Inventory > Stock Options > Display Out of Stock Products: Yes. This option hides out of stock products but also hides out of stock swatches.
I found someone that tried this

Magento 2 - Show swatches of simple products (out of stock) in configurable product
So I removed $_product->isSaleable() from
vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml
This did nothing. It still hides the swatches.
Is there any other option to show the out of stock swatches?


texts: Magento 2 Custom Module Delete Issue [SOLVED]

texts:
I'm using Magento 2 Version 2.1.0

{folder path}\magento2\app\code\Custom\Module\view\adminhtml\ui_component\custom_module_index.xml

<massaction name="listing_massaction">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="selectProvider" xsi:type="string">custom_module_index.custom_module_index.custom_module_columns.ids</item>
            <item name="indexField" xsi:type="string">posts_id</item>
        </item>
    </argument>
    <action name="delete">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="type" xsi:type="string">delete</item>
                <item name="label" xsi:type="string" translate="true">Delete</item>
                <item name="url" xsi:type="url" path="posts/massDelete"/>
                <item name="confirm" xsi:type="array">
                    <item name="title" xsi:type="string" translate="true">Delete items</item>
                    <item name="message" xsi:type="string" translate="true">Are you sure you wan't to delete selected items?</item>
                </item>
            </item>
        </argument>
    </action>
</massaction>

{folder path}\magento2\app\code\Custom\Module\Controller\Adminhtml\Posts\MassDelete.php

Only giving code for execute() method

public function execute() {
        $collection = $this->filter->getCollection($this->collectionFactory->create());
        $collectionSize = $collection->getSize();

        foreach ($collection as $item) {
            $item->delete();
        }

        $this->messageManager->addSuccess(__('A total of %1 record(s) have been deleted.', $collectionSize));

        /** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
        $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
        return $resultRedirect->setPath('*/*/');
    }

When i'm trying to Delete record from listing, It's giving below error.

  2 exception(s): Exception #0 (Zend_Db_Statement_Exception):
  SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where
  clause', query was: SELECT COUNT(*) FROM posts AS main_table WHERE
  (`` IN('')) Exception #1 (PDOException): SQLSTATE[42S22]: Column not
  found: 1054 Unknown column '' in 'where clause'

I already compile the di.xml file & also try to remove folder from var/generation. Still same issue & error.


texts: magento 2 - how to add more parameter to URL view product detail

texts:
How to add more parameter to URL view product detail.
I need add one more parameter in url of view product detail.
Anyone can help me?
Thanks!


texts:
I have added product price tax inclusive in the price column and applied a tax class says 5% tax.
On the frontend, catalog price should not increase in the cart, but when I'm adding the product into cart, row total, subtotal and grand total coming inclusive of 5%.

For eg. Catalog price added with product INR 654 (incl. tax)
Tax 5% - 32.70 INR
Row total - 686.70 INR
Subtotal - 686.70 INR
Grand Total - 686.70 INR

But Row total, subtotal, grand total should be 654 INR.

Here is my store's tax setting https://prnt.sc/pzd0j8

How to get this in Magento?


texts: How to change Payment Methods on PWA Suite?

texts:
I have installed the PWA suite on my local machine.
I have enabled COD and Check / Money order Payment methods. But Why these methods are not showing on the checkout page. Pay with Card only displaying!

I try with Cach flush and setup upgrade. Not anything change. What is the solution? I need to create custom modules or can buy customer payment module. How can I resolve that?


texts: How to get product review details in Magento 2

texts: I want to get product rating details based on product id. can you anyone help me how to get details programmatically in Magento 2.


texts: Can I add to the list of templates available for the new product widget

texts:
Is it possible to add to the list of available templates for the new products widget?

I would like to custom render a view for my homepage. I have gone into

  Content->Pages->homepage

and have added a new products widget. In the widget options, there is a template field. There are 5 available templates.

I believe I can edit the corresponding <vendor>/<theme>/Magento_Catalog/templates/product/widget/new/*.phtml files but is there a way to create a new template and add it to the widget options in the admin?


texts:
Hello to all the geniuses out there! After days of research and trials I find I am still looking for a resolution to my pricing problems on a large wholesale site.

We sell 1000s of products that come in their own cartons/boxes of a specific quantity. We allow the user to purchase single items/split box but we would have to charge an additional 10%. This would also be relevant to any amount that is above an actual box quantity. For example a box/carton that contains say 4 items and a user buys 10 of the product, then the additional 2 should have the surcharge.

The Cart Qty is added to a custom attribute. I have tried allowing minimum order and increments but that restricts the split box option.

Open to any pointers, ideas or modules! Thanks


texts: I run php bin/magento module:enable, page stops loading after that

texts:
Fresh install of M2.1 on a Turnkey LAMP (with updated php 5.6 and mysql).

I'm trying to test install a 3rd party module, and one of the commands is:

php bin/magento module:enable module1a module1b

As soon as I run this command, the website (both front end and admin pages) stop loading.

I then try "php bin/magento setup:upgrade" which completes with no errors, I then run "setup:di:compile", and then "setup:static-content:deploy" again with no errors.

However, I cannot seem to get the website to load ever again after this.

What am I doing wrong/missing ?

(I'm very new to M2's compile process and correct order of commands).

Thanks in advance!


texts:
How can set the rule in particular products in particular quantity purchase two packets it will have free shipping

for example: gold cup- every single purchase of 2 packets (500 gms each) will have free shipping


texts: How to show brand, size, color in menu with category?

texts:
how to show products attributes with category in menu. please see this image what i want.
Any Extension or custom solution please Help me.


texts: As we create view in mysql, can we do it in magento 2.1?? if yes, how to do it

texts: want to create an view in magento 2.1.7. As we do create in mysql, how to do it?? want to do it progmatically.


texts: Customer not login after upgrade magento to 1.9, I also try to add form key in login.phtml. But still not working

texts:
I am suffering a problem with customer login and is only working when i remove my browser cookie then its working, i have tried adding the form key in login.phtml file also. But this solution also is not working.

Can any one please let me know, what is the problem.


texts: How to interpret HTML generated in PHP in a Magento 2 template

texts:
It's difficult to explain with basic sentences so here the code :

template.phtml

<?php /* @escapeNotVerified */ echo __('Some text [[REPLACE]]') ?>

Javascript

var list = '

A

B

';
$("#text").text(function(index, text) {
    return text.replace("[[REPLACE]]", list);
});

Actual outcome

Some text

A

B

Desired outcome

Some text AB

It seems that Magento 2 won't interpret HTML generated. Is there a way ?


texts: cart empty after payment fail issue in magento 1.9.3

texts:
How can I stop Magento to empty cart after the customer fails to pay with a card?
I am using Midtrans: Veritrans-Payment module for payment method.

I am using Magento ver.1.9.3

Please give me a quick solution


texts: Limit the Products for Particular Category?

texts:
I have a "New Arrival" Category. I need to show the Latest product of the top level category ( Mens->New arrival) and limit the products.
I have tried to override the below category block. But not achieve that.

File Path : \\app\code\core\Mage\Catalog\Model\Category.php

if($this->getId()==463){ // New arrival Category ID
    $category = Mage::getModel('catalog/category')->load(18);   // Mens category ID
    $collection = Mage::getResourceModel('catalog/product_collection')
        ->setStoreId($this->getStoreId())
        ->addCategoryFilter($category)->setPageSize(1,10);
}else{
    $collection = Mage::getResourceModel('catalog/product_collection')
        ->setStoreId($this->getStoreId())
        ->addCategoryFilter($this);
}


texts: I need a little help with Magento 1.9.2.3

texts:
I have a lot of products in my store more than 52000, the products was structured by category, I mean the Brand is category and the Model is a category. Now I want to have attributes instead category. Exist a solution to create this brand and model attribute and copy the value from category? So all I need is to have 2 attributes Brand and Model with the same values as categories. I can't do this manually because I have more than 52000. Maybe a script or something?

Thank you so much


texts: Is there a way to select a field to be returned when using the getList() function within a Repository?

texts:
MAGENTO v2.2.6

To better illustrate my question here's an example. When using the ordinary collection I can limit the attributes/fields returned like so:

NOTE: I wouldn't normally use the object manager directly, this is just an example from an ad-hoc script I created.

$productCollection = $objectManager->get(Magento\Catalog\Model\ResourceModel\Product\Collection::class);
$productCollection
    ->addAttributeToSelect('sku') /*<-- THIS IS THE FUNCTIONALITY I WANT TO MIMIC*/
    ->addFieldToFilter('manufacturer', ['eq' => 3])
    ->addFieldToFilter('price',['eq' => 234]);

foreach ($productCollection as $product){
    print_r($product->getData());
}

The above will return the following values from my particular store:

Array
(
    [entity_id] => 185
    [attribute_set_id] => 15
    [type_id] => simple
    [sku] => SKY-5001
    [has_options] => 0
    [required_options] => 0
    [created_at] => 2012-11-08 23:52:51
    [updated_at] => 2018-11-13 12:38:30
    [manufacturer] => 3
    [price] => 234.0000
)
Array
(
    [entity_id] => 186
    [attribute_set_id] => 15
    [type_id] => simple
    [sku] => SKY-5010
    [has_options] => 0
    [required_options] => 0
    [created_at] => 2012-08-11 23:52:54
    [updated_at] => 2018-11-13 12:38:30
    [manufacturer] => 3
    [price] => 234.0000
)
...

When using the getList() function located within \Magento\Catalog\Model\ProductRepository.php like in the code block below, all values from the entity are returned. I'd like to minimize the amount of data returned to only what is needed.

$searchCriteriaBuilder = $objectManager->create('Magento\Framework\Api\SearchCriteriaBuilder');
$productRepository = $objectManager->get(Magento\Catalog\Api\ProductRepositoryInterface::class);
$productSearch = $searchCriteriaBuilder->addFilter('manufacturer', 3, 'eq')->addFilter('price', 234, 'eq')->create();
$products = $productRepository->getList($productSearch)->getItems();

foreach ($products as $product){
    print_r($product->getData());
}

Here's is what's returned using the ProductRepository:

Array
(
    [entity_id] => 185
    [attribute_set_id] => 15
    [type_id] => simple
    [sku] => SKY-5001
    [has_options] => 0
    [required_options] => 0
    [created_at] => 2012-11-08 23:52:51
    [updated_at] => 2018-11-13 12:38:30
    [status] => 1
    [visibility] => 4
    [manufacturer] => 3
    [price] => 234.0000
    [description] => The 5001 On/Off Fireplace Remote Control with Backlit Touch Screen
    ...
    [size_name] =>
    [parent_sku] =>
    [color_name] =>
    [shape_name] =>
    [material_name] =>
    [inchoo_meta_robots] =>
    [mpn] => SKY-5001
    [banner_filename] =>
    [banner_category_url] =>
    [shipping_standard] => Order by 1 PM CST for Same Day Shipping
    [google_name] =>
    [remote_function_filter] => 6450
    [major_category] => Fireplace Remotes
    [sub_category1] => On/Off
    [amasty_preorder_note] =>
    [amasty_preorder_cart_label] =>
    [is_recurring] => 0
    [tax_class_id] => 2
    [fuel_type] =>
...

I've looked through the code base to no avail. Is there a way to select only specific attributes when using the Repository's getList()? I know using service contracts are the best practice, and I want to make sure I follow best practices to make upgrades and such less of a headache in the future, but I don't want to have to return every attribute or field value when getting a collection.


texts: Magento 2.3.5 stop cache invalidate when work in admin

texts:
I have a magento 2.3.5p1 store. It is configured to use Varnish as FPC. Although I have set in magento admin the TTL for one week in server stats I see very low cache hit. Around 5%.
I am suspecting that this is because we do a lot of work in admin, adding new products, magento keeps invalidating the FPC.
My questions are:

Is this right for a platform to use FPC and always be unused? Because you can't have a store without adding or updating products etc.
Is this maybe misconfiguration of my store?
Is there another way to work in admin without invalidate FPC all the time?


texts: Magento 2, how to hide button 'Invoice' when status 'pending'?

texts: Using magento 2.2, admin, sale->order. I want to hide button Invoice when status Pending.


texts:
When I copy and paste a link to a product into the address bar and press ENTER, the page is redirected to the homepage.  If I email myself the product using Magento's share feature, when I receive the email and click it, I am not redirected to the homepage.

I need to be able to offer links to certain products, is there a setting for this?

The link sent in the email is no different than what I would get when copying the link in the address bar.  It doesn't make sense; it's as if Magento knows the referrer is not from the current page... or from one of those email shares.