texts: How can I redirect someone to external url from template and controller?

texts: How can I redirect customers to external urls i.e. other websites from template and controller in magento 1.9? Like  Mage::app()->getResponse()->setRedirect('https://payment.api.com'); exit;. It is not working for external urls in template.


texts: Magento2 Problem with displayed price exclusing tax

texts:
I don´t know where else I can ask for help.

I have one Shop with two stores and store views. (M 2.1.5)
The 1st is for regular customers. The price is shown including tax everywhere and everything is fine.

The 2nd store is for wholesaler and the price in the frontend is supposed to be displayed excluding tax. Tax is added at the end on the check out.
Here the problems appear.

The Tax-settings in the configuration for this store are all "Excluding tax" (Shopping Cart display, Price Display Settings, Orders, invoice, credit memo display settings)

In the wholesale shop on the product page the price is still shown including tax while the shopping cart shows the tax excluding tax.

I deactivated all extensions on this store to be shure that those don´t cause the problem.

Does anybody have an idea why the price on the product page is still shown including tax?
Thanks a lot! Don´t know what else to do!

Simon


texts:
in my case i want to add more option inside a column 'Voir' fro example 'option2' in a grid created with block ,
like this:

but for now i have just 'Renouveler'

the function in the class \Magento\Sales\Block\Adminhtml\Reorder\Renderer\Action is:

 public function render(\Magento\Framework\DataObject $row)
    {
        $this->_actions = [];
        if ($this->_salesReorder->canReorder($row->getId())) {
            $reorderAction = [
                '@' => [
                    'href' => $this->getUrl('sales/order_create/reorder', ['order_id' => $row->getId()]),
                ],
                '#' => __('Renouveler'),
            ];

            $this->addToActions($reorderAction);
        }
        $this->_eventManager->dispatch(
            'adminhtml_customer_orders_add_action_renderer',
            ['renderer' => $this, 'row' => $row]
        );
        return $this->_actionsToHtml();
    }

  and the column in the block is :

if ($this->_salesReorder->isAllow()) {
            $this->addColumn(
                'action',
                [
                    'header' => 'Action',
                    'filter' => false,
                    'sortable' => false,
                    'width' => '100px',
                    'renderer' => \Magento\Sales\Block\Adminhtml\Reorder\Renderer\Action::class
                ]
            );
        }

  can anyone tell me how to do that option with a specifique link for it  'Voir' with the id of the row in question ?


texts: Product dimensions visible on product configuration page

texts:
How to get these attributes visible on product configuration page?

  ts_dimensions_height
  ts_dimensions_length
  ts_dimensions_width

I already added them to my attribute-set, set 'Visible' everywhere in attribute settings, but still, have it invisible on the product configuration page. Other attributes from the set are visible.


texts: 1.9.1.0 - Magento Price hook / extension on product page for configurable products

texts:
i have some big problems with prices on the product page. I want to sell t-shirts and other things with printing and configurable prices.

50x t-shirt                                              50x  6,95 €

with  50x printing 1 color "black"                       50x  0,15 €

and 1x pre costs for printing                 1x    69,- €

My problem is the 1x pre costs.

Magento calculate 50x 6,95  + 50x 0,15 + 50x 69,- €

how can i add the position "pre costs" only 1x ?

Please help with your ideas.

Is there an extension? (hook)

Many thanks for your help


texts: Magento2 send Order information to Google Analytics when order from admin

texts:
Though Magento 2 has the inbuilt implementation to send the
transaction/order details placed on webstore or frontend to Google
Analytics, it lacks the same ability when orders are being placed
from the Magento backend, the admin, or when orders are created
programmatically.
The problem Google Analytics won't match the reports generated from Magento.
So I want to send order to google  save Google Analytics Tracking Id.

How can I achieve this?


texts: I don't know how to migrate from  m1 to m2. How to migrate m1 to m2 steps wise solution tell me? Can you please help me?


texts: Image "Browse file" and "Upload" button are missing problem

texts:
I am using magento 1.9.2.2 version, but product image "Browse button" and "Upload button" are missing from admin.

I have checked all media for in Adminhtml and Skin folder all are there. Please help me for this


texts: I use Magento 1.9 and now i have problem with adding item to cart, when i press button Add to cart, just refresh page and in cart nothing, i added in Session Cookie Management -> Cookie Lifetime = 86400, but nothing, early all working good with my site. Can you help solve problem?


texts: How to get PDF file of Orders on the basis of Date

texts: I have to add a button in Sales Order List to download the PDF for all Orders that have been created today.


texts: Magento 2 : How to run 2 cron jobs at the same time?

texts:
In my crontab.xml I have 2 different cron jobs which are invoking 2 different methods scheduled to run on the minute. When I do the command "bin/magento cron:run" only one job is running. Below is my crontab.xml file
How do I get both jobs running at the same time?

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
    <job name="jAssign_cronjob" instance="Mobileplans\Cron\Jivetel" method="assignForwarding">
        <schedule>* * * * *</schedule>
    </job>
    <job name="jRemove_cronjob" instance="Mobileplans\Cron\Jivetel" method="removeForwarding">
        <schedule>* * * * *</schedule>
    </job>
</group>
</config>


texts: 'checkout as guest' work same as 'register' with auto generated password

texts:
On onepage-checkout page there are three methods to check out.

How checkout as guest method work same register method with auto generated password?


texts: How to remove the product price and subtotal amount in the shopping cart page in magento 2

texts:
Only i need to show the number of quantity items in the shopping cart page.

if any one know the answer please share the exact code and folder structure. since i'm new to magento.

Any help would be appreciated. Thank you!

shopping cart page screenshot:


texts: Blank Page with Front End Template in Controller

texts:
I have a controller that needs to display text, but I get a blank page. Here is what I have:

  Controller/Index/Index.php

namespace Veratad\AgeVerification\Controller\Index;

    use Magento\Framework\App\Action\Context;

    class Index extends \Magento\Framework\App\Action\Action
    {

        protected $_resultPageFactory;

        public function __construct(Context $context, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
        {
            $this->_resultPageFactory = $resultPageFactory;
            parent::__construct($context);
        }

        public function execute()
        {
            $resultPage = $this->_resultPageFactory->create();
            return $resultPage;
        }
    }

  Block/Ageverification.php

namespace Veratad\AgeVerification\Block;

    class Ageverification extends \Magento\Framework\View\Element\Template
    {
      private $scopeConfig;
      protected $messageManager;

      public function __construct(
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\Message\ManagerInterface $messageManager)
      {

        $this->scopeConfig = $scopeConfig;
        $this->messageManager = $messageManager;

      }

      public function getAgeVerificationText()
      {
        $fail = $this->scopeConfig->getValue('veratad/general/failuretext', \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
        return $this->messageManager->addError( __("$fail") );
      }
    }

  view/frontend/layout/ageverification_index_index.xml

    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" layout="1column">

            <referenceContainer name="content">
                <block class="Veratad\AgeVerification\Block\Ageverification" name="ageverification" template="ageverification.phtml" />
            </referenceContainer>

    </page>

  view/frontend/templates/ageverification.phtml

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

When i navigate to the controller I get a white page with no error messages. Can someone see where I am going wrong?


texts:
When trying to filter the sales order grid by sku i get the following SQL error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '.`order_id AND x`.`product_type != 'configurable')` LIKE '%A-%')' at line 1, query was: SELECT COUNT(*) FROM `sales_flat_order_grid` AS `main_table` WHERE (`(SELECT GROUP_CONCAT(' ', x`.`sku) FROM sales_flat_order_item x WHERE main_table`.`entity_id = x`.`order_id AND x`.`product_type != 'configurable')` LIKE '%A-%')

Below is the code which i believe is causing the issue:

'filter_index' => '(SELECT GROUP_CONCAT(\' \', x.sku) FROM sales_flat_order_item x WHERE main_table.entity_id = x.order_id AND x.product_type != \'configurable\')'


texts: Magento ver. 1.9.3.0 No images in Admin and Unable to read the configuration file in Connect Manager

texts:
I am unable to upload images via the admin upload button. It appears as though the upload is going to work but no image is attached to the product nor does it come into the images folder. The upload and browse buttons are there and available. Images on the front end are fine.

If I click to edit an old item (added before this problem) there is nothing in the images area. The image shows perfectly on the front end but nothing showing in the admin. These images are indeed in the correct media folder.

I have been searching, reading and editing pages and permissions for days now. I give up. I've gone through the first 4 pages of google and nothing has fixed the problem.

Can anyone offer any suggestions besides change the permissions?

Also, not sure if it is related, I am seeing an "Unable to read the configuration file" error when trying to use magentoconnect manager.


texts: How can i change default shipping address

texts: How can i change the default shipping address of a current user programmatically.


texts:
I've got a working Magento website hosted on a development server but I've decided to take a local copy to make it easier to work on.

I've downloaded the source files and imported the database. All looks to be working perfectly, I can see all of my products and I can't see any problems - but during this import, I noticed this error:

My.Name@NETWORK c:\xampp\htdocs\website
# mysql -u root database < database.sql
ERROR 1452 (23000) at line 415010: Cannot add or update a child row: a foreign key constraint fails (`database`.`#sql-be4_32`, CONSTRAINT `FK_CATALOG_EAV_ATTRIBUTE_ATTRIBUTE_ID_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE )

Will this error have stopped certain data from being imported. Everything at the moment looks fine and ideally I would like to continue and ignore the error - but I don't want it to bite me in days/weeks to come!


texts:
I have custom module and my code structure is as per service contact.

  app/code/[Vendor]/[Module]/Model/AccountManagement.php

Now i have a dispatch event in my model file

$this->_eventManager->dispatch('vendor_register_success', $eventParams);

As per REST API standard and as per the this solution i added event in specific module where it comes from.

  app/code/[Vendor]/[Module]/etc/webapi_rest/events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="vendor_register_success">
        <observer name="vendor_register_success" instance="[Vendor]\[Module]\Observer\VendorBrandRegister" />
    </event>
</config>

and My observer looks like this

  app/code/[Vendor]/[Module]/Observer/VendorBrandRegister.php

 public function execute(\Magento\Framework\Event\Observer $observer)
    {
        echo "In execute"; exit;
    }

but this event is not dispatching.
What am i missing Because as per the solution i need to add events in webapi_rest folder in etc folder.


texts: How do I provide a valid OAuth/NLAuth authorization header for NetSuite?

texts:
Being new to NetSuite and Post Man, I wanted to get my very first RESTlet up and working using Token Based Authentication which I have already set up, therefore I have:

Account ID
Application ID
Consumer Key
Consumer Secret
Token ID
Token Secret

This particular role designated already has Web Services only checkbox ticked as it was indicated in a few guides I followed. I also added permissions appropriate to their intended task.

I am currently experimenting tests through my Post Man REST Client by inserting my RESTlet's external URL into the address bar, included the following header keys and their values: (Using the format > Key: Value)

Content-Type: application/json
Authorization: OAuth realm="###",oauth_consumer_key="###",oauth_token="###",oauth_signature_method="HMAC-SHA256",oauth_timestamp="?????",oauth_nonce="?????",oauth_version="1.0",oauth_signature="?????"

I already replaced the hashes ### with my NetSuite provided information, however anything marked with question marks ??? are generated using php code . (Sensitive information were intentionally removed and left blank on here)

As a result, I received a 403 Forbidden error ("InvalidSignature" on our saved search Login Audit)

{
    "error": {
        "code": "INVALID_LOGIN_ATTEMPT",
        "message": "Invalid login attempt."
    }
}

As an alternative, I have used NLAuth approach instead to no success:

NLAuth nlauth_account=#####, nlauth_email=###@###.###, nlauth_signature=######

Where the hashes contain my account ID, related email address and the password respectively. I have also tried nlauth_otp containing my usual 6-digit pass code from my authentication application.

Regardless, I received a 401 Unauthorized error (< Blank > on our saved search Login Audit)

{
    "error": {
        "code": "TWO_FA_REQD",
        "message": "Two-Factor Authentication required"
    }
}

Since this is my first RESTlet, I was attempting to display product inventory from NetSuite to products stored on Magento.

In terms of researching done within Magento DevDocs, I have followed DevDocs and created an instance of an Integration API with the intent of being able to link more content to and from NetSuite and Magento in the future.

As a form of troubleshooting, I did try the Post Man's Authorization tab for OAuth 1.0 but I received a 400 Bad Request error after entering my TBA credentials in.

{
    "error": {
        "code": "INVALID_REQUEST",
        "message": "The request could not be understood by the server due to malformed syntax."
    }
}

I admit I am leaving something out unintentionally or have forgotten a step somewhere before here. Any help would much be appreciated.


texts:
I change my admin URL to a custom URL and I cannot access my store admin anymore.

How can I revert the change that I made?


texts:
I want to display the coupon code used, if any, in the orders grid.
The field should be filterable and sortable.

How can I achieve this ?


texts: Bug in CE version 1.9.0.1 connecting via Soap v1?

texts:
I spent the last two days debugging a problem that caused my site to randomly redirect to the index.php/install page. I solved the problem by clearing the cache and the sessions folder, and then rebooting the server. I found the event that triggered the bug. The problem occurs when I try to add a service reference in MS visual studio 2012 using the following links.

http://magentohost/api/?wsdl
http://magentohost/api/soap/?wsdl

Using these two URLS cause the following error in the error log.

    [Thu Jul 24 08:20:40 2014] [error] [client 10.0.0.115] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata=' : failed to load external entity "http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2F_vti_bin%2FListData_svc%2F%24metadata="\n in /var/www/html/lib/Zend/Soap/Server.php on line 811

[Thu Jul 24 08:20:46 2014] [error] [client 10.0.0.115] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://hostname.com/index.php/api/soap/index/?wsdl=1&wsdl%2Fmex=' in /var/www/html/lib/Zend/Soap/Server.php on line 811

Here is line 811 of Server.php

$server  = new SoapServer($this->_wsdl, $options);

I tried connecting to those URLS on CE version 1.8.0 alpha and they worked fine.

I just recently upgraded from version 1.8.0 alpha to 1.9.0.1.

The following URL doesn't cause a problem in CE version 1.9.0

http://magentohost/api/v2_soap?wsdl=1

Does anyone know if this is a bug in CE version 1.9.0.1 or is it an error in my upgrade?
Can you not connect to soap v1 with visual studio 2012?


texts: Get all categories with custom attributes in Magento 2 REST Api

texts:
I am using Magento 2 rest api for listing all the catgories.

{{production_url}}/index.php/rest/V1/categories

It will return all the categories,

{
    "id": 2,
    "parent_id": 1,
    "name": "Default Category",
    "is_active": true,
    "position": 1,
    "level": 1,
    "product_count": 0,
    "children_data": [{
        "id": 3,
        "parent_id": 2,
        "name": "T-shirts",
        "is_active": true,
        "position": 1,
        "level": 2,
        "product_count": 8,
        "children_data": []
    }, {
        "id": 4,
        "parent_id": 2,
        "name": "Phants",
        "is_active": true,
        "position": 2,
        "level": 2,
        "product_count": 0,
        "children_data": []
    }, {
        "id": 5,
        "parent_id": 2,
        "name": "Chridar",
        "is_active": true,
        "position": 3,
        "level": 2,
        "product_count": 0,
        "children_data": []
    }]
}

But i  need custom attributes for every categories in the result.But now i have to call the below api for getting custom attributes.

{{production_url}}/index.php/rest/V1/categories/3

It will return ,

{
    "id": 3,
    "parent_id": 2,
    "name": "T-shirts",
    "is_active": true,
    "position": 1,
    "level": 2,
    "children": "",
    "created_at": "2017-06-02 11:21:16",
    "updated_at": "2017-06-02 11:21:16",
    "path": "1/2/3",
    "available_sort_by": [],
    "include_in_menu": true,
    "custom_attributes": [
        {
            "attribute_code": "description",
            "value": "
retest
"
        },
        {
            "attribute_code": "image",
            "value": "Screen_Shot_2017-06-16_at_4.06.35_PM.png"
        },
        {
            "attribute_code": "display_mode",
            "value": "PRODUCTS"
        },
        {
            "attribute_code": "is_anchor",
            "value": "1"
        },
        {
            "attribute_code": "path",
            "value": "1/2/3"
        },
        {
            "attribute_code": "children_count",
            "value": "0"
        },
        {
            "attribute_code": "custom_use_parent_settings",
            "value": "0"
        },
        {
            "attribute_code": "custom_apply_to_products",
            "value": "0"
        },
        {
            "attribute_code": "url_key",
            "value": "redwine"
        },
        {
            "attribute_code": "url_path",
            "value": "redwine"
        }
    ]
}

Suppose if there are n catgories i need to call n api for getting custom attributes.Is there any single api for getting all the attributes for all categories in a single API?


texts: Magento Magmi Multiselect import not working

texts:
I can't seem to get the Magmi version: 0.7.22 (just upgraded) to import multiple values into a multiselect attribute. Magento 1.9.3  (unless someone can show me magmi working in magento 2.x)

This is my source file

attribute_set|type|sku|testcolor|supplier|size
default|Simple|2-ALN2320|"Red , Blue"|Flint|89
it loads the supplier & size fine.. But the testcolor is a multiselect type and it does not work.. I have tried to remove the spaces, same result.. I tried to use..

attribute_set|type|sku|testcolor:multiple:1|supplier|size
default|Simple|2-ALN2320|"Red,Blue"|Flint|89
That also did not work I don't see any errors in progress.txt
I have tired to change the multiselect delimiter to ; that also do not work.
I have tired to just put ONE value in there, that did not work..
Dropdown, text attributes work just fine..

I am running out of options.

ANY idea on what I am missing?


texts: magento how to show attribute image on list view

texts:
I already loaded few custom attributes on the product list view. Now I want to show images instead of the attribute values.

I tried:

$filename= $_SERVER['DOCUMENT_ROOT'].'/media/catalog/brands/'.str_replace(' ', '_',$brand).'.jpg';
if (file_exists($filename)) {
      echo '<img style="float: left; margin: 2px;" src="/media/catalog/brands/'.str_replace(' ', '_',$brand).'.jpg" alt="'.$brand.'">';
  }

but it did not work.


texts: Error installing Magento backup on localhost

texts:
I want to install a backup of Magento on local server to test that everything works to perfection before uploading to the server.

I returned the following error and can not find solution to it, please i need your help.

There has been an error processing your request
SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected

Trace:
#0 C:\wamp-nuevo3\www\scshackeo\lib\Zend\Db\Statement\Pdo.php(228): PDOStatement->execute(Array)
#1 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 C:\wamp-nuevo3\www\scshackeo\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 C:\wamp-nuevo3\www\scshackeo\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 C:\wamp-nuevo3\www\scshackeo\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SHOW TABLE STAT...', Array)
#5 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SHOW TABLE STAT...', Array)
#6 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Adapter\Pdo\Mysql.php(347): Varien_Db_Adapter_Pdo_Mysql->query('SHOW TABLE STAT...')
#7 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Adapter\Pdo\Mysql.php(378): Varien_Db_Adapter_Pdo_Mysql->raw_query('SHOW TABLE STAT...')
#8 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Adapter\Pdo\Mysql.php(983): Varien_Db_Adapter_Pdo_Mysql->raw_fetchRow('SHOW TABLE STAT...')
#9 C:\wamp-nuevo3\www\scshackeo\lib\Varien\Db\Adapter\Pdo\Mysql.php(2510): Varien_Db_Adapter_Pdo_Mysql->showTableStatus('core_cache_opti...', NULL)
#10 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\Resource\Cache.php(58): Varien_Db_Adapter_Pdo_Mysql->isTableExists('core_cache_opti...')
#11 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
#12 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\Cache.php(520): Mage_Core_Model_Cache->_initOptions()
#13 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\App.php(1183): Mage_Core_Model_Cache->canUse('config')
#14 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\Config.php(414): Mage_Core_Model_App->useCache('config')
#15 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#16 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\App.php(413): Mage_Core_Model_Config->loadModulesCache()
#17 C:\wamp-nuevo3\www\scshackeo\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#18 C:\wamp-nuevo3\www\scshackeo\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#19 C:\wamp-nuevo3\www\scshackeo\index.php(87): Mage::run('', 'store')
#20 {main}


texts: Magento 2.3.4 showing Magento ver. UNKNOWN in admin panel

texts:
I suddenly noticed at the bottom right corner of the magento admin panel and found very strange that instead of showing Magento version, it is showing me Magento ver. UNKNOWN.
Unable to figure out what makes it so. Here is my composer.json file if it works:
{
    "name": "magento/project-community-edition",
    "description": "eCommerce Platform for Growth (Community Edition)",
    "type": "project",
    "license": [
        "OSL-3.0",
        "AFL-3.0"
    ],
    "config": {
        "preferred-install": "dist",
        "sort-packages": true
    },
    "require-dev": {
        "allure-framework/allure-phpunit": "~1.2.0",
        "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
        "friendsofphp/php-cs-fixer": "~2.14.0",
        "lusitanian/oauth": "~0.8.10",
        "magento/magento-coding-standard": "~4.0.0",
        "magento/magento2-functional-testing-framework": "2.5.3",
        "pdepend/pdepend": "2.5.2",
        "phpcompatibility/php-compatibility": "^9.3",
        "phpmd/phpmd": "@stable",
        "phpunit/phpunit": "~6.5.0",
        "sebastian/phpcpd": "~3.0.0",
        "squizlabs/php_codesniffer": "~3.4.0"
    },
    "conflict": {
        "gene/bluefoot": "*"
    },
    "autoload": {
        "psr-4": {
            "Magento\\Framework\\": "lib/internal/Magento/Framework/",
            "Magento\\Setup\\": "setup/src/Magento/Setup/",
            "Magento\\": "app/code/Magento/",
            "Zend\\Mvc\\Controller\\": "setup/src/Zend/Mvc/Controller/"
        },
        "psr-0": {
            "": [
                "app/code/",
                "generated/code/"
            ]
        },
        "files": [
            "app/etc/NonComposerComponentRegistration.php"
        ],
        "exclude-from-classmap": [
            "**/dev/**",
            "**/update/**",
            "**/Test/**"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Magento\\Sniffs\\": "dev/tests/static/framework/Magento/Sniffs/",
            "Magento\\Tools\\": "dev/tools/Magento/Tools/",
            "Magento\\Tools\\Sanity\\": "dev/build/publication/sanity/Magento/Tools/Sanity/",
            "Magento\\TestFramework\\Inspection\\": "dev/tests/static/framework/Magento/TestFramework/Inspection/",
            "Magento\\TestFramework\\Utility\\": "dev/tests/static/framework/Magento/TestFramework/Utility/"
        }
    },
    "version": "2.3.4",
    "minimum-stability": "stable",
    "repositories": [
        {
            "type": "composer",
            "url": "https://repo.magento.com/"
        }
    ],
    "extra": {
        "magento-force": "override"
    },
    "require": {
        "mageplaza/module-smtp": "^1.4"
    }
}


texts: How i can change header button (sign in to log in) in magento 2 ? and which file i can change?

texts:
[![enter image description here][1]][1]

Which file i can change .xml or .phtml file
Sign in to Log in

where the location of files....


texts: Getting Unable to serialize value after upgrade magento to 2.2.5

texts:
I am getting following error when I open any parent category page after upgrade Magento to 2.2.5

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to serialize value.

Exception #0 (InvalidArgumentException): Unable to serialize value.
#0 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/framework/App/PageCache/Kernel.php(153): Magento\Framework\Serialize\Serializer\Json->serialize(Array)
#1 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(96): Magento\Framework\App\PageCache\Kernel->process(Object(Magento\Framework\App\Response\Http\Interceptor))
#2 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/framework/Interception/Interceptor.php(146): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->afterRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\View\Result\Page\Interceptor), Object(Magento\Framework\App\Response\Http\Interceptor))
#3 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#4 /media/emipro/ssd_drive/mage2/navoco/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, NULL)
#5 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#6 /media/emipro/ssd_drive/mage2/navoco/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#7 /media/emipro/ssd_drive/mage2/navoco/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()
#8 /media/emipro/ssd_drive/mage2/navoco/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#9 {main}

I have checked many links many similar issues in stack overflow and git but nothing works.

I have upgrade Magento from 2.1.10 to 2.2.5

This error only comes when I open the parent category page. Sub-category page working well.

Update :

Now error is coming randomly, like sometimes we hard refresh then error will display in any page.

Please share the solution / suggestion if anybody have an idea.

Thanks.


texts: Problem calling SOAP V2 login method via SoapUI "failed to load external entity"

texts:
I'm trying to call "login" method via SoapUI in Magento 1.9.1 and returns "Read Timeout".

Accessing the WSDL on browser and creating the project on the SoapUI works fine, but when i call any method PHP returns the following error:

6381  [Wed Jul 08 00:18:00 2015] [error] [client 189.114.159.156] PHP Warning:  SoapServer::SoapServer(http://{host}/index.php/api/v2_soap/index/?wsdl=1): failed to open stream: HTTP request failed!  in /var/www/html/mg_testeintegracao/lib/Zend/Soap/Server.php on line 814

6382  [Wed Jul 08 00:18:00 2015] [error] [client 189.114.159.156] PHP Warning:  SoapServer::SoapServer(): I/O warning : failed to load external entity "http://{host}/index.php/api/v2_soap/index/?wsdl=1" in /var/www/html/mg_testeintegracao/lib/Zend/Soap/Server.php on line 814

6383  [Wed Jul 08 00:18:00 2015] [error] [client 189.114.159.156] PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://{host}/index.php/api/v2_soap/index/?wsdl=1' : failed to load external entity "http://{host}/index.php/api/v2_soap/index/?wsdl=1"\n in /var/www/html/mg_testeintegracao/lib/Zend/Soap/Server.php on line 814

I've looked many posts about this problem and executed many possible answers:

Magento soap api login failed using PHP

SOAP API Call not working with Magento 1.9.1.0

SOAP API fails with "couldn't load from…", "failed to load external entity…"

Bug in CE version 1.9.0.1 connecting via Soap v1?

https://stackoverflow.com/questions/2976133/php-magento-soap-error-parsing-wsdl-couldnt-load-from-urlpath

I opened all ports on server and check php extensions like soap, xmlrpc, openssl, everyting is ok.

The 814 line of "/var/www/html/mg_testeintegracao/lib/Zend/Soap/Server.php" is:

$server  = new SoapServer($this->_wsdl, $options);

My server works with virtual hosts and the setting of this domain is as follows:

<VirtualHost *:80>
        ServerName {host}
        ServerAlias {host}
        DocumentRoot /var/www/html/mg_testeintegracao

    <Directory /var/www/html/mg_testeintegracao>
        Options Indexes FollowSymLinks
        AllowOverride All
    </Directory>

</VirtualHost>

Can it be a problem with that?

Someone has the same problem?


texts:
I don't know this is easy to you or not but i need help Please help me

I need a attributes menu in Magento which auto generate

Like admin add 3-4 color and 3-4 size of some product then top menu comes up automatically with 2 menus

1.Color
2.Size

And under this drop down user can see which type of color and size available on this store after clicking of any he will show these all products which having this attributes.

if admin add only one extra color/size for any one product this color/size should be on the drop down list.

Thank you I hope you can understand my Question


texts:
I'm trying to set a cookie and immediately get it in a function:

Mage::getSingleton('core/cookie')->set('productLanded', $product_sku, 86400, '/');
$this->product_landed = Mage::getSingleton('core/cookie')->get('productLanded');

I'm not able to print on a page the value of $this->product_landed as soon I call the function, I always need a page refresh. Any clue?


texts: Magento get latest products added in the store

texts:
how i can get the newly created products in the store ?

Products collections:

$collection = Mage::getModel('catalog/product')
 ->getCollection()
 ->addAttributeToSort('created_at', 'desc')
 ->addUrlRewrite();

in my store i have a 20 products and i've added a product named test, but when print the collection value i've got all the products i want to get newly created products added in my case named test.
I don't want to get last added Product,
If I add multiple products, it should give me multiple products collection.

Any solutions ?


texts: send user and admin email for free shipping method

texts:
i want to create email method. if customer select free shipping method  then admin and user both will get an  custom email.

how to do that?  need help.

there are two shipping . one is paid and second is free.  if customer select free  shipping method and place the order then admin and  customer both  will get email notification.

need help how to do that?

in module folder Custom_shipping.xml

   <?xml version="1.0"?>
 <config>
     <modules>
       <Custom_Shipping>
         <active>true</active>
          <codePool>local</codePool>

        </Custom_Shipping>
      </modules>
  </config>

in Model Folder Observer.php

   <?php

   class Custom_Shipping_Model_Observer(){

    public function salesOrderShipmentSaveBefore($observer)
    {

    $shipment = $observer->getShipment();
    $order = $shipment->getOrder();
    $storeId = $order->getStore()->getStoreId();

     die('test');

     }

}

ann etc/config.xml

      <?xml version="1.0"?>
  <config>
   <modules>
    <Custom_Shipping>
        <version>1.0</version>
    </Custom_Shipping>
  </modules>
<global>
   <events>
      <sales_order_shipment_save_before>
        <observers>
            <shipping>
                <type>singleton</type>
                <class>shipping/observer</class>
                <method>salesOrderShipmentSaveBefore</method>
            </shipping>
        </observers>
     </sales_order_shipment_save_before>
     </events>
     </global>
     </config>


texts:
I want to create an Observer for an event.
i.e. controller_action_postdispatch_checkout_onepage_saveBilling

How to create it in Magento2 ?


texts: Automated Transactional Emails Not Sending v 1.9.2.4

texts:
I have upgraded to Magento v1.9.2.4 and my automated transactional emails do not get sent.

I have ensured that the transactional emails are enabled in system/configuration/sales_emails ?


texts: Sell same product from different distributors

texts:
What's the best way to do this?

Example I want to sell Ipad-mini's.
I can get them from different distributors, with different SKU's.
I'm updating each distributors stock level and prices into Magento via Magmi.

distributor A->SKU: A0011231 Stock: 15 pces
distributor B->SKU: B0457566 Stock: 17 pces
...

Is there a way to manage this by only one SKU? So that search results via MPN  gives only one result.


texts: How use Pagination in Custom Product Page

texts:
I display custom products in page. use controller ,block and .phtml files define block and template in xml file.

Products are showing correctly i use template module/catalog/view/frontend/template\product\list.phtml .

Now i want to apply pagination and iuse many solution like

how to add pagination on custom collection in Magento 2

https://meetanshi.com/blog/add-pagination-in-magento-2-custom-collection/#comment-962

https://mage2.pro/t/topic/1035

https://www.fmeextensions.com/blog/how-to-add-magnto-2-pagination-to-custom-collection/

All these solution just show limited products on page but not show next page counting toolbar.

Can anyone help me please ? i already spend too much time


texts: Get subtotals excluding tax for each Tax Rate in Cart summary - Magento 2

texts:
I need to calculate the SubTotal for each tax rate in my cart summary.. How can I do this? I found calculation start in module_tax under vendor / magento folder.. but I did not found where to put my hand to change the way subtotals are calculated. I tried copying the folders magento_tax module  / design / frontend / web  / js in my child theme, then I modified some functions related to knockout framework.. but I cannot find a way to extract Tax Subtotals for each Tax Rate..
Any help will be appreciated.
I'm using Magento 2.3.5.
Follow an example of what I need:
In my Cart I have 3 products with 2 tax rates:
Product 1Product 2VAT 22%
Product 3MyTax 10%
In my cart summary I need to show something like this:
TAX SUBTOTALS
tax: VAT 22%    |  subtotal excl tax: 88€ (subtot excl tax of both product 1 and product 2)
tax: MyTax 10%  |  subtotal excl tax: 90€ (subtot excl tax for product 3)
         GrandTotal Excl. TAX    178€ (Totals excluding taxes)
         GrandTotal Incl. TAX    200€ (Total including taxes)


texts:
In many Magento store using /downloader you will get access to a from to access backend. Do for your own a test, once you find a Magento store, change the url pointing to /downloader. Even you changed admin in local.xml to any name you wanted for admin url, you have this backdoor to your administration page through Downloader. Main question, how do I protect this folder being access only from backend menu by admin?

First thoughts:

1) I can password protect this folder. Will it be accessible from backend using Magento Connect link?

2) Can I change inside Magento files the name for Downloader folder? The idea is changing in prompt Downloader folder name to other name hard to find (eg downloader21). Are they many files to change? Having the menu working in backend for System->Magento Connect

Thank you!


texts: An error occurred while installing the project. I install using composer.


texts:
I have been asked to quote for a client who wants to have a standard Magento 2 grid in the backend for an extension I have custom built for them.

The want to be able to perform full-text searches, which I know how to do, but they want to be able to search fields that are in the database but not the grid.

For example:

They have a grid of blog posts in the backend. Each blog can contain links to products. The products are linked using a database table called products_in_blog and contains columns blog_id and product_id.

They want to be able to search for products in the blog admin area and return blogs that contain these products in the blog grid.

I don't necessarily need to know exactly how to do it as I can figure it out when it comes to the build. I just need to know if it is possible to do in order to provide a quote.

Any help is appreciated. Thanks.


texts: How can I fetch value from serialize product_options faster

texts:
I am using following query to load data

SELECT `main_table`.*, `sales_order_item`.`product_options` FROM `magento_giftcardaccount` AS `main_table` LEFT JOIN `sales_order_item` ON sales_order_item.product_options REGEXP code WHERE (sales_order_item.product_type like 'giftcard' AND main_table.code NOT like '')

In magento2

protected function _initSelect()
{
    parent::_initSelect();
    $this->getSelect()->joinLeft(
    ['sales_order_item' => $this->getTable('sales_order_item')],
    'sales_order_item.product_options REGEXP code',
    ['sales_order_item.product_options']
    )->where("sales_order_item.product_type like 'giftcard' AND main_table.code NOT like ''");

    $this->getSelect()->__toString();
    echo $this->getSelect();die();

    return $this;
}

It is taking too long to load, how can I do it faster.


texts: magento 1.9 programmatically add / update record

texts:
What is the way to programmatically Update an existing record, and Add a new one if the record is not found in Magento 1.9?

I have the following code, and what I want it to do is to add a new address to a customer, and update the address if it's found by the address_code(a custom field). But right now the code always Add a new address, even if the address with the same address_code already found in the database.

    $customAddress = Mage::getModel('customer/address')
        ->getCollection()
        ->addAttributeToSelect('*')
        ->addAttributeToFilter('address_code', $address_code)
        ->getFirstItem()
        ->addData($_custom_address)
        ->setCustomerId($customer->entity_id)
        ->save();

What did I do wrong?


texts:
What is the minimum version of Magento that exposes/supports a REST API and OAuth support?

Is there any support for REST API and OAuth in Magento 1.5.1?


texts: Query string to add product and apply promo code: M2

texts:
I currently have set up a query string that automatically adds a set amount of products to the users cart when they click a specific button. I already have everything set with with the FormKey() and this is working as expected.

Working

domain.com/checkout/cart/add/product/13/qty/6/

I can also in an entirely different URL apply a specific promo code to the shopping cart

Working

domain.com/checkout/cart/couponPost/coupon_code/PROMOCODE/

However, I am unable to do both at the same time. I would like to build one URL that adds specific products to the users cart and then applies the promotional code. I would expect this URL to work....

Does not work

domain.com/checkout/cart/add/product/13/qty/6/couponPost/coupon_code/PROMOCODE/

But it does not. Is there any way to accomplish what I am looking for?

Thanks,


texts: Magento2 - TinyMCE editor adds %20 in image url

texts:
The TinyMce editor adds %20 before the image url.

Expected output

Output

I've tried adding rep(/%20/gi,""); in lib/web/tiny_mce/plugins/bbcode/editor_plugin_src.js:87


texts: Magento 2. Is there a way to disable a Website or Store in the databases?

texts: Would this be possible by means of sql queries?


texts:
Categories url in not visible when calling inside page template. But this works in catalog template. How to make this accessible in a phtml block of page template?

<?php
foreach ($this->getStoreCategories() as $_category):
     echo $this->drawItem($_category); // this gives the category name but not the url
endforeach
?>


texts: Add checkbox and input to onepage checkout, and store to database

texts:
I need to add a custom checkbox and under the checkbox a textarea to onepage checkout page, to a page where you select your payment method and review delivery address.

This data then needs to be stored to DB, preferably with the order itself.

Is this possible to make by myself? I've found the extensions, but I don't wanna shell out that kind of money.

any help is more than welcome.


texts: How to manage config changes through interface and into version control efficiently

texts:
When manipulating config in the interface and wanting to track it into version control, as I see it, there are multiple options and I have doubts with every single one of them.

bin/magento app:config:dump, exports literally everything and will lock every single config field in the interface. Which I think is really inconvenient, since you will be forced to delete a value from the config to re-enable it in the interface to be able to change it again. Or you'll have to edit it manually in config.php.
bin/magento app:config:dump <config-types...> which exports all config within that config-type, eg. theme. How do I know which config type to export when I change a value within the interface?
bin/magento config:set --lock-config <path> <value> which sets a config value and simultaneously writes it to the shared config. To use this, is there any way to easily know which <path> I need to use when I just changed the value through the interface?

How do I - as a developer - edit some arbitrary config value through the admin interface, export it as quickly as possible, without preventing myself from ever (easily) editing other config values through the interface? Or, how would I go about finding out the config-type or config path for a value I just changed so I can quickly export?


texts: How to get widget parameter in custom phtml or block?

texts:
I want to get specific widget configuration in phtml or block.

In that phtml/block i want to load custom product collection with filter using that widget data.

I want to create a same page like product listing(category page) after getting that collection.

I also referred below solution.

Use product list template with my own product collection?


texts: How to make some Products visible to a single Customer Group?

texts:
I  know this has been asked before but could not get a reliable answer without suggesting some paid extension.

I need to hide some products to be visible only to user with some group id.
I have a boolean attribute set to products called is_secure. I want products with this attribute set to true to be only visible to customers with group id = 2.

How can I go about doing this?


texts: Magento 2 + create widget via installData Script

texts:
I need to custom requirement for creating a widget via Script. but I have facing an error when try to add a widget via below script

<?php

namespace Test\Xyz\Setup;

use Magento\Framework\Setup;

class InstallData implements Setup\InstallDataInterface
{
    /**
    * @var Setup\SampleData\Executor
    */
    protected $executor;
    /**
    * @var Installer
    */
    protected $installer;

    private $widgetFactory;

    public function __construct(
            Setup\SampleData\Executor $executor,
            Installer $installer,
            \Magento\Widget\Model\Widget\InstanceFactory $widgetFactory
    ) {
        $this->executor = $executor;
        $this->installer = $installer;
        $this->widgetFactory = $widgetFactory;
    }

    public function install(Setup\ModuleDataSetupInterface $setup, Setup\ModuleContextInterface $moduleContext)
    {
        $this->executor->exec($this->installer);

            $instaFeedWidget = [
                'instance_type' => 'Test\Xyz\Block\Widget\Instagram',
                'theme_id' => 2,
                'title' => 'Instagram',
                'store_ids' => '0',
                'widget_parameters' => '{"title":"Instagram ","numberimage":"16","resolution":"standard_resolution"}',
                'sort_order' => 0,
                'page_groups' => [[
                    'page_group' => 'pages',
                    'all_pages' => [
                        'page_id' => null,
                        //'group' => 'all_pages',
                        'layout_handle' => 'cms_index_index',
                        'block' => 'page.bottom',
                        'for' => 'all',
                        'template' => ''
                    ]
                ]]
            ];
        $this->widgetFactory->create()->setData($instaFeedWidget)->save();
    }
}

But I am facing error Test\Xyz\Setup\Installer does not exist

Any ideas will be welcomed.


texts: Extend a block and use new function in template

texts:
I've created a module to check which country the user has selected.

If the country is not in the EU, Magento should return a additional info when entering step 5 from the one page checkout.

This is my code:

app/code/local/Vendor/CustomsDuty/Block/Onepage.php:

<?php

class Vendor_CustomsDuty_Block_Frontend_CustomsDuty extends Mage_Checkout_Block_Onepage_Review_Info {

    public $_customsDuty;

    protected function _construct(){
        parent::_construct();
    }

    public function setCustomsDuty($input){
        $this->_customsDuty = $input;
    }

    public function getCustomsDuty(){

        //$this->setCustomsDuty($this->getShipping);
        $this->setCustomsDuty("123123123");

        return $this->_customsDuty;

    }

}

My app/code/local/Vendor/CustomsDuty/etc/config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
        <modules>
            <Vendor_CustomsDuty>
                <version>1.0.0</version>
            </Vendor_CustomsDuty>
        </modules>
        <global>
            <blocks>
                <customsduty>
                    <class>Vendor_CustomsDuty_Block</class>
                </customsduty>
            </blocks>
        </global>
        <frontend>
            <layout>
                <updates>
                    <configurable module="Vendor_CustomsDuty">
                        <file>configurable.xml</file>
                    </configurable>
                </updates>
            </layout>
        </frontend>
     </config>

And I enabled the module in app/etc/modules/ by creating a custom xml.

In the /app/design/frontend/vendor/default/template/checkout/onepage/review/info.phtml I've put in the following:

<?php

    $this->getCustomsDuty();

?>

However, at the desired position, there is no output, not even a echo or a failure. What have I done wrong here? What do I need to get at least ANYTHING on the desired position?


texts: Custom field in sales_flat_quote_item not being transferred to sales_flat_order_item

texts:
Both tables have the same custom field added to it.
I have an observer listening for "sales_quote_item_set_product". I'm setting the field like this:

$quoteItem->setData("custom_code", "TEST");

If I go to sales_flat_quote_item, I can see the custom_code field being populated with "TEST".  Once I place the order, the corresponding entry in sales_flat_order_item still has custom_code==null.

Do I need to listen for another event? Is there one like sales_order_item_set_product?  I searched around and didn't see anything.


texts: UPS shipping option sort order defaults to most expensive

texts: We offer a handful of UPS shipping options, they show up on the checkout page lest expensive to most expensive, however the redo button defaults to the most expensive. I would like it to default to which ever is the least expensive option.


texts: Magento 2 Error: technical problem with the server created an error on logo upload Magento 2.3.0

texts:
On Magento 2.3.0 version when you try to upload logo for theme from admin side it will gives error as below:

  "technical problem with the server created an error."

Is there something wrong with javascript?


texts: Magento 2 display out of stock products at the end of the catalog

texts:
I want to display out of stock products at the end of the listing page.

I have followed the link here, getting error: Exception #0 (Zend_Db_Select_Exception): You cannot define a correlation name '_inventory_table' more than once

How can I do?


texts:
New to magento, I'm trying to override vendor/Amasty/Promo/view/frontend/templates/notification.phtml called in vendor/Amasty/Promo/view/frontend/layout/default.xml

So I've added the file in this locationdesign/frontend/MYTHEME/default/Amasty_Promo/templates/notification.phtml

The override is still not working. Any ideas ?

EDIT

default.xml

<body>
    <referenceBlock name="main.content">
        <block class="Magento\Framework\View\Element\Messages" name="messages" as="messages" template="Magento_Theme::messages.phtml" before="-"/>
        <block class="Amasty\Promo\Block\Notification" name="amasty.promo.notification" before="-"/>
    </referenceBlock>
</body>


texts: How to load another language variables by REST API

texts:
How to load the another language storeview variables /text like product name and others in REST API.

I need this type of multi language website for get the api response like below

Arabic - http://www.example.com/index.php/rest/ar/V1/products?fields=items&searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][0][value]=288&searchCriteria[filterGroups][0][filters][0][conditionType]=in&searchCriteria[filterGroups][1][filters][0][field]=status&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq&searchCriteria[sortOrders][0][field]=created_at&%20searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1

English - http://www.example.com/index.php/rest/en/V1/products?fields=items&searchCriteria[filterGroups][0][filters][0][field]=category_id&searchCriteria[filterGroups][0][filters][0][value]=288&searchCriteria[filterGroups][0][filters][0][conditionType]=in&searchCriteria[filterGroups][1][filters][0][field]=status&searchCriteria[filterGroups][1][filters][0][value]=1&searchCriteria[filterGroups][1][filters][0][conditionType]=eq&searchCriteria[sortOrders][0][field]=created_at&%20searchCriteria[sortOrders][0][direction]=DESC&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1

Please anyone tell me to achieve like this.. Thanks in advance


texts:
<?php  require_once "app/Mage.php";

    Mage::app()->setCurrentStore(Mage::getModel('core/store')->load(Mage_Core_Model_App::ADMIN_STORE_ID));
    $installer = new Mage_Sales_Model_Mysql4_Setup;
    // change details below:
    $attribute  = array(
        'type' => 'int',
        'label'=> 'IceCatID',
        'input' => 'text',
        'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
        'visible' => true,
        'required' => false,
        'user_defined' => true,
        'default' => "",
        'group' => "General Information"
    );
    $installer->addAttribute('catalog_category', 'IceCatID', $attribute);
    $installer->endSetup();?>

I created Custom attribute for category it's working fine but how to get api in this custom attribute we are developing Android App.


texts: product.info.details already has a child with alias 'additional'

texts:
[2019-07-04 07:03:12] main.CRITICAL:
Magento\Framework\Exception\LocalizedException: The element
'product.info.details' already has a child with alias 'additional' in
/var/www/html/elec/vendor/magento/framework/Data/Structure.php:611
Stack trace:
0 /var/www/html/elec/vendor/magento/framework/Data/Structure.php(319):
Magento\Framework\Data\Structure->_insertChild('product.info.de...',
'product.attribu...', NULL, 'additional')


texts: String Replace Product Name Breaks with '&' in Title

texts:
I have a string replace that removes the 'manufacturer' name from a product title. However, it does not work if the manufacturer name has an & (e.g. Dolce & Gabanna) in it. Can someone please suggest an edit to the below code to get it working?

CURRENT CODE in LIST.PHTML

<?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>">
<?php echo $_product->getAttributeText('manufacturer');?>

<?php $lowermenu=strtolower($_product->getAttributeText('manufacturer'));
$manufacture=array($lowermenu,$_product->getAttributeText('manufacturer')); echo str_replace($manufacture,' ',$_helper->productAttribute($_product, $_product->getName(), 'name')); ?>


texts: Magento 2.3.1 varnish and cloudlfare - pages not caching as expected

texts:
We have a Magento 2.3.1 store that uses CloudFlare and has Varnish enabled. If we use wget or curl to load a page, that page is cached in Varnish if we try wget or curl again on that same page.

However, if we test that URL via a browser, the page is not cached. It is cached after the first browser visit, and then remains cached on reloads from a browser.

We added the CF+Varnish rules as listed at:
https://support.cloudflare.com/hc/en-us/articles/200169376-Can-I-use-Cloudflare-and-Varnish-together-

but that did not seem to make a difference. We're using the recommended Magento default.vcl file that is generated.

Any ideas what could be stopping a wget/curl from loading a page into the Varnish cache such that any request from a browser would be served that cached page instead of causing Varnish to cache the page again?

Wget request:

/usr/bin/wget --no-cache --wait=0.3 --no-check-certificate --delete-after --header="user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" --header="Cache-control: max-age=0" --header="Accept-Language: en-US,en;q=0.5" --header="Accept-encoding: gzip, deflate" -S 'https://XXXX'
--2019-07-20 09:14:14--  https://XXXX
Resolving XXXX... 1.2.3.4
Connecting to XXXX|1.2.3.4|:443... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Server: nginx
  Date: Sat, 20 Jul 2019 13:14:16 GMT
  Content-Type: text/html; charset=UTF-8
  Content-Length: 51021
  Connection: keep-alive
  X-Content-Type-Options: nosniff
  X-XSS-Protection: 1; mode=block
  X-Frame-Options: SAMEORIGIN
  Vary: Accept-Encoding
  X-Magento-Cache-Control: max-age=86400000, public, s-maxage=86400000
  Content-Encoding: gzip
  Age: 0
  X-Magento-Cache-Debug: MISS
  Pragma: no-cache
  Expires: -1
  Cache-Control: no-store, no-cache, must-revalidate, max-age=0
  Accept-Ranges: bytes
  Access-Control-Allow-Origin: *
Length: 51021 (50K) [text/html]

Browser response/header after wget runs:

accept-ranges: bytes
access-control-allow-origin: *
age: 0
cache-control: no-store, no-cache, must-revalidate, max-age=0
content-encoding: gzip
content-length: 51023
content-type: text/html; charset=UTF-8
date: Sat, 20 Jul 2019 13:14:29 GMT
expires: -1
pragma: no-cache
server: nginx
status: 200
vary: Accept-Encoding
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-magento-cache-control: max-age=86400000, public, s-maxage=86400000
x-magento-cache-debug: MISS
x-xss-protection: 1; mode=block
----
----
:authority: XXXX
:method: GET
:path: /YYYY
:scheme: https
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9
cookie: mage-translation-storage=%7B%7D; mage-translation-file-version=%7B%7D; newsletter_popup=dontshowitagain; ku1-vid=e5cf0293-7c71-74d9-10df-ffd19dcd11bb; ku1-sid=UvdxKNYS6MKRhvKZFJN9a; _fbp=fb.1.1563628017878.1828386074; recordID=c7f615a9-d0c2-41d5-8ccc-7a11beee21b1; dmSessionID=c2397d68-85b5-4f04-ad24-0c5e92e69a57; __tawkuuid=e::XXXX::dr5R22jZlQVd2e0p7XTrs0xIAaO+8YriwgvRE8yBIalE8AkHbZFPjEheVHdRnQCI::2; form_key=WRPXsJkeLSDLVwoN; _gcl_au=1.1.997920531.1563628021; mage-cache-storage=%7B%7D; mage-cache-storage-section-invalidation=%7B%7D; mage-banners-cache-storage=%7B%7D; mage-messages=; _ga=GA1.3.129667006.1563628021; _gid=GA1.3.1515936369.1563628021; X-Magento-Vary=8bed0844a67603e244f2ca107da80466ff383efd; recently_viewed_product=%7B%7D; recently_viewed_product_previous=%7B%7D; recently_compared_product=%7B%7D; recently_compared_product_previous=%7B%7D; product_data_storage=%7B%7D; PHPSESSID=2197268281d0aedc4015f7be1f5974d7; mage-cache-sessid=true; section_data_ids=%7B%22cart%22%3A1563628090%7D; TawkConnectionTime=0
referer: https://XXXX/ZZZZ
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
----


texts: Magento 2 Mini-cart doesn't close when click on outside in iPhones

texts:
How can we close the mini cart popup on Magento 2? (clicking outside is not working). I have already tried the following method on footer.phtml. It's working on android phones and browsers but iPhones, it is not working.

<script>
   require(['jquery', 'jquery/ui'], function($){
     jQuery(document).ready( function() {

      $('body').click(function (event)
      {
         element = $(event.target);
         if(element.parents('.skip-link.skip-cart').length1 || element.hasClass('skip-cart'))
           {
             return;
           }

           var parent = $('.minicart-wrapper').parents('.skip-content');
           var link = parent.siblings('.skip-link');

         if (element.parents('.minicart-wrapper').length == 0)
           {
             parent.removeClass('skip-active');
             link.removeClass('skip-active');
           }
      });
    });
  });
</script>


texts: Remove a UI component child via Layout XML

texts:
How do I remove a UI component child via Layout XML?
For example, from the below xml directive in checkout_index_index.xml. How do I remove the shipping node ?

<item name="sidebar" xsi:type="array">
    <item name="children" xsi:type="array">
        <item name="summary" xsi:type="array">
            <item name="children" xsi:type="array">
                <item name="totals" xsi:type="array">
                    <item name="children" xsi:type="array">
                        <item name="subtotal" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="title" xsi:type="string" translate="true">Subtotal</item>
                            </item>
                        </item>
                        <item name="shipping" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="title" xsi:type="string" translate="true">Estimated Shipping</item>
                            </item>
                        </item>
                        <item name="grand-total" xsi:type="array">
                            <item name="config" xsi:type="array">
                                <item name="title" xsi:type="string" translate="true">Estimated Total</item>
                            </item>
                        </item>
                    </item>
                </item>
            </item>
        </item>
    </item>
</item>

The shipping node can be removed using plugin but I just thought there should be a be a better way like a remove node attribute.


texts: I am finding the shopping cart page of my store is being indexed. How can I noindex the URL https://www.example.com.au/checkout/cart/ ?


texts: Magento 2: Add a new custom input field in order > invoice

texts:
I am trying to add new input field in Sales > Order > Invoice, this would be related to shipping method. This Custom field should be show in Invoice Shipping Method section.

I was all ready add field in sales_order tabel so we can directly access Like. $order->getShipmentDetails().

Can some one let me know how i need to proceed for this .


texts: How do I return a 404 page for pages beyond category pagination pages?

texts:
That title sounds confusing, sorry.

But basically I have a category grid page, with pagination.

So I have pages like:

/men/tops/shirts.html
/men/tops/shirts.html?p=2
/men/tops/shirts.html?p=3

This is all fine and good, but if I do this:

/men/tops/shirts.html?p=987654

That URL will load the last available page of products. How do I instead make this return a 404 error?

Basically I need to do this for Infinite Scroll's sake. Otherwise my infinite scroll keeps loading the last page of products and never ends.


texts: How to get the Customer Password in Magento?

texts:
I have got the Hash Password by using code

$this->getCustomer()->getPasswordHash()

how to decrypt Hash Password ?

Thanks


texts: Magento 2: Cron job not Calling Function [SOLVED]

texts:
Running Magento 2 on my local WAMP Windows 10

I'm following below 2 Tutorials

[1] https://www.atwix.com/magento-2/setting-up-cron-jobs/

namespace Custom\Module\Cron;

class MyCronTask {

    public function execute() {
        /**
         *  Do some cool stuff here
         */
        echo "hi";
        exit;

        return $this;
    }
}

When i run through command line it' not displaying message "Hi".

php bin/magento cron:run --group="my_cronjobs"
Ran jobs by schedule.

It only says "Ran jobs by schedule."

[2] http://inchoo.net/magento-2/running-cron-jobs-in-magento-2/

When i run

php bin/magento setup:cron:run
setup-cron: Please check var/log/update.log for execution summary.

In update.log it keep says

  [2016-09-26 09:59:38] setup-cron.ERROR: Your current PHP memory limit
  is 80000M. Magento 2 requires it to be set to 756M or more. As a user
  with root privileges, edit your php.ini file to increase memory_limit.
  (The command php --ini tells you where it is located.) After that,
  restart your web server and try again. [] []

I already increase memory_limit in php.ini up to 80000M. Cleared cache as well.


texts: How to edit checkout page code in magento 2

texts:
My website checkout page is https://mywebsite.com/checkout/
Could anyone please tell me where is this page in my magento directory
Because i want to add some code in checkout page . Currently i have 2 payment gateway. I want to hide one payment gateway some time based on some conditions .
for example i have to execute the following code in my checkout page
$items = $cart->getItems();
            $ter = 0;
            $mes=0;

            foreach($items as $item){

                $attribute1 = $item->getProduct()->getData('mynewattribute');

                if($attribute1){
                    $ter++;
                    $mes++;
                }else{
                    $ter--;
                }
            }

            and some code


texts:
I am receiving this error:

  Uncaught exception 'InvalidArgumentException' with message 'Constant name is expected.

While running php bin/magento setup:upgrade in command line.

i got this http://awesomescreenshot.com/0535zi4648 error.


texts: NOINDEX,NOFOLLOW for selected category pages

texts:
I'm reading this, and it says that you can add NOINDEX,NOFOLLOW directives using page handles on files like local.xml. What I want to do is to include these directives for a certain selected set of category pages.

It also says you can do this in general under layout updates in CMS pages. I'm assuming the counter part in categories is the custom layout update under Catalog > Categories > Custom Design tab. So, I'm thinking I can put the following in the categories I selected.

<reference name="head">
   <action method="setRobots"><value>NOINDEX,FOLLOW</value></action>
</reference>

Is this correct for what I want to do?

I also see an option called Page Layout under which there are options like No layout updates, 1 column, etc.. Does this need to be modified as well?

It looks like this works, but I want to confirm.


texts:
There is a similar question is asked here

But here I am asking other way around. Can I use magento 2.0 module at magento 1.9?


texts:
I am trying to have all product url keys automatically generated this way:

site.com/manufacturer-productname-sku.html

I managed to add the SKU adding to the file /app/code/local/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php:

public function beforeSave($object)
    {
        $attributeName = $this->getAttribute()->getName();

        $urlKey = $object->getData($attributeName);
        if ($urlKey === false) {
            return $this;
        }
        if ($urlKey == '') {
            $urlKey = $object->getName().'-'.$object->getSku();
        }

      $object->setData($attributeName, $object->formatUrlKey($urlKey));

        return $this;
    }

Adding getManufacturer() or getData('manufacturer') are not working, so the $_product->getAttributeText

Any suggestion?

It would also be better if the SKU kept the capital letters, but that's an option.


texts: observer event after order invoice status paid executed in magento 2

texts: I am working on this Magento 2 extension and part of the features is need to entry in another table where order total will be inserted. so what I need is to find order invoice status paid event observer.How can I get order invoice status paid event in observer?


texts:
After recent update of a Amasty Shipping & Payment By Customer Groups plugin, it stopped working.

After running a conflict check in n98-magerun, I got a conflict like this:

Anyone could guide me how to solve this nicely? Thank you for your interest.

They both extend Mage_Payment_Helper_Data

Here are two files:
Amasty:

<?php
/**
 * @author Amasty Team
 * @copyright Copyright (c) 2017 Amasty (https://www.amasty.com)
 * @package Amasty_Methods
 */

class Amasty_Methods_Helper_Payment_Data extends Mage_Payment_Helper_Data
{
    const PAYMENT = 'payment';

    public function getStoreMethods($store = null, $quote = null)
    {
        $methods = parent::getStoreMethods($store, $quote);
        if (!$quote) {
            return $methods;
        }

        if ( Mage::helper('ammethods')->isNullGroups(self::PAYMENT)) {
            $newMethods = array();
            $customer = $quote->getCustomer();
            foreach ($methods as $k => $method) {
                if (!Mage::helper('ammethods')->canUseMethod($method, self::PAYMENT, $customer)) {
                    continue;
                }
                $newMethods[$k] = $method;
            }
            $methods = $newMethods;
        }

        return $methods;
    }
}

SagePay:

<?php

/**
 * REWRITE Mage_Payment Helper
 *
 * @category   Ebizmarts
 * @package    Ebizmarts_SagePaySuite
 * @author     Ebizmarts <info@ebizmarts.com>
 */

class Ebizmarts_SagePaySuite_Helper_Payment_Data extends Mage_Payment_Helper_Data
{
    /**
     * Retrieve all payment methods
     *
     * @param mixed $store
     * @return array
     */
    public function getPaymentMethods($store = null)
    {
        $_methods = parent::getPaymentMethods($store);

        if (isset($_methods['sagepaysuite'])) {
            unset($_methods['sagepaysuite']);
        }
        return $_methods;
    }
}

I want to make sure I rewrite them properly and looking for some advice.


texts: Put a trailing slash at the end of CMS URL without redirection

texts:
I would to put a trailing slash at the end of my CMS URL, but without make redirection when it's possible : I want to put this slash when the URL is build.

In the BO, in CMS page, we can define url key, for instance "my-url". In the website, we can access to this url by :
example.com/my-url or example.com/my-url/ (both work).

In CMS bloc, we can call this url with the following code :
{{store url="my-url"}} or {{store url="my-url/"}}.

So, what is the most recommended ?

1 - Update all content CMS bloc and change {{store url="my-url"}} by {{store url="my-url/"}}.
=> but how change that in mass ?

2 - Override the url build and have this url example.com/my-url/ even if it's {{store url="my-url"}} in the bloc.
=> but how make this override ?

3 - Another idea ?

Thank you for your suggestions.


texts: Programmatically Remove Shipping tax on checkout

texts: Hello I wish to remove shipping tax from the quote programmatically under specific condition.So please give me idea how to remove it.


texts: CE 1.8.1 stockitem event observer not executed

texts:
I need some help.

I have added a custom attribute to the cataloginventory/stockitem table and now I am trying to observe the cataloginventory_stock_item_save_before event to set my custom attribute before saving.

<global>
    <events>
        <cataloginventory_stock_item_save_before>
            <observers>
                <mypackage_mymodule_stocknote>
                    <type>singleton</type>
                    <class>Mypackage_Mymodule_Model_Observer</class>
                    <method>stocknote</method>
                </mypackage_mymodule_stocknote>
            </observers>
        </cataloginventory_stock_item_save_before>
    </events>
</global>

This should be triggered every time a stock_item model is saved, thus when an order is placed or when a product saved, right?
I am testing the observer with a print and die command, but it doesn't look like my observer is executed. To add to the confusion, it works fine, with the same configuration, if I call cataloginventoriy_stock_item_save_after event instead.

Anyone got a hint for me what I am doing wrong? I need to set some custom attribute in the stock_item before it is saved, alternate approaches also welcome.


texts: error-opening-system> configuration >Customer configuration

texts:
When trying to open System>Configuration>Customer configuration > edit customer I get an error which produces the following error report:

Invalid config field backend model: adminhtml/system_config_backend_customer_show_address

Trace:
#0 /home/expoetce/public_html/dev/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(328): Mage::throwException('Invalid config ...')
#1 /home/expoetce/public_html/dev/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(229): Mage_Adminhtml_Block_System_Config_Form->initFields(Object(Varien_Data_Form_Element_Fieldset), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#2 /home/expoetce/public_html/dev/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php(164): Mage_Adminhtml_Block_System_Config_Form->_initGroup(Object(Varien_Data_Form), Object(Mage_Core_Model_Config_Element), Object(Mage_Core_Model_Config_Element))
#3 /home/expoetce/public_html/dev/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php(92): Mage_Adminhtml_Block_System_Config_Form->initForm()
#4 /home/expoetce/public_html/dev/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php(107): Mage_Adminhtml_Block_System_Config_Edit->initForm()
#5 /home/expoetce/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Adminhtml_System_ConfigController->editAction()
#6 /home/expoetce/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('edit')
#7 /home/expoetce/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#8 /home/expoetce/public_html/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#9 /home/expoetce/public_html/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#10 /home/expoetce/public_html/dev/index.php(87): Mage::run('', 'store')
#11 {main}


texts: Magento: what is the `customer_payment` entity type used for?

texts:
Short version:

In our Magento database we have 40 records in our customer_entity table that have an entity_type_id that maps to an entity_type_code of 'customer_payment' in the eav_entity_type table. They are stopping us from converting to global account sharing between our stores. What are they for and can they safely be deleted?

Long version:

We are preparing to launch our second store on Magento Enterprise Edition v1.12.0.2 and we have recently decided to turn on global customer account sharing before launching the new storefront. All that should be required for this is to ensure that there are no email address collisions between the two stores' accounts, so I deleted test accounts for the new storefront expecting that we would be set but that is not the case.
Upon inspection of the records in the customer_entity table I found 40 records as described in the "short version" above. They are all created in quick succession of one another- just a handful of seconds to create them all- which leads me to believe that they must be auto-generated. Most fields are null or set to zero, including store_id, website_id, and email.
I searched every table that had a foreign key reference to the entity_id field of the customer_entity table for occurrences of the offending ids but they do not appear to be related to any other records in any other tables, at least not to those that enforce a foreign key relationship. It appears that even if they were related by foreign key relationships the database schema would gracefully cascade deletes and set values to null as needed.
A Google search for Magento & customer_payment yields very few results and none of any real use. All I've been able to determine is that 'customer_payment' appears to be a default entity type for Magento. I even went as far as to do a fresh install to see if the customer records might be auto generated at install time, but that is not the case.
So why are these present? What purpose do they serve, what generated them, and most importantly can I safely delete them?


texts:
I have a script to import a list of product from xls. It works fine except for the image; I use the following bits of code:

...

if(file_exists(Mage::getBaseDir('media') . DS . 'import' . DS . $gallery_img)){
    $product->addImageToMediaGallery(Mage::getBaseDir('media') . DS . 'import' . DS . $gallery_img, null, false, false);
}

...

The image is actually added to the product but it's not selected, so it does not show in the frontend:

How can I "select" it programmatically?

Thanks


texts: Magento 2.1 Disconnection repeated when many users

texts:
i created 10 account for the backend.
each user will be to able to place an order from the administration.

The problem is when there are more than three users connected at the same time, we often have sudden disconnections.

I have configured session_lifetime at 86400 but It has no effect.

Anyone have an idea?
Thanks


texts: CE 1.9.2 - Create Product Attribute based on Custom Module

texts:
Sorry, I know the title sounds vague and could be misleading, but here is what I have and what I would like to achieve.

I have successfully created an extension which manages Product Distributors. The table for this holds data such as Distributor ID (entity_id), Distributor Name, Email Address, Contact Number, Contact Person, Postal Address and Comments.

What I would like to achieve now is to have a new dropdown list under the General Tab on Product Management, allowing the admin user to choose the associated Distributor for that product (Text will be distributor_name while Value will be entity_id). I realise that the Product Management screen is made up mainly of Attributes, hence me now asking how to achieve this?


texts:
I have followed few instructions found in this forum, but I must be missing something. I am trying to override Contacts controller, specifically postAction method. Here is what I have got:

Magento version: 1.9.3.1;
Namespace: MageOverload;
Module: ContactsModule;

/app/code/local/MageOverload/ContactsModule/etc/config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <MageOverload_ContactsModule>
            <version>1.0.0</version>
        </MageOverload_ContactsModule>
    </modules>
    <frontend>
        <routers>
            <contactsmodule>
                <args>
                    <modules>
                        <MageOverload_ContactsModule before="Mage_Contacts">MageOverload_ContactsModule</MageOverload_ContactsModule>
                    </modules>
                </args>
            </contactsmodule>
        </routers>
    </frontend>
</config>

/app/etc/modules/MageOverload_ContactsModule.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <MageOverload_ContactsModule>
            <active>true</active>
            <codePool>local</codePool>
        </MageOverload_ContactsModule>
    </modules>
</config>

/app/code/local/MageOverload/ContactsModule/controllers/IndexController.php:

<?php
require_once Mage::getModuleDir('controllers', 'Mage_Contacts') . DS . 'IndexController.php';
class MageOverload_ContactsModule_IndexController extends Mage_Contacts_IndexController
{
    public function postAction() {
        //... custom code
    }
}

I have flushed cache, custom module is visible via magento admin panel, but still the system is using Mage core files for Contacts. Any help would be greatly appreciated.


texts: Error Duplicating Product Magento 2.1.2?

texts:
After updating my Magento installation from 2.0.x to 2.1.2 I cannot duplicate products.

Suppose I try to duplicate a product with SKU number '10', duplication then yields the following error:

  Product with SKU '10' is not linked to product with SKU '10-1'

I duplicate products by the following procedure:

go to products/catalog
choose a product in the list
click on the arrow on the orange "Save" button and select "Save & Duplicate"

--> error

In the 2.0.x installation, I could duplicate products this way without any issue.


texts:
I'm having a hard time finding out what is causing these errors, but they only started once I was able to get my CronJobs working, so I believe they are tied to that.
I am calling the Magento Crons by Cpanel command:

  */5 * * * * /usr/php/54/usr/bin/php /MyServerInfo/public_html/cron.php >/dev/null &2>1

(I wanted to call Cron using cron.sh but was unable to get that to work, if interested in that struggle see post: Cronjobs Magento 1.9.2.2 - Is it possible to have Cron.sh call Cron.php by /usr/php/54/usr/bin/php)

I am getting these in my system.log file every 5 minutes, which matches the CronJob timeline:

2016-01-14T01:55:01+00:00 ERR (3): Warning: strpos(): Empty needle  in /MyServerInfo/public_html/lib/Zend/Controller/Request/Http.php on line 508
2016-01-14T01:55:01+00:00 ERR (3): Warning: strpos(): Empty needle  in /MyServerInfo/public_html/lib/Zend/Controller/Request/Http.php on line 514

And this in my error_log every 5 minutes as well:

[13-Jan-2016 23:40:01 UTC] PHP Notice:  Undefined index: SCRIPT_NAME in /MyServerInfo/public_html/cron.php on line 41
[14-Jan-2016 18:55:02 UTC] PHP Notice:  Undefined index: SCRIPT_NAME in /MyServerInfo/public_html/cron.php on line 40

I have been doing research and the best I have been able to find is a "temporary solution" that involves altering the Core files, which I would prefer not to do. I would rather fix the underlying problem if possible:
See a temporary solution to this problem:

Edit file: lib/Zend/Controller/Request/Http.php

Line 504: if (0 === strpos($requestUri, $baseUrl)) {

Replace with:

if (!empty($baseUrl) && 0 === strpos($requestUri, $baseUrl)) {

Line 510:

if (0 === strpos($requestUri, dirname($baseUrl))) {

Replace with:

if (!empty($baseUrl) && 0 === strpos($requestUri, dirname($baseUrl))) {

I also found this related post: Cron.php undefined index 'SCRIPT_FILENAME'

But it seems like they are talking about doing something with command line access, which I do not have. Only Cpanel.

Any help or direction would be appreciated.


texts: create button beside proceed to checkout button

texts:
I am beginner in learning Magento ver. 1.9. I need to create custom button in checkout/cart page exactly beside of proceed to checkout button

How to do that?

I found solution regarding this question but can not find any exact solution.


texts: Merge Shipping methods and Payment methods in one checkout step

texts:
Is it possible in easy step to move payment selection form from payment_methods step into shipping_method step?

What I want to achieve is to display shipping methods, and after select one of them display payment methods under shipping methods - on the same step without hiding shipping methods step.


texts: Magento 2 Observer customer_register_success

texts: I have a new field in customer register form named referral_code i just want to get this field data in my UpdateCustomerMeta observer how can i get the value of the field "referral_code" in observer of customer_register_success


texts: Get a quote(Shipping methods estimation) not working in first time

texts:
I am using aheadworks iphone theme in Magento 1.7.0.0. But the get a quote or calculate shipping section is not working in first time.

I have invested the issues and found that when I add product to cart its create two entries in sales_flat_quote_address table and then I calculate the shipping by entering zipcode in calculating shipping form.

The old entries deleted which was created during add to cart and it create new entries rather than updating the add to cart entities in sales_flat_quote_address.

But in case I calculate shipping second time its updating the entries second time.
I am using the core method checkout/cart/estimatePost.

Please help me in case you have any idea regarding this issue.

Thanks


texts: Total Weight in Cart Summary. Change symbol

texts: Using this tutorial https://www.siphor.com/add-a-custom-total-in-magento-2/ I created a totals for total weight of products. Generally it almost works but the prefix with currency symbol is automaticaly added to my total. I would like to change it to "lbs". How can I do that?


texts: debugging: renderCategoriesMenuHtml returning empty

texts:
We have a strange error. When an extension is installed (adds href-lang to head) then menu header is empty (no menu aruments).

Extension on: renderCategoriesMenuHtml returns ""

Extension off: renderCategoriesMenuHtml returns "menu item1; menu item 2 etc"

My conclusion is that $this object might be changed/lost. How can we debug this?

** Function called in top.phtml to generate menubar

<?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>

** File/function in core catalog/block/navigation

public function renderCategoriesMenuHtml($level = 0, $outermostItemClass = '', $childrenWrapClass = '')
{
    $activeCategories = array();
    foreach ($this->getStoreCategories() as $child) {
        if ($child->getIsActive()) {
            $activeCategories[] = $child;
        }
    }
    $activeCategoriesCount = count($activeCategories);
    $hasActiveCategoriesCount = ($activeCategoriesCount > 0);

    if (!$hasActiveCategoriesCount) {
        return 'Goes wrong here when extension is activated';
    }

Part of extension block rewrite: construct ok? extend ok?

class Module_HrefLang_Block_Head extends Mage_Core_Block_Template {

    protected function _construct() {
        parent::_construct();
    }

    public function getAlternateUrls() {
        return $this->helper('alternatelang')->getAlternateUrls();
    }

}


texts: Readiness Check - PHP Settings Check Error

texts:
I am trying to enable a module through the backend (after failed attempts from Putty). But im getting and error. im sharing the image below

I am not able to find a php ini file in my root directory but i say user.ini and .htaccess and both of them contain memory_limit = 756M

i tried to run the command shown in the image. the result i have is

carefdgi@md-in-63 [~/public_html]# php --ini
Configuration File (php.ini) Path: /opt/alt/php70/etc
Loaded Configuration File:         /opt/alt/php70/etc/php.ini
Scan for additional .ini files in: /opt/alt/php70/link/conf
Additional .ini files parsed:      /opt/alt/php70/link/conf/alt_php.ini

not able to find such a folder.


texts: Magento 2 : Use of shims in requirejs-config.js file

texts:
Can anyone explain me what is the use of shims dependencies in requirejs-config file?
Doing much of research but I hasn't found exact answer for this.


texts:
after created symlinks my owl carousel not working when i open console it shows

    owl.carousel.js:1794Uncaught TypeError: Cannot read property 'fn' of undefined(anonymous function) @ owl.carousel.js:1794(anonymous function) @ owl.carousel.js:1808
    custom.js:1 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ custom.js:1
    owl.carousel.js:1794 Uncaught TypeError: Cannot read property 'fn' of undefined(anonymous function) @ owl.carousel.js:1794(anonymous function) @ owl.carousel.js:1808
     jquery-migrate.js:21 JQMIGRATE: Logging is active
   (index):914 Uncaught TypeError: jQuery(...).owlCarousel is not a       function(anonymous function) @ (index):914context.execCb @ require.js:1650Module.check @ require.js:866(anonymous function) @ require.js:1113(anonymous function) @ require.js:132(anonymous function) @ require.js:1156each @ require.js:57Module.emit @ require.js:1155Module.check @ require.js:917Module.enable @ require.js:1143Module.init @ require.js:774callGetModule @ require.js:1170context.completeLoad @ require.js:1564context.onScriptLoad @ require.js:1671


texts: Is extending stock knockout objects a good practice in Magento 2?

texts: I'm writing an extra step in the M2 checkout. There are already written well structured models and actions in Magento_Checkout/js. Should I extend them (for instance js/model/quote or js/model/resource-url-manager) with underscore's _.extend() , or rather create my own from scratch?


texts: Multiple configurable products in list.phtml

texts:
Customers have to be able to buy from the category page configurable products. The issue is that the configurable block is created just once for the first product. So no matter what product I add to cart, it is always the first product of the category that ends in cart.

I tried the solution here with no success: Mage::registry not updating

I am following the tutorial here: http://inchoo.net/magento/display-multiple-configurable-products-with-options-on-one-page-in-magento/

I tried something like this:

//foreach loop
<?php Mage::unregister('product') ?>
<?php Mage::register('product', $_product); ?>
<?php
    echo $this->getLayout()->createBlock('catalog/product_view_type_configurable')
      ->setTemplate('catalog/product/view/type/options/configurable_category.phtml')
      ->setProduct($_product)
      ->toHtml();

with no success.
If I try getBlock() method I get false and an error (setTemplate called on a non-object).

How can I create that block for each configurable product? Or is there a better way? This solution with Mage::unregister('product') looks hacky.


texts: Installation page randomly shows up in production

texts:
Since a couple of days while accessing both the admin interface or the frontend I'm randomly redirected to /index.php/install/ url that asks me to install a new instance of magento.

This is very annoying and also a security risk, since everybody could overwrite my install.

Any idea on how I can fix it?

The store is working fine and there are no other suspect signs.


texts:
Has anybody ever seen a one page shop in magento.
Looking for a template one page shop or cloud someone please give an advice.


texts: Magento2.3.2 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException):

texts:
Facing error while exporting customer main file

Help to solve this issue...


texts:
I want to create a template file in sales->order->create new order for showing custom comment.so i create a template file set in sales_order_create_index layout.But It not displaying in admin order creation form.

In layout file(sales_order_create_index.xml):

<?xml version="1.0"?>
    <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="billing_method">
                <block class="Magento\Backend\Block\Template" template="Xxx_Order::order/create/billing/method/form.phtml" name="order_create_billing_form" as="form" />
            </referenceContainer>
        </body>
    </page>

It only showing after reloading that form.

If any changes in my layout file. I've checked the code but can't find the problem. Anyone can help? Thanks.


texts:
I added my custom js in my module js file. But I need to use the functionality in the checkout input field. But I don't know how I can let my .html file use that custom js function. Below are my code
My Custom JS is located in app/code/Vendor/Module/view/frontend/web/js/ecard-checker.js
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

define([
    'jquery',
    'Magento_Checkout/js/model/quote',
    'jquery/ui'
], function ($, quote) {
    'use strict';

    $.widget('mage.ecardChecker', {
        /**
         * @return {Boolean}
         */
        hasEcard: function () {
            return quote.isVirtual();
        }
    });

    return $.mage.ecardChecker;
});

And this is my requirejs-config located in app/code/Vendor/Module/view/frontend/requirejs-config.js
var config = {
    "map": {
        "*": {
            ecardChecker: 'Vendor_Module/js/ecard-checker'
        }
    }
};

And the Input field is located in app/design/frontend/Vendor/Module/Magento_UI/web/templates/form/field.html

Now I don't know how to let Magento know that it should use the ecard-checker and it's function hasEcard() in the Magento_UI field.html.. I already added the requirejs and did the setup:upgrade, setup:di:compile and static-content deploy but it's still can't find the function I get the error


texts: Save() on custom model creates new object in the database instead of overwriting the old one

texts:
I've created a custom model in my custom module. See dummy code below. When i loop through a collection and call save on my object, it creates a NEW object in the database instead of saving on the old object. Why does this happen?

$myCustomCollection = Mage::getModel('my_custom/custom')
    ->getCollection()
    ->addFieldToSelect('*'); //Just dummy code

if($myCustomCollection !== 0) {

    foreach($myCustomCollection as $custom)
    {
        $something = $custom->getSomething();

        switch($something)
        {
            case "something":
                $this->doStuff($custom);
                break;
            default:
                $this->doOtherStuff($custom);
                break;
        }
    }
}

public function doStuff($custom) {
   $custom->setAnotherThing('Hey');
   $custom->save();
   //CALLING SAVE() CREATES A NEW OBJECT IN THE DB,
   //IT DOES NOT UPDATE THE OLD ONE..WHY?
}

If i create a random testfile and do a Mage::getModel('my_custom/custom')->load(1), update a random thing and then use save(), it updates the current model, so here it works fine. Any ideas?


texts:
We are looking for a method to build up the cms pages in Magento 2 with a tree structure so that you can set hierarchy. For Magento 1 you have several modules, but we didn't find anything for Magento 2 yet.

Does anyone have experience with a module for this in Magento 2?


texts:
I need a little help please.
Last days I am having this error in my magento 1.9.3.8 system log:
ERR (3): Warning: include(): Failed opening 'Mage/Themeframework/Model/Observer.php' for inclusion (include_path='/home/wpaper/public_html/app/code/local:/home/wpaper/public_html/app/code/community:/home/wpaper/public_html/app/code/core:/home/wpaper/public_html/lib:.:/usr/share/php')  in /home/wpaper/public_html/lib/Varien/Autoload.php on line 94

Can anyone help?


texts: How to get available quantity of product?

texts:
I am adding products in cart programmatically. But whenever I enter quantity more than available, it gives me a 503 error. e.g. Lets say a product has 7 quantity saved in admin and out of 7, 3 is already added into cart. So now 4 quantity is available.
But if I try to add more than 4 it gives me 503 error.

Now I want to add a check for quantity before adding into the cart. Is it possible?

I am using below code to add product into cart.

$_product = Mage::getModel('catalog/product')->load(1);
        $cart = Mage::getModel('checkout/cart');
        $cart->init();
        $cart->addProduct($_product, array('qty' => 5);
        $cart->save();
        Mage::getSingleton('checkout/session')->setCartWasUpdated(true);


texts: Magento - Call Customer Account Menu in CMS Page

texts:
I have a cms page set in two columns with the left side menu where I would adding customer account menu in left bar. I tried to call navigation.phtml in 2columns-left.phtml but I have only title "My Account" without links.

What can I do to get the customer menu links in my cms page ?

Thank you very much.


texts:
<script>
    //Using document.body.contains.
    if(document.contains(document.getElementByClassName[0]('wcEmoticon'))){
        document.getElementsByClassName[0]('wcMessageContent').element.classList.add("opened");
    } else{
        document.getElementsByClassName[0]('wcMessageContent').element.classList.remove("opened");
    }
</script>


texts: All product tags cloud on the Magento start page

texts:
I use Magento 1.9.3 and I would like to show all product tags on the start page.

Can somebody tell me the code I need to use and where I need to put in the code when I want to have the tag cloud shown in the footer of the start page?

Thank You very much.


texts: Why is start page missing from sitemap.xml?

texts:
I'm rather new on the Magento platform, but I've noticed a weird thing on a couple of my clients' websites. The home page is missing from the sitemap.xml.

In all cases the clients' home page is a CMS page and the CMS page has a URL key that is "home". Off course, the page www.client.com/home exists as a page and in the sitemap, but I am missing www.client.com in the sitemap.

This is really frustrating since I want to submit an as accurate as possible sitemap.xml to Google and Bing. Does anyone have a solution for this?