texts: Trying to add address information like phone etc but only name, email and password get posted to DB

texts:
The scenario : I am trying to register adress information such as phone, company name , etc via ajax using the youama ajax login/registration module. Right now only email, names, password seem to be posted. I am almost there but there must be doing something wrong in this the Model file: Ajaxregister.php

I took example from inchoo recent post: http://inchoo.net/magento/programming-magento/programmaticaly-adding-new-customers-to-the-magento-store/

It says that it should use Mage::getModel('customer/address') for adress data, and not Mage::getModel('customer/customer').

However I tryed and it does not post any phone/company name in the DB.

Here is the code below:

class Youama_Ajaxlogin_Model_Ajaxregister
    extends Youama_Ajaxlogin_Model_Validator
{
    /**
     * Init.
     */
    public function _construct()
    {
        parent::_construct();

        // Result for Javascript
        $this->_result = '';
        $this->_userId = -1;

        // Terms and conditions has been accepted
        if ($_POST['licence'] == 'ok') {
            $this->setEmail($_POST['email']);

            // If this email is already exist
            if ($this->isEmailExist()) {
                $this->_result .=  'emailisexist,';
            // If this email is not exist yet.
            } else {
                $this->setPassword($_POST['password'], $_POST['passwordsecond']);
                $this->setName($_POST['firstname'], $_POST['lastname']);
                $this->setCompany($_POST['company']);
                $this->setTelephone($_POST['telephone']);
                $this->setNewsletter($_POST['newsletter']);

                // If there are no errors
                if ($this->_result == '') {
                    // Try register user

                    $this->_registerUser();

                    // Try subscribe user to newsletter
                    if ($this->_userNewsletter == true) {
                        $this->_subscribeUser();
                    }
                }
            }
        // Terms and conditions has not been accepted
        } else {
            $this->_result = 'nolicence,';
        }
    }

    /**
     * Register user via Mage's API.
     */
    protected function _registerUser()
    {
        // Empty customer object
        $customer = Mage::getModel('customer/customer');
        $address = Mage::getModel('customer/address');

        $customer->setWebsiteId(Mage::app()->getWebsite()->getId());
        $address->setWebsiteId(Mage::app()->getWebsite()->getId());

        // Set customer
        $customer->setEmail($this->_userEmail);
        $customer->setPassword($this->_userPassword);
        $customer->setFirstname($this->_userFirstName);
        $customer->setLastname($this->_userLastName);

        $address->setCompany($this->_userCompany);
        $address->setTelephone($this->_userTelephone);

        // Try create customer
        try {
            $customer->save();
            $address->save();
            $customer->setConfirmation(null);
            $customer->save();

            $storeId = $customer->getSendemailStoreId();
            $customer->sendNewAccountEmail('registered', '', $storeId);

            Mage::getSingleton('customer/session')->loginById($customer->getId());

            $this->_userId = $customer->getId();

            $this->_result = 'success';
        // Error by injected HTML/JS
        } catch (Exception $ex) {
            $this->_result .= 'frontendhackerror,';
        }
    }


texts: PHP & Magento. Adding convert multiple PHP strings for a Helper/Data.php

texts:
I have this PHP code (found of Stackoverflow): This shows the available attributes on the catalog view page in Magento.

 <?php if($_product->isConfigurable()): ?>

      <?php //get attributes
      $attributes = $_product->getTypeInstance(true)->getConfigurableAttributes($_product) ?>
      <?php if(count($attributes)): ?>

        <?php foreach($attributes as $att): ?>
          <?php $pAtt=$att->getProductAttribute();
            //get the child products
            $allProducts = $_product->getTypeInstance(true)->getUsedProducts(null, $_product);
            $frontValues =array() ?>

<?php echo $pAtt->getFrontendLabel() ?>

           <?php foreach($allProducts as $p): ?>

             <?php //check stock, status, ...
             //do not show unsaleable options
           if(!$p->isSaleable()) continue; ?>
             <?php $out=$p->getAttributeText($pAtt->getName()); ?>
             <?php $frontValues[$out]=$out; ?>
           <?php endforeach ?>

<?php echo implode('

', $frontValues) ?>

        <?php endforeach ?>

      <?php endif ?>
    <?php endif ?>

But due to my theme i have to include this in a Helper file (data.php)

Could anyone help me convert this into a piece of code suitable for the data.php?

I tried to remove all <?php and ?>. But that doesn't work.


texts:
I am loading a CSS file via the local.xml this way:

<?xml version="1.0"?>

    <layout>
        <default>
            <reference name="head">
                <action method="removeItem"><type>skin_css</type><name>css/style.css</name></action>
                <action method="addItem"><type>skin_css</type><name>css/style.css</name></action>
            </reference>
        </default>
    </layout>

Only problem is that this file is loaded almost at the beginning of the head. How do I get this file, to be loaded at the end of the header?


texts: Restrict add to cart only to one product per cart in magento 2

texts: How to restrict cart in magento to only one product per customer?


texts: Fatal error: Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() should not throw an exception

texts:
I am trying to obtain the collection of table in magento2 and i stuck with below error

  Fatal error: Method Magento\Ui\TemplateEngine\Xhtml\Result::__toString() must not throw an exception, caught Error: Call to a member function getConnection() on null in D:\Projects\xampp\htdocs\slideteam_m2\vendor\magento\module-ui\Component\Wrapper\UiComponent.php on line 0

Do you have any idea how we can solve it!

Your answers are appreciated

Thanks!


texts: Run an SQL query from the Magento Admin Panel

texts:
Our company has recently started using Magento and we were told we could run SQL queries from the admin panel. I am familiar with MySQL, SQL queries but am NOT a Magento guru and therefore have no idea where to start. First of all, is it possible to run a SQL query from the admin panel in Magento? Second of all, where and how to i run a query from the admin panel? It would be nice if someone could provide me with an ELI5 (explain like i'm 5) answer.

Hope my question makes sense, english isn't my primary language. Hope someone can help us out!


texts:
I’m having a strange problem with Guest Checkout in magento 2.0.2 version. I have done Allow Guest Checkout  Yes and Enable Onepage Checkout Yes.
also Enable Persistence No and Disable Guest Checkout if Cart Contains Downloadable Items No.

But Guest checkout works only (after Flush Cache and clear History) if I go through Mini cart -- Go to Checkout link one time only. When I go through cart page,shipping Fields are invisible.


texts: OnePage checkout same Billing and Shipping addresses

texts: I'm trying to combine the billing and shipping addresses into just one option on the one page checkout. Using a modified rwd theme and am looking for some direction on how to implement this. Anyone have any ideas?


texts: how do getUrl of controller in Adminhtml on frontend?

texts: I have custom module override product view. So in frontend I want to get action Save in Custom/Controller/Adminhtml/Custom/Save. How can I do this?


texts: Magento2 hide shipping address show billing address checkout

texts:
Hi Magento 2 checkout page by default shipping address fields will show and in payment section billing address will show this is default functionality like below

Bu i want to change directly show billing address
Enter billing address (assume the billing address as the delivery address but keep it  hidden from view)
and shipping address is hide position how can we do if any one know pls tell me


texts: How can I filter out a specific product and show in a sidebar/homepage?

texts:
First, I'll say that I am very new to Magento and realize I may have taken too big of a project.  That being said, I have too much time and money invested to turn back now.  LOL

I am using CE 1.9.
I want to have a daily special that changes at midnight and is displayed in a sidebar block.  I've looked at several extensions and found one I thought would work, but it's not working as advertised and the developer is balking at refunding. So I'm leary of purchasing others.

I can use import/export to set special prices and dates, but I don't know how to display JUST that product in a widget.  It will have a unique price.

Is there a beginner/newbie friendly way of doing this?

Thanks!


texts: Upload HTTP error frequently after patch 9767 v2

texts:
After applying patch SUPEE-9767 v2, i've often got an error like this

but sometimes the uploading process works fine, but for some  images when i try to upload it, it shows http error

after doing some log, turns out the error comes out from

  app/code/core/Mage/Core/Model/File/Validator/Image.php

in validate() function there's code like this:

$img = imagecreatetruecolor($imageWidth, $imageHeight);
imagealphablending($img, false);
imagecopyresampled($img, $image, 0, 0, 0, 0, $imageWidth, $imageHeight, $imageWidth, $imageHeight);
imagesavealpha($img, true);

when i remove those code, all my file can be uploaded, i don't know why these functions above won't work form some of images


texts: How can I call my API of Shipping when the order is placed using my custom shipping module?

texts:
I have created a custom shipping method and is appearing in the admin config page, and also is able in the customer order to be selected. Now I need to do an api call to my shipping company when the order is placed and my custom shipping method is selected.
(To add the custom shipping method I have fallowed this tutorial):

  https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/


texts: How to remove attribute of container in layout XML

texts:
Let's say I want to remove the page-wrapper css class from the page.wrapper container. How would I do that? I know that I can add additional attributes or change existing attributes this way in the default.xml of my theme or module:

<referenceContainer name="page.wrapper" htmlId="wrapper" htmlClass="foo" />

Just using htmlClass="" does not work. Magento will complain that this is an invalid value.


texts: Magento 2 :How to restrict add to cart quantity limit?

texts:
I want to set a restriction for add to cart

e.g customer only able to add 1 qty for a single product at a time.

I just want to set a limit on qty so the customer is not able to add more than 1 qty at a time.


texts: Magento 2.3.2: Active payment method on specific category for the products in cart

texts:
I want to show payment methods for particular category products added in cart.

  e.g I have paypal and COD payment methods, so when X category Item in
  cart then Paypal will show and other will hide, And when Y category
  item in the cart then COD method will show and PayPal will hide.

So how can I achieve this?
Any suggestion would be appreciated.

Thanks


texts: Removing Express Post shipping from some items only

texts:
I want to remove Express Post shipping from some big items (Air cons, Big desktop machines...etc) that would cost the buyer a fortune in Express Post payment.

I've found in the Fontis Australia /app/ code I can remove Express completely but cannot find a way to remove it from only a handful of items.

Thanks,
Steve


texts: magento 2.3 admin panel redirect to customer account section after login

texts:
I'm facing some issue after login magneto2.3 admin account, its redirect to "My Account" Section.

Kindly have a look this type of issue and guide me.

https://prnt.sc/qnef67


texts: Magento 2 - Add NEGATIVE discount in catalogue price rules

texts:
I'm trying to use the catalog price rule to add a NEGATIVE percentage to the recorded catalog price - but Magento won't allow that.

What I'm trying to achieve is that if the catalogue price is £100, then by adding -20% (minus 20%) it should display £120 in the frontend.

Basically I'd like to use this as a percentage pricing workaround solution to allow me to add price markup by products, categories, etc.


texts: What is your must have or recommend extensions?

texts:
When I read Fabian Blechschmidt's this interview, I'm so surprise I know only one extension (Aoe_Scheduler) among he recommend 5 extensions. I never hear rest of 4 extensions before

So I realize there should be a lot of good extensions I don't know or use.

What is your must have or recommend Magento extensions?


texts: The method parameter $context is never used

texts:
I am getting this error when I submit my extension for technical review at magento marketplace .

I know there are answers available for this , I have gone through following questions as well
question 1 &&  question 2.

but the answer provided there is not resolving the warning .

Here is my code

/**
 * Created by PhpStorm.
 * User: Rahul
 * Date: 31/7/18
 * Time: 4:37 PM
 */

namespace Rahul\DiscountPlugin\Setup;

use Magento\Framework\Setup\InstallSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Model\Config;

class InstallSchema implements InstallSchemaInterface
{

    /**
     * @var EavSetup
     */
    private $eavSetup;

    /**
     * @var Config
     */
    private $eavConfig;

    /**
     * InstallData constructor.
     * @param EavSetup $eavSetup
     * @param Config $config
     */

    public function __construct(
        EavSetup $eavSetup,
        Config $config
    ) {
        $this->eavSetup = $eavSetup;
        $this->eavConfig = $config;
    }
    /**
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
     */
    public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();

        $table = $setup->getConnection()->newTable(
            $setup->getTable('discountplugin')
        )->addColumn(
            'vatpluginid',
            \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
            null,
            ['identity' => true, 'unsigned' => true, 'nullable' => false, 'primary' => true],
            'VatPluginId'
        )->addColumn(
            'apikey',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            [],
            'ApiKey'
        )->addColumn(
            'endpoint',
            \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            255,
            [],
            'EndPoint'
        )->addColumn(
            'created_at',
            \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
            null,
            ['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT],
            'Create date'
        )->addColumn(
            'updated_at',
            \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
            null,
            ['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT],
            'Updated date'
        )->setComment(
            'discount plugin table'
        );
        $setup->getConnection()->createTable($table);

        $eavTable1 = $setup->getTable('quote');
        $eavTable2 = $setup->getTable('sales_order');

        $columns = [
            'save_vat_discount' => [
                'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                'nullable' => true,
                'comment' => 'Input option',
            ]
        ];

        $connection = $setup->getConnection();
        foreach ($columns as $name => $definition) {
            $connection->addColumn($eavTable1, $name, $definition);
            $connection->addColumn($eavTable2, $name, $definition);
        }
        $setup->endSetup();
    }
}

can please anyone guide me what I am doing wrong here ?

Thanks


texts: Add extra field like "Company name" in Registration Form

texts: How can i add an extra field like "Company Name" at the time of Registration and then save that data in database.


texts: Magento 2: How to get product id from order invoice?

texts:
i am trying to overwrite invoice tax model, and I want to get the product id. for the invoice item. But it returns the parent product id if purchased product is a configurable product.

file \Magento\Sales\Model\Order\Invoice\Total\Tax.php

Code

foreach ($invoice->getAllItems() as $item) {

             $orderItem = $item->getOrderItem();
            var_dump($item->getProductId());
            die('from invoice model...');

It returns parent product id but I want the purchased product id, how can I do it.

Please help.


texts: Add Custom Filed In Sales order for admin verification

texts: Every time we need to verify the order after order placed by the customer. Our sales represent verify same order again and again. so that is possible can I add the custom field to the sales order like verify. How can i do it?


texts: Constr is not a constructor on layout.js line 137 error

texts: This error is shown in my console after when the customer is logged in and by this checkout page is not working without customer logged in checkout page working fine.


texts: Magento 1.9.3.6 session validation exception issue

texts:
Over the last few days my exception log has become full of entries of the following:

2017-11-06T09:27:13+00:00 ERR (3):
exception 'Mage_Core_Model_Session_Exception' in mag19/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php:421
Stack trace:
#0 mag19/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(236): Mage_Core_Model_Session_Abstract_Varien->validate()
#1 mag19/app/code/core/Mage/Core/Model/Session/Abstract.php(84): Mage_Core_Model_Session_Abstract_Varien->init('tag', NULL)
#2 mag19/app/code/core/Mage/Tag/Model/Session.php(38): Mage_Core_Model_Session_Abstract->init('tag')
#3 mag19/app/code/core/Mage/Core/Model/Config.php(1357): Mage_Tag_Model_Session->__construct(Array)
#4 mag19/app/Mage.php(463): Mage_Core_Model_Config->getModelInstance('tag/session', Array)
#5 mag19/app/Mage.php(477): Mage::getModel('tag/session', Array)
#6 mag19/app/code/core/Mage/Core/Controller/Varien/Action.php(641): Mage::getSingleton('tag/session')
#7 mag19/app/code/core/Mage/Core/Controller/Varien/Action.php(665): Mage_Core_Controller_Varien_Action->_initLayoutMessages(Array)
#8 mag19/app/code/core/Mage/Catalog/Helper/Product/View.php(146): Mage_Core_Controller_Varien_Action->initLayoutMessages(Array)
#9 mag19/app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(1467, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#10 mag19/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#11 mag19/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#12 mag19/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 mag19/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#14 mag19/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 mag19/index.php(87): Mage::run('', 'store')
#16 {main}

I have not touched any code to do with sessions and will be the default code, so I am confused as to why this is occurring. If anyone could help to solve this I would thoroughly appreciate it.


texts: Magento custom customer attribute gives fatal error in search in admin

texts:
I am using Magento 1.9.1.0 ce.

I have below code in my backend customer grid for getting collection of customers.

protected function _prepareCollection()
    {
        $collection = Mage::getResourceModel('customer/customer_collection')
            ->addNameToSelect()
            ->addAttributeToSelect('email')
            ->addAttributeToSelect('created_at')
            ->addAttributeToSelect('group_id')

            ->joinAttribute('billing_postcode', 'customer_address/postcode', 'default_billing', null, 'left')
            ->joinAttribute('billing_city', 'customer_address/city', 'default_billing', null, 'left')
            ->joinAttribute('billing_telephone', 'customer_address/telephone', 'default_billing', null, 'left')
            ->joinAttribute('billing_region', 'customer_address/region', 'default_billing', null, 'left')
            ->joinAttribute('billing_country_id', 'customer_address/country_id', 'default_billing', null, 'left');

            $collection->getSelect()->join( array('company' => 'customer_entity_varchar'), 'company.entity_id = e.entity_id', array('company.value'))
                 ->where("company.attribute_id =  982");

            ## echo $collection->getSelect();die;

         $this->setCollection($collection);

        return parent::_prepareCollection();
    }

It works fine when the grid is loaded the first time, but when I search by custom customer attribute called 'company' in the grid, it gives below fatal error:

Fatal error: Call to a member function getBackend() on a non-object in /path/to/magento_root/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 817

I think it gives fatal error when it doesn't get "company.value" field in the query. But the field is there in customer_entity_varchar table.

I want the grid to be able to search by custom customer attribute company.


texts: Coupons and "dynamically" priced products

texts:
We have a product that is setup with a price of $0.00. When the product is added to the cart, programatically, we set the price according to a fee schedule that we have setup in an off line table.

Now, the product has been setup in it's own category and I have setup a coupon to discount it 100%. The coupon also discount another product from another category 100% so the entire cart must be discounted 100% when the 2 products are in the cart.

Now, because we are setting the price when we add the product to the cart, the discount is not being applied to the price set in the cart but to the ORIGINAL price of the item, $0.00.

How can I make this coupon work?

Here are the particulars:

Conditions:

Apply the rule only if the following conditions are met (leave blank for all products)
    If ANY  of these conditions are TRUE :
        If an item is FOUND  in the cart with ANY  of these conditions true:
            Category  is  9
        If an item is FOUND  in the cart with ANY  of these conditions true:
            Category  is  30

Actions:

Update prices using the following information
    Apply: Percent of product price discount
    Discount amount: 100
    Maximum Qty Discount is Applied to:0
    Discount Qty Step (Buy X): 0
    Apply to Shipping Amount: No
    Free shipping: No
    Stop further rules processing: No

Apply the rule only to cart items matching the following conditions (leave blank for all items)
    If ANY  of these conditions are TRUE :
        Category  is  9
        Category  is  30

EDITED...

ADDED CODE

// Get the product_id from product from SKU
$product_id = Mage::getModel("catalog/product")->getIdBySku("$sku");

// Load the product object by obtained productID
$product = Mage::getModel("catalog/product")->load($product_id);

// get the current cart
$session = Mage::getSingleton('core/session', array('name' => 'frontend'));
$cart = Mage::helper('checkout/cart')->getCart();

// if price is set, the use the passed price otehrwise use product's price
if(isset($_GET['price'])) {
    $price = $_GET['price'];
} else {
    $price = $product->getPrice();
}

// set params for product to be added to cart.
$params = array(
    'product' => $product_id,
    'qty'     => $qty, // $qty is also passed in the $_GET
    'price'   => $price
);

/*
    I have code here that loads a custom option with JSON data about the user, then sets the option like this:
    $params['options'] = array($option_id => json_encode($item_json));
*/

// Now add the product to the cart.
$cart->addProduct($product, $params);
$session->setLastAddedProductId($product_id);
$session->setCartWasUpdated(true);
$cart->save();


texts: How to create a custom Login/ sign up form with custom role in Magento 2.1

texts:
I am totally new to Magento and want to know how to create a custom  Login/ signup form with custom defined role in Magento 2.1.
please suggest a solution.


texts: Magento PayPal Express Payment type order still authorizes

texts:
I am currently integrating my Magento website with an OMS system where the OMS system will be responsible for authing and charging card payments and PayPal payments.

I am having trouble with the PayPal side of things.

We are using PayPal Express, and for the integration to work, we need to perform a transaction type of Order, and let our OMS system then authorize and capture the payment.

I have set the Payment Action to Order within the PayPal Express configuration settings. However, when I place an order, an authorization transaction is placed immediately after the order transaction. I don’t want this to happen.

Is there any way to prevent the authorization taking place?

I am using Magento CE 1.8


texts:
being a complete newbie with Magento, kinda' suffering a little bit but right now the question is this, if you check the following:

http://www.spartvs.com/ibiza-153.html

There's a lot of images coming on that product, the idea is to have 3 or 4, maybe 5 images max and then when people clicks on a color, then only the images associated with that color will appear, the way the images are set up within the product is as follows, please check attachment

The thing is, what I'm doing wrong? or maybe this what I am asking is not possible on Magento?

Thanks!


texts: Magento 2.3 display logged in/out message using private content

texts:
Does anyone have an example on how to display a logged in vs logged out message on frontend to customer that's not affected by cache without using the cache=false tag and hole punching the whole page

I'm assuming using knockout / section / customerData / private content somehow.

I've read a lot of tutorials and responses like this https://magento.stackexchange.com/a/261067/70343

But just looking for an example on how to do this


texts:
I wanted to display only the product name on the shipment pdf. I assume I need to edit the below section from shipment.php and I tried $item->getName() but it didn't work

How can i do this ?

foreach ($shipment->getAllItems() as $item) {
    if ($item->getOrderItem()->getParentItem()) {
        continue;
    }
    /* Draw item */
    $this->_drawItem($item,$page, $order);


texts:
In Magento 2 we have a new filesystem permissions guidelines.

Reading this link I understand that Magento requires php user inside www-data group.

What I do not understand is why static filesystem permissions are generated using 0770 instead of 0750.

With this kind of permissions another user in the same server and belonging to www-data group will be able to modify all my files.

Isn't it dangerous? Is there any reason for this?

I know the Magento 2 approach is to always have a dedicated VM and I agree with it, but I do not see any good reason for this permissions settings.


texts: "Recent viewed product" template customization in Magento 2

texts:
In Magento 2.2.5, I have showed "recent viewed products" on product detail page via Widget.
But I want to customize "recent views product" template.
Actually now they don't show price if product is configurable.
I searched and get template file in this path:-

  vendor/magento/module-catalog/view/base/web/template/product/list/listing.html

But this file contain knockout js format.
I guess there is some other files (like .phtml).
Please suggest me how can I customize its template.

Thank You


texts:
When I use dataflow profiles to export customers the exported CSV-file does not contain the customers billing_vat field. I only get the taxvat field.

I believe I have to modify the parser to include the vat field, but how and where to I change this?

I've copied:

  app/code/core/Mage/Customer/Model/Conver/Parser/Customer.php

To local.


texts: Get list of orders without a tracking number

texts:
I am new at Magento and I would like to get a list of orders/sales without a tracking number/shipment using the REST API. I was looking at the documentation https://devdocs.magento.com/swagger but I could not find anything.
Is there any endpoint I can use?
Since I could not find that, I was thinking of getting all orders and then checking if a shipment exists for it, but that is not really efficient as there are a lot of orders.
Thank you


texts: Magento 2.2.2: How to use Image file available in web folder

texts:
Magento 2.2.2

How to use Image file available in the web folder.
I am trying to access image file in layout/footer.phtml file and the image is available in the web/images/ folder


texts: Custom Carrier; price depends on grandtotal of quote

texts:
I made a custom module for my own carrier which has multiple options where the shippingcosts depend on the order total. Really simple; is it more or less than 50 euros?

MyModule/CustomCarrier/Model/Carrier/Method/Evening.php

class MyModule_CustomCarrier_Model_Carrier_Method_Evening extends
MyModule_CustomCarrier_Model_Carrier_Method_Abstract
{

public function getCost() {
   return 0;
}

public function getPrice()
{
   $totals = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
   $subtotal = $totals["subtotal"]->getValue();
   $grandtotal = $totals["grand_total"]->getValue();

   if ($grandtotal < 50) {
      return 10;
   } else {
      return 5;
   }
}

}

So simply put whenever the quote Totals are less than 50 euros, the shipping is 10. If more, the shipping is 5.

When I place an order higher than 50 euros, I see my carrier show up with a price of 5,- in the checkout, however on the review block with the totals it shows up as 10.

When I log the values, I see while going to checkout that the variables get logged a lot at once, and sometimes the $grandtotal var is 0. Why is that? How can I make sure it'll get the right amount all of the time?


texts: Add multiple sections under same tab magento 2.0

texts:
I want to add multiple sections under the same tab in admin panel. Here is what I have for system.xml (cut off config tag):

<system>

    <tab id="xxx" translate="label" sortOrder="5000">
        XXXX
    </tab>

        <class>separator-top</class>
        Ldap
        <tab>xxx</tab>

        <resource>XXXX_XXXX::config</resource>

        <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            General Options
            <field id="active" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                Enabled
            </field>
        </group>

        <class>separator-top</class>
        SMTP
        <tab>xxx</tab>

        <resource>XXXX_XXXX::config</resource>

        <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
            General Options
            <field id="active" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                Enabled
            </field>
        </group>

</system>

and acl.xml:

<acl>
    <resources>
        <resource id="Magento_Backend::admin">
            <resource id="Magento_Backend::stores">
                <resource id="Magento_Backend::stores_settings">
                    <resource id="Magento_Config::config">

                        <resource id="XXXX_XXXX::config" title="Ldap" sortOrder="10" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>

The error shows "Warning: Invalid argument supplied for foreach() in /var/www/magento2/vendor/magento/module-config/Model/Config/Structure/Mapper/Sorting.php on line 34"


texts:
I am new in magento, i need to know how to upgrade magento 1.9.0.1 to 1.9.2.4

(I use ubuntu 15.04, what are the necessary commands ? )

Thanks for help :)


texts: How to add an image before breadcrumb on specific page

texts: I made a new page using Magento2 admin panel and coded it with HTML. Now I want to add an image before breadcrumb on this page. Any help will be highly appreciated.


texts: Magento ECG discourage $_FILES superglobal

texts:
I'm using the magento ECG coding standards on a project and am getting the
following:

ERROR   | Direct use of $_FILES Superglobal detected.

I've grepped through the code and can see that core uses the $_FILES superglobal,  does magento have a wrapper function for this or should i ignore the error?


texts: showing 2 custom attributes in 1 column catalog admin grid

texts:
I add columns to the product admin grid with addColumn.

Is it possible to show 2 custom attributes in 1 column.

Something like this:

$this->addColumn('lev_vdm_inkoop',
        array(
            'header'=> Mage::helper('catalog')->__('VDM'),
            'width' => '70px',
            'index' => array('lev_vdm_stock','lev_vdm_inkoop'),
    ));


texts:
how to solve this error. I'm using GoDaddy server
In Abstract.php line 144:

SQLSTATE[28000] [1045] Access denied for user 'glamaa_mg4'@'localhost' (using password
  : YES)

In Abstract.php line 128:

SQLSTATE[28000] [1045] Access denied for user 'glamaa_mg4'@'localhost' (using password
  : YES)


texts:
I have found two ways for changing page title and I don't know which one I should use.

1. Override prepareLayout() in block

protected function _prepareLayout()
{
    $this->pageConfig->getTitle()->set(__('Title') . ' - ' . $this->pageConfig->getTitle()->getDefault());
    return parent::_prepareLayout();
}

2. Change title via \Magento\Framework\App\ViewInterface in controller

in execute() method:

        $this->_view->getPage()->getConfig()->getTitle()->set(__('My Downloadable Products'));


texts: Looking for a real One-Click Checkout for downloadable products

texts:
Question:
I am looking for an extension which offers an OneClick instant checkout for worldpay like PayPal Express for known customers (as mentioned by Adam K below).

More detailed:
I am looking for a real One-Click checkout Extension for different payment methods in a Magento shop.

Here is the status:

You need to make an account before you can enter the shop.
You need to login before you can enter the shop.
The shop contains only downloadable products.
There are just two possible payments (PayPal and WorldPay).

It is planed that the customer just have to click on a "pay now" button and is redirected to the payment clearing page. No shopping Card, no original checkout.

Regards.


texts: Fatal error: Call to a member function toOptionArray() on a non-object in ../app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 463

texts:
After installing "sphinx search ultimate", when I goto the config page and select the "sphinx search" panel, I get the following error:

Fatal error: Call to a member function toOptionArray() on a non-object in ../app/code/core/Mage/Adminhtml/Block/System/Config/Form.php on line 464

I've tried some of the tips mentioned on the site here, including ensuring compilation is off.. but no luck.

Can someone help? Have you ever seen this issue when installing a new extension? Ideas on how to troubleshoot?

Thanks.


texts: How to display an image depending on a Magento variable?

texts:
I would like to display an image whose path is linked to a Magento variable.
Here is what I would like to do, but I am not sure of the right way to implement this variable:

<img src="../images/<?php echo $_item->getValueString() ?>.png" alt="Monture lunettes" />

Thanks for your help.
Max

Update:
I am working on a custom version of filter.phtml.
I created in the magento admin (for an optical e-commerce website)  the attributes (style, color, shape, material,...) and the labels for each attribute (e.g. large, oval, square, round,...).
Now I try to get displayed a frame icon (PNG picture) on each label of the attribute "shape".
I can share you the code if you need.
Thanks.


texts: Cannot persist my model to database (M2)

texts:
I have a custom model object and want to persist it to the related database table.
When I try to save the model, nothing happens. In case I do not enter required fields, I get an "Integrity constraint violation" exception. The inner message shows me, that the model is working on the right table.
Saving a model did work that way in other situations before. But ofter some changes I have the described problem. Does anyone know, why the model cannot be saved and no error is thrown?

Code:

  public function
  createModelEntry(\vendor\Module\Api\Data\MyModelInterface $modelData)
  {
                  $modelData->save(); }


texts: I have to redo a magento website from 2.1 CE to 2.3 CE. There are few orders with total sales of 230$. what is better to create from scratch and migrate customers and orders? or is there a way by applying patch?


texts: magento backend user role assigned field

texts:
I've searched the archives but cannot find the answer to the following simple question concerning the magento backend. When I go to System -> Permissions -> Users -> Add New User -> User Role I understand I can assign zero roles or one role to each user. With zero roles assigned the user will not be able to log in. Once I assign the role (creating the role if needed), the user can log in and perform operations corresponding to that role via a restricted user interface. So far so good.

Here is what I don't understand: what does the Assigned: { Any, Yes, No } drop-down box. I've left it to the default (Any) just above the roles column, where the selected role can be found.

What is the meaning of the Assigned drop-down box on this screen?

Thanks.


texts: Change an order's website in a multi-website installation

texts:
In a multi-website (some sort of marketplace let's say) I'm looking for a way to change the website related to an order.

When editing an order in Sales / Orders, we can see that a website is attached to any order.

I'm looking for an easy way to CHANGE (I mean "reattribute") the order to another website.

First I was considering the "duplicate" option, trying to alter the code and change the website during the process but I didn't manage to do it correctly.

So here I come, seeking for some clues.

Thanks


texts: Could anyone let me know where the Category page layout XML is located, so I can created a custom layout and override the 'out of the box' layout?


texts: Magento 2, force login on specific product and specific catalog pages

texts: I find this  solution Magento 2, force login on product and catalog pages how to verify that your solution is just for a specific Category?? thanks in advance – Developper Magento 22 hours ago


texts: Magento2 hello world displaying blank screen

texts:
I am trying to create a simple hello world module, I am able to successfully create and install the module but for some reason, my screen is showing up blank. But if I echo something in controller it shows up. Can anyone help me where exactly I am going wrong? Below is my code.

I have been following this Tutorials

-app
    -code
        -KK
            -OneStepCheckOut
                -Block
                    --Main.php
                -Controller
                    -OneStepCheckOut
                        --BillingAddress.php
                -etc
                    --module.xml
                    -frontend
                        --routes.xml
                -view
                   -frontend
                     -layout
                      --oneStepCheckOut_oneStepCheckOut_billingAddress.xml
                        -templates
                            --content.phtml
                --registration.php

Controller:-

<?php

namespace kk\OneStepCheckout\Controller\OneStepCheckout;
use Magento\Framework\View\Result\PageFactory;
use Magento\Framework\App\Action\Context;
class BillingAddress extends \Magento\Framework\App\Action\Action
{
    /**
     * @var PageFactory
     */
    protected $pageFactory;
    public function __construct(Context $context, PageFactory $pageFactory)
    {
        $this->pageFactory = $pageFactory;
        return parent::__construct($context);
    }

    public function execute()
    {
       // echo "In controller";
        $page_object = $this->pageFactory->create();
        return $page_object;
    }
}

?>

oneStepCheckOut_oneStepCheckOut_billingAddress.xml:-

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="empty"
         xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

        <referenceContainer name="content">
        <block
            template="kk_OneStepCheckOut::content.phtml"
            class="kk\OneStepCheckOut\Block\Main"
            name="oneStepCheckOut" />
         </referenceContainer>

</page>

Main.php:-

<?php
namespace kk\OneStepCheckOut\Block;

class Main extends \Magento\Framework\View\Element\Template
{
   public function _prepareLayout()
    {
        return parent::_prepareLayout();
    }
}
?>

Content.phtml:-

<?php echo "hello world"; ?>

routes.xml:-

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

module.xml:-

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
        <module name="kk_OneStepCheckOut" setup_version="0.0.1" />
</config>


texts: Outputting Dollars instead of English pound sign

texts:
I am outputting the difference between the sub total and the free delivery limit and i'm using this line to out put the currency

<?php $currency_symbol = Mage::app()->getLocale()->currency($_code)->getSymbol()?>

But it keeps outputting a $ instead of £, how can i change it as i need it to change depending on where the user is in the world?

If i haven't been clear please just let me know and will try to elaborate more for you.

thank you


texts: currently i am using fooman extension for pdf attachment which is working fine now i want to add some more document upload by customer while placing order in magento2 fooman attach file using this abstract class AbstractObserver now i want add some function here how can i over ride this class  abstract class AbstractObserver.


texts:
I would like to do this request :

curl -i -X OPTIONS my/url/path

in Magento 2.

This code works :

$ch = curl_init();
curl_setopt_array($ch, array(
    CURLOPT_URL => 'my/url/path',
    CURLOPT_CUSTOMREQUEST => 'OPTIONS',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HEADER => true,
    CURLOPT_NOBODY => true,
    CURLOPT_VERBOSE => true,
));
$r = curl_exec($ch);
print_r($r);
curl_close($ch);

But it's ugly code. I would like use dependency injection to clean my code.

Something like :

/**
 * @var \Magento\Framework\HTTP\Client\Curl
 */
protected $_curl;

/**
 * @param Context                             $context
 * @param \Magento\Framework\HTTP\Client\Curl $curl
 */
public function __construct(
    Context $context,
    \Magento\Framework\HTTP\Client\Curl $curl
) {
    $this->_curl = $curl;
    parent::__construct($context);
}

public function execute()
{
    //if the method is get
    $this->_curl->get($url);
    //if the method is post
    $this->_curl->post($url, $params);
    //response will contain the output in form of JSON string
    $response = $this->_curl->getBody();
}

But there is no OPTIONS method. So do you have any idea how to do?


texts:
I need to make a copy of my project for testing and developement. However, my database hoster is very weak and there are always gateway timeouts, so this time I try to only export and import the necessary tables.

I noticed that there are some very big tables:

Can I exclude their data and only export the structure or is the data essential for magento to work?

Which tables can I exclude which are essential?

More infos

Database:

innodb_lock_wait_timeout is set to "240"


texts: Magento 2 Area code is not set Error after upgrade from 2.0.18 to 2.2.8

texts:
After upgrading Magento from 2.0.18 to 2.2.8 , lots of report generating in the var/report folder, And below is the exception message. Can anyone help me to fix this issue. Thanks in Advance.

a:4:{i:0;s:20:"Area code is not set";i:1;s:3600:"#1 Magento\Customer\Model\Plugin\CustomerNotification->beforeDispatch(&Magento\Banner\Controller\Ajax\Load\Interceptor#00000000333e0e670000000012966f05#, &Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:121]
#2 Magento\Banner\Controller\Ajax\Load\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#3 Magento\Banner\Controller\Ajax\Load\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#), array(array('customerNotifica...', 'designLoader', 'storeCheck'))) called at [generated/code/Magento/Banner/Controller/Ajax/Load/Interceptor.php:26]
#4 Magento\Banner\Controller\Ajax\Load\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/App/FrontController.php:55]
#5 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#6 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#7 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94]
#8 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#00000000333e0cbc0000000012966f05#, &Closure#00000000333e0cbb0000000012966f05#, &Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#9 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69]
#10 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(&Magento\Framework\App\FrontController\Interceptor#00000000333e0cbc0000000012966f05#, &Closure#00000000333e0cbb0000000012966f05#, &Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#11 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#12 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#), NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#13 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#00000000333e0dcd0000000012966f05#) called at [vendor/magento/framework/App/Http.php:136]
#14 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:257]
#15 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000333e0d290000000012966f05#) called at [pub/index.php:37]
";s:3:"url";s:47:"/en/banner/ajax/load/?sections=&_=1560427245352";s:11:"script_name";s:10:"/index.php";}


texts: Switching to developer mode breaks site in Magento 2 (ReflectionException)

texts:
Basically fresh install of Magento 2.2.5. Whenever I switch to developer mode, my site completely breaks with:

ReflectionException: Class Magento\Framework\App\Http\Interceptor does not exist in /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:19 Stack trace: #0 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo...') #1 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #2 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #3 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/ObjectManager/ObjectManager.php(56): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array) #4 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/vendor/magento/framework/App/Bootstrap.php(232): Magento\Framework\ObjectManager\ObjectManager->create('Magento\\Framewo...', Array) #5 /home/200582.cloudwaysapps.com/dyxjcgvyzs/public_html/pub/index.php(36): Magento\Framework\App\Bootstrap->createApplication('Magento\\Framewo...') #6 {main}

After this, I do all kinds of things like resetting permissions, clearing cache, switching back and forth from production to developer, rm -rf var/cache/* var/page_cache/* var/generation/* and find var generated pub/static pub/media app/etc -type f -exec chmod g+w {} \; && find var generated pub/static pub/media app/etc -type d -exec chmod g+ws {} \;, restarting services, and so on. I cannot find a pattern or cause for what is going on. Sometimes I clear the cache, and it comes back. Sometimes I reset permissions, and it works. But sometimes not. But switching to developer mode always breaks it.


texts: URL in CMS block for search results page adds a forward slash

texts:
I'm creating a CMS block with a URL in there that's really just a search query

Find Animals

For some reason the URL that gets outputted is

www.example.com/catalogsearch/result/?q=animals/

when it should be

www.example.com/catalogsearch/result/?q=animals

why is the extra forward slash being added at the end of the URL?


texts:
After installing magento on my localhost. It will show an error 500 internal server error and in index.php also have an error on following line -

$app = $bootstrap->createApplication(\Magento\Framework\App\Http::class);

and in app folder bootstrap.php file also have an error on following line -

\Magento\Framework\App\Bootstrap::populateAutoloader(BP, []);


texts: How to clear a configuration using config:set command from terminal?

texts:
you may know that a store configuration value can be set from terminal using this command

php bin/magento config:set web/secure/base_url http://127.0.0.1/magento/

But today I came accross a situation where I had to reset the value for a configuration or if I say in database terms to set the value of configuration to null in core_config_data table.

Does anybody know how is that possible from terminal?


texts: Magento2: How to get total page number of category?

texts:
I want to show Title of category page based current page and total page.
for example: Category Electronics has total 20 page and i am on 2nd page. I want to show 2 out of 20 pages.

I have tried below code.

 $current_page =  $this->request->getParam("p");

 $objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
            $categoryFactory = $objectManager->get('\Magento\Catalog\Model\CategoryFactory');

            $categoryId = $this->request->getParam("id"); // YOUR CATEGORY ID
            $category = $categoryFactory->create()->load($categoryId);

            $productCollectionFactory = $objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');
            $collection = $productCollectionFactory->create();

            $collection->addAttributeToSelect('*');
            $collection->addCategoryFilter($category);
            $collection->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH);
            $collection->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);
            $collection->addAttributeToFilter('status',\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED);

echo $current_page." of "ceil(count($collection)/48);

I have limiter value 48. But i am getting different count of product than actual showing in category page.


texts: Magento 2. Looking at Magento 2 provided API they all start with /V1/... why?

texts:
Looking at Magento 2 provided API they all start with /V1/...

Why is this? Is it mandatory? What is the reason behind this?

Thanks


texts: How to get Url inside Ajax in .JS file in Magento 2?

texts:
I need to getUrl from Mage::helper("adminhtml")->getUrl('route/controller/action'); in Magento 2?
How to get this url inside .js file in Magento 2?


texts: I need to get product collection by filter multiple category ids in magento 2

texts:
I need to get product collection by filter multiple category ids.

Here is my code:

$catId = [2, 3, 5];
$productcollection = $objectmanager->create('\Magento\Catalog\Model\ResourceModel\Product\CollectionFactory');

$categoryProducts = $productcollection->addAttributeToSelect('*')
    ->addAttributeToSort('position', 'ASC')
    ->addCategoriesFilter(['in' => $catId])
    ->addAttributeToFilter('color', ['in', $colorValues]);

But this code is not working.


texts: Custom sales/order attribute in admin grid

texts:
How would I add a custom field to the order grid?

I have the following code by looking at other questions but after I have ran the code the new field is not showing up.

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;
$attribute  = array(
'type'       => 'int',
'input'      => 'select',
'label'      => 'Exported',
'sort_order' => 1000,
'required'   => false,
'visible_on_front' => '0',
'filterable'    => true,
'global'     => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
'backend'    => 'eav/entity_attribute_backend_array',
'option'     => array (
        'values' => array(
            0 => 'No',
            1 => 'Yes',
        )
    )
);
$installer->addAttribute('order', 'Exported', $attribute);
$installer->addAttribute('quote', 'Exported', $attribute);
$installer->endSetup();


texts:
I need some help with UK GB Post Code Zip Validation  Magento 2 Space
In that I want to force the user to enter spaces so its like this EC1A 1BB or W1A 0AX or
M1 1AE   so there must be space After the 2 3 or 4 charachter. so far I have spent several hours but not found any solution and only file i found is vendor/magento/module-directory/etc zip_codes.xml
At the moment it is accepting entry like this bt559zq   which I dont want
Without this my shipping prices in table rates are not being calculated correctly
Need this setting wherever there is address for example customer accounts . one page checkout, cart shipping estimator
Can someone please help asap
thanks


texts:
1) When user submits an "Email to Friend" form.

2) When user submits his email for Newsletter.


texts: Product Extension attributes is not return when request from rest api

texts:
I have created an extension attribute for a product.

<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
    <attribute code="product_options" type="Sample\Module\Api\Data\ProductOptionInterface" />
</extension_attributes>

So I am able to set product_options to the product.

But when I request using API

http://10.16.16.216/example/magento/rest/all/V1/products/mypsku

Then JSON response is no contained my extension attribute. product_options

My plugin

<type name="Magento\Catalog\Api\Data\ProductInterface">
    <plugin name="set_product_options" type="Sample\Module\Plugin\Catalog\ProductOption"/>
</type>

ProductOption


texts: Magento 2 Can Magento\Framework\Filesystem\File\Write be "preference" or "plugin"?

texts:
Tried to use preference to override it, but errors appear when running "magento setup:static-content:deploy".

Then I tried to use plugin, but I found that the system did not go to my customized function.

Is Magento\Framework\Filesystem\File\Write overridable?


texts: How to fix source fields are not mapped?

texts:
I have seen a few errors like this but none of them seem to apply to me. I am receiving the error below when trying to migrate from 1.9.3.2 to 2.1.6

[2017-04-24 17:19:32][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec

Source fields are not mapped. Document: eav_attribute. Fields:is_visible_on_front,sorting_order,checkout_step,show_on_grid,store_ids,save_selected,parent_dropdown,include_pdf,apply_default,customer_groups,size_text,required_on_front_only,include_html_print_order

In the map.xml file I added this-

<ignore>
   <field>is_visible_on_front</field>
</ignore>

And changed the config file from map.xml.dist to map.xml

I got the same error. Instead of trying it in the map.xml file I tried the map-eav.xml file. Still got the same error. Am I doing this in the right files?

Edit:
I tweaked the map-eav.xml and got it to work. I needed to make it look like this- eav_attribute.is_visible_on_front by adding the table in front. My question now is how do you know which xml document the ignore tags need to be in?


texts: Magento 2 : Price including Tax based on country set in cookie

texts: By default the price of product is excluding tax, when we change Catalog Prices including tax in Calculation Settings Configuration it show price including tax and the tax is calculated based country set in Default Tax Destination Calculation configuration. Now I want to show Catalog Prices including tax based on country which I have saved in cookie. how can I do this?


texts: Magento 2 | is it possible to set block class by referencing a block?

texts:
I'm currently rewriting a layout file:

<referenceBlock name="checkout.cart.totals>

<!-- some stuff -->
</referenceBlock>

Is it possible to set the block class here?


texts: how to know what model we kneed to use get specipic data using orm

texts:
I am learning magento orm.I know get data using orm.but my problam is how i exacly know which model responcible for give specipic data.
as example I know if I want get product name I use $collection = Mage::getModel('catalog/product')  but is there any documentation like this model responsible for give that data.
as example if i want to get cart data what model I used etc.


texts: Create and delete log files in Magento 1.9

texts:
I am creating log file for check either block of code is executing or not.

I am using following code for create log file

Mage::log('Inside block',null,"filename.log",true);

Its working perfectly and creating log file inside var/log/ folder.

Now I have doubt about I can delete that log file using any code.

I need to delete the log file programmatically,can I ?

  Note : I want to delete only file not folder.


texts:
i would like to sell bracelets. These bracelets have 3 parts. Band, clasp and a plate. I would like to sell them by parts and together, too. The price of the parts is not the same if i sell together or i sell separately.

Example: There is a bracelet with name EX1 bracelet. This EX1 bracelet has 3 different part. I sell separately PART1 for 1$, PART2 for $2 and PART3 for $3. Together (like a full bracelet) i sell for $5 This EX1 bracelet has 3 color variation. All parts have own SKU and all full bracelet have on SKU. In the inventory we have just parts, therefore if we sell a bracelet, we have to reduce just the parts stock of that bracelet.

Do you have any idea, how can i do that?

I tried with this: Parts are simple product. Full bracelets are configurable products with color options. In this case I cannot handle the parts inventory.


texts: Magento2 : How Can I Update My Custom Fee While I Update Qty From Admin New Invoice Section

texts:
I have create one module to add custom fee to order product wise ,
for eg . 1 product = 10 , so 5 product = 50 , and custom fee is working fine in all section like checkout, order, Invoice

now my requirement is i need to update my custom fee when i update qty in admin new invoice section as per above screenshot.

I want if i update qty to 0 for last 2 product than that 2 product custom fee should not be add.

If any one have idea than please tell me.


texts:
I am trying to add a  enter link description here

what I have done :

add below div in 1column.phtml

added below code in footer script (inside


texts: How to Overwrite magento app->design->adminhtml

texts:
I have modified

app/design/adminhtml/default/default/template/sales/order/view/items/renderer/default.phtml

what is the quick process to overwrite the page?thanks


texts: Magento : Filtering Date Issue on Custom Grid

texts:
This is my column code:

$this->addColumn(
   Mage::getModel('catalog/product')->formatUrlKey($key),
   array(
       'header'   => Mage::helper('core')->__($label),
       'index'    => $key,
       'filter'   => $isFilterable,
       'sortable' => true,
       'type' => 'date',
       'filter_condition_callback' => array($this, 'dateFilter'),
   )
);

This is my callback code:

 public function dateFilter($collection, $column){
        $value = $column->getFilter()->getValue();
        $from = $value['orig_from'];
        $to   = $value['orig_to'];
        if (!$value) {
            return $this;
        }

        $this->getCollection()->getSelect()->where("date_scheduled >=DATE('".$from."') AND date_scheduled <= DATE('".$to."') ");
        return $this;
  }

I executed query in phpmyadmin and I got no errors, but neither results. I want to do is to filter my grid after date, so between X and Y.

The value for $isFilterable is adminhtml/widget_grid_column_filter_date

This is my Query generated:

SELECT `t`.*
FROM (SELECT
        DATE_FORMAT(`as`.`scheduled_at`, '%Y-%c-%d ')      AS `date_scheduled`,
        `o`.`customer_email`,
        `as`.`increment_id`                                AS `subscription id`,
        `as`.term                                          AS `period`,
        `c`.`increment_id`                                 AS `customer increment id`,
        `o`.`increment_id`                                 AS `order incrementid`,
        (SELECT SUM(`asi`.`price` * `asi`.`qty`)
         FROM `adyen_subscription_item` AS `asi`
         WHERE `asi`.`subscription_id` = `as`.`entity_id`) AS `subtotal_ex_vat`,
        (SELECT SUM(`asi`.`price_incl_tax` * `asi`.`qty`)
         FROM `adyen_subscription_item` AS `asi`
         WHERE `asi`.`subscription_id` = `as`.`entity_id`) AS `subtotal_inc_vat`,
        `s`.`code`                                         AS `store`,
        `as`.`shipping_method`                             AS `shipping_method`,
        `bill`.`method_code`,
        `bill`.`agreement_label`,
        GROUP_CONCAT(`oi`.`sku` SEPARATOR ',')             AS `product SKUs`
      FROM `adyen_subscription` AS `as` LEFT JOIN `sales_flat_order` AS `o` ON `o`.`entity_id` = `as`.`order_id`
        LEFT JOIN `adyen_subscription_item` AS `oi` ON `as`.`entity_id` = `oi`.`subscription_id`
        LEFT JOIN `customer_entity` AS `c` ON `o`.`customer_id` = `c`.`entity_id`
        LEFT JOIN `core_store` AS `s` ON `as`.`store_id` = `s`.`store_id`
        LEFT JOIN `sales_billing_agreement` AS `bill` ON `as`.`billing_agreement_id` = `bill`.`agreement_id`
      WHERE (`as`.`scheduled_at` >= now() AND `as`.`scheduled_at` <= DATE_ADD(now(), INTERVAL 6 MONTH)) AND
            `as`.`status` = 'active'
      GROUP BY `oi`.`subscription_id`
      ORDER BY `as`.`scheduled_at` ASC) AS `t`
WHERE (date_scheduled >= DATE('02/25/2017') AND date_scheduled <= DATE('02/28/2017'))


texts: Create link on customer account BUT not last

texts:
I am making a question because I couldn't find a way to overcome that.I have made a link in the Account Dashboard but it comes last. How can I put it first?
I used before="-" but it doesn't change it.

> <customer_account>
>         <reference name="customer_account_navigation" >
>             <action method="addLink" >
>                 <name>trade</name>
>                 <path>tradedownloads/index/index</path>
>                 <label>Resources</label>
>             </action>
>         </reference>
>     </customer_account>
>
>   <tradedownloads_index_index>
>         <update handle="customer_account" />      <reference name="my.account.wrapper" >
>         <block type="core/template" name="tradedownloads" before="-" template="tradedownloads/left.phtml"></block>
>     </reference>
>     </tradedownloads_index_index>

That's the xml file i use.


texts:
I am adding conversion tracking code?

I have made a change to /staging1/.../checkout/success.phtml

Is the staging1 file the live one?

When I do a search using cpanel filemanager I only find one instance of success.phtml?

Assuming this is the correct file. Should the change be reflected on the server immediately or do I then have to flush the cache or something in the backend.

Cheers Colin


texts: How to create a complete group tab to admin?

texts:
I want to add a group tab in

  system > configuration > general > general.

This tab will contain a text area where the user will be able to modify the text.

This text area will be connected with the database. When the user modifies the text then it will also be modified in database.

How can I do that?
I have already created a new group tab but how I can connect it with my model ??

cf this to understand: https://prnt.sc/oqfgou

Thanks!!


texts: Override phtml of a module from another module

texts:
I created a module and now I want to override a .phtml file from another module.
What is the best way to do that?


texts: Cart & Quote shared between different websites in Magento 2

texts:
Hello Magento 2 Community,
I am posting just to share with community very clearly how to make this posible, as I didn find a complete solution for this problem.
Summary: I have multiple websites, and I want my customer to keep his cart with stuff if he change website.


texts:
Having a carrier extending AbstractCarrierOnline and implementing CarrierInterface: What do the following methods supposed to do?

requestToShipment
_doShipmentRequest

And where from are they being called?


texts: Magento migrate customers and orders to a new store

texts:
We have setup a new magento store with a new products and need to migrate customers and orders from our old store.

Is it enough to migrate customers and sales tables? Or are they connected with products tables?

Whats the best way howto do it then?

Thank You in advance


texts: No payment methods are showing up on my configuration screen

texts:
In System > Configuration > Payment Methods, when I have Current Configuration Scope set to default or to my website, no Payment Methods are displayed, as seen here. I have one store setup, and it's grayed out in the Configuration Scope menu. When I select my one store view as the Configuration Scope, the Payment Methods are shown, but the configure buttons for each one are grayed out.

Am I doing something wrong, or is there an error in my installation? Everywhere I've seen shows that the Payment Methods should show up for the website as they do for the store view. Am I missing a setting somewhere? Thanks!

I'm using Community Edition 1.9.1.


texts: Is it possible to delete an empty root category once accidentally created or not required anymore? It looks like there's no "Delete" button.


texts: New order email template - price decimal place

texts:
we have amended our Magento 2.1 to use and store prices with 4 decimal places. But then used some JS to trim/round-up on the frontend to 2 decimal places.

However, on the email templates, the price is displaying with 4 decimal places e.g. £15.99000

Can I override the default email template to format the number to 2 decimal places (since the email doesn't allow JS)

I am currently looking at

vendor/magento/module-sales/view/frontend/templates/email/items/order/default.phtml

And the price is currently being called like this...

<td class="item-price">
        <?= /* @escapeNotVerified */  $block->getItemPrice($_item); ?>
 </td>

I tried changing the above to this instead...

<?php echo number_format($_item->getItemPrice(), 2); ?>

But that just seems to zero out the price, however it does read with 2 decimal places. So instead of it being £15.99 I just get £0.00

Where is my replacement code going wrong or am I even in the right place?

Thanks


texts: Unable to load Fixtures couse of foreign key constraint fails EComDev PHPUnit


texts: Get all websites, stores and store views in admin multi-select dropdown

texts:
I want to retrieve all stores and store views for a given website id. The data is to be shown as a hierarchy in multi select dropdown in the admin form.
I tried using \Magento\Store\Model\StoreManagerInterface to retrieve stores as follows:

$storeData = $this->StoreManagerInterface->getStores();

The above only gives the details about all the stores. But I am not able to retrieve stores through website Id.


texts: Assign Products created in last 45 days to specific category

texts:
I have a category created in my store with name "New Arrivals"

I want to add all products to this category which are created in last 45 days. This category products should be updated everyday with new products and remove old products.

How can I achieve this?


texts: Add an additional frontend property to the attributes - magento 1.9x

texts:
When adding/editing an attribute it is possible to set a number of frontend properties such as "allow HTML tags on frontend" or "used in product listing".  I would like to add some additional frontend properties. I am thinking of things like "include in pdf" and "logged in users only".

I have tried modifying  the catalog_eav_attribtes table directly and adding some new columns.  I have then overridden the

core/Mage/Adminhtml/Block/Catgalog/Product/Attribute/Edit/Tab/Main.php

$fieldset->addField('is_in_simple_list', 'select', array(
    'name' => 'is_in_simple_list',
    'label' => Mage::helper('catalog')->__('Visible in Simple Lists on Frontend'),
    'title' => Mage::helper('catalog')->__('Visible in Simple Lists on Frontend'),
     'note'      => Mage::helper('catalog')->__('Custom field for project'),
    'values' => $yesnoSource,
));

to include controls for the new fields.

However, whilst the controls appear, the value of the data does not save. Any thoughts as the the next step which I am missing and if there are any ramifications down the line to doing this?

Thanks


texts: Load product stock quantity by SKU : Magento 2

texts:
I need to get product quantity by using SKU. I have this code but give me null:

public function __construct(
    \Magento\Catalog\Model\ProductRepository $productRepository,

        array $data = []
    )
    {

        $this->_productRepository = $productRepository;

    }

public function getProductBySku($sku)
{
  return $this->_productRepository->get($sku);
}

$_product = $this->getProductBySku($itm['sku']);
echo $_product->Qty();


texts: static content deploy command autometically killed

texts: I am running command setup:static-content:deploy -f its running for while, but after sometime it got killed in magento2.3.2. Please let me know the exact issue for this.


texts: Magento 2: Override protected function getBackUrl in Magento\Checkout\Controller\Cart.php

texts:
I just want to override below method but its not working anymore.
Magento 2: Override protected function getBackUrl From Magento\Checkout\Controller\Cart.php

Any idea please share
My php code is :

<?php

namespace Dynamic\Checkout\Controller\Magento\Checkout;

use Magento\Catalog\Controller\Product\View\ViewInterface;
use Magento\Checkout\Model\Cart as CustomerCart;

class Cart extends \Magento\Checkout\Controller\Cart
{
    protected function getBackUrl($defaultUrl = null)
        {
        echo "8888 ";exit;
    }
}

and di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Checkout\Controller\Cart" type="Dynamic\Checkout\Controller\Magento\Checkout\Cart" />
</config>


texts: I need a way to set MOQ per group based on the total amount of units in the cart. The current magento MOQ option is applied per product. I need it to kick an error if someone has added < 40 units of an product in their cart. I'd prefer an extension that lets me set this per group because there are sometimes exceptions to the rule. Thanks!


texts: magento get attribute value for multi select attibute

texts:
i want to get attribute value for multi select attribute,

below is code that work if it is just text field or drop down , but for multi select it does not work ,
please guide way to fix it

$_product->getMetal();

works for text attibute for not for multiselect attibutes.

I am using above code on product listing page.

sample snap from where $_product comes:

<?php foreach ($_productCollection as $_product): ?>


texts: Magento 2 add country field in order export

texts:
I need to add counrty field in order export Magento 2.
Means when I click in export and csv or xml and Export button expected data with country name also.

Thanks


texts: No response from POST to custom REST Api route

texts:
I set up a working custom route for Magento's REST Api.

It works fine for GET requests, as the _retrieve() function of the corresponding V1.php class is being called as expected and returns the data. But now I'm trying to handle POST requests and that's when Magento is behaving weird:

When you want to post data you have to define the data as a collection instead of an entity in etc/api2.xml like this: <action_type>collection</action_type>. Otherwise Magento will throw this error in Mage_Api2_Model_Resource (line 207):

// Creation of objects is possible only when working with collection
$this->_critical(self::RESOURCE_METHOD_NOT_IMPLEMENTED);

So when I define the action_type as collection, then the _multiCreate() function of the corresponding V1.php is being called as expected.

However Magento now doesn't let me return any data. I want to return this array in JSON format:

$response = array("success"=>true, "error"=>"", "model"=>array(1,2,3));

'success', 'error' and 'model' are defined as attributes in the api2.xml and should therefore be available. But when I return $response, the response is empty with
Status 207 ... Hmmm! Now since it has action_type collection, I have also tried to return the $response wrapped inside another array, but without success.

In my final tryouts I figured out that by setting data with the method $this->getResponse()->addMessage(....) I am able to retrieve data, but I don't think that this is the correct way as it is thought to be for success/error/warning message types and it doesn't fit my data type requirements.

Last but not least I also tried to return data by using the $this->getResponse()->setBody($result) and $this->getResponse()->setRawBody($result) methods, but again - no success:

So Magento experts - What is the correct way to retrieve data from a POST request to the REST Api? I desperately need your help!!

Here's my api2.xml:

<customer_login translate="title" module="Test_Restapi">
    <group>restapi</group>
    <model>restapi/api2_customer_login</model>
    <title>Blablabla</title>
    <sort_order>10</sort_order>
    <privileges>
        <customer>
            <create>1</create>
            <update>1</update>
            <retrieve>1</retrieve>
        </customer>
        <guest>
            <create>1</create>
            <update>1</update>
            <retrieve>1</retrieve>
        </guest>
    </privileges>
    <attributes>
        <success>Success</success>
        <error>Error</error>
        <model>Model</model>
    </attributes>
    <routes>
        <route_collection>
            <route>/restapi/customer/login</route>
            <action_type>collection</action_type>
        </route_collection>
    </routes>
    <versions>1</versions>
</customer_login>


texts: Another magento move question but a bit reversed

texts:
I have a really silly question.
I have a live website that is hosted on a third party host and need to make a copy of it on my private server to be used as a staging environment. So far I have got the latest Magento 2 going on my Centos7 server after almost 2 weeks of mucking around.
I am aware that I have to copy the files from the magento directory on the live server which I have and the sql database which I have done also.
But here is the thing, the live webiste is using Magento 2.1.5 I think, and my version I have installed is 2.3.0. Is this going to be a problem?

Thanks in advance


texts:
I have an interesting issue.

Admin sales order grid does not show all records in sales_order_grid table.

I tried several solutions.

For example, I activated async grid generation on admin panel, than I truncated the table and cron run command filled the table but nothing changed.

I searched several times to find similar issues but I have found nothing.

By the way, missing orders created manually, so I checked all sales tables to find any difference between the other orders. No differences :/ But it must be, right?

Magento version is EE 2.2.6

I hope I can find anybody to be faced this issue before or at least any idea could help. Thanks for sharing your opinions.


texts: Magento create new order based on anonymous checkout client

texts:
we have "allow anonymous" checkout enabled because we see - that creating an account can sometimes defer customers.

Now when I create a new order based on that (specific anonymous) customer I have to enter all the customer data manually again.

What I mena is that the email, address and other information is already in another order. But when I create a new order - the customer is not in the customer list.

What I would normally do is: open the previous order and lookup all the information. What would be great is: that there is a button that says: create new order for this customer (and copies all the customer data fields)

Question: is there a fast way to copy the customer data from a previous order so I only have to add a product?

major thanks


texts: Magento 2.3 - PayPal Express Checkout partially working in Multi-website store

texts:
For Australia Paypal Payment method payment.log showing => 'STATE' => 'Victoria' compare than USA Paypal Payment method payment.log showing 'STATE' => 'TX' instead of 'Texas'. Is my Australia PayPal Payment method configuration is right? because i am getting Fatal during Australia PayPal payment, $address->setRegionId($region->getId()); clearly it's not getting the region id. I am using Multi-Website, any developers who configure australia paypal payment method help me, thanks.
Error:

Fatal error: Uncaught Error: Call to a member function getId() on null
in /var/www/html/test/app/code/Magento/Paypal/Model/Api/Nvp.php:1524
Stack trace:
#0 /var/www/html/test/app/code/Magento/Paypal/Model/Api/Nvp.php(1493): Magento\Paypal\Model\Api\Nvp->_applyStreetAndRegionWorkarounds(Object(Magento\Framework\DataObject))
#1 /var/www/html/test/app/code/Magento/Paypal/Model/Api/Nvp.php(849): Magento\Paypal\Model\Api\Nvp->_exportAddresses(Array)
#2 /var/www/html/test/app/code/Magento/Paypal/Model/Express/Checkout.php(621):
Magento\Paypal\Model\Api\Nvp->callGetExpressCheckoutDetails()
#3/var/www/html/test/app/code/Magento/Paypal/Controller/Express/AbstractExpress/ReturnAction.php(32):
Magento\Paypal\Model\Express\Checkout->returnFromPaypal('*********')
#4/var/www/html/test/generated/code/Magento/Paypal/Controller/Express/ReturnAction/Interceptor.php(24):
Magento\Paypal\Controller\Express\AbstractExpress\ReturnAction->execute()
#5 /var/www/html/test/lib/internal/Magento/Framework/App/Action/Ac in /var/www/html/test/app/code/Magento/Paypal/Model/Api/Nvp.php on line
15

Note: Unique Paypal account for my both website store.


texts:
I'm running Elasticsearch 7.6 on my Cloudways staging server, and 7.8 with Homebrew on my local server. Using Magento 2.4 (now 2.4.1).
When I try to reindex, I see
Catalog Search index process unknown error:
{"error":{"root_cause":[{"type":"mapper_parsing_exception","
reason":"analyzer [sku] not found for field [sku]"}],
"type":"mapper_parsing_exception","reason":"analyzer [sku] not found for field [sku]"},"status":400}

When I click on test connection under catalog > search, it says successful, and my Mirasvit search plugin says that I'm connected
Any idea of what this could be?
Thanks


texts: Modify the minicart price issue on Magento 2

texts:
I am trying to modify the price in mini cart with a custom product attribute

now the price in the minicart come from:

myproject\vendor\magento\module-checkout\view\frontend\web\template\minicart\item\price.html

and look like this

So, somehow the price is binding.

Does anyone know where this price is binding? or in which part of the code
the mini cart product attributes are render?


texts: CONNECT ERROR: When trying to install Fooman Speedster Advanced

texts:
I'm attempting to install Fooman Speedster Advanced for a client's site but to no avail, I keep recieving the below error when attempting to install.

Has anyone had this before and if so how did you fix it? See below the logs from Magento Connect.

  Checking dependencies of packages Starting to download
  Fooman_SpeedsterAdvanced-0.8.9-beta.tgz ...

  CONNECT ERROR: Package not found: Fooman_SpeedsterAdvanced 0.8.9-beta
  Package 'Fooman_Common' is invalid
  './app/code/community/Fooman/Common/Block/Adminhtml/Extensioninfo.php'
  already exists


texts: Remove https:// from Category and product pages

texts: I want to keep https on my homepage, cart & checkout page, but not on category & product page. How can I remove SSL from those pages?


texts:
I have installed one module with composer and that module stored in vendor folder.

Now i do not need that module, I have deleted from it and run the commnad "composer update"

Still i can see the module stored in vendor,

How to remove it completely, my site is down now.


texts: can not able to get session id from magento site to android app

texts:
we are trying to devolop a android app for magento site

we followed the follwing link to create a api username and key in magento admin panel.

https://www.yireo.com/tutorials/magebridge/administration/596-step-by-step-create-a-magento-api-user

from this api key and username we are getting the session id .

but we did lot of customization for this site.

after customization we can not able to get the session id.

please help what i have to do to get the session id for the customized site.

this error we are getting : http://sitename.com/index.php/api/v2_soap/


texts:
I am having a situation where I need to instantiate a helper object from my custom module in list.phtml file.
For this I have two options either I need to overrride productlist.php and pass the helper class in constructor or use object manager.
And I am not satisfied from both of the options..
Can anyone suggest me how can I pass this argument in constructor and use it in my phtml file ?
I have read a lot about virtual types and type arguments in di.xml
Any help in doing this?


texts: Redis default configuration and utilization

texts:
We did install Redis server 3.0.7 which has made our Magento store 1.9.x a bit better than before, but I just need to ask that all settings which comes out of the box in Redis is fine? or do I need to tune into something as we have much RAM available on machine and I want to cache as much as possible I can.

Also, when I check Redis utilization by running

redis-cli info | grep used_memory_human

it just returns some MB's like 3.72M or less than that(while when using file system caching in Magento it grows to much more) why is that?, can I somewhere define that as much memory Redis can use out of as much Gigs of RAM or is it kind of autoscale which goes up and down according to need?


texts: How custom attribute of "sales_order_item" table will be save also in "sales_order"

texts:
I am using plugin for converting "quote_item" to "sales_order_item" from below give code it work.

public function aroundConvert(
        \Magento\Quote\Model\Quote\Item\ToOrderItem $subject,
        \Closure $proceed,
        \Magento\Quote\Model\Quote\Item\AbstractItem $item,
        $additional = []
    ) {
        /** @var $orderItem \Magento\Sales\Model\Order\Item */
        $orderItem = $proceed($item, $additional);
        $orderItem->setCurrentSellerId($item->getCurrentSellerId());
        return $orderItem;
    }

But now i am want to convert my custom attribute("current_seller_id") data into  "sales_order" custom column.


texts: php -f bin/magento customer:hash:upgrade not working in magento 2.3.3

texts: After migration from magento 1 to magento 2, I ran this command but it is not working. I am not able to login with customers passwords. Why the command is not working?


texts:
I'm using the 1-click magento install from digitalocean. I downloaded a theme from templatemonster.com, added the sql database, and unzipped the theme file (fullpackage.zip) to "/app/design/frontend" as directed here. All the permissions are 770 or 775. I ran the magento command "setup:upgrade". My theme is not visible when I go to the themes section of the admin panel. Am I missing a step?

I also tried putting the theme file in several other places like /vendor/magento/.

I'm following these setup instructions from templatemonster.com


texts: About creating a custom product upload form in user panel

texts:
Admin can upload the product from the admin dashboard:

>> Catalog
>> Manage Product
>> Add product

I am implementing a custom product upload form in user panel where a user can sign in his account and upload his product and he can sell it.

I am able to generate the product form. However, I am not able to get proper input type in the form.

How can I get the proper input type and which database table is used in product form creation?


texts: Amasty: "shopby" redirect on custom product collection

texts:
I'm working on a small module which I usually test on my local magento installation. Everything worked so I uploaded the files to our magento test environment, which is online and has already a few other modules installed. One of those is "Amasty Shopby".

My module is supposed to show a custom product collection in catalog view based on $_GET values.
An example URL could look like this:

http://example.com/mymodule/index/get/?5=2

So far everything works, I get a collection of products based on $_GET['5'] == 2 (In my case those are Attributes). But if I switch from Grid to List mode (or other way around) or change the sort direction I get redirected to following URL:

http://example.com/shopby?mode=list&5=2

instead of

http://example.com/mymodule/index/get/?mode=list&5=2

If I hit the back button (from browser) now I get redirected back to

http://example.com/mymodule/index/get/?5=2

but the mode switches from grid to list (or other way around).

Everything works fine with pagination, switching pages works.
What's weird is that it also doesn't work when disabling Amasty through backend though it should be worth to mention that the toolbar isn't shown at all when disabling "Amasty Shopby". On my local magento installation (without Amasty or any other modules) everthing works as expected. If more information is required please tell me. Thanks.


texts: Trouble Uploading Images Magento CE 1.9.0.1

texts:
I have read about various users having trouble with image uploads but I have yet to find a solution to the problem I am having.  In the admin panel, when I am creating a product, I can browse to an image and click open, however, after that the image never shows up.  The upload button is there, but there is nothing to select to upload.

I am on a mac OSX 10.7.5 and using chrome 38.0.2125.111 which runs flash 15,0,0,189

Does anyone know how to fix this issue, or any workaround for it?  I have tried firefox and I have the same issue.

If you need any more information please let me know and I will update.


texts: "The product doesn't exit" Error Magento 2 admin panel

texts:
"The product doesn't exist"  Error Magento 2 admin panel.

Thank you,
Your Faithfully,
Mehul Kanjariya

Following error show log file

  [2019-03-18 11:01:54] main.CRITICAL: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.value' in 'field list', query was: SELECT entity.sku, product_entity.entity_id AS product_id, attribute.attribute_code, entity_value.value AS value_index, attribute_label.value AS super_attribute_label, IFNULL(option_value.value, default_option_value.value) AS option_title, default_option_value.value AS default_title FROM catalog_product_super_attribute AS super_attribute
   INNER JOIN catalog_product_entity AS product_entity ON product_entity.entity_id = super_attribute.product_id
   INNER JOIN catalog_product_super_link AS product_link ON product_link.parent_id = super_attribute.product_id
   INNER JOIN eav_attribute AS attribute ON attribute.attribute_id = super_attribute.attribute_id
   INNER JOIN catalog_product_entity AS entity ON entity.entity_id = product_link.product_id
   INNER JOIN catalog_product_entity AS entity_value ON entity_value.attribute_id = super_attribute.attribute_id AND entity_value.store_id = 0 AND entity_value.entity_id = entity.entity_id
   LEFT JOIN catalog_product_super_attribute_label AS attribute_label ON super_attribute.product_super_attribute_id = attribute_label.product_super_attribute_id AND attribute_label.store_id = 0
   LEFT JOIN eav_attribute_option AS attribute_option ON attribute_option.option_id = entity_value.value
   LEFT JOIN eav_attribute_option_value AS option_value ON option_value.option_id = entity_value.value AND option_value.store_id = 0
   LEFT JOIN eav_attribute_option_value AS default_option_value ON default_option_value.option_id = entity_value.value AND default_option_value.store_id = 0 WHERE (super_attribute.product_id = 31659) AND (attribute.attribute_id = '') ORDER BY attribute_option.sort_order ASC
   {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.value' in 'field list', query was: SELECT entity.sku, product_entity.entity_id AS product_id, attribute.attribute_code, entity_value.value AS value_index, attribute_label.value AS super_attribute_label, IFNULL(option_value.value, default_option_value.value) AS option_title, default_option_value.value AS default_title FROM catalog_product_super_attribute AS super_attribute
   INNER JOIN catalog_product_entity AS product_entity ON product_entity.entity_id = super_attribute.product_id
   INNER JOIN catalog_product_super_link AS product_link ON product_link.parent_id = super_attribute.product_id
   INNER JOIN eav_attribute AS attribute ON attribute.attribute_id = super_attribute.attribute_id
   INNER JOIN catalog_product_entity AS entity ON entity.entity_id = product_link.product_id
   INNER JOIN catalog_product_entity AS entity_value ON entity_value.attribute_id = super_attribute.attribute_id AND entity_value.store_id = 0 AND entity_value.entity_id = entity.entity_id
   LEFT JOIN catalog_product_super_attribute_label AS attribute_label ON super_attribute.product_super_attribute_id = attribute_label.product_super_attribute_id AND attribute_label.store_id = 0
   LEFT JOIN eav_attribute_option AS attribute_option ON attribute_option.option_id = entity_value.value
   LEFT JOIN eav_attribute_option_value AS option_value ON option_value.option_id = entity_value.value AND option_value.store_id = 0
   LEFT JOIN eav_attribute_option_value AS default_option_value ON default_option_value.option_id = entity_value.value AND default_option_value.store_id = 0 WHERE (super_attribute.product_id = 31659) AND (attribute.attribute_id = '') ORDER BY attribute_option.sort_order ASC
   at /home/domains/dev.test.com/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'entity_value.value' in 'field list' at /home/domains/dev.test.com/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []


texts: Cookie notice coming in the top of the html page : Magento2

texts:
i have installed https://meetanshi.com/magento-2-cookie-notice.html
  cookie extension in my website .

Now i am facing a serious issue .

  In my page source this cookies content is coming before my page
  content . As the result google taking cookies content as page content
  and displayed in search result .

  If i fill the meta description google taking that meta description ,
  but if i forget to fill meta description google taking cookie content
  (By continuing to use this site you agree to our use of cookies) as
  page content.

  So when i type my website in google i can see the page title , url and
  cookie content .

How can i solve this ?


texts: Magento 1.9 - Multiple Storeviews for the same Languages

texts:
I've got a settings-related question for you all; we have a Magento 1.9 shop with something of the following store setup:

Store 1 - Storeview 1 - Language A
Store 1 - Storeview 1 - Language B
Store 1 - Storeview 1 - Language C
Store 1 - Storeview 1 - Language D
-
Store 1 - Storeview 2 - Language A
Store 1 - Storeview 2 - Language B
Store 1 - Storeview 2 - Language C
Store 1 - Storeview 2 - Language D
etc

And this goes on for some storeviews.

The point being is that the site actually only has 4 different languages, but because they also have 6 storeviews with those languages, I have a lot of duplicates (24 seperate language fields, for only 4 languages).

I.e. when I translate an attribute I have to set translations for a single item 26 times where it could be 4.
I'm thinking of a fix like this (a single cache for the whole site and all productimages instead of a cache per storeview), but then for the attribute-translations?

Edit - Or am I approaching this the wrong way and should I just leave all the specific back-end translations empty, and go about to translating via .csv files?


texts: How to trigger an index for a configurable if the simple price index was changed

texts:
I made a pull request enter link description here for an the ElasticSuite module to make a discount of configurables flag dependent on simples.

Now of course the configurable has to be reindexed  if on of the simples are changed.

Is there any Magento technique do have such cascading index triggers or does everything has to be done manually?

Edit: maybe mview.xml can help


texts:
I'm using Magento V1.9.3 and I have a question about manufacturer field.

I have inserted a lot of manufacturers, but some of them are wrong and I need to change some words or delete it and create a new one

  example: from > MICROSOFT SPAIN to > Microsoft-Spain

I tried doing this, direct from admin panel but I can't save this changes :

  Magento Admin > Catalog > Attributes > Manufacturer

How can I fix that?


texts: Assigning Thumbnails via Magento REST API

texts:
I am trying to add thumbnail images to SKUs via REST API. However, the image is added but does not show as a thumbnail. Please see my POST request below
https://url.co.uk/rest/V1/products/231877/media
  "entry": {
    "media_type": "image",
    "label": "test",
    "position": 0,
    "disabled": false,
    "types": [
       "thumbnail","small_image"
    ],
    "content": {
      "base64_encoded_data": "myencodeddata",
   "type": "image/jpeg",
      "name": "test"
    },
    "extension_attributes": {
    }
  }
}

Thanks in advance!


texts: Magento Checkout Stuck: Failed to load the "Magento_Checkout/js/view/payment" component

texts:
I am on Magento 2.2. When I click on proceed with checkout, the checkout page opens (where it asks for address) but the checkout-loader jig keeps on spinning. I get below error on console:

console-output-handler.js:34 [2018-03-26 02:15:40] [ERROR] Failed to load the "Magento_Checkout/js/view/payment" component.

Could you please suggest? FYI, I have already tried cache cleans, redeploying static content etc but that didn't help either.

I have already tried the solution posted on below link but it did not help.
Magento 2.2.1 Checkout page broken and Js fail to load error


texts: Block rewrite not working - Mage_Checkout_Block_Onepage

texts:
I am having an issue with rewriting the Mage_Checkout_Block_Onepage block.

The issue is that after enabling this rewrite in the config, the one page checkout page doesn't load with any content. I have found that the Mage_Checkout_Block_Onepage block is never loaded.

I have the following in my config.xml

<blocks>
 <checkout>
  <rewrite>
   <onepage>Name_Module_Checkout_Block_Onepage</onepage>
  </rewrite>
 </checkout>
</blocks>

I then have the following class created in

app\code\local\Name\Module\Block\Checkout\Onepage.php

class Name_Module_Checkout_Block_Onepage extends Mage_Checkout_Block_Onepage {

I then override the getSteps method to see if its getting called, but it never gets called.

public function getSteps()
{
        Mage::Log("HERE!~");
}

I also created a new template file in the following location. Which is just a copy of the original onepage.phtml for now.

app\design\frontend\base\default\template\[module]\checkout\onepage.phtml

What is odd is that I can put a random name in the config.xml for the rewrite class and it never throws an error saying it can't find the class.

The same issue as described here Override Mage_Checkout_Block_Onepage with an extension

I looked through this question, but it didn't really have a solution. I tried everything that it said.

Any ideas would be very helpful. I must be missing something somewhere.