texts: Custom Attribute For Customer Entity is not working in Magento 1.9

texts:
I am trying to add a customer attribute Mobile in customer_entity_varchar and It's not working. I can't see my attribute in eav_attribute table. Here are my codes.

local/Vaibhav/Mobile/etc/config.xml

<?xml version="1.0"?>
<config>
        <modules>
            <Vaibhav_Mobile>
                <version>0.1.0</version>
            </Vaibhav_Mobile>
        </modules>
        <global>
            <resources>
                <Vaibhav_Mobile_setup>
                    <setup>
                        <module>Vaibhav_Mobile</module>
                        <class>Mage_Customer_Model_Entity_Setup</class>
                    </setup>
                    <connection>
                        <use>core_setup</use>
                    </connection>
                </Vaibhav_Mobile_setup>
                <Vaibhav_Mobile_write>
                    <connection>
                        <use>core_write</use>
                    </connection>
                </Vaibhav_Mobile_write>
                <Vaibhav_Mobile_read>
                    <connection>
                        <use>core_read</use>
                    </connection>
                </Vaibhav_Mobile_read>
            </resources>
        </global>
    </config>

local/Vaibhav/Mobile/sql/vaibhav_mobile_setup/install-0.1.0.php

<?php
$installer = $this;

$installer->startSetup();

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$entityTypeId     = $setup->getEntityTypeId('customer');
$attributeSetId   = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$installer->addAttribute("customer", "mobile",  array(
    "type"     => "varchar",
    "backend"  => "",
    "label"    => "Mobile",
    "input"    => "text",
    "source"   => "",
    "visible"  => true,
    "required" => false,
    "default" => "",
    "frontend" => "",
    "unique"     => false,
    "note"       => "Mobile"

        ));

        $attribute   = Mage::getSingleton("eav/config")->getAttribute("customer", "mobile");

$setup->addAttributeToGroup(
    $entityTypeId,
    $attributeSetId,
    $attributeGroupId,
    'mobile',
    '999'  //sort_order
);

$used_in_forms=array();

$used_in_forms[]="adminhtml_customer";
$used_in_forms[]="checkout_register";
$used_in_forms[]="customer_account_create";
$used_in_forms[]="customer_account_edit";
$used_in_forms[]="adminhtml_checkout";
        $attribute->setData("used_in_forms", $used_in_forms)
                ->setData("is_used_for_customer_segment", true)
                ->setData("is_system", 0)
                ->setData("is_user_defined", 1)
                ->setData("is_visible", 1)
                ->setData("sort_order", 100)
                ;
        $attribute->save();

$installer->endSetup();

etc/modules/Vaibhav_Mobile.xml

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

I can't see any error also. Can anyone help me out with this issue?


texts: Magento 2: using knockout components within a component

texts:
I am trying to render a new KO component within a existing KO template. I have a PackagePopup component which in the template, renders a PackageFfilter component. I would like to seperate the logic for the filters from the js logic for the items.
PackagePopup template:

      **<-- hardcoded id for testing purposes**

What this looks like:

Eventually, i also want to communicate between the two viewmodels.
In the magento template, i try to instantiate the component like this (i have the popup working):

Id's are added to the component names because there can be more instances of the same component on a page.
Witgt he above setup, knockout gives the following error
knockout.js:3993 Uncaught Error: Unknown component 'package-filters-3'

This must have something to do with the way magento handles components, but i can't really find out why. Any suggestions?


texts: Magento2 : Override Category List page with No dependency on Other Custom Module

texts:
I want to override category.products.list to display 1 custom attribute value to each product in list.

and i know i can override product/list.phtml to my module and there i can customize code in loop to display that attribute value.

but in case tomorrow any other module override list.phtml then my changes are gone.

so is there any way, that any module override list.phtml my code to display custom attribute value to each product should appear?


texts:
In my custom module I have added a tab to the admin configuration section to manage service providers for an external service. I have creted the following group in my system.xml of my module:

    <mymodule>
        <groups name="providers">
            <provider1>
                Provider 1
                <sort_order>100</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <name>
                        Name
                        <frontend_type>text</frontend_type>
                        <sort_order>10</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </name>
                </fields>
            </provider1>
            <provider2>
                Provider 2
                <sort_order>320</sort_order>
                <show_in_default>1</show_in_default>
                <show_in_website>1</show_in_website>
                <show_in_store>1</show_in_store>
                <fields>
                    <name>
                        Name
                        <frontend_type>text</frontend_type>
                        <sort_order>10</sort_order>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </name>
                </fields>
            </provider2>
        </groups>
    </mymodule>

This results in my config using the following path:

mymodule/provider1/name or mymodule/provider2/name

What I would like to do is use the following path:

mymodule/providers/provider1/name etc

I thought that i might be able to just wrap the providers in a  node bu tthis doesn't work. I appreciate that I am trying to massage the structure of the xml in order to get please the path, but in doing so it will help me to target just the providers which I need to do for the options used on drop-down select.


texts: UI: Backend Catalog -> Manage Products -> edit product (Related Products, Up-Sells, Cross-Sells)

texts:
Sorry if I must ask this stupid question, but I cannot figure out the meaning of
the following user interface element in the backend (Magento 1.8.0.0):

Under any of

  Catalog -> Manage Products -> edit product (Related Products,
  Up-Sells, Cross-Sells)

the first column of the search fields displays a check box (which is checked by
default) and the value "Yes" is selected (the three values available are "Any",
"Yes", and "No"). Furthermore when I click the "Reset Filter" button the
checkbox disappears and the value of the drop-down menu which contained
"Yes" changes to "Any". However I cannot figure out what the checkbox
means, and also cannot figure out what the value of the drop-down
menu below it from which it is possible to select "Any", "Yes",
or "No" means. Could someone please explain to me the meaning
of the checkbox field and the drop-down menu field?

Thanks.


texts: I'm trying to write an observer <sales_order_place_after> that create invoice automatically when an order is placed. Please tell me how to do it.


texts: How to add multiple product to magento cart from outside of magento?

texts:
I have to add multiple items into magento cart from out side of magento (external website), through /path/to/app/checkout/cart/add?product=[id]&qty=[qty] this method I can add one product to the cart.

Can anyone suggest how to do it?


texts: How to add datepicker in custom report page in frontend?

texts:
Is there any built in function to add datepicker in form fields. Please suggest. So far I have tried to put jquery plugin for datepicker. But I think that is not the right way.

project\report\application\views\result\index.php

 to


texts:
We have a problem with shipping costs, randomly not working and show 0€ (some products works and others not, all created in the exactly same way)

For Shipping Methods our Magento is configured with  Table Rates, and all other methods are disabled.
This is the "Tables rates" configuration:

Enabled:"Yes"
Title:"Shipping costs by weight"
Method Name: "shipping price"
Condition:"Weight Vs. Destination"
Include Virtual Products in Price Calculation: "No"
Calculate Handling Fee: "Fixed"
Handling Fee: 0
Displayed Error Message. "Error"
Ship to Applicable Countries: "Speciific Countries"
Ship to Specific Countries: "Spain"
Show Method if Not Applicable: "No"
Sort Order: 1

I have this CSV

Country,Region/State,"Zip/Postal Code","Weight (and above)","Shipping Price"
*,*,*,0.0000,8.5000
*,*,*,25.0000,5.5000
*,*,*,50.0000,1.0000

Also for the country we have tried to put the code "ES" and "ESP".

We experience the problem with all types of products: configurable, simple, grouped.
and in all products we have put the weight.
We tried to update magento from version 2.0.5 to 2.0.7
We tried to downgrade the PHP7 to PHP5.6,
Constantly we tried switch between production mode and developer mode.
also we tried compile, clear the cache ... without result.

Our current configuration:

PHP 7.0.2
Nginx 1.10.0
Magento 2.0.7
Dedicat hosting

Someone has been the same probleme.
Can you help us please

Thanks in advance!.


texts:
I have a simple module Alpine_AlpineCustom but it seems that my layout.xml file is not being applied properly and I just can't see why.

I can see via Commercebug that the layout file alpinecustom_index_index.xml is seen, but when I call my page it I see a "1column" page with "Create New Customer Account" and not my content. So either my layout is either not working, working wrong, or is ignored for this path block.

My router, controller, template seem to work properly because if I put $block->setTemplate('Alpine_AlpineCustom::alpine.phtml'); in my execute function things show as expected without error.

It must be something simple and obvious between the block and the layout, a path or name mismatch but I just cannot see it. It is the right block name and template reference since they work elsewhere.

What am I not seeing?

Bonus question: why is it showing "Create New Customer Account"?

Alpine\AlpineCustom\view\frontend\layout\alpinecustom_index_index.xml:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <title>Layout Alive</title>
</head>
<body>
    <referenceContainer name="content">
        <block class="Alpine\AlpineCustom\Block\Index" name="alpinecatalog" template="Alpine_AlpineCustom::alpine.phtml" />
    </referenceContainer>
</body>
</page>

Alpine\AlpineCustom\Block\Index.php

<?php

namespace Alpine\AlpineCustom\Block;
class Index extends \Magento\Framework\View\Element\Template
{

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        array $data = []
    )
    {
        parent::__construct($context, $data);
    }

    protected function _prepareLayout()
    {
        return parent::_prepareLayout();
    }

    public function getAlive()
    {
        return 'Module Index Block ALIVE';
    }

}
?>

Alpine\AlpineCustom\Controller\Index\Index.php

<?php
namespace Alpine\AlpineCustom\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action
{
    /**
    * @var \Magento\Framework\View\Result\PageFactory
    */
    protected $resultPageFactory;
    /**
    * @param \Magento\Framework\App\Action\Context $context
    * @param \Magento\Framework\View\Result\PageFactory resultPageFactory
    */
    public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $resultPageFactory
    )
    {
        $this->resultPageFactory = $resultPageFactory;
        parent::__construct($context);
    }

    public function execute()
    {

        $this->_view->loadLayout();
        $this->_view->getLayout()->initMessages();
        //$block = $this->_view->getLayout()->createBlock('Alpine\AlpineCustom\Block\Index');
        //$block->setTemplate('Alpine_AlpineCustom::alpine.phtml');
        //$this->getResponse()->appendBody($block->toHtml());
        /** @var \Magento\Framework\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();

        return $resultPage;
    }
}
?>

Alpine\AlpineCustom\etc\frontend\routes.xml

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


texts: Is the incremental order Id unique across all customers/orders/websites?

texts:
My question is, how unique is the incremental order Id? The payment gateway I'm using requires a unique order Id for every purchase attempt.

So let's say customer A tries to purchase, but his transaction is denied.

Order ID: 1, Increment Order ID: 100001

When he tries to purchase again, will the Increment Order Id become 100002, or will it still be 100001? And if so, how do I refresh/increment it?

Also, will it be unique across customers? Will an Order ID: 2 have an Increment Order ID: 100001? Or will it be unique across all orders?


texts: Mass action in the grid in tab redirects to dashboard in magento2

texts:
I've a form with multiple tabs and in one tab there is a grid with mass actions.

But when i click on Submit button, after selecting the massaction, the control is redirected to dashboard.

this is the code to get the mass action

protected function _prepareMassaction()
    {
        $this->setMassactionIdField('sku_id');
        $this->getMassactionBlock()->setTemplate('Namespace_Module::massaction_extended.phtml');
        //$this->setMassactionIdFieldOnlyIndexValue(true);
        $this->getMassactionBlock()->setFormFieldName('universalProductsGrid');

        $this->getMassactionBlock()->addItem(
            'delete',
            [
                'label' => __('Remove Global SKUs'),
                'url' => $this->getUrl('namespace_module/*/massDeleteSku',['id'=>$this->getRequest()->getParam('id')]),
                'confirm' => __('Are you sure?')
            ]
        );
        return $this;
    }

EDIT
I have found the problem, the form_key was not rendered in the massaction form, so temporary i added the below function in the file

magento-root/vendor/magento/module-backend/Block/Widget/Grid/Massaction/Extended.php

public function getFormKey()
    {
        return $this->formKey->getFormKey();
    }

and then in the file Namespace_Module::massaction_extended.phtml

replaced <?php echo $block->getBlockHtml('formkey')?> with

<input name="form_key" type="hidden" value="<?php //echo $block->getFormKey() ?>" />

But now my problem is how do i change this in my module block, instead of changing the core block.

Thanks.


texts: Shipping cost change depending on products in cart

texts:
I know I should have at least attempted something before asking a question here, but I genuinely have no idea where to start.

I have my shipping rates set up and don't want these to change.  They are calculated based on the destination country.

What I want to do is keep to these rules except for when the cart contains only items from a certain category.  It would be a flat cost regardless of destination:

If CART contains ONLY category_id_916 THEN shipping = 2.99
ELSE follow normal rules

Where inside Magento would I look to implement some code like this? It could be after the system has already calculated the shipping cost if that is easier, as I can't imagine perfomance being affected too badly.


texts:
I'm trying to use Magento 2 Documentation to implement my custom credit card module payment, but i'm not able to understand the way Payment Provider Gateway works.

I folowed this doc: http://devdocs.magento.com/guides/v2.2/payments-integrations/bk-payments-integrations.html

What I understand is that it can communicate with the payment gateway I choose, but how to transfer the order info and credit card info to the payment gateway?

So, my custom payment method is showing in the checkout page. I selected it and place order but my gateway provider do not received the informations.

That's my AuthorizationRequest.php file:

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Ahimsa\PaymentGateway\Gateway\Request;

use Magento\Payment\Gateway\ConfigInterface;
use Magento\Payment\Gateway\Data\PaymentDataObjectInterface;
use Magento\Payment\Gateway\Request\BuilderInterface;

class AuthorizationRequest implements BuilderInterface
{
    /**
     * @var ConfigInterface
     */
    private $config;

    /**
     * @param ConfigInterface $config
     */
    public function __construct(
        ConfigInterface $config
    ) {
        $this->config = $config;
    }

    /**
     * Builds ENV request
     *
     * @param array $buildSubject
     * @return array
     */
    public function build(array $buildSubject)
    {
        if (!isset($buildSubject['payment'])
            || !$buildSubject['payment'] instanceof PaymentDataObjectInterface
        ) {
            throw new \InvalidArgumentException('Payment data object should be provided');
        }

        /** @var PaymentDataObjectInterface $payment */
        $payment = $buildSubject['payment'];
        $order = $payment->getOrder();
        $billing = $order->getBillingAddress();
        $address = $order->getShippingAddress();

        return [
            'reference' => $order->getOrderIncrementId(),
            'capture' => false,
            'amount' => $order->getGrandTotalAmount(),
            'cardNumber' => '4024007165823435',
            'cardholderName' => 'Bill Gates',
            'expirationMonth' => 02,
            'expirationYear' => 2020,
            'securityCode' => 317,
            'uri' => 'desenvolvedores/v1/transactions'
        ];
    }
}

And the TransferFactory.php file:

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Ahimsa\PaymentGateway\Gateway\Http;

use Magento\Payment\Gateway\Http\TransferBuilder;
use Magento\Payment\Gateway\Http\TransferFactoryInterface;
use Magento\Payment\Gateway\Http\TransferInterface;
use Ahimsa\PaymentGateway\Gateway\Request\MockDataRequest;

class TransferFactory implements TransferFactoryInterface
{
    /**
     * @var TransferBuilder
     */
    const URL = 'https://api.userede.com.br/';
    private $transferBuilder;

    /**
     * @param TransferBuilder $transferBuilder
     */
    public function __construct(
        TransferBuilder $transferBuilder
    ) {
        $this->transferBuilder = $transferBuilder;
    }

    /**
     * Builds gateway transfer object
     *
     * @param array $request
     * @return TransferInterface
     */
    public function create(array $request)
    {

        return $this->transferBuilder
            ->setBody(json_encode($request))
            ->setMethod('POST')
            ->setHeaders([
                'Content-Type' => 'application/json',
                'Authorization' => 'Basic MTAwMDAyMTA6Y2M3Yzk0MjQ1YjNhNGUxNmJlYmI2ZjE2ZTZiMTFkNjk=',
                'Affiliation' => '10000210'
                ])
            ->setUri('https://api.userede.com.br/desenvolvedores/v1/transactions')
            ->build();
    }
}

Is that the right way?

Help please!


texts: Get product name in my orders (order history page)

texts:
How can I get the name of a product in the order history page? I copied the view order code in but it's not working.

$_order = $block->getOrder()
<?php $_items = $_order->getItemsCollection(); ?>
<?php foreach ($_items as $_item){ ?>
<?php echo $block->getItemHtml($_item) }?>


texts: Magento 1 Tax calculation in order creation and invoice creation off by one cent

texts:
Let's assume we create an oder. The full tax report says that the individual tax rate is 19% and the individual tax amount is 78.84 €. The total tax amount is 78.84 € as well.

Now we create the invoice. If we take a look at the Invoice totals the individual tax is off by one cent (78.83 €) and does not match the total tax amount anymore.

This is especially problematic since the differing tax amounts (individual vs. total) are on the receipt (pdf) as well.

I can provide you with the tax calculation settings as well, but I hope I do not have to change them since everything else seems to work out fine (finally).

Any help on how to unify the tax calculation throughout the whole process (order creation, invoice creation)?

I do not dare to ask why the Subtotal is different as well...


texts: Magento2.3.0 How to do in left side navigation custom category tree structure create it?

texts:
I am using Magento2.3.0 I need in left side layer navigation instead replace category section  there our  custom category tree display on it and its work as on fronted side only.If any one this type of customization reply me.

I'm using for layer navigation third party module but in this module by default category display on it left side but we want to default instead custom category tree display in left side.

I am waiting reply

any help will be appreciated.


texts: Magento 2 - Changing Default Search Query Behavior

texts:
I have the following search criteria:

/?free_from%5B%5D=265&free_from%5B%5D=266

I'm trying to query all products and return ONLY products with both options A and B selected for the custom attribute free_from.

Currently with the above search criteria, A and B for example, i get search results for products where EITHER A or B is assigned.

I only want to return results where BOTH A and B are selected.

Is this possible? I'm assuming i would need to tap into the internal logic for querying products. Or should i simply change the search query in some way?

Thanks


texts:
Hi I am trying to Run a PHPUnit static test only for the /app folder and I do not know how to exclude the /vendor folder not to be tested.

I am using the following command: php vendor/phpunit/phpunit/phpunit -c dev/tests/static/phpunit.xml

If somebody has any idea on how to exclude the /vendor folder and run the static test only in for the /app folder, your help will be much appreciated.


texts: This has probably been asked before but I can't seem to find it. Is there a way with javascript to clear or reset a configurable swatch selection?


texts: Configurable products mixed with a form. Post info to webservice and charge customers

texts:
I'm trying to develop a form in order to pass information to a web service and retrieve a response. To charge customers and manage orders I'm trying to use attribute sets and product type: configurable products combinations to retrieve the correct price and mix that functionality with my form when I send the details. Consequently I will generate the post to the webservice and all the attributes to retrieve the price and generate the order.

My idea is to use a form populated with fields where some of those fields are product attributes defined to retrieve the price of that particular product combination.

My first question is: is it possible to pass that information directly as a button? Example, CMS page -> add to cart button that passes those product variants on click and set the product attribute combination price based on those parameters.

Or: if I extend the product view page how can I parse product attributes to use? Mix those attributes as fields inside my form and use it to bill customer?


texts: How can I add mini search for sub-categories?

texts:
My Store has some Categories and sub-categories as :
-- Default Category
     -- Pass-over
          -- EP5
          -- EP15
     -- Self-serve
          -- EP02
          -- EP99
In my mini search form, It Shows Pass-over, Self-serve in Category search

I want EP5, EP15 ni category search,
My form.mini.phtml code for mini search is :

    <form id="search_mini_form" action="<?php echo $catalogSearchHelper->getResultUrl() ?>" method="get">

        <?php
    $category = Mage::getModel('catalog/category');
    if(is_object(Mage::registry('current_category'))){
        $currentCategoryPath=Mage::registry('current_category')->getPathIds();
    }else{
        $currentCategoryPath = array();
    }
    $category->load(Mage::app()->getStore()->getRootCategoryId());
    $childrenString = $category->getChildren();
    $children = explode(',',$childrenString);
    $categoryOptions='';
    foreach($children as $c){
        if($this->getRequest()->getParam('cat')==""){
            $selected = (in_array($c, $currentCategoryPath))?'SELECTED':'';
        }else{
            $selected = ($this->getRequest()->getParam('cat')==$c)?'SELECTED':'';
    }
    $categoryOptions.= '<option value="' . $c . '" ' . $selected . '>' . $category->load($c)->getName() . '</option>' . "\n";
    }
?>

           <select name="cat" id="cat">
    <option value="">All</option>
    <?php echo $categoryOptions ?>
</select>
            <input id="search" type="text" name="<?php echo $catalogSearchHelper->getQueryParamName() ?>" value="<?php echo $catalogSearchHelper->getEscapedQueryText() ?>" class="input-text"  maxlength="<?php echo $catalogSearchHelper->getMaxQueryLength();?>" />

            <button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Search')) ?>" class="button search_btn"></button>

    </form>


texts: Discount disappears after changing payment method

texts:
we created coupon code, so that that coupon should not work if customer select "Cash on delivery" payment method.

customer will apply coupon in cart page & go to checkout and select Prepaid payment method and no issue here, he can see Discount as below image. [ -139]

Again customer will  go back to "Payment information" step & he selects Cash on delivery and go to "Order review" step, he dont see any discount, thats fine.....

But customer become mad and again he go back to "Payment information" & select Prepaid payment method and come to "Order review" step, now he see the Devil that he dont see any discount....

This issue is happening only for new customers in site, for old customers there is no issue....

log errors in app/code/core/Mage/Checkout/Model/Type/Onepage.php

Notice: Array to string conversion  in

$send .= $param . '=' . $value . "\r\n";}

Notice: Undefined variable: datasend in

$datasend .= substr($send, 5, -1);

Edit 2


texts: Neither UTF-8 nor ISO-8859-1 is returning the correct characters when creating PDFs

texts:
I am creating invoices for our store in the Czech Republic, and neither UTF-8 nor ISO-8859-1 is returning the correct characters. UTF-8 is omitting characters, and ISO-8859-1 is returning the wrong characters.

From what I can tell, those are my only two options for creating PDF documents...

Any ideas on how I can get the correct character sets inside PDFs?


texts:
In Magento 2, what are the pros and cons of using a plugin vs an observer to achieve something?

I understand that observers are subscribed to events whereas plugins can jump in before and/or after a public method being called on a Magento class, but surely they're coming very close to crossing paths now?


texts: How to create a custom search in magento 2

texts:
i want to give a custom form to users using which they will search der content on mage store.
But i m not sure how to implement the same.

Above is the search form which i want to add , and upon search it should list me only those products which has selected attribute values.
All the search parameters are custom attributes of the products.
plz help and a detailed description would help me alot.


texts: Adding block between category title and product list in the frontend

texts:
I need to add my module's block between category title and product list inside the frontend category page.
I guess I'll have to use an event observer, but I can't find which, and what implementation to make.


texts: Change UPS ground shipping price in checkout

texts:
I used the Magento observer but using the code below, the UPS all-allowed method price becomes zero.

I want only the ground price to be zero and other methods not to change.

public function salesQuoteCollectTotalsBefore($observer){
    $quote = $observer->getQuote();
    $someConditions = true;
    $newPrice = 0;
    $store    = Mage::app()->getStore($quote->getStoreId());
    $carriers = Mage::getStoreConfig('carriers', $store);
    $tmp = array();
    $tmp = explode(',', $carriers['ups']['allowed_methods']);

    foreach ($carriers as $carrierCode => $carrierConfig) {

      if($carrierCode == 'ups')
      {
          $store->setConfig("carriers/$carrierCode/handling_type", 'P');

          $store->setConfig("carriers/$carrierCode/handling_fee", '-100');

      }
    }

}


texts:
Where do I go to add text to the customer account login page on my site? I have not worked in Magento previously and I am not finding this option when logging into the admin panel.

http://theh2oguru.com/customer/account/login/

I am not finding this through the CMS. Also, I do not have access to the ftp, but have asked for it.

I am used to working within WordPress for what it's worth.

Thanks very much for a response!


texts: Cannot read property 'left' of undefined - pagination not working on store

texts:
Pagination is not working on store page. Checked all settings but very weird
when you go to http://www.longclothing.com/store/ at bottom go to 2nd page. You are still staying at first page but URL is http://www.longclothing.com/store/?p=2 so the pagination is not working.

I tried to change in catalog to show 500 products and it shows me all products. If I revert to show only 64 and have 1,2,3 pages and click on 2nd or 3rd or show all nothing happen.

In chrome console you can see some JS error:

  Uncaught TypeError: Cannot read property 'left' of undefined


texts:
Magento Front-End Nothing Display.
I Changed My Magento Site to Live Hosting.
I Can Login Admin Panel that everything ok but Front-End Nothing Display.


texts: M2.1.9- I used the method which joining table when adding column to order grid. But it is so slow and filter function disappear

texts:
There,

I used the method which joining table when adding new column to order grid. A new column is for company name and its information is from sales_order_address, not sales_order. I succeeded to bring company data but it is way too slow to load totally and filter function disappears (it appear again when i scroll down tho). Could you check my code,please?

CODE

  app\code\Kbethos\CompanyColumn\etc\di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
    <plugin name="sales_order_additional_columns" type="Kbethos\CompanyColumn\Plugins\AddColumnsSalesOrderGridCollection" sortOrder="20" disabled="false" />
</type>
</config>

  app\code\Kbethos\CompanyColumn\Plugins\AddColumnsSalesOrderGridCollection.php

<?php namespace Kbethos\CompanyColumn\Plugins;

use Magento\Framework\Message\ManagerInterface as MessageManager;
use Magento\Sales\Model\ResourceModel\Order\Grid\Collection as SalesOrderGridCollection;

class AddColumnsSalesOrderGridCollection
{
    private $messageManager;
    private $collection;

    public function __construct(MessageManager $messageManager,
        SalesOrderGridCollection $collection
    ) {

        $this->messageManager = $messageManager;
        $this->collection = $collection;
    }

    public function aroundGetReport(
        \Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory $subject,
        \Closure $proceed,
        $requestName
    ) {
        $result = $proceed($requestName);

        if ($requestName === "sales_order_grid_data_source") {
            $select = $result->getSelect();

            $select->join(
                ["soa" => "sales_order_address"],
                'main_table.entity_id = soa.parent_id AND soa.address_type="shipping"',
                array('company')
            )
                ->distinct();
        }

        return $result;
    }
}

  app\code\Kbethos\CompanyColumn\view\adminhtml\ui_component\sales_order_grid.xml

<?xml version="1.0" encoding="UTF-8"?>

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">

    <columns name="sales_order_columns">

        <!-- sales_order_address company -->
        <column name="company">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Company</item>
                    <item name="sortOrder" xsi:type="number">200</item>
                    <item name="align" xsi:type="string">right</item>
                    <item name="filter" xsi:type="string">text</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <!--<item name="bodyTmpl" xsi:type="string">ui/grid/cells/html</item>-->
                </item>
            </argument>
        </column>
    </columns>
</listing>

ISSUES

My Problem is

It spent a huge of times to bring company information totally because our order items counts 216,894 right away and it will be larger in the future. So my question is that there is another way to bring an information under the database table whose prefix is sales_,not sales_order table
After adding my module, the filtering function disappear. i mean my module makes the layout crushed. How can i handle this problem?


texts: When i Tried to enter public and private key Extension Manager it show me error "Invalid response line returned from server: HTTP/2 200 " anyone have this issue ?


texts: I am working on a Webshop where purchases are done based on a points system rather than a dollar value. Each product is assigned a points value and when the customer purchases a product, his points are deducted from the accumulated points over time. Any help to point to the right plugin will be highly appreciated.


texts: How Can I move Search bar in Navigation div in Magento2 using XML

texts:
How Can I move Search bar section in Navigation div Magento2 using XML.

I have used below code but it's not working:

<move element="top.search" destination="catalog.topnav" before="-"/>

Any one have idea for how to move search bar in Navigation div?


texts:
I am new to Magento 2 and been wondering how to remove wishlist counter text.

I had tried generating a language pack using this command:

bin/magento i18n:collect-phrases -o "app/design/frontend/vendor/theme/i18n/en_US.csv" app/design/frontend/vendor/theme

in the newly generated files with 2 columns, I changed

%1 items

to

%1

I also tried replicating the one on Magento_Wishlist then put it in my custom theme but it does not work either.

Also, I tried this accepted solution but still no luck.

Thanks.


texts: How to make copy of a file from default theme in magento 2 for modifications

texts:
I have file success.phtml in directory of Magento 2

C:\wamp\www\magento_test\vendor\magento\module-checkout\view\frontend\templates\success.phtml

I want to make some changes in this, and also want to keep the source file as it is..

Made a new theme under directory and modify file success.phtml but didn't work

C:\wamp\www\magento_test\app\design\frontend\Yard\yardfreak\module-checkout\view\frontend\templates/success.phtml

Please suggest me , the right directory structure for file that loads first then the above give directory if file didn't found.


texts: Magento 2: How to add meta tags "NoIndex, Follow" to sitemap page

texts: I'm trying to add robots metatags "NOINDEX, FOLLOW" to the sitemap. How can we achieve it in Magento 2


texts: Costumer custom attribute bulk fill script

texts:
I've installed an extension that separate normal person information from enterprise information.

the taxvat field is still used by normal person but enterprises have to fill a new field and specify that the cliente is an enterprise.

The problem is: for new users ok, no problem but old enteprises clients are having problems because the new extension says the "taxvat" number is wrong. It's right because the taxvat number format are different among person and enterprises.

I moved all information from taxvat to this new field but I still need to specify the these clients are enterprise by filling a field called "tipopessoa"

My question is: Is there a way to make a script to do it?

I need that all clients that have the patern 0001 on cnpj field have the field tipopessoa filled with "Jurídica"


texts:
Due to error in reindex,  Reindex process for 'design_config_grid ' is Skipping

Design Config Grid index is locked by another reindex process. Skipping.
Customer Grid index has been rebuilt successfully in 00:00:10
Category Products index has been rebuilt successfully in 00:00:05
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:13
Product EAV index has been rebuilt successfully in 00:00:11
Catalog Search index has been rebuilt successfully in 00:00:47
Catalog Rule Product index has been rebuilt successfully in 00:00:04
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:06
Search Spell-Correction index has been rebuilt successfully in 00:00:06

So I have taken help from here : Magento 2 How to unlock reindex process

But, now I am getting this error message ->  "Design Config Grid indexer has been invalidated."

Please help me to remove this error.


texts: Remove Quantity Increment Button Based on Attribute

texts:
On the product page, I want to remove the Incremental Quantity option buttons if a given attribute in that product is "Yes". In this case product attribute "ddq_enabled" must be set to "Yes" for the Incremental Quantity option not to be desired.

I'm new to php so I do not know what syntax to use but I pretty much want to create an if statement

If ddq_enabled is yes, then only show the add to cart button.

If ddq_enabled is no, then we can default to the regular view

Below is my phtml file - I'm sure this is an easy one. Thank you...

 <?php

?>
<?php $_product = $this->getProduct(); ?>
<?php $buttonTitle = $this->__('Add to Cart'); ?>
<?php if($_product->isSaleable()): ?>

        <?php if(!$_product->isGrouped()): ?>
        <?php echo $this->__('Qty:') ?>

                    <input type="button" onclick="var qty_el = document.getElementById('qty'); var qty = qty_el.value; if( !isNaN( qty ) &amp;&amp; qty &gt; 0 ) qty_el.value--;return false;" class="qty-decrease" />

                <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>" class="input-text qty" />

                    <input type="button" onclick="var qty_el = document.getElementById('qty'); var qty = qty_el.value; if( !isNaN( qty )) qty_el.value++;return false;" class="qty-increase " />

        <?php endif; ?>
        <button type="button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"> <?php echo $buttonTitle ?></button>
        <?php echo $this->getChildHtml('', true, true) ?>

<?php endif; ?>


texts:
I want to send SMS when any user order any product and Dispatch. eg.

  Thank You for shopping with us. Your Order# _______ for Rs _____. It will be dispatched shortly.

And

  Your Order have been shipped through Firstflight & Docket No. is _________ . For queries call -------

I have one India sms provider company tied up with my client. I am not able to figure out event observer and page where to put my code.


texts: How to get attribute codes used to build configurable product

texts: I need to get attribute codes used to build to the configurable product. How to get them in PHP? Please help.


texts: magento2.3.4 installation page showing blank white color

texts: i am trying to install magento 2.3.4 with php 7.3.16 but the installation page is showing blank white color.


texts: How can I fix "Refused to load the stylesheet because it violates the following Content" in Magento 2.3.5

texts:
I've recently upgraded to Magento 2.3.5 and I've been encountering an issue with my Content Security Policy when trying to load a style sheet.

The error (Chrome dev console):

I've added maxcdn to my csp_whitelist.xml but the error still occurs after setup:upgrade + setup:static-content:deploy + cache flush

My csp_whitelist.xml:

<?xml version="1.0"?>
 <csp_whitelist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Csp/etc/csp_whitelist.xsd">
    <policies>
        <policy id="style-src">
            <values>
                <value id="maxcdn-fontawesome" type="host">maxcdn.bootstrapcdn.com</value>
            </values>
        </policy>
    </policies>
</csp_whitelist>

I've tried adding https in the hostname, but that didn't make any difference.

I'm curious as to why the violated directives are from different domains as well. getfirebug.com is only used for the tinymce editor in my admin backend not on the storefront.

How can I go about removing this error?

Also, could anyone provide me with additional resources for researching this? I've read through Mozillas CSP guide, but it's not exactly the same for Magento 2.3.5.


texts: Honest and consistent magento 2 tutorial

texts:
Do you know any honest and consistent Magento 2 tutorial?

I tried already search different tutorial but I am not sure that are honest and consistent.


texts: How to create widget which would display products with the same name as the product on page?

texts:
I am new to Magento and I need to create widget which will dynamically take name of the product on which page he would be and show all the products with the same name as this product, for example:

  Product name : shoe1

  Show all products with name of shoe1

It's like normal Catalog Product List with condition all categories AND simple check if the names are the same.

Currently I have no clue where to start. I have created one custom  widget for banners but this is too much for me but need to be done. I could send request to the database and retrieve what I need but I don't know how to show swatches or add to card button and it feels like overkill.

It's my first question, normally I don't do it but I am in need. Pleas help me.


texts:
I'm dealing with a large database of roughly 70k products.  Products regularly go Out Of Stock and In Stock, however, once and a while some of the products in my store will become Discontinued.

Disabling a product that is discontinued will result in a inaccessible page, deleting the product is the same.

I've thought of 2 possible ways to deal with this but wanted some input as I do not know if these are viable or would affect the installation negatively:

Create a 3rd Option Discontinued allowing the page to still be loaded and displaying this status as apposed to Out Of Stock
Creating a YES / NO attribute Discontinued  and simply modify my template to reflect this.

What would be the best way to address a discontinued product scenario?


texts: Magento 2 Product Listing Issue:- You cannot define a correlation name 'mp' more than once

texts:
I'm trying to join custom table on product listing page,here is the Class and method:-

Class:- vendor/magento/module-catalog/Block/Product/ProductList/Toolbar.php

Method:- setCollection()

Here is the code of this method:-

 public function setCollection($collection)
    {
        $this->_collection = $collection;

       //My Custom Code

         $mpJoinConditions = 'mp.mageproduct_id = e.entity_id';

                       $this->_collection->getSelect()->join(
                ['mp' => $this->_collection->getTable('marketplace_product')],
                $mpJoinConditions,
                []
            )->columns("mp.seller_id");

       // End of My Custom Code

        $this->_collection->setCurPage($this->getCurrentPage());

        // we need to set pagination only if passed value integer and more that 0
        $limit = (int)$this->getLimit();
        if ($limit) {
            $this->_collection->setPageSize($limit);
        }
        if ($this->getCurrentOrder()) {
            $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
        }
        return $this;
    }

But getting following issue:-

"You cannot define a correlation name 'mp' more than once"

Please help me to resolve the issue!!!


texts: How to stop form-mini.js from loading on pages?

texts:
I have a fully custom search done by myself, so I want to get rid of form-mini.js since its causing issues with my own version of search.

The problem is, I cant seem to override it, or remove it via <remove>

Any other ideas?


texts:
I have just installed a clean instance of Magento 2.4 running on PHP 7.4.9 and I am getting a 500 error when trying to access the index file to connect the database and compete the install.
I have done the following to try to remedy the issue:

Adjusted permissions to the Magento recommended permissions
Increased memory_limit to 756 M in php.ini
Removed my .htaccess file
Checked that rewrites were enabled for Apache2 and added allow code to the .conf file

I have checked my Apache2 error log and I am getting the following error:

PHP Fatal error:  Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not exist in /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php:24\nStack trace:\n#0 /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php(24): ReflectionClass->__construct()\n#1 /var/www/html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor()\n#2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters()\n#3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create()\n#4 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(170): Magento\Framework\ObjectManager\ObjectManager->get()\n#5 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(276): Magento\Framework\ObjectManager\Factory\AbstractFac in /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php on line 24

Any help would be appreciated.


texts: Magento 2.1.x search by relevance does not work

texts:
During a Magento 2 Enterprise Cloud Edition build, I have come across, when I search for a any product, the default sort order always gets set to Product Name.

I looked around but only one Magento GitHub link looks like reported similar issue.

https://github.com/magento/magento2/issues/9066

However, as of my writing Magento 2 core team has not released any fix yet.


texts: How do i hide magento attributes with no value

texts:
I have a set of Attributes showing up in my additional tabs section of my product page, the attributes are populated via the backend and show up on the front. Some attributes based on the product have empty fields and show up as N/A i want these fields to be just blank so it looks like the field is empty rather than Not Applicable or has No written in it.

example on what the products look like with N/A populated fields:

I read up on some posts and questions from people who have a smiliar problem and the fix would involve me going to.

/app/design/frontend/[theme name]/[package name]/template/catalog/product/view/attribute.phtml

and implementing the following code

<?php foreach ($_additional as $_data): ?>
<?php $_attribute = $_product->getResource()->getAttribute($_data['code']);
if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>

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

<?php } ?>

This doesnt work as i dont have the attribute.phtml file located in that section of my folder structure. See below for an example:

Edit: To further explain after finding the attribute.phtml file i copy in the code and now i get an empty blank page where the attributes should come up and everything below the attributes list dissapears too including the footer.

Everything above the attributes stay such as the product iamge, description header and menu.

Edit2: I found the solution by using a different code the outcome is not exactly how i wanted it by just removing the words N/A and No and keeping the actual attribute label there but instead it removes the full row

Open the file and search for the following lines:

<?php foreach ($_additional as $_data): ?>

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

<?php endforeach; ?>

Replace the entire foreach loop with the following lines of code:

<?php foreach ($_additional as $_data): ?>
    <?php $_attribute = $_product->getResource()->getAttribute($_data['code']);
    if (!is_null($_product->getData($_attribute->getAttributeCode())) && ((string)$_attribute->getFrontend()->getValue($_product) != '')) { ?>

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

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

Source: http://codingbasics.net/hide-magento-attributes-value/

Source: http://www.magthemes.com/magento-blog/empty-attributes-showing-na-fix/


texts: Why magento is redirecting secure url to unsecure url

texts:
I've been using Magento shop on an unsecured host for almost a month. I recently setup a secure host(SSL) and directed it to point to same directory as used for unsecured host. But to my surprise, when i try to login to admin panel using secure url, it redirects me to the unsecured one.

I have changed secure_base_url in core_... table, as well as cleared the caches, but its still not working.

Whats happenning ?

Thanks in advance for the help...


texts: How to overwrite protected afterSave method in Magento2

texts:
I need to overwrite \Magento\Widget\Model\ResourceModel\Widget\Instance _afterSave method to save another page_group field in the database.

/**
 * Perform actions after object save
 *
 * @param \Magento\Widget\Model\Widget\Instance $object
 * @return $this
 */
protected function _afterSave(AbstractModel $object)
{
    $pageTable = $this->getTable('widget_instance_page');
    $pageLayoutTable = $this->getTable('widget_instance_page_layout');
    $connection = $this->getConnection();

    $select = $connection->select()->from($pageTable, 'page_id')->where('instance_id = ?', (int)$object->getId());
    $pageIds = $connection->fetchCol($select);

    $removePageIds = array_diff($pageIds, $object->getData('page_group_ids'));

    if (is_array($pageIds) && count($pageIds) > 0) {
        $inCond = $connection->prepareSqlCondition('page_id', ['in' => $pageIds]);

        $select = $connection->select()->from($pageLayoutTable, 'layout_update_id')->where($inCond);
        $removeLayoutUpdateIds = $connection->fetchCol($select);

        $connection->delete($pageLayoutTable, $inCond);
        $this->_deleteLayoutUpdates($removeLayoutUpdateIds);
    }

    $this->_deleteWidgetInstancePages($removePageIds);

    foreach ($object->getData('page_groups') as $pageGroup) {
        $pageLayoutUpdateIds = $this->_saveLayoutUpdates($object, $pageGroup);
        $data = [
            'page_group' => $pageGroup['group'],
            'layout_handle' => $pageGroup['layout_handle'],
            'block_reference' => $pageGroup['block_reference'],
            'page_for' => $pageGroup['for'],
            'entities' => $pageGroup['entities'],
            'page_template' => $pageGroup['template'],
            'action_buttons' => $pageGroup['action_buttons'],
        ];
        $pageId = $pageGroup['page_id'];
        if (in_array($pageGroup['page_id'], $pageIds)) {
            $connection->update($pageTable, $data, ['page_id = ?' => (int)$pageId]);
        } else {
            $connection->insert($pageTable, array_merge(['instance_id' => $object->getId()], $data));
            $pageId = $connection->lastInsertId($pageTable);
        }
        foreach ($pageLayoutUpdateIds as $layoutUpdateId) {
            $connection->insert(
                $pageLayoutTable,
                ['page_id' => $pageId, 'layout_update_id' => $layoutUpdateId]
            );
        }
    }

    return parent::_afterSave($object);
}

Is there any way that i am missing to overwrite this method without using a preference and copy the whole class content in my module? (the whole class because there is the call to parent::_afterSave() so i have to extend from parent - \Magento\Framework\Model\ResourceModel\Db\AbstractDb to avoid hard-coding of parent class)

Thanks


texts: How to add magento 2 location based search product

texts: Like this how to do in magento 2 location based product search


texts: Magento 2: How to call dynamic data/ phtml file content on confirmation widget calling on massaction on sales order grid

texts:
Have added an massaction on sales order grid and want to open a modal
  popup while clicking on massaction and on popup wants to display
  dynamic data/form which value i have sent to controller after clicking
  OK.

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction">
            <action name="switch_order_owner">
                <argument name="data" xsi:type="array">
                    <item name="config" xsi:type="array">
                        <item name="type" xsi:type="string">switch_order_owner</item>
                        <item name="label" xsi:type="string" translate="true">Switch Order Owner</item>
                        <item name="url" xsi:type="url" path="switchorderowner/order/switchOrderOwner"/>
                        <item name="confirm" xsi:type="array">
                              <item name="title" xsi:type="string" translate="true">Switch Owner Confirmation</item>
                              <item name="template" xsi:type="string" translate="true">Magento\Store\Ui\Component\Listing\Column\Store\Options</item>
                        </item>
                    </item>
                </argument>
            </action>
        </massaction>
    </listingToolbar>
</listing>


texts:
Ok this is getting really serious here. I will continue explaining the code first.

This is my WSDL path connection:

$client = new SoapClient('http://xxxxxxxxxxxxx', array("connection_timeout"=>120));

These are some of my classes not all of them:

$aWebOrder = new WebOrder;
$aWebOrder->OrderNumber                         = $order->getIncrementId();
$aWebOrder->OrderCreationDate                   = $order->getCreatedAtStoreDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);

$aWebOrder->CustomerAddress = new CustomerAddress;
$aWebOrder->CustomerAddress->FirstName          = $order->getCustomerFirstname();
$aWebOrder->CustomerAddress->LastName           = $order->getCustomerLastname();
$aWebOrder->CustomerAddress->Telephone          = $order->getBillingAddress()->getTelephone();
$aWebOrder->CustomerAddress->Fax                = $order->getBillingAddress()->getFax();
$aWebOrder->CustomerAddress->Email              = $order->getCustomerEmail();

This is the code where i want to pass my product info:

$aProduct = new OrderDetail;
$aProduct->SkuId =     $order->getSku();
$aProduct->Quantity=   $order->getQtyOrdered();
$aProduct->Sellprice = $order->getPrice();

$aProduct = new OrderDetail;
$aProduct1->SkuId =     $order->getSku();
$aProduct1->Quantity=   $order->getQtyOrdered();
$aProduct1->Sellprice = $order->getPrice();

$aWebOrder->ProductDetailList = array($aProduct,$aProduct1);

And this is the code which pass these classes to the wsdl file and after they are sent into a database:

$params = array('OrderWebAPILogin' => array("login" => 'xxx', "password"=> 'xxxx'), 'DbVersion' => 16, 'Order' => $aWebOrder,'RequestOptions' => NULL);
$result = $client->addOrder($params);

This way the code works just fine. because i haven't created a foreach in the product section.

In the product section i add this code to get all products info with a foreach

Here is the code i use:

foreach ($order->getAllVisibleItems() as $item){

$aProduct = new OrderDetail;

$data[] = array(

    $aProduct->SkuId        => $item->getSku(),
    $aProduct->Quantity     => $item->getQtyOrdered(),
    $aProduct->Sellprice    => $item->getPrice()

    );
}

foreach($data as $product){

    $aWebOrder->ProductDetailList = $product;

}

I don't get any error on the log file but no data are inserted into database, it means that i am doing something wrong when i pass the values into the foreach or into the $params array().

This is an event observer which fires anytime an order is completed and purchased.


texts: How do I add a 'continue shopping' button in Checkout/cart?

texts:
I've had a Magento site set up, but there is no 'Continue shopping' button showing on the Checkout/Cart page. I want customers to have the option of going back into the store once they have added something to their cart. I've found lots of info on changing the 'Continue shopping' button, but can't find out how to add one in the first place.
Thanks in advance.


texts:
I am using Magento 2. I want to Split Order on the basis of no. of items. For example of there are four items in the cart then i want to create 4 order for that.

How can I achieve this??

Thanks


texts: “advanced search” shown on front page but no input boxes are shown Magento ver. 1.9.3.2

texts:
I followed Maris post .

I copied the C:\xampp\htdocs\m1\app\design\frontend\base\default\template\catalogsearch\advanced\form.phtml

to C:\xampp\htdocs\m1\app\design\frontend\base\default\template\catalogsearch\advanced\home_form.phtml

To show on home page i used ( am i wrong here )

 <reference name="content">
    <block type="core/template" name="customname" template="catalogsearch/advanced/custom_form.phtml"/>
    </reference>

On Home Page Only Heading and search button is shown.
When i click on search button it redirects me to http://websitename.com/catalogsearch/advanced/

Can any one see where i am doing wrong.

Thank You.


texts:
I would like to extend \Magento\Catalog\Block\Product\View but I get 404

<?php
namespace Vendor\Custom\Block;

use Magento\Catalog\Model\ProductFactory;
use Magento\Catalog\Block\Product\AbstractProduct;
use Magento\Framework\View\Element\Template;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Catalog\Model\Product;

class MyProducts extends \Magento\Catalog\Block\Product\View
{
    protected $productFactory;

    protected  $_coreRegistry;
    /**
     * @param \Magento\Catalog\Block\Product\Context $context
     * @param array $data
     */
    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        ProductFactory $productFactory
    ) {
        $this->productFactory = $productFactory;
        $this->_coreRegistry = $context->getRegistry();

        parent::__construct($context);
    }

}

?>

than I created in my module a di.xml which looks like

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Block\Product\View" type="Vendor\Custom\Block\MyProducts"/>
</config>

than I reference in product view as follows

<referenceBlock name="product.info.details">
            <block class="Vendor\Custom\Block\Variants" name="variants.tab" template="Vendor_Custom::variants.phtml" group="detailed_info">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Product variations</argument>
                </arguments>
            </block>
        </referenceBlock>


texts: change product price in order(After changing the quanity)

texts:
I have created a module to edit the products. Everything is working fine except the percentage discount rule. When a customer changed the item quantity from 5 to 1, the discount amount was not changed in the order.

Guys could you help me in this.


texts: How to safely alter Magento category attributes

texts:
I understand how to write setup scripts through a custom module. However, if you directly alter something like catalog_category by adding a new attribute, is there a way to then safely remove it in the future, if need be?

I.e. is there way to uninstall a custom module of which has altered core tables?

I'm just a bit wary of editing them if its best practise to stay away all together!


texts: Youtube video iframe not loading on product page

texts:
Have a lot of products with videos on the product page, but the videos are not loading. The thumbnail is displayed, but when I click on it I get the following error:

load-player.js:64
Uncaught
{name: "Video Error", message: "Unknown video type", toString: ƒ}

The youtube videos are not recognized as youtube videos I guess,  does anybody have a idea where this problem lies?


texts: Magento 2- Add custom container into product listing page

texts:
I've search for some answers to this but unfortunately I can't seem to find anything. I would really appreciate some help about this.

I have created a custom container using XML in 'catalog_category_view.xml' file and then move other blocks (elements) in there. The idea is to display the container on the product listing page (category page) just next to the product grid.
However, I find difficulties with the placement for my new container. I would like to move the container next to the products into the products grid.
Is it possible to insert a custom container inside the products listing (ol > li) as a first element.

My idea is to have a grid which has 4 products per row (25% per product) and to start with custom section. So the 4 columns grid and rows would look like this:

  50% custom container + 25% product + 25% product

  25% product + 25% product + 25% product + 25% product

  25% product + 25% product + 25% product + 25% product

Right now I have added the custom container just before the product listing section using XML and then using simple jQueary move the container into the product listing using the following code:

$('.custom-container').detach().prependTo('ol.product-items');

I understand that this is not a perfect solution and that's why I am asking here, any help would be appreciated. Thank you in advance!


texts: Magento Get Attribute values Collection by filter

texts:
I am using Magento 1.9.3.6 version.
I have an attribute called brand.
I want to get brand attribute's values collection by filter in order to show it in input text box as autocomplete suggestions.

I have tried the following code:

$attributeId = Mage::getResourceModel("eav/entity_attribute")->getIdByCode("catalog_product","brand");
$attribute = Mage::getModel("catalog/resource_eav_attribute")->load($attributeId);
$attributeOptions = $attribute ->getSource()->getAllOptions();

I get this output in autocomplete input box:

When I tried like this,

 $attributeOptions = $attribute ->getSource()->getAllOptions()->addAttributeToFilter("value", "brand");

it shows error.

  Fatal error: Call to a member function addAttributeToFilter() on array in .../CustomController.php on line 52

How to get attribute values as array filter by brand values.


texts: Bug - Search and Reset filter button does not work on Shopping cart tab - backend (Manage customers)

texts:
I believe it is a bug in Magento. I've confirmed same on new magento installation 1.8.1.0 and on 1.8.0.0.

'Search' and 'Reset filter' buttons does not work on Shopping cart tab - backend (Manage customers). When checked using firebug, it displays an error - ReferenceError: id_38724ef8c3ffc5020408a02bbe80530eJsObject is not defined

Edit:
Found nothing except this link: https://github.com/magento/bugathon_march_2013/issues/36 which provides no help!

If anyone has found a solution, please share


texts: Magento 2: image redirects after migration M1 -> M2

texts:
After successfully migrating M1 to M2 there is the question what to do about the old store's images. We have a lot of images in the google index and they are ranking quite nicely.

For instance a product image:

https://www.example.com/media/catalog/product/cache/6/image/265x/5df78bab33555d08d6e5fb8d27136e95/5/h/my_nice_product.jpg

I can find it in the google index but it has no equivalence in the new store. Calling this image directly generates a 404 Not Found error.

But when I click that image inside the google search I will automatically be redirected to the product's new URL but not directly to the new image though. The product's redirect has been done by us so no surprise there.

What would be the best solution to redirect these images? Or do I not have to worry about those images as google would find them by itself?

Thank you


texts: Convert product item options in an order to readable array

texts:
When i print the order item there's an index product_options, i want to make the value is readable, because the current value seems like encoded or something

foreach($order->getAllItems() as $item){
 $data = $item->getData();
 print_r($data['product_options']);
 break;
}

here's the result:

"product_options": "a:1:{s:15:\"info_buyRequest\";a:5:{s:4:\"uenc\";s:112:\"aHR0cDovL3ZpdGFtaW5kaXNrb24uY29tL2luZGV4LnBocC9maWx0ZXJwcm9kdWN0cy9maWx0ZXJwcm9kdWN0cy9sb2FkUHJvZHVjdHNCbG9jay8,\";s:7:\"product\";s:1:\"2\";s:8:\"form_key\";s:16:\"z0Ntafc7OHiqMgIx\";s:7:\"options\";s:4:\"cart\";s:3:\"qty\";i:1;}}"


texts: 1.9 RWD default theme footer link layout fix

texts:
This is a solution to the layout problem for the footer links at screen sizes smaller than 599px:

Edit the CSS from:

.footer .links:nth-child(odd) { margin-right: 3.125%; clear: both;}

to:

.footer .links:nth-child(odd) { margin-right: 3.125%; }

.footer .links:nth-child(even) { clear: both; }

You'll end up with this layout:


texts: How to add my custom product attribute in Description Tab?

texts:
I am trying to add my custom attribute inside the Description tab how can i add? Find the code of core file,they called the getDescription function how can i append my custom attribute inside that help me guys.I don't want separate tab i want inside the description tab only.

   <block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="product/view/attribute.phtml" group="detailed_info">
                <arguments>
                    <argument name="at_call" xsi:type="string">getDescription</argument>
                    <argument name="at_code" xsi:type="string">description</argument>
                    <argument name="css_class" xsi:type="string">description</argument>
                    <argument name="at_label" xsi:type="string">none</argument>
                    <argument name="title" translate="true" xsi:type="string">Details</argument>
                </arguments>
            </block>


texts: Magento 2 admin in invoice total section grand total not get reduced

texts: When creating an invoice for the order from Magento 2 admin panel, the grand total not get reduced with my store credit value.


texts:
I created a new cron job to change the status of expired orders, but I can not make it work. I have tried to upload it in System> scheduler> Job configuration. But the following error always comes out

Invalid callback: Method for sales/observer::cancelUnprocessedOrders does not exist

Model: sales/observer

public function cancelUnprocessedOrders($schedule)
{
  $orderCollection = Mage::getModel('sales/order')->getCollection()
  ->addAttributeToFilter('status', array('neq' => Mage_Sales_Model_Order::STATE_PENDING_PAYMENT))
  ->addAttributeToSelect('*');
  $orders ="";
    foreach($orderCollection->getItems() as $order)
        {
          $orderModel = Mage::getModel('sales/order');
          $orderModel->load($order['entity_id']);

          if(!$orderModel->canCancel())
          continue;

          $orderModel->cancel();
          $orderModel->setState(Mage_Sales_Model_Order::STATE_CANCELED, true);
          $orderModel->save();
    }
}

config.xml

<cancelorder_cron>
  <schedule>
    <cron_expr>0 2 */2 * *</cron_expr>
  </schedule>
  <run>
    <model>sales/observer::cancelUnprocessedOrders</model>
  </run>
</cancelorder_cron>

I'm using another cron job as a reference, even using the same model and still I can not make it work.

Update

Can someone tell me if my script is wrong?


texts: Magento does not create cache, reports and logs

texts:
I noticed that my magento onlineshop does not create any files in var/cache, var/report and it does not report anything to the logfiles in var/log.

The var directory has the permissions drwxrwxr-x and the user and group are set correctly

Logging is enabled:

What is going on?


texts: Send copy of contact us form with checkbox

texts:
I am using Magento's contact us form, which, at the moment, doesn't send a copy of the contact us form to the customer who is filling the form in.

I want to control this with a checkbox, therefore i have added a checkbox to the form.phtml page:

<input type="checkbox" name="sendcopy" value="Yes" checked/>

How can i configure the send e-mail function so that it sends out a copy (to the e-mail address which is filled in, in the e-mail field of the contact form) of the e-mail when the checkbox is checked, and doesn't send a copy when it is not checked?


texts: Magento is not updating product prices on front end after VAT change

texts:
From the 1st of June the VAT had been reduced from 24% to 9% on some products. We have changed all the prices in the backend, set the new VAT in the tax class and yet the prices are still calculated with 24% instead of 9%. In the backend they show up correctly.

The prices are added with the including tax, so for ex. something that has the total price of 10 the product price should be 9,17 and the VAT should be 0,83. This is how it's displayed in the backend, on the front end it's calculated as 8,06 and 1,94 for VAT.

I flushed the cache, reindexed everything a couple of time, but still no idea why it won't update.


texts: Using a controller to scrape own youtube video descriptions for outdated urls

texts:
Our website issues approximately twenty 503 errors a day from outdated URLs located on various videos on our YouTube channel.  We have a large number of videos and it is completely unfeasible to manually search through them all. Below is some code that I have quickly constructed to access YouTube video descriptions via their native feed api.  It encodes information about videos in an (optionally) JSON format.  Is it feasible to scrape this information using a magento controller?  Or should I deploy this elsewhere?

Below is a summary of action this algorithm takes:

I have all the hashed key values stored in a text file called 'youtube_videos_only_hash.txt.  It gets these hash values and puts them into an array.  It then iterates over this array and  retrieves json descriptions of each page.  It then examines these descriptions for outdated URLs.  If an outdated URL is found It will then append the hashes to a regular YouTube URL and log these newly constructed URLs for manual examination.

public function indexAction()
{
    $hashes = explode("\n", file_get_contents('youtube_videos_only_hash.txt'));
    $hashes = array_unique($hashes);
    $description = array();
    $outdatedURLs = array();
    foreach ($hashes as $hash) {
        $json = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/videos/' . $hash . '?v=2alt=json&prettyprint=true'));
        $description[] = $json->data->description;
    }
    for ($i = 0; $i < count($hashes); $i++) {
        if (strpos($description[i], 'placeholder') !== false) {
            $outdatedURLs[] = 'http://www.youtube.com/watch?v=' . $hashes[i];
        }
    }
    foreach ($outdatedURLs as $outdatedURL) {
        Mage::log($outdatedURL, null, 'outdatedURLs.log', true);
    }
}

Final solution is trimmed down to this:

public function indexAction()
{
    $hashes = explode("\n", file_get_contents('youtube_videos_only_hash.txt'));
    $hashes = array_unique($hashes);
    foreach ($hashes as $hash) {
        $json = json_decode(file_get_contents('http://gdata.youtube.com/feeds/api/videos/' . $hash . '?v=2&alt=json'), true);
        $cat = $json['entry']['media$group']['media$description']['$t'];
        if ((strpos($cat, 'pgsize')) !== false || (strpos($cat, 'bit.ly') !== false)) {
            $outdatedURL = 'http://www.youtube.com/watch?v=' . $hash;
            Mage::log($outdatedURL, null, 'outdatedURLs.log', true);
        }
    }
}


texts: How to change size attribute from select drop down to ul li box

texts:
I need to change view of size dorp down to  ul li box like...

I need like this

and currently size attribute is coming in drop down....

I tried in
app/design/frontend/base/default/template/catalog/product/view/type/options/configurable.phtml

i tried this code...

<?php
$_product    = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());

?>

<?php if ($_product->isSaleable() && count($_attributes) ):

;?>

    <?php print_r() ?>
    <?php foreach($_attributes as $_attribute):

    ?>

*<?php echo $_attribute->getLabel() ?>

        <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>

                <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]"  id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select ">
                    <option><?php echo $this->__('Choose an Option...') ?></option>
                  </select>

    <?php endforeach; ?>

<?php endif;?>


texts: Magento2 - Cronjob indexer not working properly

texts:
I configured the cronjob that is responsible for reindexing my webshop correctly. Unfortunately the indexer is not updated. If I enable cron output I get 'Ran jobs by schedule.'. But when I go to the Index Management page I see that nothing is updated there.

When I manually run: php bin/magento indexer:reindex this values are updated.

Does anyone know what the problem is here?

Thanks.


texts: How to migrate from Shopify to Magento 2?

texts:
I'm having many clients migrating from Shopify to Magento 2, and the data migration usually happens via ERP, but for some clients, it's not possible.

How could I import to my Magento 2 the Shopify data?

Is there a script (bash, PHP, JS, etc...) to do it via API?


texts:
I try to get status of stock but i get this error message:

  Fatal error: Call to a member function getIsInStock() on null with
  $stockProduct = $product->getStockItem()->getIsInStock();

I got this error message when i try to create a new product.

I'm using observer: catalog_product_save_after


texts: Adding Google Analytics tracking code to product links in abandoned cart email

texts:
I am a Magento newbie and I am not much of a PHP guy either.

I am setting up abandoned cart emails in our magento site and it uses Abandoned Carts Pro extension to generate these abandoned cart tables. I want to change the format of the mail that would be sent, and I can't seem to understand how the email variables work.

Right now, the template at app/locale/en_US/template/email/abandoned_cart.html looks like this:

Hello {{var customer_name}},

Thank you for stopping by {{var website_name}} and considering us for your purchase. We noticed that during your visit to our store you placed the following item(s) in your shopping cart, but did not complete the transaction.

Shopping Cart Contents:

{{var products}}

I want to add a tracking code to the product link that comes from {{url products}} and I don't know where this code is being generated or how to change it. I have tried changing the product code to look like this, to check if any of these variables work:

Shopping Cart Contents:

{{var products}}

{{var product_name}}

{{var product_url}}

{{var product_image}}

{{var product_url}}?utm_source=abandoned_cart&utm_medium=email

but the variables are not working like the reference suggests. All I end up getting are empty
 tags with the analytics text.

How can I add the tracking code to product urls that would get generated?


texts: Magento 2 : Layered Navigation Filters, tag  and SEO link juice

texts:
we're using Magento 2.2.1 with custom theme, which inherits Magento's default Layered navigation filters, which contains tag  with filtering attributes, what is not SEO friendly:

is there any solution (module, extension) which can help to solve this problem? or maybe some workaround?


texts:
I would like to ask you some help regarding an issue I'm having in the wishlist section. When we add a product as favourite, this message appears as an error.

  Fatal error: Call to a member function setItems() on boolean in
  /home2/***/public_html/app/design/frontend/base/sinprecio/template/wishlist/view.phtml
  on line 43

This is the code in the view.phtml

<?php if ($this->helper('wishlist')->isAllow()) : ?>

        <?php if ($this->helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?>
            <a href="<?php echo $this->helper('wishlist')->getRssUrl($this->getWishlistInstance()->getId()); ?>" class="link-rss"><?php echo $this->__('RSS Feed') ?>
        <?php endif; ?>

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

    <?php echo $this->getMessagesBlock()->toHtml() ?>

    <form id="wishlist-view-form" action="<?php echo $this->getUrl('*/*/update', array('wishlist_id' => $this->getWishlistInstance()->getId())) ?>" method="post">
        <?php echo $this->getChildHtml('top'); ?>
        <fieldset>
            <?php if ($this->hasWishlistItems()): ?>
                    <?php echo $this->getBlockHtml('formkey');?>
                    <?php $this->getChild('items')->setItems($this->getWishlistItems()); ?>
                    <?php echo $this->getChildHtml('items');?>

            <?php else: ?>

<?php echo $this->__('You have no items in your wishlist.') ?>

            <?php endif ?>

                <?php echo $this->getChild('control_buttons')->toHtml();?>

        </fieldset>
    </form>

    <form id="wishlist-allcart-form" action="<?php echo $this->getUrl('*/*/allcart') ?>" method="post">
        <?php echo $this->getBlockHtml('formkey') ?>

            <input type="hidden" name="wishlist_id" id="wishlist_id" value="<?php echo $this->getWishlistInstance()->getId() ?>" />
            <input type="hidden" name="qty" id="qty" value="" />

    </form>

<?php echo $this->getChildHtml('bottom'); ?>

<a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>">&laquo; <?php echo $this->__('Back') ?>

And this is the line 43

<?php $this->getChild('items')->setItems($this->getWishlistItems()); ?>

Any clue? I'm kinda lost with this error.
Thanks in advance!


texts: Get Category Image to front-end from custom category attribute created through attribute manager

texts:
I have just created a custom attribute for categories through Attribute Manager, with attribute code category_view_img.

Now I can only put one image into a category, and use this image for both the banner and category-view-image on the home page. I want to use this custom attribute image on the home page as category view image. How can I get this image on front-end?

I am new to Magento and I don't have ideas how to do this, please assist. I am using Magento 1.9.2.3.


texts: Display All simple products of a grouped product as list view in magento product page

texts: i had a catalog with 29 products and when the catalog is clicked its products are to be displayed as list view as all grouped products are displayed, is there any extension for this or any help is to be appreciated


texts: Magento 2 security key issue in Third-Party API redirect URI

texts:
I am working on a Instagram extension for magento 2x. When i turn off

  "Add Secret Key to URLs" to No

than everything fine and Instagram redirect successfully to my Auth Controller But when

  "Add Secret Key to URLs" is Yes

Than it redirect to Dashboard because there is no session key in redirect URI. How can i handle this situation for Magento 2x?


texts:
I am experiencing a strange issue with Magento 2 when creating new products where the product images shows fine in the backend, it also shows on the frontend category catalog but on the actual product image gallery, it just shows the default Magento default product images.
I have tried running the php bin/magento catalog:images:resize command but it just makes things worse by changing all of the product images on the website to the default Magento image

Magento 2 Version 2.3
Permissions are set correctly in the file system

Thanks for the help in advance.


texts: \Filter\Interceptor getting added to end of argument class in plugin

texts:
I am attempting to create a plugin for an extension but when it runs I get a 500 error stating the argument I'm passing is incorrect, here is my code:

namespace Vendor\Module\Plugin;

use Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection as ProductCollection;

class FilterPlugin
{
    public function beforePrepareCollection(\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection $collection)
    {

        $collection->addFieldToFilter('category_ids', 11);
    }
}

And the error I am getting is:

Fatal error: Uncaught TypeError: Argument 1 passed to Vendor\Module\Plugin\FilterPlugin::beforePrepareCollection() must be an instance of Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection, instance of Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection\Filter\Interceptor given, called in /home/<user>/public_html/vendor/magento/framework/Interception/Interceptor.php on line 146 and defined in /home/<user>/public_html/app/code/Vendor/Module/Plugin/FilterPlugin.php:12
Stack trace:
#0 /home/<user>/public_html/vendor/magento/framework/Interception/Interceptor.php(146): Vendor\Module\Plugin\FilterPlugin->afterPrepareCollection(Object(Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection\Filter\Interceptor), Object(Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor), Object(Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor))
#1 /home/<user>/public_html/vendor/magento/framework/Interception/In in /home/<user>/public_html/app/code/Vendor/Module/Plugin/FilterPlugin.php on line 12

I have cleared /generated/code and ran bin/magento setup:di:compile with no luck.
it appears to be passing an object of Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection\Filter\Intercept
instead of Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection

Any help would be appreciated.

As asked here is my di.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Collection\Filter">
        <plugin name="Vendor_GenderFilterToSearch" type="Vendor\Module\Plugin\FilterPlugin" sortOrder="1" />
    </type>
</config>


texts: Small Images on site appear in reverse order

texts:
I upload a .csv file to magento that looks like:

When the small_image appear on the website, for whatever reason, the final picture is the one being displayed. I was able to navigate using the GUI and pull up this page which showed that the radio button for the final image is the one that is clicked.

If I click the radio button for small_image on the first picture, than I am able to restore the website to the display that I originally intended.

Does anyone know how to default to this in the .csv? I would hate to have to go through 100s/1000s of items individually to accomplish this.

Thank You

Note: The sort_order column was added as a "workaround" to try and solve this issue. However, it hasn't solved anything.


texts:
I am using SMTP pro magento extension.When i check Run Self Test i am getting issues.I am getting following error

SMTP Pro Self Test Results
Sending test email to your contact form address: abc.def@gmail.com from: aaa@gmail.com
Test email was sent successfully.
Default templates exist.
Email communications are enabled.

Testing failed, please review the reported problems and if you need further help visit the support page or contact me via support@aschroder.com for support.

Because of this error place order mail is not sending.
Please Help Me.
Thanks In Advance


texts: Capture payment after shipment programmatically

texts:
i am creating a shipment programmatically but i also need to capture payment too how i can do that?

    $order=Mage::getModel('sales/order')->load($orderid);
             $itemQty =  $order->getItemsCollection()->count();
             if($order->canShip())
                {
                    $shipmentId = Mage::getModel('sales/order_shipment_api')->create($order->getIncrementId(), $itemsarray ,'' ,$email,1);
                    $trackingdata=$this->getRequest()->getParam('order'.$orderid);
                    $tracking=explode('-',$trackingdata);

                    $trackmodel = Mage::getModel('sales/order_shipment_api')
                    ->addTrack($shipmentId,$tracking[0],$title,$tracking[2]);
                }


texts: M2 Installation got stuck at 64% Magento_CatalogSearch

texts:
The installation of magento 2.2.5 got stuck while installing the Magento_CatalogSearch module.

I have tried it twice but every time it got stuck at the same point.Please let me know.


texts: low stock notification to admin without any extension in magento 1.9

texts: I want to create the custom module for email sent to admin for notifying when the product is low qty in magento 1.9.x.


texts: X-Frame-Options SAMEORIGIN not working after upgrade to 2.4.1

texts:
I just upgraded from 2.3.4 to 2.4.1 , before there is no issue when load content using iframe, but now there is always an error message:

Refused to display 'http://test.m2.local/test/index/test/' in a frame because it set 'X-Frame-Options' to 'deny'.

Refused to display '' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('DENY, SAMEORIGIN'). Falling back to 'deny'.

the app/etc/env.php already included SAMEORDIGIN configuration
'x-frame-options' => 'SAMEORIGIN',

before i upgrade to 2.4.1, i duplicated the 2.3.4 instance and hosted in different sub domain in the same server, but it does not get any error
I already set in ssl configuration like this:
Header always set X-Frame-Options SAMEORIGIN

then i got this kinda same error result:

Refused to display '' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('DENY, SAMEORIGIN, SAMEORIGIN'). Falling back to 'deny'.


texts: Magento 2: How to rearrange sales order view in adminhtml?

texts:
I want to rearrange the sections in the sales order view (which is displayed while viewing an order in admin page).

I tried to move the Items ordered section before Order & Account Information. To achieve this, I have added sales_order_view.xml in my backend theme in Magento_Sales/layout.

<page>
    <body>
        <move element="order_items" destination="order_tab_info" before="-"/>
    </body>
</page>

However, the sales order view stays unchanged. I also tried to remove the order_items block which did work.


texts:
Date.prototype.addDays = function(days) {
  var dat = new Date(this.valueOf());
  dat.setDate(dat.getDate() + days);
  return dat;
}

Date format for this code is Sun Mar 19 2017 16:17:11 GMT+0530 (India Standard Time)

How to change this format to Sun Mar 19
Also how to add suffix to date? (st, nd, rd, th)


texts: Magmi does not import images on all my simple products

texts: I am having a little trouble with magmi it does not matter the images on all my simple products do you know why it makes its? the path of my products are correct. But it does not matter the images on all my simple products do you know why?


texts: How to change the canonical function for category page in Magento 2?

texts:
How to add custom url  Using canonical function

Code:

if ($this->_categoryHelper->canUseCanonicalTag()) {
    $this->pageConfig->addRemotePageAsset(
    $category->getUrl(),
    'canonical',
   ['attributes' => ['rel' => 'canonical']]
  );
}

Can any one help i want to add page limit to given url


texts:
My Customized controller seems not work. Added new method which suppose to update some values in table, here is my method:

    public function reorderAction()
    {
    Mage::log('=> test',true,'bannerposition.log',null);
    $bannerId = $this->getRequest()->getPost("id");
    $bannerNewOrder = $this->getRequest()->getPost("order");
    try {
            $model = Mage::getModel('cms/block');
            $model->load($bannerId);
            //$bannerOldPosition = $model->getPosition();
            $model->setPosition($bannerNewOrder);
            $model->save();
            Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('cms')->__( $block.' Updated.'));
            return 'Updated';

        } catch (Exception $e) {
            Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
            return 'Update Failed';
        }

    Mage::log('=> '.$result,true,'bannerposition.log',null);

    return $result;
    }

in ajax url:

    "admin/adminhtml/cms/block/reorder"

but I can't see anything, neither log created or change in database.
What am I doing wrong ?


texts: Edit price template in view order Magento 2

texts:
Prices in store are inclusive of tax.  But I am trying to separate Tax out of the price in the client dashboard.  In view order the file

vendor\magento\module-sales\view\frontend\templates\order\items.phtml

generates the code for the item order breakdown :

<?php $_items = $_order->getItemsCollection(); ?>
<?php $_index = 0; ?>
<?php $_count = $_items->count(); ?>
<?php $_giftMessage = ''?>
<?php foreach ($_items as $_item): ?>
<?php if ($_item->getParentItem()) {
continue;
} ?>         <tbody>
            <?php echo $block->getItemHtml($_item) ?>

Calling the price information from elsewhere.  Is there a way to edit the $block->getItemHtml($_item) & be able to change the price output but just for this page?  Or create a new block with edited price information, so it will not affect other calls of the same block?


texts: Magento 2 - Add additional options or custom options in the product on click of 'Update cart' button on cart page

texts:
This is Observer file:-

<?php
namespace Neologix\Bopis\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;
use \Magento\Checkout\Model\Session as CheckoutSession;

class SetAdditionalOptions implements ObserverInterface
{

    protected $_request;

    public function __construct(
        RequestInterface $request,CheckoutSession  $checkoutSession
    ) {
        $this->_request = $request;
        $this->checkoutSession = $checkoutSession;
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $infoDataObject = $observer->getEvent()->getInfo()->toArray();
        $cart = $observer->getEvent()->getCart();

        foreach ($infoDataObject as $itemId => $itemInfo) {

           $item = $cart->getQuote()->getItemById($itemId);
           $product = $item->getProduct();
           **// able to load product but after this code is not working for adding options to the product**
           $additionalOptions = array(
                array(
                    'code'  => 'my_code',
                    'label' => 'This text is displayed through additional options2',
                    'value' => 'ID is '
                )
            );
             $product->addOption(
                array(
                     'code'  => 'additional_options',
                     'value' => serialize($additionalOptions),
                )
            );
        }
    }
}
?>


texts: How to use php version according to magento version?

texts:
I have

  php 5.6 & php 7.0.3

on the server. I am upgrading the website magento 1.9.2.4 to magento 1.9.3.9 which is showing me an error of php version.

  CONNECT ERROR: Package community/Interface_Adminhtml_Default 1.9.3.9:
  requires PHP version >= 5.2.0 and <= 6.0.0 current is: 7.0.30

So how can I choose php 5.6 for magento 1.9.3.9?

Or any other way to upgrading magento 1.9.3.9


texts: Add to cart not working in Iphone Magento Version 1.8.0.1

texts:
There is a strange issue with my website. My Add to cart is not working on Iphone. Its working fine on all other devices.

I think the session is getting destroyed while browsing to next page. I tried different settings on iphone but none works.

I have tried few methods like in add to cart one of the post suggested to make add to cart button from type=button to type=submit but it didn't worked.

Can anyone please guide me through this.

Thanks


texts: How do i hide description block if no data found

texts: I am using magento version 1.9 and I need to hide description block if no data found, if data exits the block shows description, if not found, that should be  hide.


texts: Magento 2 view.xml in inherited Theme throwing error

texts:
I am having issues with my Magento 2 store not displaying products at all on a new theme I created that inherits from the Magento/luma theme.

Where the product block is suppose to be displayed on my main page, this is displayed, (also in the single product category that exists, this message is displayed)

We're sorry, an error has occurred while generating this content.

Below is my error I am getting for my view.xml file

1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /home/madhatte/public_html/store/app/design/frontend/Madhatters/m2-theme/etc/view.xml:
Element 'media': No matching global declaration available for the validation root.
Line: 2

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid XML in file /home/madhatte/public_html/store/app/design/frontend/Madhatters/m2-theme/etc/view.xml:
Element 'media': No matching global declaration available for the validation root.

Below is my view.xml file:

<media>
    <images module="Magento_Catalog">
        <image id="category_page_grid" type="small_image">
            <width>350</width>
            <height>350</height>
        </image>
    </images>
</media>

I don't believe it is just the media tag solely throwing the error. I have tried removing it, adding it, and adding other lines to try and see what is wrong with view.xml.


texts: My navigation bar is gone there must be a navigation bar like in the bottom picture. Help! TT


texts:
When i upgrade magento from 2.1.9 to 2.2.0 to 2.2.6 to 2.3.2 i am facing an issue Circular dependency:

  Magento\Logging\Model\Handler\Controllers depends on
  Magento\Logging\Model\Handler\Controllers and vice versa. when i
  execute setup:upgrade command from terminal


texts: how to add a custom meta dynamic tag in all page using a module in magento 2

texts:
i want to make a module which will add a custom meta tag which will be dynamic as per page .it will appear in all page.

i want this to be appear after meta name "viewreport".