texts:
After the development of Magento 2 store, I push my site on production mode and perform all the speedup tweak's like merge JS/CSS etc..

After this, my site is working very well without any JavaScript error in production mode.

My client wants to install one more extension in this store.
So I want to ask what is the procedure to follow to install the new extension in production mode site.

Should we install the extension in the production mode without of the JS/CSS merging?
Should we turn off the JS/CSS merging and change the production mode to the developer mode and install the new extension?

Because when we change the production mode to developer mode, we get many JavaScript errors and site not running properly.

Please suggest.


texts: How to show remain item column of an order in shipment pdf?

texts:
I am using Megento 1.9.3

I need to add a column "Remain Item" in shipment PDF. For your convenient I am sharing a sample image:


texts: Hello i want to create own log & stored different location like var/supportlog/test.log instead of var/log/test.log. Kindly reply me


texts:
So here is a strange thing: we uploaded a few thousand products but some products refused to show up in the front end. All products were enabled and had stock inventory. I reindexed a dozen times, cleared cache, tried everything. The products acted like they weren’t enabled, even trying to open them with the url address didn’t work. I finally managed to resolve the issue by disabling, saving and then re-enabling them. With this the products did show up as out of stock products. I changed the quantity, saved and voila the product was there.

Question is: did anybody face this issue and what should I do, because I can’t go over 8000 products enabling them one by one and setting the quantities manually.

Running magento 2.3.1


texts: Magento Observer is not able to run the script

texts:
I have written a script in Magento observer to send the invoice number in my ERP at the time of invoice creation. Below is my script. I am using sales_order_invoice_save_after event for the below job.

public function invoicePull(Varien_Event_Observer $observer){

        $invoice = $observer->getEvent()->getInvoice();
        $InvoiceId = $invoice->getData('increment_id');
        mail('it_magento@mysoresareeudyog.com', 'Invoice Pulled', $InvoiceId);

        $proxy = new SoapClient('http://182.72.91.202/XCerptRef/XCerptService.asmx?wsdl');
        $result = $proxy->PullInvoice(array('InvoiceId' => $InvoiceId));
        return($result);
    }

However, I am able to receive email, but the api script is not working in the above code. The same script I have tested in a separate PHP file in the root of Magento, And that works fine.

Here is my simple php script to run the same job.

<?php

$InvoiceId = 'MSUL000000006757';
$proxy = new SoapClient('http://182.72.91.202/XCerptRef/XCerptService.asmx?wsdl');
$proxy->PullInvoice(array('InvoiceId' => $InvoiceId));

?>


texts: Magento 2 OAuth authentication fails when activating an integration

texts:
I want to create an integration. I have added an integration in System > Extensions > Integrations.
I have added Callback and Identity URL.
When saving, it generates a Consumer Key and Consumer Secret. When I click Activate, the login screen that I added in callback URL it opens and after login,
I get no messages or exceptions in any of the logs in Magento (debug.log, system.log, exception.log) or in any of my external application's log. After the login screen it will says that
"Sorry, we couldn't establish a connection to your Magento store
Please try to 'Activate' or 'Reauthorize' the integration again."
Error reference 160df1fe
Please Help me about this.


texts: I had downloaded a magento theme and uploaded the files into server succefully.Permission for folders are 755 and 644 for css files.Failed to load resource: the server responded with a status of 403 (Forbidden) This is the error showing in console.Please help me to fix it.


texts: Programatically enable Free Shipping and set minimum order ammount for it

texts:
I am writing a custom module, which deals with order creation, for
 multiple stores with free-shipping disabled.

What should I call in my install scripts or add to my config.xml in order to enable shipping_method == freeshipping_freeshipping and set it's minimum order amount to 0 ?


texts:
I just need to apply a check on the default Sort By options. Not on all. only one. That when the user is not login, he cannot sort products by price.
Anyone having any idea how to do it.

Thanks


texts: Send Order confirmation after only order success or failed Magento 2

texts:
Magento 2 is sending order confirmation email right once you click on place order button even if you cancel the payment. If you are using any SMS service it will send order success SMS too. This is not a good idea. What i want i need order success and SMS notification only once after if payment success or failed. Anyone can help me to solve this issue

Thanks in advance


texts: Adding product to cart - productAddToCartForm

texts:
We are running Magento Enterprise 1.12.0.2. This is on a staging and production server. On our production server when trying to add a product to the cart from the popup overlay we are getting the following Javascript error.

Uncaught ReferenceError: productAddToCartForm is not defined.

We are not getting the same error on our staging site.

Looking at cases where other people have had a similar issues we have checked the following.

Checked the code differences between the live and test sites and there are non.
We have also copied the code of the site from our live server to our test and this process works as expected.
Cleared all the cache on the server.

All the above are to no avail.

An example page of where this is broken is http://www.earlyyears.co.uk/physical-and-social-development/winther.
If you click on buy now to get the popup to add an item to basket then action of clicking "Add to Basket " returns the javascript error.

Any other pointers on where to look / how to resolve will be gratefully received.


texts: MAGENTO CONNECT ERROR: Package 'ASchroder_SMTPPro' is invalid './README.md' already exists'

texts:
I am trying to install ASchroder_SMTPPro via Magento connect, but I keep getting the error:

  CONNECT ERROR: Package ' CONNECT ERROR: Package 'ASchroder_SMTPPro'
  is invalid './README.md' already exists

I read online that the way to fix it would be to remove the file in question? How ever being a newbie I have no knowledge where does the connect installer files go? So I thought asking from here.

Could someone be so kind and tell me how to fix the error (do I delete the README.md)? and where is the right README.md located. I am using bitnami magento stack and doing a find search gives me too many results to know which one to delete.

Thank you for your help.


texts: API SOAP V1 - sales_order.list not returning results

texts:
I'm dealing with a Magento Store (CE 1.7) that has over 10M orders.

I am trying to get the full order list through SOAP V1 in order to extract some statistics from it, and i encounter the following problem.

When i run

$result = $soap->call($session_id, 'sales_order.list', array(array('status'=>array('eq'=>'Canceled'))));

echo "
";
foreach($result as $order){
    echo ($order['increment_id'])." - ";        // order number
    echo ($order['customer_id'])." - ";        // customer number
    echo ($order['billing_lastname'])." - ";    // customer last name
    echo ($order['grand_total']);        // grand Total
    echo "
";
}
echo "
";

i sucessfuly get the results (~ 1300 records).

When i try to change 'Canceled' to 'Processing', or 'eq' to 'neq' (expecting about 10M results) i get an error Warning:  Invalid argument supplied for foreach() and if i print_r($result); i get an empty string.


texts:
I want to change www.m2.com/authors/view/index/id/1 to www.m2.com/authors/author_name.html
how can i achieve this
help


texts: How to get collection from other collection in magento 2?

texts:
I making report for my Magento 2 site. My code as below and the result of orderCollection as image.

$sale_order_item_table = $this->_resource->getTableName('sales_order_item');

    $catalog_category_product_table = $this->_resource->getTableName('catalog_category_product');

    $catalog_category_entity_text_table = $this->_resource->getTableName('catalog_category_entity_text');

    $catalog_category_entity_varchar_table = $this->_resource->getTableName('catalog_category_entity_varchar');

    $orderCollection = $this->_salesOrderCollectionFactory->create()
        ->addAttributeToSelect('entity_id');
        //->addFieldToFilter('status', 'complete');

    $orderCollection->getSelect()
        ->joinLeft(
            ['soi' => $sale_order_item_table],
            "main_table.entity_id = soi.order_id",
            [
                'item_id' => 'soi.item_id',
                'order_id' => 'soi.order_id',
                'product_id' => 'soi.product_id',
                'base_row_total' => 'soi.base_row_total',
                'base_discount_amount' => "soi.base_discount_amount"
            ]
        )
        ->join(
            ['ccp' => $catalog_category_product_table],
            "soi.product_id = ccp.product_id",
            [
                'category_id' => 'ccp.category_id'
            ]
        )
        ->join(
            ['ccet' => $catalog_category_entity_text_table],
            "ccp.category_id = ccet.entity_id",
            [
                'kpt_id' => 'ccet.value'
            ]
        )
        ->join(
            ['ccev' => $catalog_category_entity_varchar_table],
            "ccet.entity_id = ccev.entity_id",
            [
                'category_name' => "ccev.value"
            ]
        )
        ->where("ccev.attribute_id = 45 AND ccev.store_id = 1 AND ccet.value IS NOT NULL")
        ->group("kpt_id");

    $saleOrderData = $orderCollection->getData();

    echo $orderCollection->getSelect();
    die;

The result image:

I need count number of item, sum base_row_total, sum base_discount_amount and group by category_id or group by kpt_id (kpt_id is value in catalog_category_entity_text table).

I think to get collection from $orderCollection->getSelect() to do that.

I want expect result:

Please help me, How to do that?
Thanks & Best regards,
BienHV


texts: Does group product can be associated with other group product?

texts: i don't know somehow other group product associated with other group product. so i reassigned, reindexed every group product and single product. how should i do in this case?


texts: Remove existing and assign new categories to existing product while updating it programmatically in magento 2

texts:
How can I remove existing and assign new categories to product programmatically in magento 2 while updating product data.

 <?php

 $newCategoryIds = array(5,6);

 $existingProductId = 25;

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();

 $_product = $objectManager->create('Magento\Catalog\Model\Product')->load($existingProductId);

 $_product->setName('New name xyz'); // Name of Product

 $existing = $_product->getCategoryIds();

 print_r($existing);// Return existing assign categories like Array(3,4)

 $_product->setCategoryIds([]); // Want to remove existing categories so i can assign updated categories but its not working

 $_product->save();

 $_product->setCategoryIds($newCategoryIds); // It's also not remove existing categories.

 $_product->save();


texts: Don't show products that are completely out of stock, but show out of stock sizes

texts:
I want to hide products only if all the sizes are out of stock, but I also want show sizes that are out of stock. I have seen that you can turn on an option in Stores > Configuration > Catalog > Inventory > Display Out of Stock Products (Y/N). When I set this option to Yes, it also shows the completely sold out products.
How can I hide the sold out products, but show the sold out sizes?


texts: Image size via view.xml - possible to set up for category specifically and NOT globally only?

texts:
For Magento 2 a new feature is the view.xml, which allows me to configure image sizes globally. Image sizes on category, product, and basket pages can all be defined within this xml file by width, height, and the ratio (see a short example below).

Now my question is: can I configure images here in this view.xml also solely per categories and not globally?
Backround is, I have 95% of my shop product pictures as main images where 600x600px is enough but for some 5% of the products I would need an image size of 900x1200px but really only for those to be sharp on Retina display.
Does anyone have an idea? I´d be grateful for your info.
Best regards


texts: How to add new extention to magento connect?

texts:
I have followed http://info.magento.com/rs/magentocommerce/images/packagingmagentoconnectextensions6%200.pdf steps add new extension.

when I'm trying to upload my new extension to magento connect its getting below error

Invalid or not allowed image file Mime-Type.

please help me to fix this.


texts:
I have a problem with custom module and displaying custom block template on homepage.

I create a custom module to show product form specified category.

my config.xml file:

<config>
    <modules>
        <Vendor_Module>
            <version>0.1.0</version>
        </Vendor_Module>
    </modules>
    <global>
        <blocks>
            <vendor_module>
                <class>Vendor_Module_Block</class>
            </vendor_module>
        </blocks>
        <models>
            <vendor_module>
                <class>Vendor_Module_Model</class>
            </vendor_module>
        </models>
    </global>
    <frontend>
        <layout>
            <updates>
                <promotedproducts>
                    <file>promotedproducts.xml</file>
                </promotedproducts>
            </updates>
        </layout>
    </frontend>
</config>

my Model file:

<?php
class Vendor_Module_Model_Products extends Mage_Catalog_Model_Product
{
    public function getItemsCollection($valueId)
    {
        $category = Mage::getModel('catalog/category')->load($valueId);
        $productCollection = $category->getProductCollection();
        $productCollection
                ->addStoreFilter()
                ->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds())
                ->addMinimalPrice()
                ->addFinalPrice()
                ->addAttributeToSelect(Mage::getSingleton('catalog/config')->getProductAttributes())
                ->addUrlRewrite();
        return $productCollection;
    }
}

my Block file:

<?php
class Vendor_Module_Block_List extends Mage_Catalog_Block_Product_Abstract
{
    protected $_itemCollection = null;
    public function getItems()
    {
        $catid = $this->getCatid();
        if (!$catid)
            return false;
        if (is_null($this->_itemCollection)) {
            $this->_itemCollection = Mage::getModel('vendor_module/products')->getItemsCollection($catid);
        }
        return $this->_itemCollection;
    }
}

and here is my template file :

<?php $_items = $this->getItems(); var_dump($_items);die; ?>

        <?php foreach ($_items as $_item): ?>

        <?php endforeach; ?>

and here is my custom layout file:

<?xml version="1.0"?>

<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addCss"></action>
        </reference>
    </default>
    <cms_index_index>
        <reference name="head">
            <action method="addCss"></action>
        </reference>
        <reference name="content">
            <block type="vendor_module/list" name="promotedproduct" template="vendor/module/list.phtml"/>
        </reference>
    </cms_index_index>
</layout>

So, when i use

{{block type="vendor_module/list" name="promotedproduct" template="vendor/module/list.phtml" catid="252"}}

in my cms contact page it shows as i expected. but on cms_index_index it does not show. the custom css file is included, but the block does not show. It gives me a warning

  Warning: Invalid argument supplied for foreach()

, and when I use

$_items = $this->getItems()->getData();

it gives me an error that it is type boolean, but using var_dump($_items) on cms_contact shows me object, and var_dump($_items->getData()) shows me array with 4 elements (I have 4 product in this category).

Any help would be appreciated. Thanks in advance.


texts: How to mock an external resource in Magento 2?

texts:
I want to write unit test for a module which contains these functions:

public function abc($Str)
{
    $n = $this->def();
 ...
    return x;
}
public function def()
    {
 ...
        $productRepo= $this->productRepo->get($this->_product->getSku());
...
            return $something;
        }

I have alredy tried to mock a product and pass the sku value of it but every time it gives me this error:

PHP Fatal error:  Call to a member function getSku() on a non-object in...

Here is how I wrote mock for it:

$sku->method('getSku')->willReturn('sku-test');

I have also tried to mock it this way in my setUp() but still getting the error:

    protected function setUp()
{

    $sku = $this->getMockBuilder(\Magento\Catalog\Api\ProductRepositoryInterface::class)
        ->getMockForAbstractClass();
    $skuManager = $this->getMockBuilder(\Magento\Catalog\Api\Data\ProductInterface::class)
        ->setMethods(['getSku'])
        ->getMockForAbstractClass();
}


texts:
In the footer of my theme I've placed a static block, with the code below. But it only echo's the content of the block and not the title, how do I also get the title?

<referenceContainer name="footer">
  <block class="Magento\Cms\Block\Block" name="footer-column-1">
    <arguments>
      <argument name="block_id" xsi:type="string">footer-column-1</argument>
    </arguments>
  </block>
</referenceContainer>


texts: Magento 2 How to upgrade existing custom customer address attribute?

texts:
I have created a module, which creates one custom customer address attribute.
In my attribute I have visible true, Now I need to visible false.
I need to update that attribute.
My code is as below:

public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
    {
        $setup->startSetup();
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
        $customerSetup->updateAttribute('customer_address', 'custom_id', [
           'is_visible'  =>  false,
       ]);

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'custom_id')
        ->setData([
            'used_in_forms' => [],
        ]);

       $attribute->save();
       $setup->endSetup();
}

it's giving error "Unique constraint violation".
How could I update this attribute

Thanks.


texts: Magento 2 How to Get average rating and get rating wise percentage?

texts: How to get the overall average rating and star wise rating into the custom phtml file?


texts: When hit the home page url, it shows contact us page as home page

texts:
I am facing a very unusual scenario for my web site. (https://zitomer.com)

When we try to access homepage https://zitomer.com it displays contact us page as a homepage.

What will be the issue? I am using magento 2.2.6


texts: Magento 2 : UpgradeSchema write mysql trigger

texts:
I am trying to add mysql trigger using the upgradeschema in magento 2 but I am getting the "Cannot execute multiple queries". Below is my trigger

DELIMITER $$

CREATE TRIGGER customerdata_insert_before
BEFORE INSERT
ON customerdata
FOR EACH ROW BEGIN
IF (NEW.longitude IS NULL) THEN
  SET NEW.longitude = `00.000000`;
END IF;
IF (NEW.latitude IS NULL) THEN
  SET NEW.latitude = `00.000000`;
END IF;
  SET NEW.geo_point = Point(NEW.latitude, NEW.longitude);
END;
$$
DELIMITER ;

Please Help.


texts: error while using jsonEncode in magento 2.0

texts:
class Calculator implements CalculatorInterface
{

     public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager

)
{

    $this->_objectManager = $objectManager;

}

$age=array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");

$jsonHelper = $this->_objectManager->get('Magento\Sitemap\Helper\Data');

        $jsonHelper->jsonEncode($age);
}

Error is :

  Fatal Error: 'Call to undefined method
  Magento\Sitemap\Helper\Data::jsonEncode()'


texts: Magento 2 : How to configure smtp mail functionality for magento 2.2 from localhost ubuntu?

texts:
I have installed megaplaza smtp extension for configure mail functionality magento 2.2 but its throwing error during test mail.

I have configured with gmail smtp server.

Can anyone help me regarding this?


texts: Admin page gives 404 error after domain name change

texts:
I have moved a magento store from one server to another and had the domain name changed as well. The front end works fine, the /admin/ just shows the magento 404 page.  I have tried every solution I could find - none have worked.

updating/verifying app/etc/local.xml
scanning the databse dump for instances of old domain name [none]
dumping /var/cache/* /var/session/*
ran this little bit of SQL:

SET FOREIGN_KEY_CHECKS=0;
UPDATE core_store SET store_id = 0 WHERE code=’admin’;
UPDATE core_store_group SET group_id = 0 WHERE name=’Default’;
UPDATE core_website SET website_id = 0 WHERE code=’admin’;
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code=’NOT LOGGED IN’;
SET FOREIGN_KEY_CHECKS=1;

checked .htaccess
server and magento logs, an error shows up in the magento log:

2016-02-26T19:46:43+00:00 ERR (3): Recoverable Error: Argument 1
passed to Mage_Core_Model_Store::setWebsite() must be an instance of
Mage_Core_Model_Website, null given, called in
/var/www/html/app/code/core/Mage/Core/Model/App.php on line 645 and
defined  in /var/www/html/app/code/core/Mage/Core/Model/Store.php on
line 453
2016-02-26T19:46:43+00:00 ERR (3): Recoverable Error:
Argument 1 passed to Mage_Core_Model_Store_Group::setWebsite() must be
an instance of Mage_Core_Model_Website, null given, called in
/var/www/html/app/code/core/Mage/Core/Model/App.php on line 665 and
defined  in
/var/www/html/app/code/core/Mage/Core/Model/Store/Group.php on line
275

Which leads to this:
public function setWebsite(Mage_Core_Model_Website $website)
    {
        $this->_website = $website;
    }

So something is calling the function but not passing in the $website variable.
How do I fix this??


texts: how to change image upload tab section name in magento 2

texts: I want to change "image and video" tab name to "image and documents" and add some custom code to upload documents.


texts: M2 - Integrate an external script tag with parameters in html template of payment method module

texts:
I tried everything possible to integrate this piece of code in my custom payment method module for M2
<form method="POST" action="'.$path.'step2.php">
<script type="text/javascript"
src="https://mybank.com/ui/v2/bankscript.min.js"
data-apikey="'.$publickey.'"
data-amount="2000.00"
data-currency="THB"
data-payment-methods="card"
data-name="MY SHOP NAME"

>
</script>
</form>

This code is supposed to show a Pay Now button.
I have tried to call the js from require-js and method-renderer and the script load, unfortunately I don't know how can I use my script now from the html template file to get this button on the checkout page. Does anyone know how can I achieve that?


texts: Import / Export Shopping Cart Price Rules in Magento 1.9

texts:
I have Magento 1.9.1, and I am wondering if there is anyway to export Shopping Cart Price Rules which is located at Promotions tab and import it into another instance of Magento?

If it is not possible via CSV file, Can I do it from DB level?


texts: one page checkout billing save event is not triggering

texts:
I want save customer register information once billing information saved(click continue button) .for that i created one  module with following files.Please direction me where i'm wrong.thanks in advance.
etc/modules

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

config.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
    <Exinent_Billingtax>
        <version>1.0.0</version>
    </Exinent_Billingtax>
</modules>
<global>
    <events>
              <controller_action_postdispatch_checkout_onepage_saveBilling>
            <observers>
                <auto_register_billing>
                    <type>singleton</type>
                    <class>Exinent_Billingtax_Model_Observer</class>
                    <method>autoRegisterBilling</method>
                </auto_register_billing>
            </observers>
                </controller_action_postdispatch_checkout_onepage_saveBilling>
    </events>
</global>
</config>

Observer.php

<?php
class Exinent_Billingtax_Model_Observer {
    public function autoRegisterBilling($evt){
        if(!Mage::helper('customer')->isLoggedIn()){
            $data = $evt->getEvent()->getControllerAction()->getRequest()->getPost('billing', array());
            echo "<pre>";
            print_r($data);
            $customer = Mage::getModel("customer/customer");
            $email = $data['email'];
            $websiteId = Mage::app()->getWebsite()->getId();
            $store = Mage::app()->getStore();
            $pwd = $data['customer_password'];
            $customer->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email);

            if (!$customer->getId()) {
                 //Code begins here for new customer registration
                $customer->website_id = $websiteId;
                $customer->setStore($store);
                $customer->firstname = $data['firstname'];
                $customer->lastname = $data['lastname'];
                $customer->setEmail($email);
                $customer->setPassword($pwd);
                $customer->sendNewAccountEmail('confirmed');
                $customer->save();
                   }
            Mage::getSingleton('customer/session')->loginById($customer->getId()); // to login that customer.
           }
    }

}


texts:
There are no commands defined in the "setup:static-content" namespace.

Did you mean one of these?

  setup
  setup:config
  setup:cron
  setup:db-data
  setup:db-schema
  setup:db
  setup:di
  setup:performance
  setup:store-config

When Run deploy Command in Magento 2 show error in console?


texts: Magento 2 one page checkout enabled but still multipage checkout

texts:
I have enabled the one page checkout in Magento 2 but still my checkouts are multipage. What should I do to more than setting enabled under stores-sales-checkout options in the Enable Onepage Checkout    box?

Magento 2.1.8

Thanks


texts: How to export all the products that are not assigned to any category?

texts: I am looking for a way to export all the products that are not assigned to any category. I know it can be done using XML, but I don't have enough knowledge in XML to create an Action so is there any easy export products that are not assigned to any category in CSV format?


texts: Magento 2: How to create custom grid report based on Order collection?

texts:
I want to create a new report showed as an option at
Reports -> Sales -> My New Report

This new report should be based on the Orders collection joined to other existing Magento core tables, as well as applying some filters (the columns should be different than the Orders report).
Any idea of how I can achieve this?
Thanks in advance
EDIT
I have been able to add it to the menu as shown in the image:

But when clicking on the page, it shows just the blank page with the title (as expected as I don't have the uiComponent)


texts: Cart rule + taxjar not applying to tax on shipping

texts:
We have a current issue where we are trying to apply a cart price rule to give 100% off for certain customers helping us get our site launched by giving us feedback. The problem is that when the grand total is calculated in the cart, the taxjar plugin is still applying a tax on shipping for qualified destinations based on the standard shipping cost even though the cost to the customer is $0.00 as a result of the price rule.

I have contacted TaxJar on this and while I've let them know I'm not satisfied with their response and opened a ticket/issue on their github to address the problem, their support is currently trying to pass the buck back to me saying I need to make a custom override to their code.

Seeing as how their initial response may bode that they won't enthusiastically try to fix this, I figured I would try just that (make my own override/fix) in the meantime. While they helped me find the point in the code where they are applying the tax to the shipping cost, it is obviously pulling the pre-discounted cost of shipping and I need to know where/how/what I can get the post-discounted cost of shipping. (the amount that is showing in the subtotal in the cart)

Any help is appreciated.


texts: I have facing order issue with magento version (1.9.0.1). I have placed a order from front-end and checked in my account order page as well in backend order page it showing another product with my order. I have order only one product but it showing 2 product in order. Total amount is correct but another user billing and shipping address showing. Where is an issue?


texts: How to fetch and display child of subcategories in list page?

texts:
In list page above the narrow by list filter, I want to display the subcategories of the selected category to be displayed. The Code I use for that is:

<?php
$category = Mage::getSingleton('catalog/layer')->getCurrentCategory();
$categories = $category->getCollection()
        ->addAttributeToSelect(array('name', 'thumbnail'))
        ->addAttributeToFilter('is_active', 1)
        ->addIdFilter($category->getChildren())
?>

        <?php foreach ($categories as $category): ?>

                <a href="<?php echo $category->getUrl() ?>">
                    <?php echo $category->getName() ?>

        <?php endforeach; ?>

But it is displaying only level1 subcategory. I want to display level2 subcategory also. How to do that? Help me.


texts: How to establish connection between Magento 2 and some ERP Software?

texts:
I am working on ERP Magento 2 Connector. I have a query about it

How is it practical to make connection with some ERP through csv formate data. I mean we can create REST/SOAP APIs but how can we tell some ERP about the data coming. Whether from API or it is a CSV file, voice versa how Magento 2 gets response from ERP?

I have just started playing with APIs so any information will be quite helpful.

Here are some facts, I understood:

By default, M2 has just file import/Export ability in csv formate.
We can extend data sharing feature by using REST/SOAP APIs
We can create a module which will be a connecter between M2 and ERP.


texts:
My magento has 2 stores, blue and white.

I have a static block which contains links to cms pages for a left menu.

The static block displays on both stores, but I took one of the cms pages pages off the white store.

Am I able to do some kind of an if statment in the static block to only display the link to that one cms page on blue only, since on the white store it just goes to 404?

Thanks!

EDIT:

in 2columns-right.phtml I have

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

and in page.xml

<block type="core/text_list" name="right" as="right" translate="label">
    Right Column
</block>


texts:
how to make recently view products on all users on magento2
so i wanna make module to show recently view product from every users and located this module to admin page,
how to make this module?


texts: Pass the value of input hidden an add cart to checkout/cart

texts:
I have a question, i have physical stores with a shop code.
When a customer selects from the list a particular store (with fancybox):

I inform under the button add to the basket an input hidden with the code of the store in question in javascript.

How can I add code to the product selected by the customer when he clicks add to cart and find this information in the checkout / cart page?

Can you help or explain me ?


texts: How to prevent module rewrite class conflict in Magento

texts:
I have a class rewrite problem in Magento Onepage Checkout as  I have a custom module in the local code pool and a third party extension in the community code pool both extending the same class...

I've tried to add a depends node to the ModuleA_Name.xml file of one module then extend the class of ModuleB in the Onepage.php file but this hasn't worked.

Could someone give me heads up on how to do this I know there is another way to do it using an Observer but I could really just need a solution at the moment? Also, would it be dangerous for me to use a dependency since ModuleB may only be enabled for different store/views would that mean the dependent module would no longer work?

Thanks in advance for the assistance...

ModuleA

<global>
  <rewrite>
      <moduleA>
          <from><![CDATA[#^/checkout/onepage/#]]></from>
          <to>/moduleA/onepage/</to>
      </moduleA>
      <moduleA>
          <from><![CDATA[#^/checkout/cart/add/#]]></from>
          <to>/moduleA/cart/add/</to>
      </moduleA>
  </rewrite>

ModuleB

<global>
    <models>
      <salesrep>
        <class>ModuleB_SalesRep_Model</class>
        <resourceModel>salesrep_mysql4</resourceModel>
      </salesrep>

      <salesrep_mysql4>
        <class>ModuleB_SalesRep_Model_Mysql4</class>
        <entities>
          <salesrep>

salesrep

          </salesrep>
        </entities>
      </salesrep_mysql4>

      <checkout>
        <rewrite>
          <type_onepage>ModuleB_SalesRep_Model_Type_Onepage</type_onepage>
        </rewrite>
      </checkout>

      <modulebadminthemecontroller>
        <class>LucidPath_SalesRep_Controller</class>
      </modulebadminthemecontroller>
    </models>
</global>


texts: Magento2: Re- trigger total in checkout page

texts:
I have init js and corresponding template in checkout_index_index.

In that template, I have added on checkout after the payment methods.

If I checked the checkbox, I have add a custom fee.

In page-load, I have checked the checkbox using the afterRender method.

But the order total is not reflected with the fee.

How to re-trigger order total when the payment method tab is activated.


texts: Getting Warning include(): Failed opening 'Mage/0/Helper/Core.php' for inclusion

texts:
I am using Fishpig to integrate my blog into my magento installation. It is all working but when I try switching themes I get the following warning and then my theme switches back to the default.

  include(): Failed opening 'Mage/0/Helper/Core.php' for inclusion
  (include_path='/var/www/site/app/code/local:/var/www/site/app/code/community:/var/www/site/app/code/core:/var/www/site/lib:.:/usr/share/php:/usr/share/pear')
  in /var/www/site/lib/Varien/Autoload.php on line 94

Im having a hard time tracking this error down because I can not figure out what the 0 represents in

Mage/0/Helper/Core.php


texts: How I can change the title of SendFriend page

texts:
I've enabled functional, but there is not title by default.

I see only site suffix, like mySite's suffix.
and url like /sendfriend/product/send/id/2059/cat_id/47/

Where is the place of configuring of page title?


texts: magento Default DHL Shipping Method will be good or i should purchase any extension for DHL shipping?

texts: i am using first time DHL shipping so Please suggest me I Should use Default DHL shipping method or purchase any extension.


texts: product export makes backend inaccessible. sql seems to be idle. How to find the bottleneck?

texts:
I'm running a default Magento product export. The shop contain over 30K products. That will take some time - sure! But if I open a new tab to continue working with the backend I just get a blank screen and the browser only continues loading...
If I run

mysql> show processlist;

I see that most of the time mysql is idle. Just one select every 5-7sec. So I assume there is a PHP issue somewhere or a bottleneck in writing the file to the hardrive? How can I check it / How can I improve the speed?
After 20 minutes the export finished and I got a success message. The second tab I had opened shows me a Magento default error message. The report says:

"a:5:{i:0;s:63:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away";i:1;s:2422:"#0 /var/www/html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)"

So is it a mysql issue? But why is mysql idle most of the time? I'm very confused :(

Thank you so much for any help!

PHP Memory limit:
local: 1204M
master: 128M

PHP timeout: 60 sec (master/local)

Apache, PHP 5.3.3


texts: Magento2 : After setup upgrade add extention module error occur

texts:
When i add new featureslider module and run magento setup:upgrade command , this error occur and admin, front page display blank.

  File system cleanup:
  D:/xampp/htdocs/linsenwelt/var/generation/Composer
  D:/xampp/htdocs/linsenwelt/var/generation/Magento
  D:/xampp/htdocs/linsenwelt/var/generation/Symfony
  The directory 'D:/xampp/htdocs/linsenwelt/var/di/' doesn't exist - skipping >cleanup
  Updating modules:
  Schema creation/updates:
  Module 'Ced_FeaturedSlider':

  [ReflectionException]
  Class Magento\Catalog\Model\Resource\Eav\AttributeFactory does not exist

  [ReflectionException]
  Class Magento\Catalog\Model\Resource\Eav\AttributeFactory does not exist

  [Magento\Framework\Exception\LocalizedException]
  Source class "\Magento\Catalog\Model\Resource\Eav\Attribute" for >"Magento\Catalog\Model\Resource\Eav\AttributeFactory" generation does not >exist.

  setup:upgrade [--keep-generated] [--magento-init-params="..."]

Please give a Solution.

Thanks in advance.


texts: How to remove logo from product swatch images in product detail page Magento 2

texts:
I am getting one issue on the product detail page. I have created the configurable product and added the color swatches with images. when I visit the product detail page of those products.

I can see the product images but the transparent website logo is adding on it. Even I don't have the placeholders and any default thumbnails.

How to remove the logo from it

Please find the below image. Any solution for this please let me know if anyone facing this issue


texts: I moved the main server to localhost with subdomain , all the pages are working but static blocks are not displaying in frontend, where i have to change to display the static blocks in frontend


texts: How to add a custom block to the quick cart in Magento 2

texts: I need to add a custom block to the quick cart / mini cart so that a message can be displayed. What XML would I need to amend?


texts: How to add magento meta description programmatically

texts: How to add Magento 1 meta description programmatically. I have to add all product meta description in my Magento 1 store.


texts: Set Block Status from xml and show if its enabled

texts:
Created CMS > Block and display it on product page as tabs following this tutorial

app/design/frontend/[theme]/default/layout/catalog.xml

<block type="catalog/product_view_attributes" name="product.sizes" as="sizes" template="catalog/product/view/sizes.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>Size Guide</value></action>
</block>

From the above code, block title is set from admin and it will be shown as product tab even if its disabled from admin end.

How can we show block only if its enabled from admin and check using
some IF condition in xml ?

Also is it possible to show the title given from admin end rather than setting it from XML file ?


texts: How get the collection of all Discounted Product?

texts:
I need the collection of all discounted Product .  i find 1 table catalogrule_product in which all discounted products entity are available .
How can get these all discounted Products programmatically ?


texts: How to add a custom template for fieldset in ui-component form in magento 2

texts: I have two filed sets in ui component form , Now I wish to Add custom template for one of the field set.Is it possible in uicomponent form to add custom template for a field set. Please provide me a solution


texts: Overriding Blank Theme Styles in Magento 2

texts:
How would you go about overriding the navigation styles for a custom theme when inheriting from the blank theme in Magento 2?

I have a theme.css file in my app/design/frontend/<Vendor>/<theme>/web/css folder, but I am aware that Magento 2 uses LESS. I can easily override the styles within my theme.css stylesheet, but I don't want to have to keep using !important.

Also, I am using Bootstrap 3, and I'm assuming that the styles from the blank theme will override any style instructions that match in Bootstrap. What is the best way to approach this?


texts: Shipping method no longer shows after update

texts:
Magento ver. 2.2.6

The store has been operational for some time with several shipping methods. Most of these were disabled for covid, with the remaining one having its name and price changed.

Have tried refreshing page and config caches and even flushing the magento cache but the remaining method still doesn't appear in checkout.

The module is a basic flat rate type that just returns the price when it's active


texts: Magento 2.2.1 export products all store views

texts:
just tried to do an export of all products from all store views. But it just does export the Default products. Do I miss something? Any idea how to export all the products?
Thanks.


texts:
I'm still having issues with adding some custom .css file to my custom theme in Magento 2.2.2

I have followed the known steps like: (I'm using the Claue theme)

Put magento in developer mode
In this file: app/design/frontend/Mgs/claue/Magento_Theme/layout/default.xml I've added this line: <css src="css/file_custom.css"/>
I've created the file_custom.css in: app/design/frontend/Mgs/claue/web/css
When I deploy the files the css file is generated in: pub/static/frontend/Mgs/claue/nl_NL/css as "file_custom.min.css".

But I can't get it to load... What am I doing wrong? Do I need to deploy the files in the first place when I'm in developer mode? I think I don't :) But how can I get Magento to load the file so I can add some custom styling?

Regards,
Robert


texts:
I have a custom module which does same function of product view page. I am using this module in order to show my bundle products. i have created a fully functional module for this.

I have loaded the product successfully and displayed products name,description, different options in my page. However my add to cart button is not working.

I am loading my product like this

<?php
/*getInternationalPlans() is a custom function which filter out bundle products that
  satisfy certain conditions. there may be more than one bundle products for this
  function
 */
$_product=$this->getInternationalPlans($custom_select_business);
foreach ( $_product as $product ){
$plan_array [] = $product->getId ();
}

?>
<?php
 /*it unregisters the product  */
  Mage::unregister ( 'product' );
  Mage::register('international_product',$plan_array[0]);// i need only the first product
/*  loading the current product*/
  $_product=Mage::getSingleton('catalog/product')->load($plan_array[0]);
 /*registering the current product*/
 Mage::register('product', $_product); // add the product object in the registry
 $block = Mage::getBlockSingleton('Mage_Catalog_Block_Product_View'); // Instantiate the product view block

?>

but in default product view page prdoucts are loading using getProduct() method.
my form is like this... which is exactly same as that of default one

 <form action="<?php echo $this->getSubmitUrl($_product) ?>" method="post"
 id="product_addtocart_form"
  <?php if($_product->getOptions()): ?> enctype="multipart/form-data"
 <?php endif; ?>>
       /*all options are showing here*/
      /*...................................*/
         $buttonTitle = $this->__('Order Now');
         <button type="button" title="<?php echo $buttonTitle ?>" id="international_btn" class="btn btn-success" onclick="productAddToCartForm.submit(this)">
 </form>

However the action part of form is blank, after I load this code. when I click on the button, it loads the same page again and during consoling it says that 'productId is not defined'. So I have checked 'productAddToCartForm ' definition and found out that it uses 'productId' in its definition. How can I set 'prdouctId'  in my page? why form action field is empty?

how can make my order now button work perfectly?

Please help me...


texts: Magento CE 1.8 - Catalog Prices : Including Tax not working as intended

texts:
Please note this isn't a tax rounding issue - it's functionality not working as intended.

I've just installed 1.8 to start developing a new site and am setting it up for use in Australia. Here, GST (tax) must be visible and included in the advertised price throughout the entire process, but a subtotal is needed showing tax amount (10%).

I also input the price of the goods as including tax. E.g:
A product has it's price field entered at $100. This is $100 including Tax.
Therefore the catalog / checkout prices must be $100, and the tax calculation breakdown must be

Subtotal $90.91
Tax $9.09
Total = $100

(Note: subtotal isn't required, only tax and total).

My tax settings are as follows.

Tax Classes

Tax Class for Shipping : Shipping

Calculation Settings

Tax Calculation Method Based On : Unit Price

Tax Calculation Based On : Shipping Address

Catalog Prices : Including Tax

Shipping Prices : Including Tax

Apply Customer Tax : Before Discount

Apply Discount On Prices : Including Tax

Apply Tax On : Custom Price If Available

Default Tax Destination Calculation

Default Country : Australia

Default State : *

Default Post Code : *

Price Display Settings

Display Product Prices In Catalog : Including Tax

Display Shipping Prices : Including Tax

Shopping Cart Display Settings

Display Prices : Including Tax

Display Subtotal : Including Tax

Display Shipping Amount : Including Tax

Include Tax In Grand Total : Yes

Display Full Tax Summary : No

Display Zero Tax Subtotal : No

No matter what arrangement I have them, it will either display the prices as if they have been entered not including tax. i.e. the example prices will display as $110 in catalog and cart.
Or they will display correctly, but then tax will be added onto that total and it will still come out at $110.

It's like magento is not recognising the setting Catalog Prices : Including Tax which is defined as "Whether catalog prices entered by admin include tax."

Am I doing something wrong or is this a bug?


texts: Magento 1.13.1.0 New Website/Store creation Website/Store Name not stored

texts:
While trying to create a new website via System->Manage Stores on an existing magento install with a website already existing on it. And when editing and existing website/stores name.
The save overwrites the existing name and stores it as null.

The same happens for the store save and the store view save.
I have seen this happen on 3 separate installs of this version of enterprise.
This does not appear to be an issue on the CE equivalent 1.8 at least not 1.8.0.0

This could also be created by similar extension between my different installs.


texts:
I am trying to display the search result sorted by attribute_set_id.

I want to display them with the title as the name of the first attribute_set and then all the products that belong to attribute_set_id 1 and then title of attribute_set 2 and then the products in attribute set 2.

Any one got an idea on how i can make this happened?

I have tried to sort the result list by the following code

<?php $_productCollection = clone $this->getLoadedProductCollection();

$_productCollection->clear()
    ->addAttributeToSelect('*')
    ->addAttributeToSort('attribute_set_id', 'DESC')
    ->load();
?>


texts: Save Button Do nothing and does not work in my backend

texts:
My magento admin area does not save anything, whenever i do any activity either in configuration , editing some code in home page or even re-index , the message shows up like it is saved but its not saving there and just refreshes the page. But if after clicking save, i log out from admin area and again login, changes shows up but then also it does not reflect on my frontend.
I'm not getting what kind of issue is this and not getting any solution for same.
I m facing this problem for two days now, it was all good till then.
Some body please help me with this.


texts:
I want to show one product on home page. The product should be shows same as on product view, not like list view.

I can get name and sku of product in above code but I don't know how to show custom options of product.

<?php

$obj = Mage::getModel('catalog/product');
$product_id = 8;
$_product = $obj->load($product_id);

echo $_product->getName();

?>

You can see the image what I want. That I can see the one product on home page.

Could you help me?


texts: I want get Product_id from 'sales/quote_item' but only i have quote_id not Item_id?

texts:
The do so i have used below code but it iswn't working

 $productId = Mage::getModel('sales/quote_item')
                           ->addAttributeToSelect(array('product_id'))
                           ->addAttributeToFilter('quote_id', array('eq' => $quoteid))
                            ->load();


texts: How to get all products collection for special category

texts:
I am looking for function which is similar to getLoadedProductCollection and which retrieves all products from this category with selected filters, not only those I can see on current page like getLoadedProductCollection do.

I've tried to do:

$productCollection = Mage::getModel('catalog/product')->getCollection()
                         ->addAttributeToSelect('sku')
                         ->addAttributeToSelect('collection_price')
                         ->addAttributeToSelect('price')
                         ->addAttributeToSelect('special_price')
                         ->addAttributeToSelect('name');

But it retrieves all products from whole store, not only products from current category with selected filters. Any ideas?


texts: Magento2 - fastest way to save product after several calls to addImageToMediaGallery() method

texts:
We had several issues when trying to build a catalog for a customer using native Import/Export functionality. Unfortunately it seems Magento2 has some difficult to download & process cloudfront.net images, so we wrote our own command to manage that

Process is working fine, problem here is we need to call about 10 times addImageToMediaGallery() for each product. That calls are processed in a reasonable time, but then, at the end when calling the product save... it takes a long time

We have other processes to update product information (text attributes, stock data, etc...) in this project, and they all run fast, so it seems clear there is something about image processing which kills the save process performance

Our relevant code would be this

foreach ($parseData as $row) {

    // I omit the part where we get $sku from $row...
    // $productRepository -> Magento\Catalog\Model\ProductRepository
    $product = $productRepository->get($sku);

    // Delete existing Magento images from DB and filesystem
    $existingMedia = $product->getMediaGalleryEntries();
    if (is_array($existingMedia) && count($existingMedia) > 0) {
        foreach ($existingMedia as $existingMediaItem) {
            // $galleryProcessor -> Magento\Catalog\Model\Product\Gallery\Processor
            $galleryProcessor->removeImage($product, $existingMediaItem['file']);
        }
        $productRepository->save($product);
    }

    // Import new images
    $product->setMediaGalleryEntries([]);

    foreach ($row as $i => $remoteImage) {
        // I omit the part where we download, save to filesystem & get $image
        // and the logic to set the right attributes in $media variable
        $product->addImageToMediaGallery($image, $media, false, false);
    }

    // and finally... the kill of performance...
    // all previous code runs reasonable fine, no need to change anything
    $productRepository->save($product);
}

We have tried different ways, $product->save() was our first try (same kill of performance)

So, any tips to save the product in a decent time? Is there any way to update image attributes values using something like \Magento\Catalog\Model\ResourceModel\Product\Action::updateAttributes, which works perfect & fast?

This is CE 2.3.0 version, by the way


texts: Magento ver 1.8 - Unable to upload images

texts:
I am new to magento and I am facing a problem with Magento ver. 1.8.0.0. Image import is working fine but when I try to upload image it don't  work. My cache is disabled and media folders is 777. I have added front end and back end screenshots for you to have a look.

Any help will be really appreciated.

Thanks
AM


texts: How to insert additional block in create order page (magento2 admin side order) after billing/ shipping address**


texts:
I typed in Plain Back and I did not see any results for plain back until page 12.

Looks like it searched for back first and then gave me the results for "plain back" together.

I only want exact Plain Back should be search.

Current back end setting for search :
Search Type = Fulltext


texts: Magento : How to Setup Advanced Search in Multicurrency Shop

texts:
I have Magento 1.9 shop with 2 languages (English and Russian) and 2 currency - Euro and RUB (Russian rubles). Currency rate setup correct and in product page I see correct price for both currency.

But in advanced search I need select products by Price, dependency by currency.

Now this search work normal only for one of currency - RUB.
Then I switch to English site, search result for Price show me products with my wishes price, but in RUB, not in Euro...

For example - products have a cost 6300 RUB, in my currency rate it's equal 100 Euro.

In Russian version of site everything works fine but in English I setup Price to 100 Euro. In results, I see all products with price unlit 100 RUB, instead of 100 Euro.


texts:
where is products images column in magento2 database? i want to make a querey to check those products who haven't images wont come and products with only images comes on my homepage product list .

please elaborate if anybody knows : i figured out this table

(select * from catalog_product_entity_media_gallery)

there are some images inside this table , thanks


texts: Magento 1.9.3.6 : Product Will Not Display On Front End Of Website

texts:
I have a weird issue.

I bulk uploaded 1,300 products and they display properly in the database.

However, they do not display on the front end of the website. I have the Manage Stock setting at "Yes" and the "Use Config Settings" checked.

My global config settings are "Yes" as well.  Now, if I unclick the "Use Config Settings" in the individual product setting, then click it again, the products show in the front end.

I am not sure why this is happening.

I have another 7,000 products to upload and do not want to do this for each of them to get them to display.

Does anyone have any suggestions as to why this is happening?

Thanks.


texts: Virtual Server - php 5.4 SQLSTATE[HY000] [2002] No such file or directory

texts:
i have an virtual server with a preinstalled php version 5.3.
With this version of php my website works correctly. Now i have compiled a new php version 5.4 as cgi application. If i change my domain to the new php version i will get following error in the frontend:

SQLSTATE[HY000] [2002] No such file or directory

Trace:
#0 lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 lib/Varien/Db/Adapter/Pdo/Mysql.php(320): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(360): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php(134): Mage_Core_Model_Resource_Db_Abstract->getReadConnection()
#12 app/code/core/Mage/Core/Model/Config.php(1348): Mage_Core_Model_Resource_Db_Collection_Abstract->__construct(Object(Mage_Core_Model_Resource_Website))
#13 app/code/core/Mage/Core/Model/Config.php(1380): Mage_Core_Model_Config->getModelInstance('core_resource/w...', Object(Mage_Core_Model_Resource_Website))
#14 app/Mage.php(491): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#15 app/code/core/Mage/Core/Model/Abstract.php(208): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Resource_Website))
#16 app/code/core/Mage/Core/Model/Abstract.php(213): Mage_Core_Model_Abstract->getResourceCollection()
#17 app/code/core/Mage/Core/Model/App.php(608): Mage_Core_Model_Abstract->getCollection()
#18 app/code/core/Mage/Core/Model/App.php(466): Mage_Core_Model_App->_initStores()
#19 app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Model_App->_initCurrentStore('', 'store')
#20 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 index.php(87): Mage::run('', 'store')
#22 {main}

I have shorten the directory pathes.

I know this is a connection error to my database. But for me it doesn´t make any sense. In a subfolder i have also a typo3 installed. With typo3 i don´t have any problems regarding the database connection.

Is this error known by anyone of you?


texts: How to find possible config settings for UI Components

texts: For the UI components, I see nodes for data/config and data/js_config. It seems like a lot of components have this option. How do I find the possible values available to be set for each component? Is there any type of guide?


texts: Level 4 category URL redirects to Level 3

texts:
In some categories of my Magento webshop I have 4 Levels in my menu. The problem is that every Level 4 category menu item is being redirected to the Level 3 Menu item on top. I've already tried empty the core_url_rewrites in the database and reindex, but that doesn't work. It only happens on the 4th level. All other menu-items work fine.

Any ideas how to fix this? Here's the webshop: https://www.hoesjesonline.nl

EDIT: I've tried it with a Level 5 menu-item and then I just get to the Level 5 menu-item. Level 4 still doesn't work.


texts: Get product collection by store ID on Magento 2.2

texts:
I want to get all products by store ID, so I'm doing it like this

return $this->productCollection->addStoreFilter(27);

productCollection is

  Magento\Catalog\Model\ResourceModel\Product\Collection

but instead, it returning the products by store, it returns all the products of all stores.

so can you please let me know how can I get only the product which belongs to store ID 27 or any given ID?


texts: How to get custom field value in reorder functionality

texts:
I added custom_image field in sales_flat_quote_item  and sales_flat_order_item tables using installer script.

I have added below code in my config.xml file.

All product is having unique value in custom_image field.

<global>
    <fieldsets>
        <sales_convert_quote_item>
            <custom_image>
                <to_order_item>*</to_order_item>
            </custom_image>
        </sales_convert_quote_item>
        <sales_convert_order_item>
            <custom_image>
                <to_quote_item>*</to_quote_item>
            </custom_image>
        </sales_convert_order_item>
    </fieldsets>
</global>

Getting correct value in to order item but while doing reorder functionality this custom_image field value is getting null.

How to get value of custom_image in sales_flat_quote_item table while doing reorder?


texts: I'm newbie in Magento and as a newbie my first question is how to download magento. I tried it from the official website but it does not get downloaded. I want to download latest version of Magento with and without sample data to learn. I created the account and when I press the download button it takes too much time and throws error.Is there anything I'm missing to download from the official website.


texts: Magento delete my images after an import of products

texts:
I am having a problem with magento. When I do an import of my products with magmi everything goes correctly well.
But I am having a little problem magento removes images on some product. Why he did this?
I show you a video of this problem: https://www.youtube.com/watch?v=mrYtAq3qcI8

If you look good, when I select only the color images images appear But when I select a size and a color the first two color image black images appear and when I select the last two color image does not appear.

Do you know why I have this problem?


texts: what should i do to get my emails worked in magento 2

texts: The client gets email when they create account. but later they don;t get any emails during purchasing. i dont want to use extensions.


texts: Cart total doesnt update after remove an item programatically Magento 2

texts:
Events.xml

<event name="controller_action_postdispatch_customer_account_loginPost">
       <observer name="customer_login_observer" instance="vendor\module\Observer\Customercart" />
 </event>

Customercart.php

<?php

namespace vendor\module\Observer;

class Customercart implements \Magento\Framework\Event\ObserverInterface
{
public function __construct(
         \Magento\Framework\Message\ManagerInterface $messageManager,
         \Magento\Checkout\Model\Session $session,
     \Magento\Customer\Model\Session $customerSession,
        )
    {
         $this->_session = $session;
    $this->_customerSession = $customerSession;
         $this->_messageManager = $messageManager;
    }
public function execute(\Magento\Framework\Event\Observer $observer)
{
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/teqwewq.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        if($this->_customerSession->isLoggedIn()){
          $customerId=$this->_customerSession->getCustomer()->getId();
        }
        $currentQuote=$this->_session->getQuote();
        $currentQuoteItems=$currentQuote->getAllVisibleItems();
        $currentQuoteItemSku = array();
        foreach ($currentQuoteItems as $currentQuoteItem) {
                   array_push($currentQuoteItemSku, $currentQuoteItem->getSku());
                   $logger->info($currentQuoteItem->getSku());
                }
          $logger->info("-------");
        $clbStatus=false;$normalProductStatus=false;
        foreach($currentQuoteItemSku as $value){
          if($value=="some1" || $value=="some2"){
            $clbStatus=true;
          }
          else{
            $normalProductStatus=true;
          }
        }
        $logger->info($normalProductStatus);
        $logger->info($clbStatus);
        $currentQuote->setTotalsCollectedFlag(false)->save();
        if($clbStatus && $normalProductStatus){
        foreach ($currentQuoteItems as $currentQuoteItem) {
                        if($currentQuoteItem->getSku()=="some1" ||$currentQuoteItem->getSku()=="some2"){
                            $itemId = $currentQuoteItem->getItemId();
                            $currentQuote->deleteItem($currentQuoteItem);//->save();
                        }
                }
        }
        $currentQuote->collectTotals()->save();
        return $this;

}
}

Screen shot ref https://nimb.ws/qSPujg

The subtotal does not change on the cart and also in the window.checkoutConfig.quoteData.base_grand_total

eg

A product $40

B product $20  // removed

subtotal $60  //remains same - after a refresh , even go to checkout

Any suggestion?


texts: Move Magento "Store View Name" to "Store Name"

texts:
we setup three store Store View Name's a long time ago when this should have been Store Name's.

We are now busy rolling out multi-language and this is where I discovered the mistake.

Is there an easy way (and how) to move a Store View Name to a Store Group Name (1 up in the hierarchy)

Website             Store Group       Store View
------------------------------------------------
www.domain.com      domain.com        store1_NL
www.domain.com      domain.com        store2_NL

becomes

www.domain.com  store1      NL
www.domain.com  store2      NL
...
www.domain.com  store2      EN
www.domain.com  store2      DE
etc

Thx!!


texts: SQLSTATE[23000]: Integrity constraint violation issue V1.9.4

texts:
Thanks for taking the time to look!

Basically i have not changed anything in my magento for a few months i come to add a new product yesterday and got this error.

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1321-1' for key 'UNQ_mg_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID', query was: INSERT INTO `mg_cataloginventory_stock_item` (`product_id`, `stock_id`, `qty`, `use_config_min_qty`, `is_qty_decimal`, `use_config_backorders`, `use_config_min_sale_qty`, `use_config_max_sale_qty`, `is_in_stock`, `low_stock_date`, `use_config_notify_stock_qty`, `use_config_manage_stock`, `stock_status_changed_auto`, `use_config_qty_increments`, `use_config_enable_qty_inc`, `is_decimal_divided`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, '2016-10-04 14:00:37', ?, ?, ?, ?, ?, ?)

When I make a new product when I save it I am greeted with this error, I have had a look around google and cant seam to find a problem that is the same as mine.

Any help or a point in the direction of help would be most appreciated!


texts: Share 50off coupon with friends and earn wallet 50 when that friend use that coupon on checkout

texts: I want to share a coupon 50off with friend and when that friend uses that coupon they will earn 50 as wallet money .how do i do that on magento 1?


texts: How to create a mysql view in Magento 2 programmatically

texts: Is it possible to create a mysql view in Magento 2 just like we create table in InstallScheme.php. I want to create a view which will be a join of multiple table with selected columns.


texts: Magento 2: Adding a color picker as an attribute to a product form

texts:
Please tell me how you can add a color picker as an attribute to the product form.
I tried several options from the Internet, well, they did not work.


texts: how to get index page in magento while using event observer?

texts:
when am creating a customer in magento (before creating the event observer),

after click on the register the following screen will appear.

after adding observer,the page link goes to
  http://mgstore/customer/account/createpost/
 and gives output of the observer.
how can i skip this step,and how can i get normal page like dashboard given above.


texts: variable from CREDIT MEMO transactional email

texts:
Credit Memo # {{var creditmemo.increment_id}} for Order # {{var order.increment_id}}

  Does someone know what file do these variables come from?

I need to add functions and variables but I don't know where they are located.

Thanks.


texts: Extend product custom options select when checked

texts:
I want to extend the default code of the file /app/code/local/Mage/Catalog/Product/View/Options/Type/Select.php

So that the
 of the custom options got a specific class when selected.
So when a option (radio button) is checked, it should add class="checked" to the opper
.

Already tried this, but that did not added the class when checked:

$spanClass = "input-radio";
if ($checked) {
    $spanClass = "input-radio checked";
}

''

How can I achieve this?

CODE:

        $htmlValue = $_value->getOptionTypeId();
        if ($arraySign) {
            $checked = (is_array($configValue) && in_array($htmlValue, $configValue)) ? 'checked' : '';
        } else {
            $checked = $configValue == $htmlValue ? 'checked' : '';
        }
        $spanClass = "input-radio";
        if ($checked) {
            $spanClass = "input-radio checked";
        }

        $selectHtml .= '
' . '<input type="' . $type . '" class="' . $class . ' ' . $require
            . ' product-custom-option"'
            . ($this->getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"')
            . ($this->helper('core')->currencyByStore($_value->getPrice(true), $store, false) ? '0' : ' checked="checked"')
            . ' name="options[' . $_option->getId() . ']' . $arraySign . '" id="options_' . $_option->getId()
            . '_' . $count . '" value="' . $htmlValue . '" ' . $checked . ' price="'
            . $this->helper('core')->currencyByStore($_value->getPrice(true), $store, false) . '" />'
            . 'getId() . '_' . $count . '">'
            . $this->escapeHtml($_value->getTitle()) . '' . $priceStr . '';
        if ($_option->getIsRequire()) {
            $selectHtml .= '';
        }
        $selectHtml .= '
';


texts: Magento 1.9, Order email found in core_email_queue, but not sent out

texts:
I have Magento 1.9 website, and the order emails have always been working. But about just a few days a ago I noticed that the order confirmation emails are not sent out to customers.

I have set cronjob up like this,

*/5 * * * * /opt/alt/php56/usr/bin/php /var/www/public_html/webshop/cron.php > /dev/null

I have installed AOE scehduler, and it looks like this,

And in table cron_schedule, every thing also looks as usual.

And this is how the table core_email_queue looks like,

I have tried to clear the table cron_schedule, but it didn't help. And I haven't changed any setup in Magento. What more can I diagnose with?


texts: Programatically add Item to Quote with Tax Information

texts:
I've been reviewing options for programmatically adding an item to a customer's quotation on the final stage of checkout (by selecting a tick box) which adds a simple product to the customer's order (a free product catalogue).

The code below works perfectly for adding the item within Magento, I'm simply having issues further down the line syncing this to another system due to missing fields in the sales_flat_order_item table.

Basically, when adding this free item in the admin by SKU rather than programmatically it assigns values to the following fields...

base_original_price
tax_percent
tax_amount
base_tax_amount

There are a few others but these are the ones I believe I require. When adding by using the check box these fields are added as 'NULL'.

Below is the code currently in place to add the item to the quote as the order is placed...

public function addCatalogToOrder(Varien_Event_Observer $observer)
{
    $event = $observer->getEvent();
    $quote = $event->getQuote();
    $enabled = Mage::helper('catalogrequest')->isCatalogEnabled();
    $request = Mage::app()->getRequest()->getPost('add_catalog');

    if(!$request)
    {
        return false;
    }

    if(!$enabled)
    {
        return false;
    }

    if(!$quote->getId())
    {
        return false;
    }

    $sku = Mage::helper('catalogrequest')->getCatalogSku();
    $id = Mage::getModel('catalog/product')->getIdBySku($sku);

    $product = Mage::getModel('catalog/product')->load($id);
    $qty = 1;
    $quote = Mage::getSingleton('checkout/session')->getQuote();
    $quote->addProduct($product, $qty);
    $quote->save();
}

Any idea's to populate those fields would be greatly appreciated.


texts: "Unique constraint violation found" Error When Assign Product into Category

texts:
After Assign Product Into Category Getting Error Unique constraint violation found

In exception.log file :-

  [2019-05-31 17:53:29] main.CRITICAL: Unique constraint violation found
  {"exception":"[object]
  (Magento\Framework\Exception\AlreadyExistsException(code: 0):
  Unique constraint violation found at
  /var/www/html/m2shineretrofits/vendor/magento/framework/EntityManager/Operation/Update.php:121,
  Magento\Framework\DB\Adapter\DuplicateException(code: 1062):
  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  'root-category/sub-category/product-url' for
  key 'URL_REWRITE_REQUEST_PATH_STORE_ID', query was: INSERT  INTO
  url_rewrite
  (redirect_type,is_autogenerated,metadata,description,entity_type,entity_id,request_path,target_path,store_id)
  VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?,
  ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?,
  ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?),
  (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?,
  ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?, ?), (?, ?, ?, ?, ?, ?, ?, ?,
  ?),

Also Try This Solution But Not Working :-

Add categories automatically - Unique constraint violation found

Magento 2 Unique Constraint Violation Found On Product Save

Magento 2 : Unique constraint violation found when adding product, categories or mega menu items


texts: Magento 2 | Varnish cache pages per session

texts:
We have a magento 2.2.6 shop, with 20k products. We use varnish for fpc. It is configured properly, and we can verify by visiting a page two times. The second time the ttf is really low. Problem is that in another session, the page is not cached so on first request ttf is really big.

Notice that we use the default exported vcl for varnish 5. We had another problem, while implementing magento vcl and we had to remove the health_check.php from vcl.


texts: Magento2 strange issue missing billing address

texts:
I am facing a strange issue, where orders are missing billing address, I have noticed it is due to user lands on paypal review page
After visiting the paypal review page then order is placed but no billing address, how am I suppose to solve this.
Please advice


texts: Static content doesn't load with nginx, works with apache

texts:
I'm setting up a staging server for a server that's already in production and functioning with Apache. My staging I'm setting with nginx because I want to test the performance difference.
When I access the store, no CSS/JS/images get loaded and I get a lot of "not found" on nginx error log.
All errors are like this:
2021/01/22 19:09:18 [error] 248516#248516: *26 open() "/var/www/html/WEBSITE/pub/static/version1611342481/frontend/Nexa/STORE/fr_CA/Magento_Catalog/images/product/placeholder/image.jpg" failed (2: No such file or directory), client: redactedIP, server: http://URL/, request: "GET /pub/static/version1611342481/frontend/Nexa/STORE/fr_CA/Magento_Catalog/images/product/placeholder/image.jpg HTTP/1.1", host: "WEBSITE", referrer: "WEBSITE/category/subcategory/product.html"

(redacted because of NDA)
There's no folder version1611342481 inside pub/static, but there's no folder like that as well on production server and it's working alright. Same code and versions on both.
How can I debug/solve this?


texts:
I'm trying to add an already created custom attribute to the admin order review page. So far I managed to find this function but I don't know what should I change in order to display my attribute, instead of SKU.

public function getItemsHtml()
{
    return $this->getChildHtml('order_items');
}

What I have and what I'm trying to accomplish


texts:
I am running Magento 1.9.3.8 on EC2, database running MariaDB 10.1.34 on separate AWS - RDS instance which is db.r5.xlarge
vCPU: 4
RAM: 32 GB

I have defined various MYSQL variables under custom RDS parameter like group query_cache%, innodb_buffer_pool_size and some other variables but I think due to values unit differences or what I am unable to find any better performance after rebooting RDS and applying changes.
I found this post helpful, where you can define some dynamic values like
sort_buffer_size, value={DBInstanceClassMemory/64}
innodb_additional_mem_pool_size, value={DBInstanceClassMemory/64}

Does anyone have any kind of custom RDS parameter group optimized for best performance? especially for Magento 1.9.x?


texts: How to get value for API URL from other custom module

texts:
I am created a custom module A(google business Review API) for getting reviews, for get store specific review i want to pass my store code to the API URL, i am using amasty store module B, there is i am created custom attribute and saved my store code, how to pass this store code to my another custom module A(google business Review ) API URL.
In module B after enter store code attribute if i click save button then the value pass to my Module A there i can get my attribute and pass to my API URL.
How to achieve this?


texts: Magento module not calling install script, to create attribute for category

texts:
I am creating module in magento 1.9.1, to create a attribute for categories. I have created files as follows:

  app\etc\modules\Ddevs_Ebayaff.xml

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

I am trying to call controller and mysql install script in one config file as follows

  app\code\local\Ddevs\Ebayaff\etc\config.xml

 <?xml version="1.0"?> <config>
        <modules>
            <ddevs_ebayaff>
                <version>
                    0.1.0
                </version>
            </ddevs_ebayaff>
        </modules>
          <frontend>
            <routers>
                <helloworld>
                    <use>standard</use>
                    <args>
                        <module>Ddevs_Ebayaff</module>
                        <frontName>ebayaffload</frontName>
                    </args>
                </helloworld>
            </routers>
        </frontend>
     <global>
     <resources>
        <add_category_attribute>
            <setup>
                <module>Ddevs_Ebayaff</module>
                <class>Mage_Catalog_Model_Resource_Setup</class>
            </setup>
        </add_category_attribute>
    </resources>

</global>
     </config>

In IndexController, i have the following content

  app\code\local\Ddevs\Ebayaff\controllers\IndexController.php

<?php
class Ddevs_Ebayaff_IndexController extends Mage_Core_Controller_Front_Action{
    public function indexAction(){
           $this->loadLayout();
            $this->renderLayout();
}
}

And my install script as follows:

  app\code\local\Ddevs\Ebayaff\sql\add_category_attribute\mysql4-install-0.1.0.php

<?php
$this->startSetup();
$this->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'ddev_ebayaff_cat', array(
    'group'         => 'General Information',
    'input'         => 'text',
    'type'          => 'text',
    'label'         => 'Category ID',
    'backend'       => '',
    'visible'       => true,
    'required'      => false,
    'visible_on_front' => true,
    'global'        => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
));

$this->endSetup();


texts: Magento 2: file_get_content() is not working on server

texts:
I have used file_get_content() in my Magento 2 and it response data in my local system, but once I upload file to server it returns empty data
I also check allow_url_fopen=on and my PHP version is 7.2 for both local as well as server
Does anyone have an idea what is the exact problem or any other alternative?


texts: Magento Observer - Check if event was fired from Magento's SOAP API

texts:
I am currently developing a custom Magento extension (Magento CE 1.7) that will use the Magento observers, to send data back to a custom ERP solution when certain events are triggered.

However, this ERP solution also uses the Magento SOAP API to update information back to the website (two-way syncing system).

My question is, in my Magento Observer, how can I tell if the following events are being triggered by the Magento SOAP API calls from the ERP versus user interaction in the frontend/backend of the website?

Events I would like to check if being called via API:

sales_order_save_after
catalog_product_save_comit_after

I have searched all of the SO boards and seen several similar questions, however none of them appear to have been answered.

Thank you ahead of time!


texts: How do I check my override Model is working?

texts:
I wrote an override to \vendor\magento\module-sales\Model\Order\Pdf\AbstractPdf.php

I did enable my override, I did run magento setup, di compile and flush the cache. Everything went smooth. But seems still using the old AbstractPdf.php. I don't see anything from the log, what can I do about it?

Thank you

Update Question
I want to override AbstractPdf class in magento2

Here is my code

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">
    <preference for="Magento\Sales\Model\Order\Pdf\AbstractPdf" type="ProjectA\ShipmentPdf\Model\Order\Pdf\AbstractPdf" />
</config>

AbstractPdf.php(ProjectA/ShipmentPdf/Model/Order/Pdf/AbstractPdf.php)

<?php

// @codingStandardsIgnoreFile

namespace ProjectA\ShipmentPdf\Model\Order\Pdf;

// use Magento\Eav\Model\Entity\Attribute as EntityAttribute;
// use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
// use Magento\Framework\DB\Select;
// use Magento\Framework\Model\AbstractModel;
// use Magento\Framework\App\Filesystem\DirectoryList;
// use Magento\Framework\DataObject;

/**
 * Sales Order PDF abstract model
 * @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class AbstractPdf extends \Magento\Sales\Model\Order\Pdf\AbstractPdf
{

    /**
     * Insert logo to pdf page
     *
     * @param \Zend_Pdf_Page &$page
     * @param null $store
     * @return void
     * @SuppressWarnings(PHPMD.CyclomaticComplexity)
     */
    protected function insertLogo(&$page, $store = null)
    {
        echo "override";die;
    }

}

Before I was modify on the core and its work, then I roll it back and create above for to override


texts: I want to display a custom message on product page after Ajax add to cart success message in list page. Can you suggest anyway?


texts: commands need to be execute to run cron job

texts:
we don't have cpanel access, we are using amazon web service and we are using putty ssh.

we want to check cron job is working or not, so i installed this extension : https://github.com/AOEpeople/Aoe_Scheduler

its displaying cron job is not working.

so i want to use this : http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/how_to_setup_a_cron_job

they mentioned like this for unix based systems : http://pastebin.com/WXeGVPxJ

i am new to these ssh commands.

Can anyone please inform me what commands ,i have to run in above link to install cron job successfully


texts: Magento 2 upload image not showing in post form data

texts:
I have created a custom module and in the admin  New/Edit form I added the image field but when I submit the form with uploading image, it won't show the image in save controller.

I used to add below code to add image field in admin from:

$fieldset->addField(
        'image',
        'image',
        array(
            'label' => __('Image'),
            'name'  => 'image',
            'class' =>'admin__control-image',
    )
 );

also in my form, I added the multipart form data as below:

protected function _prepareForm()
{
    /** @var \Magento\Framework\Data\Form $form */
    $form = $this->_formFactory->create(
        ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post' , 'enctype' => 'multipart/form-data']]
    );
    $form->setUseContainer(true);
    $this->setForm($form);
    return parent::_prepareForm();
}

How to get rid of this issue?

Thanks in advance!


texts:
I currently have a pretty standard magento setup. I have the general sort orders, price, release date, name.

What I want to do is add an extra level to each sort order. So they would be release date, price.


texts: How to validate custom category attribute

texts:
How to validate a new custom category attribute in Magento, so that no more than 300 words can be written in that new field?

Is that possible? How could I achieve this? Thanks for your contributions.


texts: Magento 2: Rest API "PUT" method Customer is not updated

texts:
Rest API for updating customer PUT method not working. Every time creating new customer.

  Method: PUT

  Request URL: http://localhost/magento/rest/en/V1/customers/55

Body:

{
   "customer": {
     "email": "test@gmail.com",
     "firstname": "firstname new",
     "lastname":  "lastname new",
     "website_id": 1
   }
}

Also when pass the customer Email Id then response is throwing below error.

Response:

{
    "message": "A customer with the same email address already exists in an associated website."
}

Github Issue URL: https://github.com/magento/magento2/issues/24625


texts: Magento2: How can solve this error "{"error":"invalid_grant"} " on product save by admin?

texts:
When I am saving product by admin then it is showing error "{"error":"invalid_grant"}" and product is not showing in frontend also.
How can resolve this?


texts:
I have this code on api2.xml

<?xml version="1.0"?>
<config>
<api2>
    <resource_groups>
        <custom_restapi translate="title" module="Custom_Restapi">
            <title>Custom Rest API</title>
            <sort_order>10</sort_order>
        </custom_restapi>
    </resource_groups>
    <resources>
        <custom_restapi translate="title" module="Custom_Restapi">
            <group>custom_restapi</group>
            <model>custom_restapi/api2_restapi</model>
            <title>Testing My Rest API</title>
            <sort_order>10</sort_order>
            <privileges>
                <admin>
                    <create>1</create>
                </admin>
            </privileges>
            <attributes  translate="" module="Custom_Restapi">
                <firstname>First Name</firstname>
                <lastname>Last Name</lastname>
                <email>Email</email>
                <password>Password</password>
            </attributes>
            <routes>
                <route>
                    <route>/googlesearch</route>
                    <action_type>collection</action_type>
                </route>
            </routes>
            <versions>1</versions>
        </custom_restapi>
    </resources>
</api2>

in my V1.php file i have this code

class Custom_Restapi_Model_Api2_Restapi_Rest_Admin_V1 extends
Custom_Restapi_Model_Api2_Restapi
{

protected function _retrieveCollection($data)
{
   var_dump($data);
    exit;
}

public function _create($productData)
{
    return "tested 2";
}

}

in POSTMAN i send

How can i get my POST data?
How do I accept the request in _create , because I only accept in _retrieveCollection ,


texts: Auto Invoice Check/Money Order Payment method

texts:
Our 3rd party shipping software only captures orders that are processing/complete in magento. I would like to auto invoice orders using this payment method and this payment method only. So that as soon as the order is captured, magento auto invoices.

Clarification: Our shipping software (Ship Station) will not process/pull orders from Magento unless they are Processing status. With Check/Money Order Payment method in magento, orders are not automatically moved to that status from PENDING unless the order is manually invoiced in the Magento backend.

I am looking for guidance on how to set up an observer that automatically triggers an order using the Check/Money Order payment method and then a module that automatically invoices that order.

I hope that clarifies my need/question.


texts: Magento 2.3.3 Transactional Emails issue with the logo link

texts:
I have uploaded the  Transactional Emails Logo image using the
Content->Design->Configuration uploaded successfully but in the email does not show the proper link with the
link Of logo :
https://ci5.googleusercontent.com/proxy/vWy5v75cdKbYCpO-9euWaV0tWWYYC1vkoy2y-NQb0DMLEfX041cTg0_HrrAjzH97tCY_Y3Z8_9_FhsEC6e1ENWi_n3BMHHOkgWVUXlbKYCMeNyGwiX3lw03hrw3vEB_090CnXU8=s0-d-e1-ft#http://test.site.co.uk/pub/media/email/logo/stores/1/logo.png

How to remove the google user proxy link from the logo URL.
I need just http://test.site.co.uk/pub/media/email/logo/stores/1/logo.png

Thanks in advance.


texts: Magento 2.2.5 log me out from the back-end

texts:
I get logged out when I am trying to work in the back-end, and I do not log from other devices! I tried to look the issue with "inspect" and I found this errors. And right after showing this error, I get logged out.
NB! sometimes, the inspector do not show anything! and I get logged out!
Please, look at the picture


texts:
What would be the easiest way to create a FPC hole punch for static block (cms block)?

Let's say I have a static block that calls another block inside that has behaviour I want to be dynamic on every page load.


texts: Magento 2 EE Order By Sku Widget Template not working

texts:
Magento 2 EE version provide default Order By SKU widget but it's not working with default luma theme please check attached screenshot.

Steps

Go to Admin => Content => pages => home page => add Order By SKU
widget

I have facing this in Magento EE 2.3.5 and Magento EE 2.4.0
Thank you for your help.


texts: Magento 2 : Disabling Cache For Specific Block

texts:
In my module, I am adding small snippet to every page on site with layout file, that I have attached below. The thing is, I would like to disable caching for my module. How do I do that without disabling FPC for whole page? Using cacheable="false" will make whole page non-cached. So this option won't work for me.

I have already tried following:

controlling cache through the constructor, my block derives from \Magento\Framework\View\Element\Template and setting up cache like this : $this->addData(array('cache_lifetime' => null)); didn't work.
adding parameters to my block in layout file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
            <referenceContainer name="content">
                <block class="Something\Something\Block\SnippetBlock" name="snippetblock" template="snippetblock.phtml">
                 <arguments>
                                    <argument name="cache_lifetime" xsi:type="null">null</argument>
                          </arguments>
            </block>
            </referenceContainer>
        </body>

overwriting getCacheLifetime() method to return null.
And this is my layout file that I am using now:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceContainer name="content">
        <block class="Something\Something\Block\SnippetBlock" name="snippetblock" template="snippetblock.phtml" />
    </referenceContainer>
</body>

I will gladly listen to any suggestion.


texts: php-cuong customer avatar customer profile image

texts:
I am getting an error, In admin panel when clicking on customers-> All customers, it is throwing an error

  Class
  PHPCuong\CustomerProfilePicture\Ui\Component\Listing\Columns\Avatar
  does not exist


texts: How to show all categories in menus in homepage in Magento 2.2.3?

texts: I have installed Magento 2.2.3 successfully completed.But I have created categories but it will not show on homepage menu.I don't know how to implement this task.Can you please help me?.Please check my screenshots.https://prnt.sc/j5x93f https://prnt.sc/j5x9g4.


texts: Bundle product in stock even though one of the simple products is out of stock

texts:
I recently discovered a problem - if I have a bundle product with 3 simple products (all set as standard) and one of them is out of stock, the whole bundle product remains in stock.
If I try to add the bundle product to cart, it just displays the remaining 2 products, and i can add it to cart, which is not ok. If one of the simple products in the bundle is out of stock, the whole bundle should be out of stock.
Same goes if 2 are missing from the 3. It just displays the one remaining and I can add it to cart.

I have looked everywhere in frontend and can't find the solution

Does anyone know what I should modify in order for this to be ok?
Thanks a lot in advance!!


texts: Observer for Admin while creating an order

texts:
Is it possible to have an observer while making an order in the admin panel?

I'm trying to change the 'purchased from' depending on which customer group the customer is in. So if a customer is in the wholesale group, they would be purchasing from the wholesale storeview. Obviously this can be done manually but I'm trying to cut out human error.

For example, an admin would select a customer during order creation (this triggers the event) which in turn change the store view to the appropriate one.


texts: Magento 2 : How to remove part of the breadcrumbs in category product page?

texts:
I have found this question but it's for Magento 1.7.

I want to remove the product name in breadcrumb, so that my breadcrumbs will only show the category. For example, from:

Home/Category Name/Product Name

to:

Home/Category Name

Thanks very much!


texts:
I'm beginer and I want to custom my theme in sample data. But i can not find the class I want to custom css on source code.
You can help me to check it.
For example:

I want to custom css for class blocks-promo but I cannot check it locate in file less.
Can you help me?


texts: js not loading properly in backend product edit while click on show/hide of description field magento 2.2.4 production mode

texts:
This issue specific to production mode of Magento 2.2.4.

Js is appending in product edit url like :

  base_url/admin/catalog/product/edit/id/57473/set/12/key/0225361c458609d4c7d2cd0ecaa40b96dab87a5fef098bddd1b575ee3ce6b474/type/simple/store/0/back/edit//themes/advanced/editor_template.js

Here our edit URL is

  base_url/admin/catalog/product/edit/id/57473/set/12/key/0225361c458609d4c7d2cd0ecaa40b96dab87a5fef098bddd1b575ee3ce6b474/type/simple/store/0/back/edit/

js file is /themes/advanced/editor_template.js.

I have tried to change production mode to developer it worked there.

Also tried to re-deployment, di-compile and also checked file permission, it is already in 777.

Please let me know if some faced this issue earlier.


texts: Cannot override class RuleProductPricesPersistor in Magento 2

texts:
I'm trying to override following class

Magento\CatalogRule\Model\Indexer\RuleProductPricesPersistor

Using below code
<preference for="Magento\CatalogRule\Model\Indexer\RuleProductPricesPersistor"
                type="Vendor\Module\Model\Indexer\RuleProductPricesPersistor" />

But I'm getting following error

Type Error occurred when creating object:
Magento\CatalogRule\Model\Indexer\ReindexRuleProductPrice, Argument 5
passed to
Magento\CatalogRule\Model\Indexer\ReindexRuleProductPrice::__construct()
must be an instance of
Magento\CatalogRule\Model\Indexer\RuleProductPricesPersistor, instance
of Vendor\Module\Model\Indexer\RuleProductPricesPersistor given,
called in
/var/www/html/MagentoCE230/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php
on line 116 [] []

I tried to clear generation folder and also ran setup:di:compile command. But it didn't work.


texts:
I am working an project that has two websites running on a single Magento platform.

One store is set to Romanian language the other is set to Hungarian, both stores sell only in Romania. Everything should be on the websites language, except the PDF invoice, which has to be on Romanian for both websites.

Problems when generating the PDF invoice from the Hungarian store:

the dates are displayed according to Hungarian standards: 2016 ápr.
22 instead of the Romanian standard: 22.04.2016. How can I set the
format? This is the code from
app/code/local/Mage/Sales/Model/Order/Pdf/Invoice.php

$page->drawText(Mage::helper('sales')->__('Data: ') .
       Mage::helper('core')->formatDate($invoice->getCreatedAt(), 'medium',false), 250, 765, 'UTF-8');
The totals are displayed in Hungarian/English, yet I translated everywhere where I could find the totals. I actually need this part to be on Romanian, so how can I separate this from the rest of the totals? This is the code section from app/code/local/Mage/Sales/Model/Order/Pdf/Abstract.php:

 protected function insertTotals($page, $source){
    $order = $source->getOrder();
    $totals = $this->_getTotalsList($source);
    $lineBlock = array(
        'lines'  => array(),
        'height' => 12
    );

//draw total box
$page->setLineColor(new Zend_Pdf_Color_Html('#000000'));
$page->setFillColor(new Zend_Pdf_Color_GrayScale(1));
$page->drawRectangle(430, $this->y+16, 570, $this->y -54);

$this->y +=5;
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));

$this->_setFontRegular($page, 5);

foreach ($totals as $total) {
    $total->setOrder($order)
        ->setSource($source);

    if ($total->canDisplay()) {
        foreach ($total->getTotalsForDisplay() as $totalData) {

            $lineBlock['lines'][] = array(
                array(
                    'text'      => $totalData['label'],
                    'feed'      => 510,
                    'align'     => 'right',
                    'font_size' => $totalData['font_size'] - 2,
                    'font'      => 'bold'
                ),
                array(
                    'text'      => $totalData['amount'],
                    'feed'      => 568,
                    'align'     => 'right',
                    'font_size' => $totalData['font_size'] ,
                    'font'      => 'bold'
                ),
            );
        }

    }

}


texts: How I Can track customers around in my magento store

texts: I want to track the customer event what they are doing on website and current link of customer ip location etc