texts: Set default selected all simple products of bundle products

texts:
i was trying to set to all my bundle products with all the options selected.

Instead of doing it manually, i wants to make it by code.

I think i should get first all the bundleproducts from my shop and then makes a loop to change all the simple products of it, and put it default, but i cant make it and i haven´t seen nothing like that.

Anyone have any idea?

This is how my front-end is show.

And this is on backend:

I dont know which is the best solution, i think it could be easy if i change it on backend, not?

The result should be all the options selected by default.


texts: How can i call custom action on custom button click?

texts:
I have created override file app/code/local/Mage/ImportExport/Block/Adminhtml/Import/Edit.php

and added a button

 $this->_addButton('downloadCsv', array(
            'label' => $this->__('Download CSV'),
            'onclick' => "setLocation('{$this->getUrl('/import/downloadcsv')}')",
        ));

in __construct()

it is work fine if add action function to core controller
app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php

But i want to override controller. so i have created

app/code/local/Mage/ImportExport/controllers/Adminhtml/ImportController.php

and create

public function downloadcsvAction()
{
        // code
}

but it is not called.


texts: How to add jquery and stylesheet to my custom module

texts:
I have created a custom module on frontend that is showing data from DB on now i want to add jquery and style sheet to my custom module front page.

I have tried like this through my layout xml but it is not including.

<?xml version="1.0"?>
  <layout version="0.1.0">
     <reviews_index_index>
        <reference name="root">
           <action method="setTemplate"><template>page/1column.phtml</template></action>
        </reference>
        <reference name="content">
           <block type="reviews/index" name="reviews_index" template="reviews/index.phtml"/>
        </reference>
         <reference name="head">
            <action method="addItem">
                <type>js</type>
                 <name>reviews/reviews.js</name>
            </action>
         </reference>
    </reviews_index_index>

 </layout>


texts: Magento custom module click view get the product details from quote id

texts:
how to get the product details from quote id, click on view in custom module
magento.


texts:
I have updated Magento version Magento 2.3.5-p1 to Magento 2.4.0 When I am running Magento setup upgrade command
php bin/magento setup:upgrade

then it's showing me below error
Module 'Magento_ComposerRootUpdatePlugin':
Running data recurring...Reading /var/www/html/composer.json
Loading config file /var/www/html/var/composer_home/auth.json
Loading config file /var/www/html/composer.json
Loading config file /var/www/html/auth.json
Reading /var/www/html/auth.json
Failed to initialize global composer: Composer could not find the config file: /var/www/html/var/composer_home/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /var/www/html/vendor/composer/installed.json
Reading /var/www/html/composer.lock
Checking for "magento/composer-root-update-plugin: 1.0.0" for the Web Setup Wizard...
Reading /var/www/html/var/vendor/magento/composer-root-update-plugin/composer.json
Loading config file /var/www/html/var/composer_home/auth.json
Loading config file /var/www/html/var/vendor/magento/composer-root-update-plugin/composer.json
No Web Setup Wizard update needed for magento/composer-root-update-plugin; version 1.0.0 is

already in /var/www/html/var.

Module 'Magento_User':

I have update composer version by below command
composer selfupdate

how can I solve this error?


texts: PayPal payments Advanced vs PayPal Payments Pro

texts:
I currently use Magento v1.7 and offer PayPal Payments Standard and Authorize.net on my site using a onepage checkout extension.

I would like to drop Authorize.net and take cards and PayPal payments through PayPal.  I am not clear on the differences between PayPal Payments Pro and PayPal Payments Advanced.

It looks like PayPal Payments Advanced will take care of much of the PCI compliance stuff, but PayPal Payments Pro costs more.  I am sure I am missing something important, but I have not found anywhere the important differences between the two. They both seem to keep the customer on my site and the customer doesn't know PayPal is handling the credit/debit card payments which is good.

Can anyone help explain these two options so I can make a knowledgeable decision?  Thank you!


texts: Magento 1.9 get product options value for only the checked

texts:
I want to get the product options value for only the checked product option.
My current code loads all product options values, instead of the checked one.

I use radio buttons for my product options, so I need something to get only the value of the checked one.

Current code:

<?php
foreach($_product->getOptions() as $option) {
    echo 'Option title is: ' . $option->getTitle();
    echo 'Option type is: ' . $option->getType();
    echo 'Option values:';
}
?>


texts: Magento 2 Add category path to product page

texts:
How do I add category to breadcrumbs on products page so it says Home -> Category -> Lenovo Thinkpad
From the Admin panel I've set
Use Categories Path for Product URLs -> YES
But it only affected my url path.
Even thow I go directly to Rootategory -> Components -> Lenovo Thinkpad It stil says Home -> Lenovo ThinkPad
I've already checked this:

Magento 2 Get Full Category Path for product
Magento 2 some Product URLs show Category path
How to get category id by category path in Magento 2?
Get product path from id with category path in url


texts: create an event to trigger newsletter subscriber status hanges

texts: I'm trying to observer the newsletter subscriber status when it changes from unconfirmed to confirmed.is there an event for that


texts: Magento 2 : How to Place New Tab at The End of Product's Details Tabs?

texts:
I already created new custom tab using this tutorial:
https://magenticians.com/add-custom-tab-magento-2/

But it is located on left side. I need to place it at end (right side) like it is on this picture:
https://i.stack.imgur.com/Stqen.png

I should be using move element like it is mentioned in this manual:
http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/xml-instructions.html

But I don't know how to do this.

Please help me.


texts: Magento 2 : Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails

texts:
When I save records, I got this error message.

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (report.vendorname_modulename_entity, CONSTRAINT
  VENDORNAME_MODULENAME_ENTT_ENTT_TYPE_ID_EAV_ENTT_TYPE_ENTT_TYPE_ID
  FOREIGN KEY (entity_type_id) REFERENCES eav_entity_type
  (entity_type_id) ), query was: INSERT INTO
  vendorname_modulename_entity (created_at,updated_at) VALUES
  ('2019-02-26 00:00:00', '2019-02-27 05:12:31')

Save controller file (execute function):

$storeId = (int) $this->getRequest()->getParam('store_id', 0);
$data = $this->getRequest()->getParams();

/** @var \Magento\Backend\Model\View\Result\Redirect $resultRedirect */
$resultRedirect = $this->resultRedirectFactory->create();
if ($data) {
    $params = [];
    $model = $this->modelFactory->create();
    $params['store'] = $storeId;
    if (empty($data['entity_id'])) {
        $data['entity_id'] = null;
    } else {
        $model->load($data['entity_id']);
        $params['entity_id'] = $data['entity_id'];
    }
    $model->setData('entity_type_id', 10);
    $model->setData('attribute_set_id', 17);
    $model->setData('store_id', $storeId);
    $model->setData('field_title', $data['field_title']);
    $model->setData('field_url', $data['field_url']);
    $model->setData('field_desc', $data['field_desc']);
    $model->setData('created_at', $this->_dateFactory->create()->date());
    $model->setData('updated_at', $this->_dateFactory->create()->date());

    try {
        $model->save();
        $this->messageManager->addSuccessMessage(__('You saved this record.'));
        $this->_getSession()->setFormData(false);
        if ($this->getRequest()->getParam('back')) {
            $params['entity_id'] = $model->getId();
            $params['_current'] = true;
            return $resultRedirect->setPath('*/*/edit', $params);
        }
        return $resultRedirect->setPath('*/*/');
    } catch (\Exception $e) {
        $this->messageManager->addErrorMessage($e->getMessage());
        $this->messageManager->addExceptionMessage($e, __('Something went wrong while saving the record.'));
    }

    $this->_getSession()->setFormData($this->getRequest()->getPostValue());
    return $resultRedirect->setPath('*/*/edit', $params);
}
return $resultRedirect->setPath('*/*/');

How I solve this error?


texts: What's the preferred way of throwing exceptions in Magento?

texts:
All of the following methods are used in Magento core so which one is the preferred (or the latest "best practice") way?

Mage::throwException('Some Message') - 732 Usages
throw new Exception('Some Message') - 419 Usages
throw Mage::exception('Vendor_Module', 'Some Message') - 94 Usages
(need to create a Vendor_Module_Exception class)


texts: Setup shipping charges for two different Stores based on country selection

texts:
I have to one website which contains two different stores. I want to set different shipping charges for the both stores.

Magento Provide different shipping charges per website. but I need to create different shipping rules for both store.

STORE A Shipping Details

Minimum order value € 50 net - shipping charge
Germany:
- Minimum order value € 50 net
- Ship € 6.30 net
- Free shipping from 100 € net
- 5% discount from 250 € net

Abroad Austria:
- Minimum order value € 50 net
- Postage to weight
- Free shipping from 250 € net
- 5% discount from 250 € net
- Calculate No VAT

All other foreign:
- Minimum order value € 50 net
- Postage to weight
- 5% discount from 500 € net
- Calculate No VAT
- International prices"

STORE B Shipping Details

Germany:
- Free shipping from 150 € net

Abroad Austria:
- Parcel postage to weight

All other foreign:
- Parcel postage to weight
- International prices

If anybody faced this type of changes then please help me.


texts: Cannot add product to category - cannot expand category tree - see image

texts:
I'm wanting to add a product to a category but it does not show in the product admin panel. The category is there under 'Manage Categories' and the top level shows but not any of the subcats.

There is a small search glass in the corner. Im not getting any error messages, it's just not there.

The image will explain more -

Ver - 1.9.3.3

Any insight would be appreciated, Thank you.


texts: Magento 2 Exception occurred during order load

texts:
i am using magento2.3 and facing this issue when i want to order detail page.

I checked my exception.log there is curl issue is
[2021-05-04 07:50:14] main.CRITICAL: Connection timed out after 30001 milliseconds {"exception":"[object] (Exception(code: 0): Connection timed out after 30001 milliseconds at vendor/magento/framework/HTTP/Client/Curl.php:426)"} []


texts: How to set default root category on a store while creating it programatically?

texts:
I want to set a category on the new stores I'm creating, but could not find any appropriate method.
    public function  createStore()
    {
        // load default website
        $defaultWebId = $this->defaultWebsite->load(self::DEFAULT_WEB_ID);

        // create german store
        $germanStore = $this->storeFactory->create();
        $germanStore->setWebsite($defaultWebId);
        $germanStore->setName("germanStore");
        $germanStore->setCode("Task5German");

        // create english store
        $englishStore = $this->storeFactory->create();
        $englishStore->setWebsite($defaultWebId);
        $englishStore->setName("englishStore");
        $englishStore->setCode("Task5English");
    }

I want to set a "default root category" on both of these stores. By default root category, I mean this:
Any kind of help would be appreciated
Update:
public function createStores()
    {
        // load default website
        $defaultWebId = $this->defaultWebsite->load(self::DEFAULT_WEB_ID);

        // create english group
        $englishGroup = $this->groupFactory->create();
        $englishGroup->setName("englishGroup");
        $englishGroup->setCode("Task5EnglishGroup");
        $englishGroup->setWebsite($defaultWebId);
        $englishGroup->setRootCategoryId(self::DEFAULT_ROOT_CATEGORY);

        // create german group
        $germanGroup = $this->groupFactory->create();
        $germanGroup->setName("germanGroup");
        $germanGroup->setCode("Task5EnglishGroup");
        $germanGroup->setWebsite($this->defaultWebsite);
        $germanGroup->setRootCategoryId(self::DEFAULT_ROOT_CATEGORY);

        // create german store view
        $germanStore = $this->storeFactory->create();
        $germanStore->setName("germanStore");
        $germanStore->setCode("Task5German");
        $germanStore->setGroup($germanGroup);

        // create english store view
        $englishStore = $this->storeFactory->create();
        $englishStore->setName("englishStore");
        $englishStore->setCode("Task5EnglishStoreView");
        $englishStore->setGroup($englishGroup);
        try {
            $englishStore->setCurrentCurrencyCode("GBP");
        }
        catch (LocalizedException) {
        }
    }


texts: Magento 2 extension attribute issue for Magento\Quote\Api\Data\AddressInterface

texts:
i am trying to add extension attribute for Magento\Quote\Api\Data\AddressInterface but i am facing below issue.

Message: Property "Addressfiled" does not have corresponding setter in class "Magento\Quote\Api\Data\AddressExtensionInterface".

Any one could you please provide solution for this.


texts: Custom option with a drop down when input type selected is a drop down.?

texts: How to add a new drop down beside "Price Type" present in custom options of Product Information.


texts: How to override adminhtml file in Magento 2

texts:
We have to override vendor adminhtml file in magento2.

\magento\module-sales\view\adminhtml\templates\order\view\info.phtml

Does anyone know how can i do this?

Thanks


texts: In one page checkout i need to find html file for the address block. Please can someone help me with that. I want to put first name and last name together in a div.


texts: Checkout stuck with loader: Cannot read property 'indexedOptions' of undefined

texts:
I had to customize the country field in checkout shipping address field.

I edited the checkout_index_index.xml with the new component/template for country field like this

 ....
<item name="shipping-address-fieldset" xsi:type="array">
   <item name="country_id" xsi:type="array">
     <item name="component" xsi:type="string">Vendor_Module/js/form/element/country</item>
     <item name="config" xsi:type="array">
        <item name="elementTmpl" xsi:type="string">Vendor_Module/form/element/input-country</item>
     </item>
  </item>
</item>
......

Everything is working, field is updated with customizations but several times when I arrive at checkout for the first time I get this js error

  Uncaught TypeError: Cannot read property 'indexedOptions' of undefined (region.js:59)

and chekout is stuck with a loader. I found some documentation about this error which seems to be related to fields removal in checkout, but I didn't remove any field, only updated.

I'm using Magento 2.1.10


texts: Foreign key constraint fails when trying to add custom product attribute option

texts:
I added a product attribute called size from admin with the same settings as color attribute. Now when i programmatically try to add an option to this attribute I get a MySQL error:

Cannot save attribute SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`eav_attribute_option_value`, CONSTRAINT `EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `eav_attribute_option` (`option_id`) ON DELETE CASCADE), query was: INSERT INTO `eav_attribute_option_value` (`option_id`, `store_id`, `value`) VALUES (?, ?, ?)

Code to add option:

/* \Magento\Eav\Api\Data\AttributeOptionInterfaceFactory $optionFactory */
$option = $this->optionFactory->create();
$option->setLabel('120cm')->setValue('120cm')->setSortOrder(0);

/* \Magento\Eav\Api\AttributeOptionManagementInterface $optionManagement */
$this->optionManagement->add(\Magento\Catalog\Model\Product::ENTITY, 'size', $option);

When I try to add attribute option color with the same code as above, everything works fine and option is added.

What am I doing wrong?


texts: Is there a way to change cart product thumbnails?

texts:
I'm using the following code to add cart products manually.

The following code works fine, except that I would like to change the cart product thumbnails.

Can some one help me with the thumbnail part? Here is my code.

$session = Mage::getSingleton('customer/session');

// Get cart instance
$cart = Mage::getSingleton('checkout/cart');
$cart->init();

// Add a product with custom options
$productId = 3;
$productInstance = Mage::getModel('catalog/product')->load($productId);
$param = array(
    'product' => $productInstance->getId(),
    'qty' => 1
);
$request = new Varien_Object();
$request->setData($param);
$cart->addProduct($productInstance, $request);

// update session
$session->setCartWasUpdated(true);

// save the cart
$cart->save();


texts: Magento 2 How to create an Extension for Shipping Calculator on Product Page

texts:
I want to know that how to create an Extension for Shipping Calculator on product page .The functionality of Shipping Calculator is use Country , Region and Pincode on the product page. when I fill the all details and click on Calculate shipping button. It will show all relative shipping methods. It is similar to Estimate shipping block on cart but I need on product page.

Many Thanks


texts:
I'm trying to use Postgres instead of the default MySQL setup. I understand that Magento 2 should support Postgres out of the box (once it is released). From the looks of it there is a layer of abstraction between the view and the data layer, using something like Mage::getModel('catalog/product')->getCollection. I'm more curious whether there is a current solution either Enterprise or Community 1.7+.

--EDIT--
Heres an update I got from Alan at Magento; they'll most likely want to move forward with eventually supporting multiple RDBMS' but it'll most likely be through the support of the Doctrine ORM (or some other ORM). I don't think they'll release this by the GA of M2 though.


texts:
How do you approach unit testing Observers in Magento? (working with EcomDev_PHPUnit)

What kind of assertions do include?

check if the event is being dispatched (assertEventDispatched())
check the function with mock data
...

Ideally I would like to see other developers opinion regarding the approach and assertions made.


texts: Redirect to previous URL after admin login

texts:
I want admin users to be redirected to the url they opened after login.
They should get links to a custom module page in the admin area, like

  https://magento.example/index.php/admin/admin_mycoolmodule/adminhtml_viewawesome/view/showpage/awesome/howmuch/9001/

Obviously, they will be redirected to the login page, unless they are already logged in.

How can I redirect them back to this page after login?

Secret keys in the URL are disabled and can stay that way.

Now they get the configured default page (default was Dashboard) instead.


texts:
Trying to fix the PHP memory limit issue when installing an extension.

I made all the possible configurations, I do not have access to an SSH but everything seems to have correct values,

I made the steps provided, unfortunately, the problem still occurs.

I opened a support ticket with the server provider and they said it's a Magento Installation problem, however, I tried installing it several times and none of that helped.

As it's a shared host I am using could that type of server affect it in some way?


texts: Is there a way to remove the delete button from the manage products backend? I understand that this would make it impossible to remove products. Preferably, it would not require a change to the core.


texts: Magento 2 : Add to Cart Success Message in a Popup

texts: How can I show Add to Cart success message ("You added 'Product name' to your shopping cart.") in a popup in Magento 2?


texts:
I am using SOAP api to integrate an ERP system but throws fatal error Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Client] Error cannot find parameter

<?php
require_once(__DIR__ . '/app/Mage.php');
Mage::app();

$api_url_v2 = "https://ninobambino.in/index.php/api/v2_soap/?wsdl=1";

$username = 'test123';
$password = 'test123';

$cli = new SoapClient($api_url_v2);

//retreive session id from login
//$session_id = $cli->login($username, $password);
$session = $cli->login('test123', 'test123');

//call customer.list method
$result = $cli->customerCustomerList($session_id);
print_r($result);


texts: Magento 2 How to create new order attribute programatically

texts: I've been searching the web on how to create an order attribute (if thats whats called), essentially I just want a new database column to appear in the sales_order database, obviously I could create it manually but is there a way I can create it via an upgrade script/programmatically?


texts:
Continue button is not working on Magento checkout after selecting Payment Method.
Error in console

TypeError: document.querySelector(...) is null
card_number = document.querySelector('#ccsave_cc_number').value


texts: Magento disable ordering of simple products in backend

texts:
how can I disable the ordering of simple products via the backend?

(whwre you search for sku, product and there is this enormous list)

Why? Because we sell T-shirts in sizes. What happens is that we set the price on the mother configurable product level, say 20 euro. We have to set the price of the simple product as mandatory. THe problem is that when we discount the product and change the price to 18 euro for the mother product. Then, when someone adds an order via the backend for the products and selects the simple product -then the order amount is still 20 euro. Not 18 coming from the mother config product.

So.... does anynone know how to disable the ordering of simple products via the backend?

Many thanks!


texts: Magento 1.9.3 - Mailing Solution for Magento Multistore

texts:
We are using a Magento 1.9.3 instance with multiple websites set up.
Every website has it's own Mailbox and Mail-Address. And their own Domains.

These are either hosted at all-inkl.com or gmail.

Website A -> Domain A -> info@domain-a.com -> Mailbox hosted at all-inkl.com
Website B -> Domain B -> info@domain-b.com -> Mailbox hosted at all-inkl.com
Website C -> Domain C -> info@domain-c.com -> Mailbox hosted at gmail
Website D -> Domain D -> info@domain-d.com -> Mailbox hosted at gmail

The MX records are obviously showing to the Mailservers according to the mailboxes.

The Extension we are using for Mail is SMTPPro

SMTPPro doesn't support Multistore or at least doesn't support setting up multiple mail servers. I managed to change some code to allow me to configure different mail servers and login credentials depending on the website scope level.

Problem:, In general, these settings work but they don't seem to be used in every situation. This is not a surprise because the extension isn't meant to work with different scope level so it might not take these into account in every situation.

Result: Not all the emails are being sent.

Example: A mail from Website C should be sent.
The mailbox for Website C is hosted on Gmail
Now the system doesn't seem to check the server configuration on scope level but instead goes with the default one which is the one for Website A.
The e-mail address is taken from the store configuration.
I assume this is what happens: SMTPPro trying to send a mail from info@domain-c.com via the Default server which is the all-inkl.com one.

Result: Sender address rejected: not owned by user

What we want to achieve: That all emails from all the websites are going out to the customers.
Since I think this is not a very uncommon task: are there any good concepts on how to solve this?

Here's what we already tried:

Solution 1:
Modify the Extension's code in a way that it will always take the correct server configuration.
Problem: I am not able to do this myself.

Solution2:
Using a service like SendGrid, which can be used as default SMTP server, while all the mailboxes stay the same.
Problem: I tried this but with the shared IP in the Essentials Plan we had a failure rate of about 30% emails not being delivered.
This is because of the IP being blacklisted on several blacklists.
So the other 70% that are not being blocked is probably directly going into the spam filter of the inbox, at least that's what happened with the test emails I sent to my own mail addresses.
I set some DNS (CNAME) entries according to the SendGrid Guides along with implementing SPF and DKIM but that didn't change too much.
For my understanding, once the IP is blocked it's blocked.
I wrote to the support but basically got told to upgrade to Pro, which is not an option because it's too expensive.


texts: I want to add a layered navigation block for a custom product collection. Is there a way to do that in Magento2 ?


texts: How to move Success, Error messages position?

texts: How to move Add to cart success and error message above Add to cart button and not at the top ?


texts:
I am working on a Magento 1 maintenance project. On cart page, it is printing quote object array. I am not able to find out from where it is printing. I searched for var_dump and print_r but not able to find out.

Please, any idea how can I debug this?

Like

Array ( [0] => Custom_Sales_Model_Quote_Item Object ( [_eventPrefix:protected] => sales_quote_item [_eventObject:protected] => item [_quote:protected] => Custom_Sales_Model_Quote Object (


texts: No such entity with cartId = 0 on checkout page

texts:
Magento2 - Customer lost session occasionally on checkout page.
After login when I go to checkout page it's shows me below error but after refresh 4 to 5 times customer session restore again but after refresh again same issue happened.


texts: How to add another web app to a subdirectory within Magento?

texts:
We are running magento on our site www.xsmoke.com.
The site is international, so we are using "/country code" - e.g.www.xsmoke.com/de/ etc.

Now we would like to install wordpress in one of the languages only and we want the URL to be "xsmoke.com/de/blog".

But i can't create a folder on that location for the wordpress files because of magento.. Does anyone have an idea for a workaround?


texts:
I just installed a fresh copy of Magento 1.9.2.3. Now my issue is when I try to upload any image, be it product, category, transactional email, ect. it gives me the little broken image placeholder. Now the steps I have tried so far:

Changed \media folder to 777
Flushed all Cache (Magento and images)
Read endless questions on similar issues but to no avail.
This is happening in the frontend and Admin
I have checked the link it creates to the image and when I put that in the address bar it gives me a "404 not found" error.
I have checked that the image is indeed uploaded to the folder that the site is pointing to.  If I upload an image directly to the server via FTP i.e. my logo it works fine.  but nothing uploaded by Admin works.
Note: I have had Magento running on this server previously, but it is one to two versions older.

URL is http://southernperformanceparts.com - In case you want to take a look

Can anyone give me some direction here.

Thank you in advance.


texts: How to add custom js file for PDP page in magento 2

texts:
I wish to include custom js file in PDP page in magento 2.

I wish to do some action while product has some options. Please provide me a solution to add custom js in PDP page


texts: Custom toolbar template - fatal error on home page

texts:
I want to have different templates for top and bottom toolbar, so in

\template\catalog\product\list.phtml

I use

<?php echo $this->getToolbarBlock()->setTemplate('catalog/product/list/toolbar.phtml')->toHtml(); ?>

instead of <?php echo $this->getToolbarHtml() ?>

In Home page I have

{{block type="catalog/product_list" category_id="5" template="catalog/product/list.phtml"}}

This works except Home page:

  Fatal error: Call to a member function getSize() on a non-object in
  app\design\frontend\default\mytheme\template\catalog\product\list\toolbar.phtml
  on line 34

What I can do to display products at home page with different top and bottom toolbars?


texts:
I want to be able to upload videos in the media storage and embed them in Blocks.
Is and how is this possible? I could not find any informations about this.


texts: Magento 2 - front-end selection from database

texts:
I want to add drop-down(selection) to front-end checkout page. The options must come from database because the data is from third-party and might change.

What i have so far:
From magento devdocs i have understand i need to use "Dynamically defined forms" and knockoutJs 'options' => [..] for that. Is it correct?

I thought that maybe it is possible to run php script that gets the array like in backend selection can be done. But i do not know how can i get php methods value(returned array) in js page what is using magento devdocs example. Or can i use phtml or php in frontend instead to create drop-down?


texts:
To remove the orders from the database, I use the following queries:

$connection = $this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
$connection->rawQuery('SET FOREIGN_KEY_CHECKS = 0');

$connection->rawQuery('TRUNCATE TABLE `gift_message`;');
$connection->rawQuery('TRUNCATE TABLE `quote`;');
$connection->rawQuery('TRUNCATE TABLE `quote_address`;');
$connection->rawQuery('TRUNCATE TABLE `quote_address_item`;');
$connection->rawQuery('TRUNCATE TABLE `quote_id_mask`;');
$connection->rawQuery('TRUNCATE TABLE `quote_item`;');
$connection->rawQuery('TRUNCATE TABLE `quote_item_option`;');
$connection->rawQuery('TRUNCATE TABLE `quote_payment`;');
$connection->rawQuery('TRUNCATE TABLE `quote_shipping_rate`;');
$connection->rawQuery('TRUNCATE TABLE `reporting_orders`;');
$connection->rawQuery('TRUNCATE TABLE `sales_bestsellers_aggregated_daily`;');
$connection->rawQuery('TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`;');
$connection->rawQuery('TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`;');
$connection->rawQuery('TRUNCATE TABLE `sales_creditmemo`;');
$connection->rawQuery('TRUNCATE TABLE `sales_creditmemo_comment`;');
$connection->rawQuery('TRUNCATE TABLE `sales_creditmemo_grid`;');
$connection->rawQuery('TRUNCATE TABLE `sales_creditmemo_item`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoice`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoiced_aggregated`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoiced_aggregated_order`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoice_comment`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoice_grid`;');
$connection->rawQuery('TRUNCATE TABLE `sales_invoice_item`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_address`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_aggregated_created`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_aggregated_updated`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_grid`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_item`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_payment`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_status_history`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_tax`;');
$connection->rawQuery('TRUNCATE TABLE `sales_order_tax_item`;');
$connection->rawQuery('TRUNCATE TABLE `sales_payment_transaction`;');
$connection->rawQuery('TRUNCATE TABLE `sales_refunded_aggregated`;');
$connection->rawQuery('TRUNCATE TABLE `sales_refunded_aggregated_order`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipment`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipment_comment`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipment_grid`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipment_item`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipment_track`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipping_aggregated`;');
$connection->rawQuery('TRUNCATE TABLE `sales_shipping_aggregated_order`;');
$connection->rawQuery('TRUNCATE TABLE `tax_order_aggregated_created`;');
$connection->rawQuery('TRUNCATE TABLE `tax_order_aggregated_updated`;');

$connection->rawQuery('SET FOREIGN_KEY_CHECKS = 1');

This successfully deletes all orders from the DB.

My question is:

How to reset the order ID back to 000000001 so the first new order will start with that id?

I've been searching for this, but most answers require you to do this by hand, but I want to achieve this by running a query from a PHP file.

-- EDIT --
Running the following command:

SELECT * FROM `sequence_order_1`

Directly in phpmyadmin returns:

Also runnning:

ALTER TABLE `sequence_order_1` AUTO_INCREMENT = 000000001;

in phpmyadmin does nothing.


texts: Uncaught TypeError Porto Theme 2.1.0 Magento 2

texts: I'm using porto theme 2.1.0 in my Magento 2. Every time i load my site I'm always experiencing this error.


texts: Magento product export with full canonical url

texts:
There is a question on stackoverflow, perhaps this is a better place to ask for:

https://stackoverflow.com/questions/24490169/magento-product-export-with-full-canonical-url


texts: How would I link module-page-cache into my theme?

texts:
what would be correct spelling for the module?

Magento_Page-Cache , Magento_Page-cache , Magento_Page_Cache ?


texts: Call a phtml file at bottom of home page using custom controller Magento 2.2

texts:
/var/www/html/magento2/app/code/NameSpace/ReviewRating/Controller/Index/Slider.phtml

<?php
namespace Namespace\ReviewRating\Controller\Index\Slider;

use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\View\Result\PageFactory;

class Slider extends Action
{
    protected $_resultPageFactory;
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory,
    ) {
        $this->_resultPageFactory = $resultPageFactory;
        parent::__construct(
            $context
        );
    }

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

  /var/www/html/magento2/app/code/NameSpace/ReviewRating/view/frontend/layout/cms_index_index.xml

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

    <head>
        <css src="NameSpace_ReviewRating::css/csshome.css"/>
        <script src="NameSpace_ReviewRating::js/jshome.js"/>
  </head>

            <referenceContainer name="content">
                <block class="NameSpace\ReviewRating\Block\Index\Slider" name="custom_layout_load"
                    template="NameSpace_ReviewRating::reviewrating_index_slider.phtml"
                     cacheable="false"/>
            </referenceContainer>

    </page>

  /var/www/html/magento2/app/code/NameSpace/ReviewRating/view/frontend/templates/reviewrating_index_slider.phtml

<?php

echo 'Slider content goes here';


texts: Magento 2 : Add new options to Import settings > Entity Type

texts:
Is their any way i can add new entity type & just execute basic method without any validation of csv ?
Please share your thoughts on this.


texts: What is the "Top 100 contributor" title?

texts:
You can see a title "top 100 contributor" or "top 250 contributor" around the module reviews.

What does it mean?

I suppose the "top 100 contributor" is about the commenter and it means the commenter is in the top 100 of Magento Connect contributors. Or Magento community edition contributor or the contributor of an exact module? Where can I find a list about contributors? Where is the rules of this contributing?

example: http://reviews.magentocommerce.com/4643-en_us/4940/semantium-msemantic-semantic-seo-for-rich-snippets-in-google-and-yahoo-reviews/reviews.htm?page=5


texts:
Product's Stock Status doesn't change when quantity drops below threshold in
CE1.9.1...For starters, I've confirmed my config settings for all scopes, and they are all set as follows,

Manage Stock : Yes
Qty for Item's Status to Become Out of Stock : 4
Backorders : No Backorders

I've also confirmed that indexes are rebuilt, and I also reindexed manually to see if it would fix the bad products but they stay in stock.  Each night, a cron job runs that updates the products through the magento api, then refreshes the cache and rebuilds all indexes.  The desired effect is that if any product has stock lower than 4, it will remove the "Add to Cart" button.  This is true of many products, they lose the button and all is good.  But some products keep the "Add to Cart" button, and when I try to add them to the cart it won't allow it.  So the cart realizes that I shouldn't be able to order it.  So I'm not worried that someone will buy it, but I don't like seeing the warning when the button could just go away.

When I find one, I'll refresh the caches, rebuild the indexes, and then refresh the product page.  Quantity 2, threshold 4, in stock!  Button remains, but can't add to cart.  Then I will go into the product in the admin interface, save it without making any changes, and it goes out of stock.  Again, I don't need to do this to every product with quantity under 4, just some.  It seems like something special happens when I save it in the interface, that doesn't happen when I save it using the api, refresh cache, and reindex.

I'm considering running another script after my cron job that will look for anything in cataloginventory_stock_status with qty<4, and setting those stock_status values to 0.  This appears to work, even without rebuilding indexes/cache, but I don't like quirks especially when only some products are affected.  And I've put considerable time into speeding up the api so that I wouldn't have to do hackish things like this. Anyone run into this and know what's up?


texts: Customer address problems after migration from Magento 1.9.2.4 to Magento 2.3.2

texts:
I've searched high and low for a problem the same as this, and while I have found some seemingly similar, after investigating they are not linked.

I migrated fine, and products, categories, attributes etc etc are all there and I can browse the site, however the customer "shipping address" and "billing address" in all areas of the site show as

{{depend prefix}}{{var prefix}} {{/depend}}{{var firstname}} {{depend middlename}}{{var middlename}} {{/depend}} .......

And if I go to "manage addresses" then I also get a fatal error.

When I investigate the eav_attribute_set table, they appear the same as in Magento 1.9.2.4 , which is where I assume the fault lays, because Magento is looking for a different attribute id? Please see below for the table.

Has anyone come across this or solved this? Thanks


texts: How to edit image quality in homepage (Magento ver. 1.9.0.1)

texts:
I installed Magento ver. 1.9.0.1 Here the problem is the image in home page looks very bad. I know this question has been asked for many years. Nearly googled 2 days read posts regarding same issue, Bad Luck find no proper fixes.Is there any way to change the compression settings in backend, or is there any way to change optimization techniques without modifying core code. Here I attached the issue images for better reference.

When product image is uploaded, magento compress images as base, thumbnail, small as per our selection.
Image quality in home page is very disappointing (not sure what type: base or thumbnail or small)
Is there any way to change the compression technique?

This is HOME PAGE

This is CATEGORY PAGE

This is PRODUCT PAGE

Image 1 is very bad.
Images 2&3 are good.


texts: Checkout shipping fields different than default

texts:
I am developing a Magento 2.1.6 store, with data migrated from Magento 1.9.3.
Is there something in the database that could cause my checkout shipping page to not display all the relevant form fields?

Looking at a demo store online, it seems that the default fields on checkout should include the following:

Email

First Name

Last Name

Company

Street Address (x2)

City

State/Province

Zip/Postcode

Country

Phone

But my page is missing several of these, and only includes:

Email

Company

City

Zip/Postcode

Phone

Fax

I have not made any changes to checkout_index_index.xml, and the theme (Ultimo) only modifies the header and footer layout blocks.

This leaves me thinking that something in the database might be causing the issue, from the migrated data.

What can I look for in the database (maybe?) that might also impact this?

If it isn't something in the database, then how can I find out if any files are instructing the system to remove fields?


texts: Magento 2 : what is magento 2 equivalent of checkout/cart?

texts: What is the magento 2 equivalent of $checkout = Mage::getSingleton('checkout/cart'); ?


texts: convert sql query to magento addFieldToFilter combine OR and AND

texts:
You can convert me this sql I did not arrive at combined OR and AND at the same time
SELECT * FROM sales_order AS main_table,
sales_order_payment AS sop
WHERE ((status = 'processing') Or
((status = 'pending') and (sop.method = 'chekmo') ))
AND (updated_at >= '2020-06-19 18:24:59')
Please, can someone help or suggest anything?


texts: To stop magento from creating its own base images of products from the ones uploaded

texts:
I am using Magento 1.9 and find that when I upload an image for a product, Magento system picks it up and creates three versions of it as a small image, thumbnail and base image. I found that the base image dimensions, it is using are 600x600 in size.

So, I tried to upload same dimension size for it in view that it will pick up and use the same image as is but still it creates a new version of it which reduces its sharpness to some extent and thereby loss in clear image (especially if text area such as a brand name is present in it.)

How can I direct Magento to pick up the same image as a base image so that the effort put in prior to upload is not wasted just because Magento creates its own version. This is observed only with product images.


texts: How can we get the date of when product came in stock in Magento 2?

texts:
I need to get the date when did product came in to stock in Magento 2. Please help

or How can I write event when product came in stock and store that date in database?


texts: How to load a layout XML file from a different page

texts:
On the "Saved Payment Methods" page, customers can look (and interact with) their saved cards.  This happens on the vault_cards_listaction page.  I want to build a separate page that interacts with the vaulted cards.

However, in order for me to render a token, I need a Magento\Vault\Block\AbstractTokenRenderer.  The current way this works is that modules with vault support add their CardRenderer to the layout page.  For example, Braintree has the following file at module-braintree/view/frontend/layout/vault_cards_listaction.xml:

<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">
        <referenceBlock name="vault.cards.list">
            <block class="Magento\Braintree\Block\Customer\CardRenderer" name="braintree.card.renderer" template="Magento_Vault::customer_account/credit_card.phtml"/>
        </referenceBlock>
        <referenceBlock name="vault.token.list">
            <block class="Magento\Braintree\Block\Customer\PayPal\VaultTokenRenderer" name="braintree_paypal.token.renderer" template="Magento_Braintree::paypal/vault_token.phtml"/>
        </referenceBlock>
    </referenceContainer>
</body>
</page>

However, I want to render cards/tokens on a different page (not on the vault_cards_listaction page).   This means I don't have access (AFAIK) to the vault.cards.list block, so I can't render the list of cards.

My best idea so far is to make my own custom vault.cards.list block, but that means that I have to write custom XML for every payment gateway that supports vaults (which doesn't play nice with 3rd party modules that use Magento_Vault).

Is there any way I can automatically grab the renderer for a particular token type?


texts:
I updated a project from Magento 1.5 to Magento 1.7.0.2.
In the latest Mage CE Version we have vat_id attribute in customer_address. During checkout this field is used to validate a customer for 0% tax calculation. This all works fine.

Strange thing however is that when var_dumping customer_address_entity the vat_id field is not present. The other vat_* related fields are however.

I need the field to update the data in addresses for existing customers that have an old customer_entity related taxvat attribute value.

Anyone an idea on how I can access the vat_id field or where it even is?


texts:
I'm currently trying to make my website PCI DSS compliant and one of the requirements is to ensure that, when an administrator user selects a new password, it cannot be the same as any of the last four password that they have used.

Is there a way to set the number of stored passwords in Magento 2.2.7 so that it will not allow an admin user to use a password they have used previously?


texts: Magento 2 Add custom field Estimate Shipping and Tax (cart page)

texts:
I'm working on one project and i wants some extra fields on cart page under estimate shipping and tax.

Hide Country field
Show State as "Province" Text
Show City as "Canton" as a Dropdown (data will load from database).
Show "District" custom field as Dropdown (data will load from database)
Show Postal Code as Dropdown (data will load from database)

i've modified vendor/magento/module-checkout/Block/Cart/LayoutProcessor.php file
Original Code
$elements = [
            'city' => [
                'visible' => $this->isCityActive(),
                'formElement' => 'text',
                'label' => __('City'),
                'value' =>  null
            ],
            'country_id' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Country'),
                'options' => [],
                'value' => null
            ],
            'region_id' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('State'),
                'options' => [],
                'value' => null
            ],
            'postcode' => [
                'visible' => true,
                'formElement' => 'text',
                'label' => __('Postcode'),
                'value' => null
            ]
        ];

After Modification
$elements = [
            'city' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('cant贸n'),
                'value' =>  null
            ],
            'country_id' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Country'),
                'options' => [],
                'value' => null
            ],
            'region_id' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Provincia'),
                'options' => [],
                'value' => null
            ],
            'postcode' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Postal Code'),
                'value' => null
            ],
            'distro' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Distro'),
                'value' => null
            ]
        ];

this code isn't working I'm facing error
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: sortOrder in /home/samarpan/mage.samarpanherbslife.com/vendor/magento/module-checkout/Block/Checkout/AttributeMerger.php on line 194

if i remove
            'distro' => [
                'visible' => true,
                'formElement' => 'select',
                'label' => __('Distro'),
                'value' => null
            ]

then it's working fine but City comes after postcode. so kindly please suggest or help me for

How to load data from database to city field (Dropdown).
How to add Custom field(Dropdown) and load data into it from database.
How to move city above Postcode
How to create, Manage and best way for Custom Tables, those link with another tables like, Country and State already linked. City Depends on State, District Depends on City, Postal Code Depends on District.

Thank you.


texts:
when i select one quantity then work correct when i select one more quantity of one product then work not correct.

   Country  Region/State    Zip/Postal Code Weight (and above)  Shipping Price
    NZL       auk             *             1                     0
    NZL       auk             *             2                     3
    NZL       auk             *             3                     5
    NZL       auk             *             4                     10


texts:
i want to make magento admin never logout in my computer. I have tried increasing cookies life time and other thing. But never got successed.

Is there any other way to edit code and make never logout the admin side?
if so, please help me. Thanks


texts: Replace Block in Layout for Specific Page

texts:
At the controller checkout_cart_index with the reference content, I want to replace this:

<block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>

With this:

<block type="multicoupon/cart_coupon" name="checkout.cart.coupon" as="coupon" template="checkout/cart/coupon.phtml"/>

What happens is instead of replacing the block, it adds a new one. I've spent hours looking into this to no avail. Is there a way to do this with my own module using just the layout or will I have to write the change to a different file?


texts: magento 2 : Remove catalog.leftnav from non anchored category page

texts:
How to remove catalog.leftnav from Only Non Anchored Category page.
I have to required catalog.leftnav in Anchored category page only.

I have done code for that,
file path, app/design/frontend/Package/theme/Magento_Catalog/layout/catalog_category_view_type_default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
            <referenceBlock name="catalog.leftnav" remove="true"/>
    </body>
</page>

But Above code remove left sidebar from Anchor category page also.


texts:
Does someone can point me to the official reference documentation for url directives such as

{{store url....}}

{{view ....}}

etc?
Thanks


texts: Updating html template not show in Magento 2 Checkout page

texts:
I use Magento 2.0 for the first time and I am trying to make some changes on Checkout page. For example, I want to change template
module-checkout/view/frontend/web/template/estimation.html,
so I copied this template to my folder theme to
'Magento_Checkout/web/template/estimation.html'
and I made some changes in it, but nothing changes. Also, for a test, I changed original template but still, no changes.

I use grunt, I deployed the code, cleared all cache. On every other pages, changes do apply, but not on checkout. Do you have any guess, what am I doing wrong?

Also a question - is there any better explanation on how does checkout page on Magento2 work than the one from Magento page?


texts: Magento 2 is giving me Fatal error: Allowed memory size of 1073741824 bytes exhausted when i am trying to save product

texts:
I am getting following errros

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 73400328 bytes) in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(93): Zend_Db_Statement_Pdo->_execute(Array) #2 /var/www/modernlamps.dk/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array) #3 public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 235

Guys, can you help me to fix this issue?

I have tried to allocate 2GB ram but still having the same error.

Magento Version: 2.3.1
Php 7.2
Nginx


texts:
I am using the following command from command line to check compiler state in magento2.3.2
php -f shell/compiler.php -- state

I found this in the following url
https://magehit.com/blog/how-to-disable-magento-2-compiler-from-command/
But I am getting an error while running the command
Could not open input file: shell/compiler.php

I know it has something to do with file paths but could not understand what, please let me know what changes I shall make to make it work.


texts:
I am facing issue with Magento 2 optimization server response
What are the measures that are required to fix this
My current Magento version in 2.3.4 running on the Cloudflare server


texts: Parent product variation to be shown in configurable product

texts:
I have configurable product where the parent variation is also needs to be shown . In Magento only the child product's variation is shown
But If parent product variation also needs to be shown then how to deal with it.???
what to do if we want to sell the parent product as well?


texts: Where are resource strings kept? Are they editable in the Admin

texts:
In our item detail page, category listing and search results, I need to change the verbiage "Regular Price" to "MSRP".  I'm new to Magento so I don't know if string resources are kept in a separate string resource file or if they are embedded in the template code.

Thanks.


texts: Custom order status not working like magento predefined order status

texts:
I created a custom order status like below.(This is a big issue that i am simply missing some small stuff and hope to figure out with the help of a member).

config.xml

<sales>
    <order>
        <statuses>
          <backorders translate="label">
            Back Orders
          </backorders>
        </statuses>
        <states>
          <backorders translate="label">
            Back Orders
            <statuses>
              <backorders default="1"/>
            </statuses>
          </backorders>
        </states>
   </order>
</sales>

mysql script

<?php
$installer = $this;
$installer->startSetup();
// Required tables
$statusTable = $installer->getTable('sales/order_status');
$statusStateTable = $installer->getTable('sales/order_status_state');

// Insert statuses
$installer->getConnection()->insertArray(
    $statusTable,
    array('status', 'label'),
    array(
        array(
            'status' => 'backorders',
            'label' => 'Back Order'
        )
    )
);

// Insert states and mapping of statuses to states
$installer->getConnection()->insertArray(
    $statusStateTable,
    array('status', 'state', 'is_default'),
        array(
            array(
                'status' => 'backorders',
                'state' => 'backorders',
                'is_default' => 1
            )
        )
    );
$installer->endSetup();

During the back order the order status is saved to backorders and it will show in the admin panel order list.
My question is the same order is not showing in the customers my account recent orders section.

Why this orders under status of backorders not showing in recent orders page?

In  the admin panel if we create an invoice the order status is changed to Processing, but if i create an invoice for the orders wich belongs to backorders are not changed to Processing.But if i completed the shipping for backorders order it will change the order status to Completed

What is the issue causing this?

This is how i update the order status in the observer

$order->setData('state', 'backorders');
$order->setStatus('backorders');
$history = $order->addStatusHistoryComment('', false);
$history->setStatus('backorders')->setData('state', 'backorders')->setIsCustomerNotified(false);
$order->save();

After order saved(with the status of backorders) the success screen is like below.

if i update the order status like this everything is fine.

$order->setData('state', 'processing');
$order->setStatus('processing');
$history = $order->addStatusHistoryComment('', false);
$history->setStatus('processing')->setData('state', 'processing')->setIsCustomerNotified(false);
$order->save();

After order saved(with the status of processing) the success screen is like below.

I can clearly understand there were some issue with custom created status.but i cannot found out why was that.


texts:
After some issues with Upgrade to latest stable versions of components I decided to rollback, so I went to System > Tools > Backups and clicked on Rollback of latest System Backup I did before the upgrade. I also did a Database and Media Backup.

Now I get the following error and it seems that a  large number of files have disappeared on the server side:

Warning: include_once(Mage/Core/functions.php): failed to open stream: No such file or directory in /var/www/web108/html/www/app/Mage.php on line 50 Warning: include_once(): Failed opening 'Mage/Core/functions.php' for inclusion (include_path='/var/www/web108/html/www/app/code/local:/var/www/web108/html/www/app/code/community:/var/www/web108/html/www/app/code/core:/var/www/web108/html/www/lib:.:/usr/share/php:/usr/share/php/PEAR:/var/www/web108/html') in /var/www/web108/html/www/app/Mage.php on line 50 Warning: include_once(Varien/Autoload.php): failed to open stream: No such file or directory in /var/www/web108/html/www/app/Mage.php on line 51 Warning: include_once(): Failed opening 'Varien/Autoload.php' for inclusion (include_path='/var/www/web108/html/www/app/code/local:/var/www/web108/html/www/app/code/community:/var/www/web108/html/www/app/code/core:/var/www/web108/html/www/lib:.:/usr/share/php:/usr/share/php/PEAR:/var/www/web108/html') in /var/www/web108/html/www/app/Mage.php on line 51 Fatal error: Class 'Varien_Autoload' not found in /var/www/web108/html/www/app/Mage.php on line 54

This is a terrible situation, completely lost here for next steps, any suggestions?


texts: Uncaught TypeError for download product magento 2.2.7 admin

texts:
Uncaught TypeError: Argument 4 passed to
  Magento\Sales\Block\Adminhtml\Items\Column\Name::truncateString() must
  be of the type string, null given, called in
  /vendor/magento/module-downloadable/view/adminhtml/templates/sales/items/column/downloadable/name.phtml
  on line 25 and defined in
  /vendor/magento/module-sales/Block/Adminhtml/Items/Column/Name.php:36 in magento 2.2.7

I have disabled all third party extension.


texts: What are main differences in Magento indexing between Magento Community Edition 2.x and Enterprise Edition 2.x?


texts: Get empty result when trying to get filterable attribute for particular category

texts:
I need to retrieve all filterable attributes for category. I'm using that snippet:

$category = Mage::getModel('catalog/category')->load($categoryId);

$layer = Mage::getModel('catalog/layer');

$layer->setCurrentCategory($category);

$attributes = $layer->getFilterableAttributes();//$attributes now is empty array

Category has product with filterable attributes, also in categories options anchor was enabled. This code using in SOAP API.

Maybe someone know where I made mistake?


texts: TypeError: require.exec is not a function error in js file

texts:
I am loading options with below code :

first_select.load(url,function(){
    first_select.change();
    first_select.closest("li").removeClass("loading");
});

Now i am getting this error :

  require.exec is not a function

anybody have any idea about this error ?


texts:
I'm using a Magento based On-line store and it seems many of the CSS changes I make on our test server work correctly however there seem to be many CSS changes I make that don't Work if they are related to the CSS you can modify using the Magento dashboard tools.

For an example, changing the colour of the price displayed on the Website will not work as it seems that in the Magento Backed a colour has been specified for " Link Color " that seems to override the colors I try to change any buttons, price etc too.

Is there a way of getting around this?

Cheers in advance

Here is a screenshot that shows that the line of CSS I modified


texts: Magento2.1 add pagination to my wishlist

texts:
Want to add pagination and toolbar to my wishlist page on customer panel.
Mean that i want to do something like list.phtml on wishlist page in customer account - customer panel.


texts: Magento getting Sql Error for M2ePro Module after Upgrade

texts:
After Upgrade Magento 1.7 to 1.9.3 Getting below error on M2ePro Module Backend

Fatal error: Uncaught TypeError: Argument 1 passed to Ess_M2ePro_Controller_Adminhtml_BaseController::_addContent() must be an instance of Mage_Core_Block_Abstract, boolean given, called in E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\community\Ess\M2ePro\controllers\Adminhtml\SupportController.php on line 49 and defined in E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\community\Ess\M2ePro\Controller\Adminhtml\BaseController.php:105 Stack trace: #0 E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\community\Ess\M2ePro\controllers\Adminhtml\SupportController.php(49): Ess_M2ePro_Controller_Adminhtml_BaseController->_addContent(false) #1 E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\core\Mage\Core\Controller\Varien\Action.php(418): Ess_M2ePro_Adminhtml_SupportController->indexAction() #2 E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\community\Ess\M2ePro\Controller\Adminhtml\BaseController.php(48): Mage_Core_Controller_Varien_Action->dispatch('index') #3 E:\Personal\Pro in E:\Personal\Project\xampp\htdocs\maya-clone-2810\app\code\community\Ess\M2ePro\Controller\Adminhtml\BaseController.php on line 105

Can any one help me on this


texts:
I have two home pages in magento 2. One abc.com and another abc.com/index.php

How can I get rid of this duplication?
How can I set canonical for homepage in magento 2?


texts: URL rewrite Path ID for home - Multiple store views

texts:
I have created a URL rewrite with the path ID "home" for my first store view, but when I want to do it with my second store view, it says that the path ID have already been used.
Can I use another path ID or what should I do?


texts: Magento 2 - Render custom product collection via list.phtml

texts:
The product grid of a category page (frontend) is rendered via layout in catalog_category_view.xml.

Lets say I have a custom product collection (which I got via

ProductRepositoryInterface::getList($searchCriteria) method

in a custom block class and want to render this collection. The rendered result should be displayed as a product grid on frontend (just like any category page).

How can this be done ?

By looking into catalog_category_view.xml there are two significant lines, which are responsible for rendering a product collection:

<block class="Magento\Catalog\Block\Category\View" name="category.products" template="Magento_Catalog::category/products.phtml">
<block class="Magento\Catalog\Block\Product\ListProduct" name="category.products.list" as="product_list" template="Magento_Catalog::product/list.phtml">

How can I provide my custom product collection to these template files, so they render my collection ?

Correct me, if I am wrong on this.

This is how my block code looks like:

<?php
namespace Mod\Mod1\Block;
use Magento\Framework\View\Element\Template;
class Main extends Template
{
protected $_filterBuilder;
protected $_filterGroupArray;
protected $_filterGroupBuilder;
protected $_searchCriteriaBuilder;
protected $_productRepository;
protected $_productFactory;
protected $_list;

public function __construct(
    \Magento\Framework\View\Element\Template\Context $context,
    \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
    \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
    \Magento\Framework\Api\Search\FilterGroupBuilder $filterGroupBuilder,
    \Magento\Framework\Api\FilterBuilder $filterBuilder,
    \Magento\Catalog\Model\ProductFactory $productFactory,
    array $data = [])
{
    $this->_productRepository = $productRepository;
    $this->_searchCriteriaBuilder = $searchCriteriaBuilder;
    $this->_filterGroupBuilder = $filterGroupBuilder;
    $this->_filterBuilder = $filterBuilder;
    parent::__construct($context, $data);
}

public function getLoadedProductCollection(){
    $searchCrit = $this->buildSearchCriteria('','','','','','5-',1);
    $list = $this->_productRepository->getList($searchCrit);
    return $list;
}
public function buildSearchCriteria(...){
....
return $searchCriteria;
}
}


texts: Magento 1 checkbox issue in the Payment Methods section from adminhtml

texts:
I have a custom checkbox in the payment method:

<input  class="required-entry" type="checkbox" value="1" name="test" />

I checked the checkbox and I changed the shipping method. After the ajax reload my checkbox is unchecked.

If I add the attribute checked='checked' (to be my default checked). I changed the shipping method and after ajax reload my checkbox remained checked.

I tried to add the checked='checked' attribute via prototype(included directly in the template), like:

$$('#sepa_payment_adyen input[type="checkbox"]').invoke('observe','click',function(field) {
        if(this.checked){
            this.setAttribute('checked','checked');
        }else{
            this.removeAttribute('checked');
        }
});

It adds the checked attribute but after the ajax reload from shipping it remained unchecked. How can I fix this ? All of the inputs from my payment method selected kept they value, except this checkbox.


texts:
I had this error message showing after I tried to upgrade the Magento 1.9.1 cm_redisSession from the magento connect interface:

  SQLSTATE[42S22]: Column not found: 1054 Unknown column 'SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(ma' in 'field list', query was: SELECT `SUM((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `lifetime`, `AVG((IFNULL(main_table.base_total_invoiced, 0) - IFNULL(main_table.base_tax_invoiced, 0) - IFNULL(main_table.base_shipping_invoiced, 0) - (IFNULL(main_table.base_total_refunded, 0) - IFNULL(main_table.base_tax_refunded, 0) - IFNULL(main_table.base_shipping_refunded, 0))) * main_table`.`base_to_global_rate)` AS `average` FROM `sales_flat_order` AS `main_table` WHERE (main_table.status NOT IN('canceled')) AND (main_table.state NOT IN('new', 'pending_payment'))";

Now I can't log in into the backend. Can you help me? What if I roll back a DB backup?


texts: How to make SOAP calls in magento2.I am using a third party API service

texts:
<?php
$client = new SoapClient(
    "https://sandbox.ws-idu.tracesmart.co.uk/v5.6/?wsdl"
);

    // Set up Classes ready for populating specific wsdl fields
    $params = new stdClass;
    $params->Login = new stdClass;
    $params->IDU = new stdClass;
    $params->Person = new stdClass;
    $params->Services = new stdClass;

    // Enter the Username and password associated with your account
    $params->Login->username                        = '';
    $params->Login->password                        = '';

    // Reference is optional/mandatory based on user settings
    $params->IDU->Reference                         = '';
    // ID and IKey should be passed to continue a previous search
    $params->IDU->ID                                = '';
    $params->IDU->IKey                              = '';
    // $params->IDU->Scorecard                         = 'IDU Default';
    $params->IDU->Scorecard                         = 'Identity Verification default';
    $params->IDU->equifaxUsername                   = '';
    $params->IDU->GlobalTransactionId                   = '';

    // Subject details
    $params->Person->forename                       = 'HEATHER';
    $params->Person->middle                         = 'JANE';
    $params->Person->surname                        = 'RUSSELL';
    $params->Person->gender                         = 'F';
    $params->Person->dob                            = '1946-04-21';

    $params->Person->address1                       = '201';
    $params->Person->address2                       = 'Julius Road';
    $params->Person->address3                       = 'Bristol';
    $params->Person->address4                       = '';
    $params->Person->address5                       = '';
    $params->Person->address6                       = '';
    $params->Person->postcode                       = 'BS7 8EU';

    // var_dump($params);
    // $results = $client->GlobalTransactionId = '1';
    $results = $client->IDUProcess($params);

    var_dump($results);
    var_dump($results->Summary);


texts: Magento 2: How to reset Customer Password from Database

texts:
It's hash for customer password in DB. So MD5 & Sha1 is not working.

UPDATE `customer_entity` SET `password` = MD5('test123') WHERE `email` = 'X@X.com';

So how to update password using database query. May be MD5(Sha1('test123'))?

How Magento is doing via code. go to vendor\magento\module-customer\Console\Command\UpgradeHashAlgorithmCommand.php

protected function execute(InputInterface $input, OutputInterface $output)
{
    $this->collection = $this->customerCollectionFactory->create();
    $this->collection->addAttributeToSelect('*');
    $customerCollection = $this->collection->getItems();
    /** @var $customer Customer */
    foreach ($customerCollection as $customer) {
        $customer->load($customer->getId());
        if (!$this->encryptor->validateHashVersion($customer->getPasswordHash())) {
            list($hash, $salt, $version) = explode(Encryptor::DELIMITER, $customer->getPasswordHash(), 3);
            $version .= Encryptor::DELIMITER . Encryptor::HASH_VERSION_LATEST;
            $customer->setPasswordHash($this->encryptor->getHash($hash, $salt, $version));
            $customer->save();
            $output->write(".");
        }
    }
    $output->writeln(".");
    $output->writeln("<info>Finished</info>");
}


texts:
On PageSpeed I am getting this : Enable Keep-Alive

https://www.example.com/
https://www.example.com/skin/frontend/example/retail/fonts/fontawesome-webfont.woff2?v=4.3.0
https://www.example.com/skin/frontend/example/retail/fonts/gotham-bold-webfont.woff2
https://www.example.com/skin/frontend/example/retail/fonts/gotham-book-webfont.woff2
https://www.example.com/skin/frontend/example/retail/fonts/gotham-medium-webfont.woff2

My htaccess

<IfModule mod_deflate.c>

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

    # Insert filter on all content
    SetOutputFilter DEFLATE
    # Insert filter on selected content types only
#    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
   # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-woff
  AddOutputFilterByType DEFLATE application/x-font-woff2
  AddOutputFilterByType DEFLATE application/font-woff
  AddOutputFilterByType DEFLATE application/font-woff
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent

    # Netscape 4.x has some problems...
    #BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    #BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

    # Don't compress images
   # SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    #Header append Vary User-Agent env=!dont-vary

</IfModule>

<IfModule mod_ssl.c>

How to resolve this ?


texts: How to show link to a products native category on product view page

texts:
How can we add a link to "current products category" on "product view page" - (not the bread crumb, but a link to the category this product is assigned to in backend)?

Magento M2 - 2.3.3


texts: logo email doesn't show on mailbox of the customer

texts:
in my case i am using magento 2.2.x , so i want to override the file "vendor/magento/module-email/view/frontend/email/header.html" in order to add a logo in the email to show the company's logo in the customer's mailbox side , but it doesn't work, i can't see the icon for the alt attribute that means the picture is there but still not showing in the header of the mail
i call the image from a custom module Mymodule_Email sequence of Magento_Email
my file inside app/design dir  to override : vendor/magento/module-email/view/frontend/email/header.htm:

                        <img src="<?php echo $this->getViewFileUrl('Mymodule_Email::images/logo.png'); ?>"
                        />

PS : when i use simple syntax it works , for example
PS : file structure and path for the image  is good : 'Mymodule_Email::images/logo.png'

can anyone help me please ?


texts: How to add logout on header links in Magento 2.3.X

texts: Can anyone tell me how to add 'sign out' option after the user is logged in on header links in Magento 2.3.X https://prnt.sc/oqe2ue


texts: rwd-theme how to move the language / currency bar

texts:
I've managed to be able to hide the language/currency bar at the top of the screen by editing the header.phtml, however when I try to move for example the following code into the footer - it doesn't appear.

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

Am I missing something, or should I also be editing the template files?

Thanks


texts: Change the value of Associate to WebSite

texts:
In the Backoffice of mine Application that uses Mangento, I have a list with all clients.

And in the Column “Site” I have 2 values, “Admin” and “Main Website”.

So, I wanted to know, when I try to edit some specific client, how can I change the “Associate to Website” value, because it is unclickable.

Thanks.


texts: Custom api development with magento not working in server

texts:
Just using following tutorials created custom api in magento and working properly in local host
http://easyway2magento.blogspot.in/2015/04/magento-custom-api-method-to-login-as.html
But when we push this code into server and run api call according to documentation.

Its give fatal error:

Fatal error: Uncaught SoapFault exception: [3] Invalid api path. in /API2_DEV/apicall.php:7

Stack trace: #0 /API2_DEV/apicall.php(7): SoapClient->__call('call', Array) #1 /API2_DEV/apicall.php(7): SoapClient->call('cb12be9e72de1f1...', 'fcustomer.check...', Array) #2 {main} thrown in /API2_DEV/apicall.php on line 7

Please help me i am  stuck here .


texts: Disable wishlist button for the product once added into wishlist

texts:
Suppose there is a product A. Once we add the product into wishlist, it should not allow us to add the same product A once again. The wishlist icon for the product should be disabled.

For our current website, if I add the same product again it increases the quantity of the product.

please help us with some solution.


texts: "Online customers" didn't show any customer (empty)

texts: I have a production magento 1.7 website. After migrated from a old server to a new one, from unknown reason the "Online Customers" under "Customers" didn't show any Online customers when there are actually many customer visit the site. I tried to google this problem but found nothing. The only change, from the old server to the new server, is the DB server switched from mysql 5.5 to MariaDB 10. Anything i can do to fix this?


texts:
We use 3 payment methods and I want to select a payment method if the customer clicks on the li class.

We use this code:

<li class="formListBlock" onclick="$('p_method_<?php echo $_code ?>').checked=true;payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?>>
<?php if(!$oneMethod): ?>
    <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
<?php else: ?>
    <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" />
    <?php $oneMethod = $_code; ?>
<?php endif; ?>
    <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?>Gratis
<?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
<span class="payment_icon_<?php echo $_code ?>">

    <select name="payment[iDeal_issuer_id]" id="ops_iDeal_issuer_id" class="required-entry">
    <option value=""><?php echo $this->__('--Please Select--')?></option>
        <?php foreach ($issuers as $key => $value): ?>
            <option value=<?php echo $this->escapeHtml($key) ?>>
                <?php echo $this->escapeHtml($value) ?>
            </option>
        <?php endforeach; ?>
    </select>

    <button type="button" class="button" onclick="payment.save()"><?php echo $this->__('Continue') ?></button>

    <?php endif; ?>

Error on Chrome console:

Failed to load resource: net::ERR_CACHE_MISS

How can I select the radio button by clicking the li and make it work on every browser?


texts: Mysql query to Model, Resource Model, Collection - Magento 2

texts:
I can easily get or set value using ORM. I felt difficult to convert mysql query logic to Model, Resource Model, Collection(ORM).

for example I am getting last one hour data using the below query

select * from chennai_cancel_order where cancel_date >= DATE_SUB(NOW(),INTERVAL 1 HOUR)

but I don't have idea about how to apply above logic to ORM.

Similarly more way of query is possible like order by, descending, limit..... etc.

please give some clarity about how to handle Mysql query in ORM.


texts:
In my controller function I'm setting cookie like

$cookie = Mage::getSingleton('core/cookie');
$cookie->set('frontAttributeLabel',$frontAttributeLabel ,time()+86400,'/');

In observer I'm retriving it's value and using it

$cookie = Mage::getSingleton('core/cookie');
$frontAttributeLabel = $cookie->get('frontAttributeLabel');

In the observer function it's working fine. After it's usage I'm deleting it using

$cookie->delete('frontAttributeLabel');

Once I'm done with the use of this observer (catalog_product_load_after) function, next time I'm visiting the page again I see it's previous value is set.
I'm using wrong function to delete cookie? or I need to pass more parameters in delete function?


texts: Price rule based on number of extra product varieties

texts:
Is it possible to make a rule that checks if there is more than one variety of a specific product in the cart, based on the custom options?

It should then apply a $10 discount for each additional product line

For example:

Product A - red
Product A - blue
Product A - purple
Product B
Product C

Should = $20 discount.


texts: Magento 2.3 & pwa studio: How can I access another store to update data or get data other than that of the default store? Is it possible?

texts:
The store is composed of different websites with multiple stores and multiple storeviews.

I'm developing a functionality to get the particular storeview depending on the location of the customer and get its product catalog with prices.

But when I go to get the information from the current store I am always in the default store using GraphQL query,

How could I get the information from any other store or set values in a different store?
Is there a GraphQl query or can I make a request to the Rest API to change store to get the products from a store using the store id or store code?


texts: Magento2 - delete all products not in a category

texts: Is there a simple way of deleting all products that does not belong to any category in Magento2?


texts: New Attribute values don't show on product page

texts:
I have a problem with the values of attributes in my Magento installation.
I have created an attribute with the weight of the products and have created some configurable products with these attribute and those were shown correctly on the webshop.
Today I tried to add new values to the same attributes, and I tried to create new products with more values (some values are the values inserted today, and some values older).
Basically, on the product page only the old one and not the new values are shown. Is there someone who knows why this happens?


texts: Where exactly to place the code to retrieve products by category

texts:
this is what I came to:

First I needed to go to a folder called Local
Then I had to create my own namespace which I called
NamespaceTesting
Then I created the name of my module MymoduleTesting
Then I had to create several folders inside MyModuleTesting like controllers, models, blocks, and etc
Inside etc, I had to add a config.xml file
Inside controllers, I added a controller.php file
Also, inform Magento of the existence of my module at
app/modules/MyModuleTexting.xml

and yes, I read that I had to clear the cache so that Magento finally gets notice of that new module but, please, I don't want to mess with the cache as this is a production site that sells a lot and I would go into panic mode if I crashed the application.

Since all I want  is to extract some data like, give me all products with their price, their description, short description belonging to a specific category, I would prefer to be able to just paste the code somewhere so that I can export it as I need that data for another database not based on Magento.

Could anyone kindly tell me where I can do that without any risk of crashing the app? Be detailed please, as I have been a few hours with Magento and I have already learned a bit.

Thank you for the editing I could not get it properly formatted>

UPDATE INFO

I know about the Magento options to export Products and Customers, but that is maybe too much. Ideally, I d like to be able to obtain the data already specific

Just visualize the category tree like

Homeopathy
OTC
Trademarks
  - A
  - B

how do I get all products from category B?

I have seen the code to collect that data, I just am not sure where to actually paste it safely.


texts: Fastest Way to Update Product Custom Attributes and Product Name, Product Weight using csv in magento1.9

texts:
We want update existing created products Product Name, Product Weight and custom attributes using csv file.
We have csv  file and want compare existing created Product SKU in website with Product SKU in csv file then we need to update custom attributes like (Product Name, Product Weight and other differnt custom attributes ).
How to do is there any way or solution please share.


texts:
I created an order payment with Redsys. The status of the order is Pending. However I can't cancel the order. Appears a message saying that "the order can't be canceled"
Why? In theory, I could cancel a order in pending.

Anyone knows what happen?

Thanks.

I'm in Magento 2.3.1.


texts: Magento2 Apis fectching product collection in entry.php file

texts:
Can anyone help me, how this content for apis is actually fetching and how the collection is getting here for the below file:

vendor/magento/module-catalog/Model/Product/Gallery/Entry.php

Screenshot:
https://prnt.sc/i3rq6u

Actually the above api screenshot content is comming from below function in Entry.php file:

public function getFile()
    {
        return $this->getData(self::FILE);
    }

How the content is loading here.

Thanks


texts: Magento Indexer Not Adding Attribute to flat table in custom attribute

texts:
Magento Not adding custom Attribute to flat table.....
I have a market place extension...which have some attribute but some attributes not adding to flat table...due to my extension not working....

attribute setting is...

$catalogEavSetup->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'approval', array(
    'group' => 'General',
    'sort_order' => 21,
    'type' => 'int',
    'backend' => '',
    'frontend' => '',
    'label' => 'Approval',
    'note' => '',
    'input' => 'select',
    'class' => '',
    'source' => 'vendorsproduct/source_approval',
    'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'visible' => true,
    'required' => false,
    'user_defined' => false,
    'default' => '1',
    'visible_on_front' => false,
    'unique' => false,
    'is_configurable' => false,
    'used_for_promo_rules' => false,
    'used_in_product_listing'  => true,
));

whole setting is correct..but due to mysql limit 65536...some attributes is not adding to flat tables...
I need to know that how to add these attribute in flat tables...


texts: How to get custom table values into front-end checkout address section in Magento 2

texts:
For custom requirement, we are saving few values in our custom table with customer id and address id. We are trying to display those values in the checkout page address section based customer,address id's.

We found that, Below file is rendering address sections.

module-checkout/view/frontend/web/template/shipping-address/address-renderer/default.html

Can any one help up us on how to render my custom table values into these address sections.

Help would be appreciated.


texts: Disable/Enable product through the Magento 2 Api with Rest

texts:
I'm new to Magento Rest Api and I was wondering where can I could mark a single product disabled/enabled with a rest call.

I've tried to change the visibility property via /V1/products/ but that does not change anything.

Thanks in advance!


texts: How do I create a cart percentage discount with a coupon code?

texts: I'm trying to create a 25% discount code for the whole cart, not just for one product. Is this possible? I'm pretty new to Magento and the only rules I find is either a percentage for one product or for the whole cart, but then it's accessible even without a code.


texts:
i'm in big trouble. I was working on my Magento theme and suddendly something wrong with up my website.
i'm using bootstrap but it's not loading my version but the one of a plugin i installed.
if i disable the plugin it's loading the useragent css and if i analyze the console i've got this result

 my test developement the theme it's correct. so i think i messed up something with magento installation.

Please help, i can kill myself right now.

THANKS!!!


texts: Magento2: How to create multiple storefronts

texts:
I'm trying to create new store & website which will run at http://127.0.0.1/lapis/in/. Here is the process I've followed.
1. Created new store, website and store view named Indian Store, Indian website & Indian Store view respectively with website code in.
2. In Stores->Configuration->Web changed website URL to http://127.0.0.1/lapis/in/.
3. Assigned category at products->Categories after switching store view to Indian Store view.

Created folder named in inside root magento installation with 2 files index.php and .htaccess with following code
index.php code inside in directory

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'in';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
$app = $bootstrap->createApplication('..\Magento\Framework\App\Http');
$bootstrap->run($app);

Copied .htaccess root file inside in directory and added
 RewriteBase /in/
Now when I'm navigating to http://127.0.0.1/lapis/ , it works fine but http://127.0.0.1/lapis/in/ throws 500 server error.
I'm missing something here or my process of creating new website is wrong?


texts: Frontend styling has disappeared, and I can't get it back

texts:
Disclaimer: I'm new to Magento 2 development as of Nov 2018, and new to development generally as of mid-2017.  So I'm new to asking development-help questions too.  Most of the time I can figure it out on my own.  Please forgive me for anything I do that is something I should know not to do.

My problem:
All styling is gone from my frontend (admin is fine).

When the problem started:
When I was trying to add a custom font via an '_extend.less' file.  (Creating this file and using it to make changes was the method that was being used in a tutorial I was following to make custom styling changes.)

(I have Magento set to Developer Mode.)

I have set everything back to the way it was before trying to add the custom font (as best I can tell), but the problem still remains.  Around the time I was trying to add the custom font, I remember using the command cache:disable, and maybe this messed something up?  I've since used cache:enable, but the CLI responds with There is nothing to change in cache status.

I have searched online over the course of 3 days for a total of around 10 hours for a solution.  Just so you know I've really tried to figure this out on my own, the following are some things I have tried many (many!) times, and in many variations as to their order and combination (I'm pretty sure new developers do this a lot!):

indexer:reindex
cache:clean
setup:upgrade
setup:static-content:deploy -f
deploy:mode:set production

(The idea here was apparently setting it to Production Mode would clear things in a certain way, and then I was supposed to set it back to Developer Mode, and this would fix the problem. But I get an error part way through setting it to Production Mode when it tries to deploy static content, and it shows a message in bright red: Command returned non-zero exit code.  Plus above that there's a line that reads: Something went wrong while deploying static content. See the error log for details.  Is the error file it's talking about in 'var > log'?  Because all the files in there have a 'Date modified' showing 8 days ago, which is way before this problem started. What log file is this referring to?)
using the 'Flush Static Files Cache' button (In Admin: System > Cache Management)
using the 'Flush JavaScript/CSS Cache' button (In Admin: System > Cache Management)
using the bright orange 'Flush Magento Cache' button (In Admin: System > Cache Management)
setting directory and file permissions (pretty much to 777 every time)
rm -rf view_preprocessed/*
rm -rf static/*
rm -rf var/{cache,di,generation,page_cache,view_preprocessed}
and I couldn't begin to tell you how many times I've hit 'Shift+F5' to refresh the storefront page

'No styling' seems like such a simple issue, but I can't figure this one out. Any help would be greatly appreciated!

I'm on Apache, all served from Google Cloud Platform (static IP), Bitnami stack.

Edit: screenshots added


texts: What happens if two people at the same time trying to buy same product with qty=1?

texts:
I have bit confused about this. If there is a one product whose quantity = 1 and two customers
are trying to purchase it at the same time who can buy it? The person who starts the
checkout first or who clicks on the place order button first? Or who pass the payment method first?

Any clarification on this will be appreciated.


texts: Adding inline translation to injected HTML

texts:
I'm only 2 weeks old to Magento but I believe I'm getting my head around it well. I have a task to enable language translations on the store front, which works well using inline translation but that only works for elements that Magento has created upon page generation.

This gets tricky for me because once the page is generated, an AJAX call is made which returns HTML and inserts that in to the page. The inline translation doesn't allow me to translate that from the store front, understandably.

My idea at the moment is to hack the inline translator code to allow me to edit injected HTML but I'm struggling to find the code in Magento that creates the red dotted line around elements. Could somebody give me a pointer to where this is please.

Alternatively, I'm open for suggestions for doing this.

We have a custom product importer that some ex-developer has created. This works by reading an XML file that a client supplies us and some voodoo happens and the products appear in the store. One idea we have here is to put the translation data in to that importer.

I should add that the injected HTML is stored in files on the file system.

Ste,


texts: Magento2 : When Custom Price applied Product price is not displayed proper with tax on Cart

texts:
Steps to reproduce:

1.Please configure tax settings and tax rules as seen in screenshots.

2.Now login in storefront using Demo Customer Access provided by Magento
  (roni_cost@example.com).

3.Please integrate the below code to apply custom price.

Observer :

namespace Vendor\MyModule\Observer;

use Magento\Framework\Event\ObserverInterface;

class BindPriceToCart implements ObserverInterface
{

public function execute(\Magento\Framework\Event\Observer $observer)
{
        $price = 100;
        $event = $observer->getEvent();
        $item = $event->getQuoteItem();
        $item->setCustomPrice($price);
        $item->setOriginalCustomPrice($price);
        return $this;
}

}

Event :
checkout_cart_product_add_after

Configurations that needs to be set :

Expected Result :

Actual Result :


texts: Magento 1 - How to write module google analytic "Conversions > Ecommerce Tracking"?

texts:
In Magento 1.9, How to write module google analytic "Conversions > Ecommerce > Shopping Analysis " ? : include : view detail, add to cart, checkout one page ?
If have link example or show me step by step, thanks!


texts: How to give free shipping based on GRAND TOTAL (+coupon)

texts:
I tried to avoid giving free shipping based on subtotal, but it doesn't work.
If I apply coupon for example 50% customer pays so little, but gain the free shipping.
How to achieve the scenario that any shopping cart rules do not affect free shipping.
I'm using also VAT tax (so grand total is presented including and excluding tax).


texts: URL Redirect from Catalog Search to Category Page

texts:
Is it possible to redirect from a catalog search to a category page?

For example, from "catalogsearch/result/?q=test" to "test.html"? A user would search for the term "test" and would be redirected to the category page of the category called "Test".

I've tried Catalog->URL Redirects, but it doesn't work.


texts: Magento Admin - Reorder - New Increment ID

texts:
In magento 1.9.x if i click in "reorder" in an order page he duplicate the increment_id of original order and add "-1" in the end.

ex:
order-> increment_id = 12345

reorder-> increment_id = 12345-1

where i can found this function?
there is a way to change this function? because i need to create new increment_id

ex:
order-> increment_id = 12345

reorder-> increment_id = 12346

thank you very much


texts: When I edit my block in Magento 2, Front-end updates but not Block?

texts:
I tried to change my HTML code in my BLOCK. The problem is when I press Save I can see the changes on the live site but my block is still showing the old code.

It also returns "Something went wrong" panel.

Why does site update but Magento 2 doesnt?

Any ideas?


texts: Magento 2 : In custom login extension Default welcome message not changed

texts:
I am working with custom extension.

When I login with custom extension login page I am not getting customer name in the top right side instead of default welcome message.

I want name of customer who is login here as in default it is coming.

Thanks in advance.