texts: Error : "Call to undefined method Varien_Autoload::startSetup() "

texts:
I'm trying code like tutorial

http://devdocs.magento.com/guides/m1x/magefordev/mage-for-dev-6.html

But when i add code create table into setup.php file i have an error .Please help me create table like tutorial . Thanks for your help .

My error:

  Fatal error: Call to undefined method Varien_Autoload::startSetup() in C:\xampp\htdocs\magento\app\code\local\Magentotutorial\Weblog\Model\Resource\Setup.php on line 3

config.xml

<?xml version="1.0"?>
<config>
    <frontend>
        <routers>
            <weblog>
                <use>standard</use>
                <args>
                    <module>Magentotutorial_Weblog</module>
                    <frontName>weblog</frontName>
                </args>
            </weblog>
        </routers>
    </frontend>
    <global>
        <models>
            <weblog>
                <class>Magentotutorial_Weblog_Model</class>
            </weblog>
            <weblog_resource>
                <class>Magentotutorial_Weblog_Model_Resource</class>
                <entities>
                    <blogpost>

blog_posts

                    </blogpost>
                </entities>
            </weblog_resource>
        </models>

        <resources>
             <weblog_setup>
                   <setup>
                         <module>Magentotutorial_Weblog</module>
                         <class>Magentotutorial_Weblog_Model_Resource_Setup</class>
                   </setup>
              </weblog_setup>
        </resources>

    </global>
</config>

Setup.php

<?php
$installer = $this;
$installer->startSetup();
$installer->run("
CREATE TABLE `{$installer->getTable('weblog/blogpost')}` (
  `blogpost_id` int(11) NOT NULL auto_increment,
  `title` text,
  `post` text,
  `date` datetime default NULL,
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`blogpost_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

INSERT INTO `{$installer->getTable('weblog/blogpost')}` VALUES (1,'My New Title','This is a blog post','2009-07-01 00:00:00','2009-07-02 23:12:30');
 ");

  $installer->endSetup();
  class Magentotutorial_Weblog_Model_Resource_Setup extends    Mage_Core_Model_Resource_Setup {
  }


texts: Magento 2: How to show loader while customer-data is loading from server?

texts:
define([
    'Magento_Ui/js/form/form',
    'Magento_Customer/js/customer-data'
], function (Component, customerData) {
   'use strict';

    return Component.extend({
        isLoggedIn: function () {
           this.customer = customerData.get('customer');
           if (!this.customer().firstname) {
              return false;
           }
           return true;
       }
    });

}

When the customer login and the customer data is being loaded by ajax from server, isLoggedIn returns false.

But this is not correct as the customer has logged in and local-storage update is in progress.

How to get the logged in state while data is loading from server in 'customer-data.js'?


texts: how to get refreshed shipping address in quote object in js - Magento2.2

texts:
I am using this one code but once i update shipping info not getting refreshed info they retrieve old info how can i achieve that?

require([
    'jquery',
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/shipping-service',
    'Magento_Checkout/js/model/shipping-rate-registry',
    'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
    'Magento_Checkout/js/model/shipping-rate-processor/new-address',
], function($, quote, shippingService, rateRegistry, customerAddressProcessor, newAddressProcessor) {
    $('#target').on('click', function(e) {
        var address = quote.shippingAddress();
        console.log(address);
        // clearing cached rates to retrieve new ones
        rateRegistry.set(address.getCacheKey(), null);

        console.log(quote.shippingAddress()); // but getting old one
        var type = quote.shippingAddress().getType();
        if (type) {
            customerAddressProcessor.getRates(address);
        } else {
            newAddressProcessor.getRates(address);
        }
    });
});


texts:
I am using A2 Hosting and Magento 2.3.0 when I tried to change the slider picture it shows an error "There has been an error processing your request
Exception printing is disabled by default for security reasons.

Error log record number: 1382995242503
Suggest a solution to my problem.


texts: strpos() expects parameter 1 to be string, array given in vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 160

texts:
I am getting following error on product detail page for multiselect attributes.

Warning: strpos() expects parameter 1 to be string, array given in /home/xxxxx/public_html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 160

Exception #0 (Exception): Warning: strpos() expects parameter 1 to be string, array given in /home/xxxxx/public_html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php on line 160

0 [internal function]: Magento\Framework\App\ErrorHandler->handler(2, 'strpos() expect...', '/home/xxxx...', 160, Array)

1 /home/xxxxx/public_html/vendor/magento/module-eav/Model/Entity/Attribute/Source/Table.php(160): strpos(Array, ',')

2 /home/xxxxx/public_html/vendor/magento/module-eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php(331): Magento\Eav\Model\Entity\Attribute\Source\Table->getOptionText(Array)

3 /home/xxxxx/public_html/vendor/magento/module-eav/Model/Entity/Attribute/Frontend/AbstractFrontend.php(176): Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend->getOption(Array)

4 /home/xxxxx/public_html/vendor/magento/module-catalog/Block/Product/View/Attributes.php(84): Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend->getValue(Object(Magento\Catalog\Model\Product\Interceptor))

5 /home/xxxxx/public_html/app/design/frontend/xxxx/xxxx/Magento_Catalog/templates/product/view/attributes.phtml(19): Magento\Catalog\Block\Product\View\Attributes->getAdditionalData();

I am using magento 2.2.3 please help


texts: What is the best way to wrap additional structural markup around CMS content?

texts:
What I need to do is wrap some structural markup around ALL CMS content. For example:

I don't want to actually put this in the template becuase that become somehwat problematic as the content_header needs to actually be outside of this element producing the markup:

Essentially what I am trying to do is assign a template to the content region itself, independent of the page without having to have admins maintain some kind of tricky layout xml that needs to be copied and pasted to each CMS page as time goes by.


texts:
i added a widget to show new products on the page

{{widget type="catalog/product_widget_new" display_type="all_products" products_count="10" template="catalog/product/widget/new/content/new_custom.phtml"}}

it works fine
however i was wondering if i could add a 'dropdown' with all the categories
and filter the new products using that.
is there a predefined block for category that i can use or i have to create one myself??


texts:
I have a question regarding the local.xml (config) file in app/etc/. How is it possible to add multiple initStatements?

Currently it looks like this:

<initStatements><![CDATA[SET NAMES utf8]]></initStatements>

Now I also want to add this:

 <initStatements><![CDATA[SET lock_wait_timeout=120]]></initStatements>

Obviously, I can't just add this line, so there must be a way to append the "SET lock_wait_timeout=120" to "SET NAMES utf8". But now, does anybody know?


texts:
I'm having a bug with the Varnish Caching and after investigating and searching for a solution, I'm still not able to solve the problem.

The FPC is working fine most of the times, but sometimes the issue happens. We have some hidden catalog data (price for example) if the customer isn't logged in, that way we force a guest to register an account in order to view all the available data. However, sometimes after the login (especially if we login after opening some catalog page), the customer won't be able to see all the available data on that same page he was. If he switches to a sub category of that same catalog page, he can see all the data, but if he switches to the main category (the catalog page he was), the data is still hidden.

I know it has something to do with FPC/Varnish, but I haven't been able to find what he's causing this issue.
I use the default Varnish Configuration File.

I think I'm also taking in consideration the user/customer's session cookie.

if (req.http.cookie ~ "X-Magento-Vary=") {
        hash_data(regsub(req.http.cookie, "^.*?X-Magento-Vary=([^;]+);*.*$", "\1"));
    }

EDIT: This happens if the customer logins via homepage, after opening some catalog page (and that catalog page it's the only one that's still hiding data)


texts:
I have a big problem with paypal on my shop. If i choose authorization on payment action, no problem, i can make an order, and paid on payla. I see my order on BO it's all great.

But i want to change for Sale method on payment action. If i choose this method, just after paid on paypal i am redirected on http://mywebsite.com/paypal/express/return/?token=EC-xxxxxxxxxxxx&PayerID=xxxx with the fallowing error :

  Fatal error: Call to a member function isDummy() on a non-object in
  /srv/d_monexpresso/http/monexpresso/www/app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php
  on line 49.

If you could help me please.


texts: Create custom attribute for customer in Magento 1.9 programmatically

texts: How can Create custom optional attribute in Magento1.9 for customer  programmatically and how can fetch it.


texts:
I have installed sample data on magento(Madison Island), It has default homepage set. I have created new page called test (cms>pages>create page).
When i open my localhost, test page should appear first rather than homepage of madison island. How can i do it?


texts: How to add a color picker field in Admin form?

texts:
How to add color picker in my custom module of Magento 2 admin panel form?

Not in System Configuration.


texts:
Any idea why I can't disable backups in Magento 2.3.3?

I've tried through the admin panel and when I change the enabled setting from "yes" to "no" and save the page, it still shows "yes" when the page refreshes. I tried disabling the automatic backups first and then disabling backups entirely, but when I save the settings and the page refreshes, both still show "yes".

I tried through the command line using:

bin/magento config:set system/backup/functionality_enabled 0

and get: value saved in response, but when I go back to the control panel in Magento and check, it shows that backups are still enabled.

I tried clearing the caches, then tried blowing away the caches. I also tried a complete reindexing and there was no difference.

As far as I can tell any/all other settings in the Magento panel are behaving as expected, so it seems that the problem is isolated to backup settings...

Anyone seen this before, or have an idea what to look at to get these backup jobs shut off?


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

texts:
I'm attempting to connect on my site in magento 1.9 on my work environment. It's shown a page like this:

Until other yesterday everythig worked perfectly.. Can you help me,please?
Thanks!


texts:
I have 1 simple catalog price rule, but when I "Apply Rules" the system gets stuck and eventually I get a 500 server error:

These messages appear in my system.log:

2015-02-22T09:51:27+00:00 ERR (3): Warning: include(): Filename cannot be empty  in /data/home/etkm01/domains/etk-mood.nl/public_html/shop/app/code/core/Mage/Core/Block/Template.php on line 241
2015-02-22T09:51:27+00:00 ERR (3): Warning: include(): Failed opening '' for inclusion (include_path='/data/home/etkm01/domains/etk-mood.nl/public_html/shop/app/code/local:/data/home/etkm01/domains/etk-mood.nl/public_html/shop/app/code/community:/data/home/etkm01/domains/etk-mood.nl/public_html/shop/app/code/core:/data/home/etkm01/domains/etk-mood.nl/public_html/shop/lib:.:/usr/local/php5/lib/php')  in /data/home/etkm01/domains/etk-mood.nl/public_html/shop/app/code/core/Mage/Core/Block/Template.php on line 241

And this is a part of template.php:

238      try {
239           $includeFilePath = realpath($this->_viewDir . DS . $fileName);
240           if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
241                include $includeFilePath;
242            } else {
243                Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, null, true);
244           }

Unfortenately I don't have enough knowledge to know what to do.


texts: return phtml file content in ajax response in magento2

texts:
I am calling an controller function via Ajax and its calling and returning correct data. But how can I return Controller function respective phtml file content instead of some data from controller function.

Here is my current code that returning data  -

public function execute()
{
    $result = $this->resultJsonFactory->create();
    $request = $this->getRequest();
    if ($request->isAjax()) {
        $method = $request->getParam('method');
        if($method != '')
            $regions = $this->getRegionByCountryId($request);
            $result->setData($regions);
        } else {
            $result->setData(['error' => 'method not found']);
        }
    }

    return $result;
}

Its running fine and retruning data to my ajax function.

But I want to return phtml file content instead of this data, So for that I have created an handler for this and respective phtml file.

Handler file is -  booking_index_ajax.xml with below code -

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="main" htmlClass="content-page">
            <block class="Mymodule\Booking\Block\BookingList"
                   name="test.booking.filtertable"
                   template="Mymodule_Booking::content/test.phtml"
                   after="-"/>
        </referenceContainer>
    </body>
</page>

And created an respective test.phtml file on specified location  -

<?php
echo "Hello";
?>

But my test.phtml file content is not retruning, Please let me know what I am doing wrong.

You answer worked #AMIT, But I am trying to use my execute function to get Json and phtml file both - Its returning phtml if I am not applying 'return' in Json If block, But If I am applying "return $result" statement in then returning nothing. here is mine code -

public function execute()
{
    $request = $this->getRequest();
    if ($request->isAjax()) {
        $method = $request->getParam('method');
        if ($method === 'getRegionByCountryId') {
            $result = $this->resultJsonFactory->create();
            $regions = $this->getRegionByCountryId($request);
            $result->setData($regions);
            //return $result;
        } elseif ($method === 'getAddressesByCountryId') {
            $resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT);
            return $resultLayout;
        } else {
            $result = $this->resultJsonFactory->create();
            $result->setData(['error' => 'method not found']);
            return $result;
        }
    }
}

Regards


texts:
We have an eshop in 3 different countries (3 domains) domain.lng1 domain.lng2 domain.lng3
Plus each country has optional language EN

domain.lng1/lgn1/
domain.lng1/EN/
domain.lng2/lgn2/
domain.lng2/EN/
domain.lng3/lgn3/
domain.lng3/EN/

All countries has the same products. In rare occasion we want to disable product (make it out of stock) for particular country.
Prices and shipping options are also the same but flexibility to have different per country would be good.

How should we set up our M2 Websites / Stores / Views to best fit this model?


texts: How to get customer's addresses using CustomerId?

texts:
I am trying to get all the addresses of a customer using below code. But here I am not able to fetch all the details. If I try to print the array $customerAddres it give me memory exhausted error in terminal.

$customer = $this->_customers->load(3);
    $addresses = $customer->getAddresses();
    foreach ($addresses as $address) {
        $customerAddress[] = $address->toArray();
    }
    foreach ($customerAddress as $customerAddres) {
        echo $customerAddres['street'];
    }

If anyone can help me to get complete addresses of a customer please let me know.


texts: Why does parentID = 0 when the product's catalog_product_entity value is different than 1?

texts:
I recently migrated from M1 to M2 and when I am attempting to retrieve a product's Parent ID I am getting a zero value on some products but on others I'm getting the correct parent IDs. It's definitely a code issue, as my store displays all of the simple products correctly based on my configurations as expected.

After doing some research I found that the products affected match the exact same products that belong to configurable products with a value other than "1" in the "created_in" column. I presume "created_in" refers to the store ID? I can't find any documentation on that.

Question is - will changing the 'created_in' value to '1' solve the problem or does that seem as far fetched as I think it does?

Here is the code I'm using - we're running EE so using 'row_id' as the $productIDLink:

        protected function getFirstParentProductId($product)
        {
            // Check is Magento EE >=2.1, if so use different catalog_product_entity link field name (row_id in EE 2.1)
            if ($this->utilsHelper->isMagentoEnterprise() && $this->utilsHelper->mageVersionCompare($this->productMetadata->getVersion(), '2.1.0', '>=')) {
                $productIdLink = 'row_id';
            } else {
                $productIdLink = 'entity_id';
            }

            $parentId = null;
            #if ($product->getTypeId() == 'simple') {
            $parentIds = $this->productTypeGrouped->getParentIdsByChild($product->getId());
            if (!$parentIds) {
                $parentIds = $this->productTypeConfigurable->getParentIdsByChild($product->getId());
            }
            foreach ($parentIds as $possibleParentId) {
                // Check if parent product exists, if yes return first existing parent product
                $readAdapter = $this->resourceConnection->getConnection();
                $select = $readAdapter->select()
                    ->from($this->resourceConnection->getTableName('catalog_product_entity'), ['entity_id'])
                    ->where($productIdLink . " = ?", $possibleParentId);
                $possibleParentId = $readAdapter->fetchOne($select);
                if ($possibleParentId) {
                    $parentId = $possibleParentId;
                }
            }
            #}

            return (int)$parentId;
        }


texts: How to add SMS sending function inside a custom module

texts:
I have to add SMS sending function at the checkout success page.

This is my code:

namespace send\sms\Block;

class sendsms extends \Magento\Framework\View\Element\Template
{
    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $checkoutSession;

    /**
     * @var int
     */
    protected $oderId;

    /**
     * @var array
     */
    protected $lastOrder;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->checkoutSession = $checkoutSession;
    }

    protected function _prepareLayout()
    {
        $lastOrder = $this->checkoutSession->getLastRealOrder();
        $this->orderId = $lastOrder->getIncrementId();
        $this->lastOrder = $lastOrder->getData();
        return parent::_prepareLayout();
    }

    public function getOrderId()
    {
        return $this->orderId;
    }

    public function getLastOrder()
    {
        return $this->lastOrder;
    }

    public function sendsms()
    {
        $YourAPIKey='<api key>';
        $From="<sender name>";
        $To="<number>";
        $TemplateName="OrderSuccess";
        $VAR1="<var1>";
        $VAR2="<var2>";
        $agent= 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)';
        $url = "https://2factor.in/API/V1/$YourAPIKey/ADDON_SERVICES/SEND/TSMS";

        $ch = curl_init();

        curl_setopt($ch,CURLOPT_URL,$url);
        curl_setopt($ch,CURLOPT_POST,true);
        curl_setopt($ch,CURLOPT_POSTFIELDS,"TemplateName=$TemplateName&From=$From&To=$To&VAR1=$VAR1&VAR2=$VAR2&VAR3=$VAR3&VAR4=$VAR4&VAR5=$VAR5");
        curl_setopt($ch, CURLOPT_USERAGENT, $agent);
        echo curl_exec($ch);
        curl_close($ch);
        return parent::sendsms();
    }

}


texts: Magento checkout issue - SOLVED - i hope

texts:
I just found a weird thing in checkout (Magento 1.9.2.3)
If customer have two pages opened, one is a checkout page and another one is a product page and customer will proceed with checkout but in the meantime go back to the product page it can affect  order content if customer add another item to the basket but in checkout this change will not be applied (but order in will) so after the payment is done customer will pay for example only for one item while on order there will be more.There should be a order validation before the form is submitted to the payment gateway.
Did anyone met this or similar problem before ?

Update:

In the meantime We've checked it on other Magento installations and it seems like a serious issue. Of course if the shop owner is not checking all of the orders and it's content and prices.
We tested it on three different Magento instances and everyone was doing the same, once you fill up the form and select delivery and payment method go to the second page where you can select and add another item to the basket, then go back to the checkout and click "Place the order"
then add another item quickly to the basket. Magento will save order with new content but payment will be recorded with only one.

Coincidence ???
Or is this the problem with Magento 1.9.2.3 ??


texts:
im having a really strange issue, in my online store i applied some catalogue rules and is working fine. The problem is in the product details page. When the catalog rule is applied normally i run indexer and clear magento cache, and the price shows correcly. But after some time, the price shows wrong, in my case is in the configurable product, in the select box with the simple products shows the wrong price, but is fixed when i click the magento cache clear.

The problem with this is that this keeps sometimes go back again the the old price without the discount rule, to fix it i need to click the button in the cache management always and always.

I have all cache enabled in production mode.

The only thing that can occure to me is the cron jobs, maybe something is happening that makes this go back or something, is someone had the same experience?

Im not using web proxy (secure) if this ocurred, everything looks normal.


texts:
We are currently working on a Magento Migration and have so far exported all products to CSV where our client has been making amendments so that we can import the data into a new version of Magento using Magmi.

However we are struggling to figure out how we can export all the media gallery paths and position indexes for each product, when we do a standard Magento Export we can get this data but it splits each media image to a separate line however with the Magmi import ideally we would like a comma separate list of paths in the correct sort order.

Am I over complicating things? and does anyone know of any PHP Code that could perhaps iterate the products and output the list of media images to a string?


texts: Customer logged out after checkout & redirected to empty shopping cart - Magento 1.9

texts:
I'm trying to find out why some logged in customers are being logged out of their accounts and redirected to an empty shopping cart after clicking the place order button in Magento.

I am using SagePay 4.1.3 and Idev_OnstepCheckout

I've been looking into the saveAfter event in sagePay to see where the session is terminated but I am not able to locate the function call but I can see where the failedPayment.log is called.

public function saveAfter($o)
{
    $order = $o->getEvent()->getOrder();

    $isSage = Mage::helper('sagepaysuite')->isSagePayMethod($order->getPayment()->getMethod());

    if (!$order->getId() || $isSage === false || $order->getIsRecurring()) {
        return $o;
    }

    $dbtrn = $this->_getTransactionsModel()->loadByParent($order->getId());

    if ($dbtrn->getId()) {
        return $o;
    }

    $rqVendorTxCode = Mage::app()->getRequest()->getParam('vtxc');
    $sessionVendor = ($rqVendorTxCode) ? $rqVendorTxCode : $this->getSession()->getLastVendorTxCode();

    if($sessionVendor == null){
        $sessionVendor = Mage::app()->getRequest()->getParam('VendorTxCode');
    }

    /**
     * Multishipping vendors
     */
    $multiShippingTxCodes = Mage::registry('sagepaysuite_ms_txcodes');
    if ($multiShippingTxCodes) {

        Mage::unregister('sagepaysuite_ms_txcodes');

        $sessionVendor = current($multiShippingTxCodes);

        array_shift($multiShippingTxCodes);
        reset($multiShippingTxCodes);

        Mage::register('sagepaysuite_ms_txcodes', $multiShippingTxCodes);
    }
    /**
     * Multishipping vendors
     */

    $reg = Mage::registry('Ebizmarts_SagePaySuite_Model_Api_Payment::recoverTransaction');
    if (!is_null($reg)) {
        $sessionVendor = $reg;
    }

    if (is_null($sessionVendor)) {

        if (!$dbtrn->getId()) {

            #For empty payments or old orders (standalone payment methods).
            if ((Mage::app()->getRequest()->getControllerModule() == 'Mage_Api') || Mage::registry('current_shipment') || Mage::registry('sales_order') || Mage::registry('current_creditmemo') || Mage::registry('current_invoice') || ($order->getPayment()->getMethod() == 'sagepayrepeat')) {
                return $o;
            }

            $logfileName = $order->getIncrementId() . '-' . time() . '_Payment_Failed.log';

            $request_data = $_REQUEST;
            if (isset($request_data['payment'])) {
                $request_data['payment']['cc_number'] = 'XXXXXXXXXXXXX';
                $request_data['payment']['cc_cid'] = 'XXX';
            }

            Sage_Log::log($order->getIncrementId(), null, $logfileName);
            Sage_Log::log(Mage::helper('core/http')->getHttpUserAgent(false), null, $logfileName);
            Sage_Log::log(print_r($request_data, true), null, $logfileName);
            Sage_Log::log('--------------------', null, $logfileName);

            Mage::throwException('Payment has failed, please reload checkout page and try again. Your card has not been charged.');
        }

        return $o;
    }

Has anyone seen this problem before and know roughly how to resolve it?

Any ideas will be welcomed.


texts: CE 1.9.2 - Onepage checkout - merge shipping address and method into one step

texts:
I am struggling to find a way to combine the Shipping Address and Shipping method into a single step on the default Magento Onepage Checkout. I know that there are many 3rd-party OneStepCheckout extensions (some of which I have used in the past), but I prefer the flow of the onepage checkout...I would just like to optimise it.

Ideally, I would like to prompt for Shipping Address and Shipping Method in the first step, followed by prompting the customer for their billing address (if different) and payment information together in a single step as well. We only have 2 shipping methods which are not determined by shipping address, so there will be no need to make any ajax calls to update the available shipping methods.

I know that checkout is difficult to customise in this regard, but I would sincerely appreciate any pointers and/or advice please.


texts: Is it better to use Vue.js storefront as a frontend for magento 2?

texts:
We have to lunch a new store and planning to use Vue.js storefront on frontend.

-> Will it be feasible easily - data will be interchanged using APIs

-> Would there be any security issues ?

-> Any other factor that can effect ?

Thanks


texts: How to avoid Bogus tag in SOAP request with PHP?

texts:
My request is like:
<ns3:Ininline >
    <ns3:Ininline >
      <BOGUS>
        <ns3:LineIden >1133</ns3:LineIden>
        <ns3:Quantity >I</ns3:Quantity>
        <ns3:ProductCode >1</ns3:ProductCode>
        <ns3:UOM >1</ns3:UOM>
    </BOGUS>
    <BOGUS>
        <ns3:LineIden >1134</ns3:LineIden>
        <ns3:Quantity >I</ns3:Quantity>
        <ns3:ProductCode >1</ns3:ProductCode>
        <ns3:UOM >1</ns3:UOM>
    </BOGUS>
    </ns3:Ininline>
</ns3:Ininline>

But, this is what I need:
  <ns3:Ininline >
        <ns3:Ininline >
            <ns3:LineIden >1133</ns3:LineIden>
            <ns3:Quantity >I</ns3:Quantity>
            <ns3:ProductCode >1</ns3:ProductCode>
            <ns3:UOM >1</ns3:UOM>
        </ns3:Ininline>
        <ns3:Ininline >
            <ns3:LineIden >1134</ns3:LineIden>
            <ns3:Quantity >I</ns3:Quantity>
            <ns3:ProductCode >1</ns3:ProductCode>
            <ns3:UOM >1</ns3:UOM>
        </ns3:Ininline>
    </ns3:Ininline>

My code:
public function getItemDetails()
    {
        $i = 0;
        foreach ($items as $item) {
            $inputData = [
                'LineIden' => $i + 1,
                'Quantity' => (int)$item->getQty(),
                'ProductCode' => $item->getCode(),
                'UOM' => 'EA'
            ];
            $inputData = new StdClass();
            foreach ($finalData as $field => $value) {
                $inputData->{$field} = new SoapVar(
                    $value,
                    XSD_STRING,
                    null,
                    $nameSpace,
                    $field,
                    $nameSpace
                );
            }
            $loop[$i] = $inputData;
            $i = $i + 1;
        }
        $outputArray = new ArrayObject();
        $outputArray->Initem = new SoapVar(
            $loop,
            SOAP_ENC_OBJECT,
            null,
            null,
            'Initem',
            $nameSpace
        );
    }

    $outputObject = new StdClass();
    $outputObject->Initem = new SoapVar(
        $this->getItemDetails(),
        SOAP_ENC_OBJECT,
        null,
        null,
        "Initem",
        $nameSpace
    );

Please help.


texts:
I added a second footer block with links by adding the following code to my default.xml in my theme: app/design/frontend///Magento_Theme/layout/default.xml
<referenceContainer name="footer">
    <block class="Magento\Framework\View\Element\Html\Links" name="footer_links_custom">
        <arguments>
            <argument name="css_class" xsi:type="string">footer links</argument>
        </arguments>
    </block>
</referenceContainer>

<referenceBlock name="footer_links_custom">
    <block class="Magento\Framework\View\Element\Html\Link\Current" name="2custom-link">
        <arguments>
            <argument name="label" xsi:type="string">Custom Links</argument>
            <argument name="path" xsi:type="string">page-url</argument>
        </arguments>
    </block>
</referenceBlock>

What is the easiest way to add a title to the my footer_links_custom block, is there any way to do this in a simple manner? I've tried setting an argument "title" but that didn't work obviously. Is there any way we can know all the attributes there are for a certain block? (css_class, label, path, ...) Is there no .phtml file for the footer links block?
Magento 2 leaves me behind with a lot of questions...Thanks for the help!


texts: How can we pass the check Skip Base URL Validation Before the Next Step via command line installation in Magento 1.x?

texts:
I'm using the following cli command to setup magento 1.9
**
php -f install.php -- --license_agreement_accepted yes \ --locale en_US --timezone "America/Los_Angeles" --default_currency USD \ --db_host localhost --db_name my_db --db_user DB_User --db_pass DB_Password \ --db_prefix wk_ \ --url "http://domain.com/" - use_rewrites yes \ --use_secure yes --secure_base_url "http://domain.com/" --use_secure_admin yes \ --admin_lastname Test --admin_firstname admin --admin_email "abc@gmail.com" \ --admin_username admin --admin_password admin123
**


texts: Two Estimate Shipping blocks on cart page for two different addresses

texts:
I'd love to have two "Estimate Shipping and Tax" blocks:

One to display domestic rates to a default address. This one would have no form and would be displayed at all times.
The other to estimate international shipping would be just the standard form + rates.

I've got the layout and template part of it working, but I don't seem to be able to customize the functionality of checkout/cart_shipping block. I was planning on adding a method (setAddress) to set the default address to be use for calculation.

However, going through the code, the cart_shipping, quote and it's shipping_address objects appear to be all wired through and I see no easy way to create two Estimate Shipping blocks for two different addresses.

Any suggestions much appreciated.


texts: How to add field to sign up Form Magento 2

texts: I want to add field name "HOW DID YOU GET TO KNOW ABOUT US?". I can add field in view. But i have no idea how to save this value in database and how to search users by this value. Please advice


texts: Why every layout xml root node has a version

texts:
Why does the root layout xml node have a version number:

<layout version="0.1.0">

I have searched the source code and cannot find this being used.
Is it a feature that never got implemented? or taken out?


texts: Need to offer free shipping on a configurable product

texts:
We are using Magento Community 1.7.0.2. Here is our situation that we need help:

1) We offer products for sale, which can be purchased in “each” quantity or in the “case” quantity.

2) This product is setup as a configurable product, where the “each” option is a simple product and the “case” option is a separate simple product.

3) I want to offer free shipping for the “case” quantity simple product.

4) I created a category that is called “Case quantity items that should receive free shipping”. I set this to ACTIVE, but not in navigation.

5) I add the desired Case quantity simple product to the category specified in item #4 above.

6) I then create a shopping cart price rule. In this rule, I set free shipping to matching items online. I set actions to be “Apply the rule only to cart items matching the following conditions if all of these conditions are true”, and I set it to read category = 123 (where category 123 is the same as item #4 above).

Can someone please help me get this setup properly so that I can set a simple product, assigned to a configurable product, to allow free shipping???


texts: Magento 2 In what cases will order item be canceled?

texts:
We are experiencing some wierd issue that when customer place an order with creditcard, the payment went though, and we can see this payment in our payment gateway admin system, everything seems good, except Magento canceled order items (order item status canceled in Magento admin), and left order status Processing.

What caused this? why does Magento set order item status to canceled?


texts: Cache issue with saving configurable field programatically

texts:
I am saving a configurable field programmatically by this code:
// @var Magento\Framework\App\Config\Storage\WriterInterface
$this->config->save('custom/general/average_score, 100);

The code works, but if refresh the config page, it doesn't show me the value of 100. To have it shown I need to flush the cache storage.
If I want to have it shown automatically and I need to flush the cache programmatically by:
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$cacheManager = $objectManager->create('Magento\Framework\App\Cache\Manager');
$cacheManager->flush($cacheManager->getAvailableTypes());

Please ignore the fact that I used object manager, it is just for debugging purpose.
My problem is why i need to flush the cache storage programmatically? to have it displayed.
If I changed the value of my config field, manually, after the form submit, when the page is refreshed, I have it shown, I don't need to flush the cache. Why ?
Thank you


texts: Change item options in cart : last item not saved

texts:
I would like to change some options of the items present in the cart.

On the checkout_cart_add_product_complete.

I launch the following function:

 public function TreatShipConflicts($observer)
 {
    //Analyse du nouveau produit ajouté au panier

    $_cart = Mage::getModel('checkout/cart')->getQuote();
    $_items = $_cart->getAllItems();

    foreach ($_items as $_item) {

        $_options = $_item->getProduct()->getTypeInstance(true)->getOrderOptions($_item->getProduct());
        $Flag = 0;
        $optionid = 0;
        Mage::log("CART to be changed");
        foreach($_options["options"] as $_option)
        {
            if ($_option['label'] == 'ShipMth')
            {
                $Flag = 1;
                $optionid = $_option['option_id'];
            }
        }
        Mage::log($optionid);
        if ($Flag == 1) {

        $optionnb = "option_".$optionid;

        $item22 = Mage::getSingleton('checkout/session')->getQuote()->getItemById($_item->getId());
        $options = $item22->getOptions();

        foreach ($options as $option) {
            switch (true) {
                case ($option->getCode() == 'info_buyrequest') :
                    $unserialized = unserialize($option->getValue());
                    $unserialized['options'][$optionid] = 'TNT';
                    $option->setValue(serialize($unserialized));
                    break;
                case ($option->getCode() == $optionnb) :
                    $option->setValue('TNT');
                    break;
                }
        }
        $item22->setOptions($options)->save();
        Mage::getSingleton('checkout/cart')->save();
    }
 }

}

All my items option are changed EXCEPT the last one (the last added in cart i.e. the one that triggered the event)…

(I was before triggering on the checkout_cart_product_add_after event, but read on a so  post that the item was not yet saved, and then it was impossible to customize its options at this step. I then changed to checkout_cart_add_product_complete, (where at this point it was said to be really an Item and really in cart, but got the same result..)

Thank you for your help,

EDIT: An info that maybe can help. When I add my first item in cart (cart empty) (item that then will be the unsaved one), I have an error on $options = $item22->getOptions();which means that it is clearly not the same item type as the others…

EDIT 2: still searching… and found a new strange thing : when my cart has items in it and that I remove the last added item (the one with unsaved options), when I add a new item in cart, I have got the same error as the first EDIT !
If I remove another item (not the last one), I can add an time without the $options = $item22->getOptions(); error but the option modification is still unsaved…

EDIT3: I checked the database using phpmyadmin and the "sales_flat_quote_item_option" table still have the unmodified options values for the last added item


texts: how to write getActiveFilters snippet in magento 2?

texts:
In Magento 1.x snippets:-

  $appliedFilters =
  Mage::getSingleton(‘Mage_Catalog_Block_Layer_State’)->getActiveFilters();

(and)

  $appliedFilters =
  Mage::getSingleton('catalog/layer')->getState()->getFilters();

Please suggest me in magento 2 syntax for the above snippet?


texts: Magento 2 display custom input radio in checkout page and save into sales_order table

texts:
I am trying to display with custom input radio button in checkout page as like below image and trying to save in Sales_order table. Here I am able to display the input radio button in checkout page and I'm created custom filed in sale_order table but I can't understand how can i save this input value.
Can any one please help on this.

image:


texts: How to validate custom coupons in magento 2?

texts:
I want to validate coupon code which is not in magento sales rules.
I have millions of coupons in another table. I want to apply coupon from another table.
If user enter any coupon first i want to  look another table and search for coupon. if it exists then i will apply that coupon code on cart and show discount amount.


texts:
I am moving companies website from old installation 1.7.1 to fresh installation of Magento 1.9.3. I have moved now all the Product and Customer data easily - how do I export/import orders?

I have tried several extensions but they take huge amount of time to export/import as I have over 100k orders, so ideally I would need magento friendly way to move them.

Here is a nice extension: Bulk Import + Export Orders to CSV

I will update this post when I find something decent for Dataflow profiles.


texts: Register customer region to State/Province table

texts:
I'm fairly new to Magento and I'm not quite sure how to add a State/Province field to the register.phtml form. I read somewhere that it's not a good idea to edit this file since it gets wiped whenever theres an update so I'd need some tips with that too. I've managed to add the field (by editing register.phtml) but after registering, the State/Province tab is empty in Manage Customers Panel.

So basically my 2 questions are:

What file do I edit to add a field to the register form?

and

What do I need to save the data in Manage Customer panel?

Any links or tips would be much appreciated!

Thanks in advance!

Collin


texts: Magento 2.3.3 Payflow pro integration with PWA

texts:
I am trying to implement Payflow pro with PWA, I am following https://devdocs.magento.com/guides/v2.3/graphql/payment-methods/payflow-pro.html document.

But i can not understannd handlePayflowProResponse mutation (Step-9), How to implement this and also not clear which API i need to use in PWA.

Let me know if anyone have idea.


texts: Enable PayPal Pro & Standard in Magento 1.7

texts:
Since Magento 1.7 it's only possible to use PayPal Pro or PayPal standard but not both.

In this scenario I cannot use PayPal Express because I have to pass through order data which gets lost using Express, so I need PayPal standard to be working as well.

In my time writing modules I've never seen anything configured in the new PayPal way in the Magento configuration so I'm not sure where to begin looking. If anyone can point me on the right direction I'll answer this with the solution.

As a side note, does anybody know exactly why Magento have enforced this?

UPDATE

I have tried setting the core_config_data payment/paypal_standard/active and although both appear enabled in the admin, still only the direct method shows in the checkout.


texts: Script for multiple coupon code generation for CE 1.5x

texts: Can anyone help me with the script and explanation to generate multiple coupon codes programatically since this feature is not present in Magento CE ver 1.5x. Thanks.


texts: Magento 2.2 Drop Down to Radio button in a Product

texts:
I created a configurable product and I set the dropdown as a selection method. How can I change it in radio buttons?
it's possible? I saw some guides on Magento 1.9 where they set the radio buttons instead of the drop-down selection

My Magento version is 2.2.

Thanks in advanced!


texts: getting 404 error in english home page in magento

texts: As mentioned in the title i am getting an 404 error in my english store view in magento 1.9. I had until recently one language in my shop and then decided to add english too. I created a second home page , assigned it to the english page and then copied in the design section all the data that i had in the default home page. But when i switch from the other language to english i get the 404. The rest menu works pretty fine. Any ideas/advice on how to resolve this??


texts:
I am frustrated. I'm unable to add an ajax route in Magento 2.2 no matter what I try, I get a 404.

routes.xml:

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

The Controller is beside working controllers at [module path]/Controller/Adminhtml/Ajax/Index.php and looks something like this:

//namespace is defined here.
class Index extends \Magento\Backend\App\Action
{
    protected $resultPageFactory;

    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory
    ) {
        die('foo');
    }

    public function execute()
    {
        die('foo');
    }
}

/admin/schematics_ajax/index shows a 404

I'm pretty sure I followed https://devdocs.magento.com/guides/v2.2/extension-dev-guide/routing.html pretty much exactly. What am I missing?


texts: Latest order is not showing in admin sales order grid in magento1

texts: Latest order is not showing in admin grid, but it is saving in database and also showing order id in mail. i have cleared cache and tried with some solution but not getting success,please help me for that.


texts: How to check if the cart contains any bundled products?

texts:
I'm needing the find out how to check if the cart has any bundles products in it. If so then the standard 'Proceed to Checkout' shows, if not then text is displayed.

This is what I've got to so far but this just doesn't display anything.

<?php $cartdata = Mage::getModel('checkout/cart')->getQuote()->getData();?>
<?php $bundlesincart = $cartdata->addFieldToFilter('type_id','bundle');?>
    <?php if (!$bundlesincart):?>

No Package Selected

    <?php else:?>
        <?php if ($this->isPossibleOnepageCheckout()):?>
            <button type="button" title="<?php echo $this->__('Proceed to Checkout') ?>" class="button btn-proceed-checkout btn-checkout<?php if ($this->isDisabled()):?> no-checkout<?php endif; ?>"<?php if ($this->isDisabled()):?> disabled="disabled"<?php endif; ?> onclick="window.location='<?php echo $this->getCheckoutUrl() ?>';"><?php echo $this->__('Proceed to Checkout') ?></button>
        <?php endif?>
    <?php endif;?>


texts: Ask setup:static-content:deploy to use more system resources

texts:
I'm currently running my development on a Windows 10 machine with Laragon.

Php memory limit is set to -1.
8 Core(s), 16 Logical Processor(s).
Installed Physical Memory (RAM) 16,0 GB.

Still when i run composer or magento upgrade, deploy and compile commands it is really slow. Really irritating.

The question is:
How can i make Magento and Composer use more resources and perform faster? I use so much of my time waiting for these processes and it makes me very sad atm.


texts: Magento2 - How can I change color filter url?

texts:
How can I change carpet color url?
carpet_colour_group=472 to carpet/black?
These are color filters on the list page.


texts: How to set additional data to quote_item table from controller in Magento 2?

texts:
I have a controller with following code

$data = $this->getRequest()->getPostValue();
    $item_id = $data['item_id'];
    $additionalOptions = $data['additional_options'];
    $itemFactory = $this->itemFactory->create()->load($item_id);
    $itemFactory->setAdditionalData($additionalOptions);
    $itemFactory->save();

but it throws following error while saving the quote item data as follows.

  Fatal error: Uncaught Error: Call to a member function getStoreId() on
  null in
  vendor/magento/module-quote/Model/Quote/Item/AbstractItem.php:144
  Stack trace: #0


texts:
Problem background

At the Insert Image page I accidentally removed a folder. I was trying to delete one image.

Question

Is it possible to retrieve this deleted data? If so how?


texts: Sorting by "Best selling" not working for configurable products M2.4.x (but for simple products)

texts:
the sorting by "Best selling" is not working for configurable products in M2.4.x
Its well working for categories with simple products.
When mixed category, first the best-selling simple products are shown, after that all the configurable products (in wrong order).
We use the plug-in from weltpixel. According weltpixel, their plugin cannot be the reason.
The whole thing was working till oct 2020 approx, it could be after the update from M2.3 to M2.4.1 ist stopped working but i am not sure..
Any ideas???


texts: How to remove Quote Marks From Product Name

texts:
I'm need to remove the quote marks from the product name because it is messing up the Data Layer.

$product['name'] = $item->getName();

How can I do it in the above code? Thanks


texts:
I am having some problems with base import on a Magento website. Problem is that the import hangs and remains stuck on the Please wait message.

I checked, the var/importexport has all the necessary permissions, the csv file even appears after I hit the import button.

I checked all the different solutions found on forums and on stackexchange, but none of them seem to be the issue in my case. There are no errors on the browser console, in the logs, on the server logs, the file is UTF-8, memory limit is set to 2048. I tried to leave just one line in the import file, it's the same. I exported all the products and then tried to reimport the file without ever opening it: same. I left just one product in the export file and then tried to reimport it: same issue.

So I think it's there is no problem with CSV file, it has to do something with magento failing to process the data.


texts: Bulk update products to include new websites in Magento 2?

texts:
I saw This link and I want to do the same thing in magento 2.
I want to associate all products to some list of websites.


texts: How to change currency symbol in filter Magento 2

texts: I am new in Magento 2 and in frontend category page there is a filter by price which is range and under it there are two inputs which are disabled and there values are from - to price and the currency symbol is not right as it shows $ and the currency I use is egp. How can I change it or even remove it?. Just need to know what is the file that I need to edit.


texts: Magento2 Add Login/Logout Button homepage

texts:
I have a home landing page that has a Login/Logout button. It's currently static html, but I'm trying to convert it so that the button actually functions same as default login/logout button.

I tried creating a custom template landing-content.phtml and updating my Layout Update XML for my homepage to code below.

<referenceContainer name="page.wrapper">

    <container name="landing-header" label="Landing Header" as="landing-header" htmlTag="div" htmlClass="landing-header">
        <container name="landing-header-container" label="Landing Header Container" as="landing-header-container" htmlTag="div" htmlClass="container">
            <block class="Magento\Cms\Block\Block" name="landing-page-header">
                <arguments>
                    <argument name="block_id" xsi:type="string">landing-page-header</argument>
                </arguments>
            </block>
        </container>
    </container>

    <!--
    <container name="landing-content" label="Landing Content" as="landing-content" htmlTag="div" htmlClass="landing-content-area cf">
        <container name="landing-content-container" label="Landing Content Container" as="landing-content-container" htmlTag="div" htmlClass="container cf">
            <block class="Magento\Cms\Block\Block" name="landing-page-content">
                <arguments>
                    <argument name="block_id" xsi:type="string">landing-page-content</argument>
                </arguments>
            </block>
        </container>
    </container>
    -->

    <container name="landing-content" label="Landing Content" as="landing-content" htmlTag="div" htmlClass="landing-content-area cf">
        <container name="landing-content-container" label="Landing Content Container" as="landing-content-container" htmlTag="div" htmlClass="container cf">
            <block class="Magento\Framework\View\Element\Template" name="landing-page-content" template="Magento_Theme::html/landing-content.phtml"></block>
        </container>
    </container>

    <container name="landing-footer" label="Landing Footer" as="landing-footer" htmlTag="footer" htmlClass="landing-footer">
        <block class="Magento\Cms\Block\Block" name="landing-page-footer">
            <arguments>
                <argument name="block_id" xsi:type="string">landing-page-footer</argument>
            </arguments>
        </block>
    </container>

</referenceContainer>
<referenceContainer name="before.body.end">
            <block class="Magento\Framework\View\Element\Template" name="footer.script" template="Magento_Theme::html/landingpage-script.phtml"/>
</referenceContainer>

Additionally, I added the following snippet of code to my landing page, but got an error:

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var $block \Magento\Customer\Block\Account\AuthorizationLink */
$dataPostParam = '';
if ($block->isLoggedIn()) {
  //  $dataPostParam = sprintf(" data-post='%s'", $block->getPostParams());
}
?>
<div class="authorization-link" data-label="<?php echo $block->escapeHtml(__('or')); ?>">
    <a <?php /* @escapeNotVerified */ echo $block->getLinkAttributes(); ?><?php /* @escapeNotVerified */ echo $dataPostParam; ?>>
        <?php echo $block->escapeHtml($block->getLabel()); ?>
    </a>
</div>

What am I missing?


texts: How Can I Display Custom Attribute Below Products Price

texts: I need to display custom attribute below my product price, how can i get custom attribute and display on products price.


texts:
Why I'm having this kind of error that "Type of user is a required field" even I didn't add one.

here is the error log:
a:5:{i:0;s:96:"Source model "capulus_customer/attribute_source_typeofuser" not found for attribute "typeofuser"";i:1;s:2951:"#0


texts: How can I set cron for some specific php file

texts:
I created test.php file in the root folder. I want to this file run automatically in every 2 minutes. I know this is done using cron. but I don't know how to set up cron. so can any one give me example or explain in detail how can I set cron job for this file.I create this file in my local magento setup.

Thanks in Advance. Magento version:1.9.3.4.


texts: Sending complex types in Custom API requests

texts:
I'm extending the SOAP API in a magento 1.7.0.2 installation. For some reason, the API is not receiving a complex data i'm sending in the request.

Is there something wrong in my definitions?

wsdl.xml

<!-- inside types tag -->
<complexType name="reviewCreateData">
    <all>
        <element name="review" type="xsd:string" minOccurs="0" >
        </element>
        <element name="isPositive" type="xsd:boolean" minOccurs="0" >
        </element>
        <element name="parentReviewId" type="xsd:int" minOccurs="0" >
        </element>
    </all>
</complexType>

...snip...

<message name="myCreateProductReviewRequest">
    <part name="sessionId" type="xsd:string"> </part>
    <part name="dato" type="typens:reviewCreateData"></part>
</message>

...snip...

Api.php

public function createProductReview($dato){
    Mage::log(__METHOD__);

    Mage::log("dato");
    if(isset($dato)){
        Mage::log('dato received');
        Mage::log($dato['review']);
    }
    else{
        Mage::log('dato not received');
    }

    // $reviewId = $this->_createReview($productId, $customerId, $review, $isPositive, $parentReviewId);
    $reviewId = 9999;

    $result = [];
    $result['success'] = true;
    $result['message'] = "created review $reviewId";
    return $result;
}

After every request, i'm getting the "dato not received" message.


texts: How to group conditional filters in Magento 2 data provider

texts:
In my component/ui/dataprovider I have the following.

class TheProvider extends DataProvider
{
    /**
     * Get collection data
     * @return array
     */
    public function getData()
    {
        $this->setFilter();
        return parent::getData();
    }

    /**
     * Adds filter to collection for view
     * @return void
     */
    protected function setFilter()
    {
        $this->addFilter(
        $this->filterBuilder
            ->setField('status')
            ->setValue('pending')
            ->setConditionType('eq')
            ->create()
        );
    }
}

So obviously 'setFilter()' applies the following conditions to the data source...

WHERE status='pending'

What I want to do is apply the following logic in the filter.

WHERE (status = 'pending' AND store_id = 1) OR (status='processing' AND store_id = 2)

It seems I can easily create chained AND conditions, but I can't find anything in the code that allows me to chain OR conditions.

Is this possible without having to modify the model's collection query?


texts: How to install a theme to a fresh magento v1.8 store

texts:
I have purchased the theme a couple of years ago from rocket theme.

I've looked at their install instructions and it's missing some details and never got it installed.

I just installed a fresh v1.8 magento store to start over and have a current copy of the theme but i am just not getting enough detailed install instructions for me to feel comfortable trying it.

Here's the instructions i have from rocket theme:

  https://rockettheme.com/docs/magento/themes/infuse/INDEX.md#how-to-install-the-theme

what are the missing details.


texts: How to display crossed visual swatches for not available sizes in Magento 2?

texts: I've set up a Visual swatch for sizes S, M, L. When a size is sold out I want Magento to display the sold out size with a red cross mark instead of hiding that size option.


texts: How to override Pdf Invoice in Magento 2?

texts:
Magento 2:

I was looking to add a custom text on the footer in pdf invoice. I have done this by adding a small piece of code here in this file

vendor/magento/module-sales/Model/Order/Pdf/Invoice.php

I know it's not good to edit core files, so how can i override this file?

I tried by placing the same file with directories in app/code/Local/Sales/Model/Order/Pdf/Invoice.php but not working.


texts: How to add "Add To Cart" Pop Up Magento 2 Custom theme?

texts:
Here i am trying to add a pop-up once product added to cart using
  custom theme magento 2??

I tried this link


texts: How to override translate csv files in magento2

texts:
Suppose, I want to translate Shop By to Shop in my custom theme using translation file en_US.csv

What is the method or procedure to achieve it in Magento2?


texts: Magento 2 Product Page Gallery Image Preview Issue with Algolia

texts:
Im facing a serious issue with Magento 2.3.5-P2 product view image gallery. The Preview thumbnail images are showing same if there are multiple images.
The issue seems to be a conflict with Algolia Magento 2 Module. Also using the Codazon Magento 2 theme.
I have tried to clear the image cache and regenerate it, but no luck.

It would be great if any one can share a solution to resolve the issue.


texts: how to get wordpress data in fishpig magento integration

texts:
I need to crease a author block for the wordpress posts in fishpig integration furthermore I need to create an author profile page and recommended posts etc.
However inorder to do this I need to access wordpress database values ...Does this extension already reference this data eg:display name post date etc ...are there any other lines of code that reference wordpress data?... like in these lines of code

$post->getPostDate(), $post->getAuthor()->getDisplayName()

or would I have to make a custom query to the database?


texts: Strange Issue product image filename adding _1 to the filename

texts:
I am adding new products , and I want to copy the images , and keep them with the same name.  In most cases it seems to work , but one particular product ( and possibly others ) has me baffled.

I have deleted ALL products
I have deleted ALL images in media/catalog/product
I have disabled the cache , redindxed and I have even a run magerun addon to remove any orphan references / orphan files.

I am using addImagetoMediaGallery

$targetProduct->addImageToMediaGallery($importFilepath,$sourceImage['types'],false,$sourceImage['exclude']);

The image is set up correctly in terms of linking to the product and correct types , however it persists in adding a _1 to the and of the first part of the filename

So:

th_new-l_4_2.jpg

becomes

th_new-l_4_2_1.jpg

( Yes I do realise that it already has numbers appended from previous database )

Note: For other products , it seems to keep the filename as is.

This image does not exist anywhere that I can find in either the file system or the database ( I have been through pretty much all of the product / attribute / media tables.

If you have any idea why it would be doing this when the product does not exist I would appreciate your time.  Thanks!


texts: Magento displays ORIGID missing error when trying to "Capture Online" a PayPal Advanced authorized order

texts:
So when trying to capture an authorized payment from a customer that used their Debit/Credit card using PayPal Advanced Payments Magento displays this error:

  Field format error: ORIGID missing

This only happens when customers use PayPal Advanced not PayPal Express. I know that the issue is that the Parent Transaction ID is not being taken from the initial transaction for whatever reason. I have debugging enabled and do not see any other errors in system.log that are related to this.

Please help me figure out what the issue might be, thank you.


texts: addAttributeToSort() not working with flat product data

texts:
We have a bit of code that looks like this:

$products = Mage::getModel('catalog/product')->getCollection();
$products->addAttributeToSelect('name');
$products->addAttributeToSelect('sellbydate');
$products->addAttributeToSort('sellbydate','ASC');

This has been working fine, but after enabling flat product data the items are no longer sorted.  I have reindexed but there is no change.

Should I be using a different function?


texts:
I have an "additional information" table on my product pages that contains several rows of product attributes and their values. I have an "ingredients" attribute that can sometimes be very long, so I need the content of that cell to scroll if the content is higher than 35 pixels, for example. Magento doesn't add ID's to the table rows so I cant style that row in particular. I could live with a solution that affects all other attributes on that table as well.

I'm using the default template.

I've tried this:

table#product-attribute-specs-table.data-table tbody tr {
    max-height: 35px;
    overflow: scroll;
}

I see the style showing up on firebug but the row is still as tall as any content you put in it and no scrollbar ever shows up.

Any help would be appreciated. Thanks!


texts:
I encountered an error on running  php bin/magento setup:di:compile on CLI

Error is :

  [Zend\Code\Exception\RuntimeException]
  No tokens were provided

How to fix this issue ?


texts: How i can fix error Invalid backend model specified

texts:
when i try run magento, i see in log file next error:

  a:5:{i:0;s:74:"Invalid backend model specified:
  eav/entity_attribute_backend_time_updated";i:1;s:6088:"#0
  \app\code\core\Mage\Eav\Model\Entity\Attribute\Abstract.php(346):
  Mage::exception('Mage_Eav', 'Invalid backend...')

Can you help how i can fix this? because i can not found solution((
any solutions please, Thanks

Backend working good, not working only frontend


texts: How to create a table in the database in Magento using install script

texts:
I am new to Magento, and I am trying to create a table in the database using an install script.  THE WEB SITE IS HOSTED.  I followed few tutorials, and they all look same.  I followed every step, but the table is not created.  Can some one tell me where I have gone wrong?  I created the following file:

app/code/local/Sitepoint/Articles/etc/config.xml

It contains following code:

<global>
    <models>
        <articles>
            <class>Sitepoint_Articles_Model</class>
            <resourceModel>articles_mysql4</resourceModel>
        </articles>
        <articles_mysql4>
            <class>Sitepoint_Articles_Model_Mysql4</class>
            <entities>
                <articles>

articles

                </articles>
            </entities>
        </articles_mysql4>
    </models>
    <resources>
        <articles_setup>
            <setup>
                <module>Sitepoint_Articles</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </articles_setup>
        <articles_write>
            <connection>
                <use>core_write</use>
            </connection>
        </articles_write>
        <articles_read>
            <connection>
                <use>core_read</use>
            </connection>
        </articles_read>
    </resources>
</global>

Then I created following file:

app/code/local/Sitepoint/Articles/sql/articles_setup/mysql4-install-0.1.0.php

Which has the following code:

<?php
$installer = $this;
$installer->startSetup();
$installer->run("-- DROP TABLE IF EXISTS {$this->getTable('articles')};
CREATE TABLE {$this->getTable('articles')} (
      `articles_id` int(11) unsigned NOT NULL auto_increment,
      `title` varchar(255) NOT NULL default '',
      `short_desc` text NOT NULL default '',
      `long_desc` text NOT NULL default '',
      `status` tinyint(2) NOT NULL default '0',
      `created_time` datetime NULL,
      `update_time` datetime NULL,
      PRIMARY KEY (`articles_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    ");
    $installer->endSetup();
?>

I followed this tutorial => https://www.sitepoint.com/magento-install-upgrade-data-scripts-explained/ but the tables are not created.  I tried few other tutorials, and they all provide the same way.  Can someone help me?


texts: Magento 2.2.6 : Add custom field in product attribute add form - Is not render the database value on edit

texts:
I added a custom field inside my product attributes and it's render and save OK, but when I reload the attribute form, the value of my custom field is empty. If I enter to the form data inside the _prepareForm in Front.php, I see my custom field value that is 5 right now

I create my plugin with this code:

  /app/code/Vendor/CustomModule/etc/adminhtml/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\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front">
        <plugin name="vendor_custommodule_attribute_edit_form" type="Vendor\CustomModule\Plugin\Block\Adminhtml\Product\Attribute\Edit\Tab\Front" sortOrder="1"/>
    </type>
</config>

  /app/code/Vendor/CustomModule/Plugin/Block/Adminhtml/Product/Attribute/Edit/Tab/Front.php

namespace Vendor\CustomModule\Plugin\Block\Adminhtml\Product\Attribute\Edit\Tab;

class Front
{

    /**
     * Get form HTML
     *
     * @return string
     */
    public function aroundGetFormHtml(
        \Magento\Catalog\Block\Adminhtml\Product\Attribute\Edit\Tab\Front $subject,
        \Closure $proceed
    )
    {

        $form = $subject->getForm();
        if (is_object($form)) {
            $fieldset = $form->addFieldset(
                'custom_fieldset',
                ['legend' => __('Custom options')]
            );

            $fieldset->addField(
                'my_custom_field',
                'text',
                [
                    'name'      => 'my_custom_field',
                    'label'     => __('My custom field'),
                    'title'     => __('My custom field'),
                ]
            );
        }
        return $proceed();
    }
}

  /app/code/Vendor/CustomModule/view/adminhtml/ui_component/product_attribute_add_form.xml

<?xml version="1.0"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <fieldset name="custom_fieldset">
        <field name="my_custom_field">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="sortOrder" xsi:type="number">130</item>
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="formElement" xsi:type="string">input</item>
                    <item name="label" xsi:type="string" translate="true">My custom field</item>
                    <item name="default" xsi:type="number">0</item>
                </item>
            </argument>
        </field>
    </fieldset>
</form>

The result is this:

But in the database I have the correct value that is currently 5

Somebody could help me please?


texts: Setting data on Session not working ( different behavior on 2 server)

texts:
I need to store some data on Session during a call to Magento API, so I have overwritten Mage_Checkout_Model_Cart_Customer_Api and added this:

Mage::getSingleton('core/session')->setCustomVar('value');

The above code works fine on my local server but on Live server it is not storing anything on session (even If i just store a fix string )

Any idea ?


texts: Core Javascript files aren't working, and admin menu's won't dropdown

texts:
I have been migrating a Magento install to one server from another. Normally an everyday process - however I have hit a brick wall, and I think I've hit that point where I am too frustrated to see the solution which hopefully is right in front of my eyes...

All my core JavaScript files seem to be giving me problems, on both the front end and the back end. I can't use the Magento admin menu's, because they're managed by the core js files...

Here's the screens of the error messages showing up in firebug.

Frontend: http://i.imgur.com/PvdAXAb.png

Backend: http://i.imgur.com/TnYEkSI.png

My first thought was permissions weren't set correctly on the JS folder, but I've reset them 3 times, so it shouldn't be that unless 755 for the folders and 644 for the files is incorrect.

Any help would be greatly appreciated, thanks!


texts: Magento 2.2 - Mobile_detect is not working

texts:
require_once($directory->getRoot().'/Mobile_Detect.php');
$deviceDetect = new Mobile_Detect;
if ($deviceDetect->isMobile()) {
    echo "<script>alert('MOBILE');</script>";
} else {
    echo "<script>alert('WEB');</script>";
}

Always in all the device we get only "WEB".


texts: How to add Fix amount charge in percentage wise in shopping cart price rule?

texts:
in magento 1 provide by default "Percent of product price discount" i want create "percent of product price add charge".
I override validator.php file and gets the discount amount on that but I don't know which place I calculate and add a charge for that.

please help me on this action.
thank you in advance.


texts: Review and Rating not working in admin and frontend in Magento2

texts: Grid Listing showing white page also New form and edit form showing white page in Admin.(Review and Rating)


texts: Is there a way to check if data migration tool finished smoothly

texts:
My data migration was running yesterday and it was taking so long. In 7 hours it completed only about 50%, so I left my computer turned on and making my computer to never sleep.

I check 11 PM from TeamViewer and it was still running and had finished 70%.
I came back to work this morning at 9 AM and only to find my windows computer had restarted. Most likely it had auto-updated.

Now, is there a way to check if Data Migration finished its job?

And is it normal to take this much of the time to migrate data? I do have a DB of 45GB.

Please suggest.


texts: Magento 2.3.4 update: All Rest API are getting 500 error

texts:
I've recently updated my Magento 2.3.4. Now getting 500 error for all the Magento REST API being used on checkout, cart, or any other pages.
I've checked for System log but not getting anything related to error except 500error on browser network.
Please suggest the solutions If someone has encountered the same issue.
Below is the error screenshot


texts:
New to magento development so this might be a simple mistake, but why is this Schema missing the method magentoInfo? Do methods difference between enterprise and community?

http://www.cantonteaco.com/index.php/api/v2_soap?wsdl

EDIT:

The example client above 'Cantonteaco' is using version 1.5, which I'm guessing is the reason for the missing 'magentoInfo' method.

What other method can I use to get the version?


texts:
I'm trying to insert a block that shows up at a specific point in my page. I created a new layout file, which looks like this:

mylayout.xml

<layout version="0.1.0">
<catalog_product_view>
    <reference name="content">
        <block type="core/template" after="-" name="my.block" template="my_dir/myblock.phtml" />
    </reference>
</catalog_product_view>

This successfully displays the html content in myblock.phtml, at the top of my content block. How can I make this block render after another block, such as this one:

catalog.xml

<block type="catalog/product_view" name="product.info.addtocart" as="addtocart" template="catalog/product/view/addtocart.phtml"/>

Intuitively, I thought this would work, but didn't:

<layout version="0.1.0">
<catalog_product_view>
    <reference name="product.info">
        <!--in config file / Istockphp\Customerpage\Block\Customer.php-->
        <block type="core/template" after="product.info.addtocart" name="product.reward" template="socilogica/product_reward.phtml" />
    </reference>
</catalog_product_view>

Appreciate any help!


texts:
I'm trying to make the status of a review be approved instead of pending when the user posts it in the frontend in Magento 2.
And I took this approach. Create a before plugin, available only in the frontend area, for the method setStatusId for the Magento\Review\Model\Review that looks like this

public function beforeSetStatusId(\Magento\Review\Model\Review $review, $status)
{
    return [\Magento\Review\Model\Review::STATUS_APPROVED];
}

It seamed to me like a good idea. And it should work since I'm returning the approved status. The actual method should then pick this up as a parameter.
but to my surprise it didn't work.
Then I dug up and found that the method setStatusId does not exist in the review model. It is magically called and it actually runs setData('status_id', $status).
I took a look then in the generated interceptor, and indeed there is not setStatusId method.

How can I pluginize the magic getters/setters in magento 2? Is that even possible?

Note: I don't need a solution for making the reviews auto-approved. I know I can take other approaches, like the save_before events. This is not important for now.


texts: How does objectmanager instantiated by objectmanagerinterface?

texts:
I always see objectmanager instantiated by objectmanagerinterface.
But I never found di.xml that have preference of objectmanagerinterface to objectmanager.

Is it something I have never found?
Or is objectmanager some special object that doesn't need di.xml?


texts:
This problem looks like the case of using http://localhost as domain as found the issue:
magento 2 Error ERR_TOO_MANY_REDIRECTS

But in my case the base-url is: http://m2test_bd.mac0004.isaac.local/

When I make a clean install on this URL and open (in Chrome of Firefox):

http://m2test_bd.mac0004.isaac.local/admin/

I get redirected to:

http://m2test_bd.mac0004.isaac.local/admin/http:/index/m2test_bd.mac0004.isaac.local/admin/admin/index/index/key/8028086a452629a2b24de1fca7faaa78009a188619fdc2558c10e78f5eb18a0a/

And get the notice:

The m2test_bd.mac0004.isaac.local page isn’t working

m2test_bd.mac0004.isaac.local redirected you too many times.

ERR_TOO_MANY_REDIRECTS

Can anyone tell me what I'm doing or is going wrong?


texts: How execute commands after loading of checkout?

texts:
I need execute jQuery('.selectpicker').selectpicker(); after checkout shipping (billing) form loaded (step 1).

What I need to do?


texts: Magento stock sync using a lot of memory- what options do i have to reduce memory usage?

texts:
I have a file of around 100,000 sku's that need to have their quantity updated in Magento.

For speed reasons, I am doing a few things:
1. I am generating an array of SKU, Product ID and SKU so that I don't have to do a call for each product to find the product ID from the SKU code, or to get the current quantity.
2. The current quantity from above is then compared to the quantity in the file. If it is the same, then no update occurs.
3. We are using a multi warehouse plugin and so I also keep a list of the cataloginventory_stock_item item_id so that I can just call the model and update it.

My issue is, is that the process is using almost 2GB of memory. I can't quite see why. The file that I am reading line by line is only 5MB. I run the following functions and put the results into an array which must be where the memory is getting used.

protected function _getStockItemsAsArray() {
    $stockCollection = Mage::getModel("cataloginventory/stock_item")->getCollection();

    $out = [];
    foreach ($stockCollection as $stock) {
      $product_id = $stock->getData("product_id");
      $warehouse_id = $stock->getData("stock_id");
      $stock_item_id = $stock->getData("item_id");
      $qty = $stock->getData("qty");
      $is_in_stock = $stock->getData("is_in_stock");

    $out[$product_id][$warehouse_id]["stock_item_id"] = $stock_item_id;
    $out[$product_id][$warehouse_id]["qty"] = $qty;
    $out[$product_id][$warehouse_id]["is_in_stock"] = $is_in_stock;
  }

  return $out;
}

protected function _getCurrentStockAsArray() {
  $resource = Mage::getSingleton("core/resource");
  $readConnection = $resource->getConnection("core_read");

  $query = "
    SELECT
      p.sku,
      p.type_id,
      w.stock_id,
      SUM(IFNULL(pe.qty,0)) pending_qty,
      SUM(s.qty) on_hand_qty
    FROM
      " . $resource->getTableName("catalog_product_entity") . " p
    CROSS JOIN
      " . $resource->getTableName("cataloginventory_stock") . " w
    INNER JOIN
      " . $resource->getTableName("cataloginventory_stock_item") . " s on
      s.product_id = p.entity_id
    LEFT OUTER JOIN
    (
      SELECT
        oi.product_id,
        oi.stock_id,
        IFNULL(SUM(qty_ordered),0) qty
      FROM
        " . $resource->getTableName("sales_flat_order_item") . " oi
      INNER JOIN
        " . $resource->getTableName("sales_flat_order") . " o ON
        oi.order_id = o.entity_id
      WHERE
        o.tigers_export_status IN('Incomplete', 'Failed', 'Pending', 'Exporting')
        AND o.status NOT IN('canceled', 'closed')
      GROUP BY
        oi.product_id,
        oi.stock_id
    ) pe ON
      pe.product_id = p.entity_id
      and pe.stock_id = w.stock_id
    WHERE
      p.sku IS NOT NULL
      OR p.sku != ''
    GROUP BY
      p.sku,
      p.type_id,
      w.stock_id
  ";
  $data = $readConnection->fetchAll($query);

  $out = [];
  foreach( $data as $key => $value ) {
    $out[$value["sku"]][$value["stock_id"]]["on_hand_qty"] = (int)$value["on_hand_qty"];
    $out[$value["sku"]][$value["stock_id"]]["pending_qty"] = (int)$value["pending_qty"];
    $out[$value["sku"]][$value["stock_id"]]["type_id"] = (int)$value["type_id"];
  }
  return $out;
}

protected function _getSkuToProductIDAsArray() {
  $resource = Mage::getSingleton("core/resource");
  $readConnection = $resource->getConnection("core_read");

  $query = "
    SELECT
      sku,
      entity_id
    FROM
      " . $resource->getTableName("catalog_product_entity") . "
    WHERE
      sku IS NOT NULL
    ";
  $data = $readConnection->fetchAll($query);

  $out = [];
  foreach( $data as $key => $value ) {
    $out[$value["sku"]] = (int)$value["entity_id"];
  }
  return $out;
}

What other options are available to use less memory but still have similar performance?


texts: Admin form validation - making image file upload required

texts:
For backend part of my extension, I am trying to make one file required. The following code is not working. It is working fine for other text fields.

  $fieldset->addField('image1', 'image', array(
      'label'     => Mage::helper('myextension')->__('Image1'),
      'required'  => true,
      'class'     => 'required-file',
      'name'      => 'image1'
  ));

I can see * in the label, but there is no css class in the input field except "input-file". I can still save new entries/posts without uploading an image.


texts: Backup failed. Error received from server: Backup functionality disabled

texts:
The following error message received when trying to install an M2 extension.
Backup failed
Error received from the server:
Backup functionality is disabled


texts:
I'm looking for a Magento language pack, like Facebook's Pirate Language option, that is humorous. My Google-fu is failing me.

Pirate is preferable.

Update

A pirate language pack been created and is now hosted on Github:

https://github.com/philwinkle/Philwinkle_PirateLang


texts: Code Generation and Local Development Workflow in Magento 2

texts:
Currently I am running Magento 2 on my local environment and running into problems with development of a custom test module.

I am trying to use dependency injection in one of my controller actions but the interpreter class that seems to be auto-generated in var/generation folder seems to have an older definition of the __construct method of my action class, leading to run time errors. I realize I need to clear the var/generation folder and get on with it. However, is there a way for me to setup my local development environment in such a way that I don't have to do this step every time there is a change to the action class?

Is there any documentation on best practices for local development? Information on the web can get confusing in some cases - like for instance I happened to read somewhere that using static deploy during development isn't best practice, but then I had problems in using a git branch that had setup a new theme. The system wouldn't pick up the new theme however, after static deployment the theme override was working fine.

Is there a list of 5-6 steps that you need to do on the regular while developing locally on M2?


texts: Magento 2 install with baseUrl "http://localhost": Can't add product to the cart in Chrome

texts:
Today I've created a vanilla installation of Magento 2:

Magento CE 2.0.3
Vagrant
Ubuntu 14.04
PHP 7.0.3
MySQL 5.6.28
URL: http://localhost/

Out of the box, when I try to add a product to the cart in Chrome it doesn't work:

The cart changes to a spinner icon
The text on my button changes to 'Adding...'
That's it ...

The same goes for reviews. When I try to add a review, it doesn't work.

However... when I try it in Firefox it works!

Can anyone tell me why it isn't working in Chrome?


texts: not able to add custom block in cart page above coupon block

texts:
i am adding the block through xml on cart page. i searching a lot but could not find the find the solution where i am getting wrong.

<checkout_cart_index>

    <reference name="checkout.cart">

            <block type="test/test" before="coupon"   template="test/cart_test.phtml" />

    </reference>
</checkout_cart_index>

when i and  the block is added to cart page but i want to add before the coupon block any help will be appreciated.


texts: exception 'Mage_Core_Exception' with message 'Invalid Block Type: Mage_Bannerslider_Block_Bannerslider'

texts:
I'm new to Magento. And my task is to migrate magento online store to a subdomain for a development work.

Backed up the whole store
Backed up the database and import it in the new one I've created
I've changed the core_config_data values (URL)
Chnaged the .htaaccess which is pointing to the old domain
Changed the local.xml in app/etc/local.xml

So far everything is okay. But I get the error on the screen when I type the domain and It says: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'lorotrad_elmaira_dev.sofia_slides' doesn't exist
And in my exception.log I get the following thing:

2015-01-21T21:03:48+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Невалиден блок тип: Mage_Bannerslider_Block_Bannerslider' in /home/lorotrad/public_html/dev/app/Mage.php:594
Stack trace:
#0 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('???????????????...')
#1 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('bannerslider/ba...', Array)
#2 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('bannerslider/ba...', 'slide-show')
#3 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('bannerslider/ba...', 'slide-show')
#4 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/lorotrad/public_html/dev/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/lorotrad/public_html/dev/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'sofia_home_1col')
#9 /home/lorotrad/public_html/dev/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'sofia_home_1col')
#10 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Cms_IndexController->indexAction()
#11 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/lorotrad/public_html/dev/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/lorotrad/public_html/dev/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#15 /home/lorotrad/public_html/dev/index.php(88): Mage::run('', 'store')
#16 {main}

As I said I'm newbiew to Magento, but the most logicfull is that these same files and database are working on the other domain with no problem, no errors. So I'm just wondering where is the problem. If you need more information about this issue I'll provide it!

I need help guys.
Thank you in advance! :)


texts: Shopping cart price rules calculated using RRP/price

texts:
It seems shopping cart prices are always applied to the price in the cart.

Is there a feature/module that allows shopping cart prices rules to be applied to the items original RRP/price regardless if it has a special price and or group price?


texts:
I have never worked with magento before, just played around with a local installation of magento 2 for the last couple of days. I have technical background and can comfortably code in PHP if needed.

Background

I currently sell wholesale - all sales offline at the moment. All records are kept in Excel spreadsheets. I now want to start selling via following channels:

Wholesale
- online on my B2B website
- offline via phone orders etc (currently already do this, as above)
Retail
- online on a separate B2C website
- online marketplaces like ebay, amazon, facebook etc.

The Problem

I would like to sell via above channels whilst minimising admin work and centralising all data including product information, inventory information, orders, customer records etc.

Proposed solution

I think magento is my answer. The main reason for choosing magento is that it allows multi-site so I can run both B2B and B2C e-commerce websites from the same platform so half the battle is already won. But it's just as important to centralise data from other sales channels - with that in mind I can see it working as follows.

Data flow scenarios:

Magento will hold the product listings. The product listings will be PUSHED to market places e.g. ebay, amazon etc on adhoc bases.
Magento will PULL orders from market places periodically (once a day?). Magento will then use this data to:

Create/update customer records held on Magento.
Update product inventory records held on Magento and PUSH these back to market places.
PUSH necessary information to courier systems for delivery label generation.
PUSH financial data to external accounting system (might just be a massive CSV file for now).

Any online orders from the B2B ecommerce website and the B2C ecommerce website will automatically be created in Magento and manageable through the Magento admin panel.
Any offline B2B and B2C sales can be manually created in Magento through it's admin panel.

Questions:

What do you think of this solution for my requirements?
Have I missed anything important?
Is scenario no.1 and scenario no.2 above achievable with magento out of the box.

Thanks.


texts: In Magento from admin panel we can delete customer and ca do mass delete of customers. Is there any way to run an observer before deleting customer we can get the customer id ?


texts: Copy shipment data from canceled order to the new one on edit

texts: anyone one knows how to duplicate/copy shipment data with status from canceled order to The new one on edit? When i edit order my shipment data os reset to default status. I override The paynent methods to copy data and its ok but shipment os wrong. Anyone?


texts:
Magento fails to generate the sitemap.xml. I get Unable to generate the sitemap..

I get this exception:

2019-02-25T15:00:59+00:00 DEBUG (7): Exception message: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULLurl_rewrite.id_path LIKE 'category/%'
 INNER JOIN `magecatalog_category_enti' at line 2, query was: SELECT `main_table`.`entity_id`, `url_rewrite`.`request_path` FROM `magecatalog_category_entity` AS `main_table`
 LEFT JOIN `magecore_url_rewrite` AS `url_rewrite` ON url_rewrite.category_id=main_table.entity_id AND url_rewrite.is_system=1 AND url_rewrite.store_id = 1 AND url_rewrite.category_id IS NOT NULLurl_rewrite.id_path LIKE 'category/%'
 INNER JOIN `magecatalog_category_entity_int` AS `t1_is_active` ON main_table.entity_id=t1_is_active.entity_id AND t1_is_active.store_id=0
 LEFT JOIN `magecatalog_category_entity_int` AS `t2_is_active` ON t1_is_active.entity_id = t2_is_active.entity_id AND t1_is_active.attribute_id = t2_is_active.attribute_id AND t2_is_active.store_id = 1 WHERE (main_table.path LIKE '1/2/%') AND (t1_is_active.attribute_id='42') AND ((IF(t2_is_active.value_id > 0, t2_is_active.value, t1_is_active.value))=1)
Trace: #0 /home/company/live/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/company/live/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/company/live/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/company/live/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /home/company/live/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /home/company/live/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Abstract.php(164): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select))
#6 /home/company/live/app/code/core/Mage/Sitemap/Model/Resource/Catalog/Category.php(80): Mage_Sitemap_Model_Resource_Catalog_Abstract->_loadEntities()
#7 /home/company/live/app/code/core/Mage/Sitemap/Model/Sitemap.php(154): Mage_Sitemap_Model_Resource_Catalog_Category->getCollection('1')
#8 /home/company/live/app/code/core/Mage/Adminhtml/controllers/SitemapController.php(255): Mage_Sitemap_Model_Sitemap->generateXml()
#9 /home/company/live/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_SitemapController->generateAction()
#10 /home/company/live/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('generate')
#11 /home/company/live/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/company/live/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/company/live/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /home/company/live/index.php(70): Mage::run('', 'store')
#15 {main}

The error only appears in our live shop, in the test shop it works fine, even if I checkout the live shop branch in git and the staging area is clean

The permission of the sitemap.xml is set to -rw-rw-rw in both shops.


texts: How to apply magento discount on custom fee in Magento2.2.X

texts:
I have created a custom module that will add custom fee on order and show it everywhere in cart, checkout, order details etc, But When I applied magento discount it will not include this custom fee amount for discount tobe applied on.

Suggest what changes I need to done for this.


texts: Magento 2 Convert backend admin grid to use joint table

texts:
What are the step I need to take to convert my backend admin grid to use a joint table I have my grid example with column id and name

id comes from the mainTable and name from the secondtable:

I have added to my collection:

$this->getSelect()->joinLeft(
        ['secondTable' => $this->getTable('second_table')], //2nd table name by which you want to join
        'main_table.entity_id = secondTable.main_table_entity_id', // common column which available in both table
        '*' // '*' define that you want all column of 2nd table. if you want some particular column then you can define as ['column1','column2']
    );

This works well on the Frontend but not sure what I am missing to make it work on the admin grid?


texts: Magento 2.1: How to set some conditions before checkout

texts:
I'm newbie in Magento 2. I have an problem with my shop. I need to check programmtically some conditions before the user placing some orders.

if(condition)
     placeOrder()/saveOrder()
else
     sorry! order can't be created.

Has somebody an idea how and where can i do it? Thank you very much!


texts: Frontend Customer Session Expire But Product Price Not Update in Magento

texts:
In my site back-end, I have created one product with price $75.00.

Also, I have set the 'Wholesale' customer group price is $50.00.

After saving the product I saw the front-end that product price shown $75.00.

I have created one 'Wholesale' customer and logged-in.

Now shown product price is $50.00.

After some hours the customer session has expired, Now click my account page redirect to customer login page.

But the product view page showing only $50.00 (Wholesale price).

Also the product list page too (Shown $50.00 Wholesale price).

How to rectify this ..? Help me.


texts: Magento2: How to fix add to cart not showing in product details page

texts:
When I click on product details page not showing  add to cart
But when I search in inspector  it's there but not showing on site
console error:

  Error: Missing required parameters: site key

How can i resolve ?


texts: Why Magento2.2 create "_cache" Directory under pub/static/_cache

texts:
Just want to know about _cache Directory which is generating under [root]/pub/static/

I have noticed that once upgrades, compile & deployed command done through CLI then _cache directory is creating.

What is the purpose of this _cache directory?

Is it Specific for Production mode?

Will it help to increase performance of JS and CSS?

Thanx in Advance!!


texts:
I have currently grouped my different brands by categories with the name of the brand. I would now like to use an attribute to control the brand also.

Because of that, I need to bulk edit all products of the category BRAND1 to have the brand-attribute set to BRAND1. I suppose I could use a script to do this, but I would prefer doing it from the Catalog -> Products in backend. Is it possible to sort by category here somehow?


texts: Magento 2 :Change order of billing address

texts:
In the customer account section,how can i edit the order of address data(billing and shipping)(ie, i want to show customer company first and customer name second)

https://prnt.sc/nucm3l

I found this in this template file

vendor/magento/module-customer/view/frontend/templates/account/dashboard/address.phtml

as

<?= $block->getPrimaryShippingAddressHtml() ?>

But this is coming as a single block.

From where i can edit this order.

Any help would be appreciated.


texts:
Is there any solution to optimize the speed for the category page which is having more than 2.5 Lac products in Magento 2.2.2?

I have tried to debug the code, I have just put only one attribute entity_id in the collection still while I am checking the profiler then it still shows me the class which is being called many times getAttribute. Would someone guide me for this if anyone has an idea?


texts: what is included in base grand total magento 2?

texts:
I need to create a custom getBaseGrandTotal amount. What is included in this amount like a tax, shipping.tax?

I am new to Magento.

Please guide!!!