texts: Image is uploaded but unable getting entry in database Magento 2

texts:
I am performing image uploading task in admin form Magento 2. I can choose the image and also can upload it in my module but I'm not getting the entry of that image into my database's table field.

This is my controller.

<?php
namespace Webkul\Grid\Controller\Adminhtml\Grid;

class Save extends \Magento\Backend\App\Action

{

protected $_mediaDirectory;
protected $_fileUploaderFactory;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\Filesystem $filesystem,
    \Magento\MediaStorage\Model\File\UploaderFactory $fileUploaderFactory
)
{
    $this->_mediaDirectory = $filesystem->getDirectoryWrite(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA);
    $this->_fileUploaderFactory = $fileUploaderFactory;
    parent::__construct($context);
}

public function execute()
{
    /*For Image Upload*/

    /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
    $resultRedirect = $this->resultRedirectFactory->create();

    try{
        $target = $this->_mediaDirectory->getAbsolutePath('mycustomfolder/');
        /** @var $uploader \Magento\MediaStorage\Model\File\Uploader */
        $uploader = $this->_fileUploaderFactory->create(['fileId' => 'content']);
        /** Allowed extension types */
        $uploader->setAllowedExtensions(['jpg', 'jpeg', 'gif', 'png', 'zip', 'doc']);
        /** rename file name if already exists */
        $uploader->setAllowRenameFiles(true);
        /** upload file in folder "mycustomfolder" */
        $result = $uploader->save($target);

        if ($result['file'])
        {
            $this->messageManager->addSuccess(__('File has been successfully uploaded'));
        }
    }
    catch (Exception $e)
    {
        $this->messageManager->addError($e->getMessage());
    }
    return $this->resultRedirectFactory->create()->setPath(
        '*/*/upload', ['_secure'=>$this->getRequest()->isSecure()]
    );
    /*For Image Upload Finished*/

    $data = $this->getRequest()->getPostValue();
    if (!$data) {
        $this->_redirect('grid/grid/addrow');
        return;
    }
    try {
        $rowData = $this->_objectManager->create('Webkul\Grid\Model\Grid');
        $rowData->setData($data);
        if (isset($data['id'])) {
            $rowData->setEntityId($data['id']);
        }
        $rowData->save();
        $this->messageManager->addSuccess(__('Row data has been successfully saved.'));
    } catch (Exception $e) {
        $this->messageManager->addError(__($e->getMessage()));
    }
    $this->_redirect('grid/grid/index');
}

/**
 * Check Category Map permission.
 *
 * @return bool
 */
protected function _isAllowed()
{
    return $this->_authorization->isAllowed('Webkul_Auction::add_auction');
}
}


texts: Magento2: Display popup when click Add to cart button

texts:
Hi I want to show a popup when a user click add to cart button. The popup allows user choose inventory. If product available in inventory selected, add product to cart. If not, throw the error message.

Please help me, How to do that? Thanks!


texts: Why i upgrade extensions (at Magento Connect Manager) and "Magento Installation Wizzard" is now forced show. How can i fix it?

texts:
i just have a problem with an extension upgrade.

I have upgrade some extensions, all to stable version, but then the site is down, and it force me to be redirect to the Magento Installation Wizard!

I try to backup the /app/etc/local.xml file, but its not working. I delete the file ones, the site goes white. Then restore file, and site was back again to the installation wizard.

All files at the FTP are there, and look good. PLEASE HELP!
THANKS!!!!


texts:
I have a Magento 1.9 Store. I want to sell coupon codes as a product name "USD 1000 coupon code". So Customer buy this product then send the order email. This email consist with a unique coupon code which has 1000 USD discount.

This coupon code unique, 1 time use, per customer.

If customer buy 2 qty then send 2 unique coupon codes.

Please help me to sort out this. Appreciate your help.

Thank you


texts: Varien_Event_Observer getName() method returns null

texts:
I don't understand why the Varien_Event_Observer object has getters and setters for th 'name' attribute. However when using it in the method defined by my config xml, calling getName() returns null?

I would of take a guess that the unique node name you use in the config xml should be used as the observer name?

eg.

 <events>
    <catalog_product_save_after>
        <observers>
            <my_special_unique_name>
                <type>singleton</type>
                <class>my_special/catalog_product_save_after_observer</class>
                <method>myMethod</method>
            </my_special_unique_name>
        </observers>
    </catalog_product_save_after>
</events>

public function myMethod($observer) {

    //Returns null , not what I would expect to be "my_special_unique_name"
    $observer->getName();

}

Am I missing something, was there intention there and it was never added?


texts: Can't display all upsell products in magento, 1 product is missing

texts:
I don't understand why upsell doesn't show 1 product in the frontend. All upsell products are showing up except for 1. I've reindexed all data, but still no changes. All upsell products are in stock, they all have quantity and they are all enabled, but still 1 product doesn't show up in the frontend. I've tried to check only 1 product, which is the product that is missing but didn't show up, any help, please. Thanks. By the way, it is not modified in the catalog.XML so the product limit is not the issue.

here is the backend http://ecommerceoutsourcing.co/projects/UMD/magento/skin/frontend/default/theme542/images/upsell_products_backend.png

and here is the frontend http://ecommerceoutsourcing.co/projects/UMD/magento/skin/frontend/default/theme542/images/upsell_products_frontend.png


texts: When editing attributes for a product it removes it from category in magento 2

texts:
I'm getting all product entity id's via sql and setting an attribute is_featured to 0 then saving the product this has the added effect of removing the product from all categories. Can someone tell me why?

foreach( $result as $k => $row){
  $product = $objectManager->get('Magento\Catalog\Model\Product')->load($row['id']);
  $product->setStoreId(0);
  $product->setIsFeatured(0);
  $product->save();
}


texts: Magento 2.0.7 is not creating certain files in pub/static and pub/media

texts:
For some reason mage 2 is not creating files that seems to be needed for a proper working of the shop. For example there is a file http://dev.domain.co.uk/pub/media/catalog/productno_selection requested but a 404 is delivered because it is not there. I guess that might be a file containing the amount of items in basket since my top right corner does not state the products amount and I can't reach the basket without going directly in there via url. The top right basket doesn't let me in, stating that no products are in basket... which is wrong.

Going to that url directly delivers an empty page.

The other files missing are javascript-files that should be created by mage2 in pub/static too, it seems. For example I mapped the right filename (.js is not needed or allowed) to the left handle

'jquery_191':           'js/jquery-1.9.1.min',

Then mage2 requests the filename http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/de_DE/jquery_191.js but this file does not exist.

Going to that file directly gives some mage bugs claiming that the file does not exist.

What's wrong? Why are these files not created? I think it brings certain problems to my installation.

PS: Errors in chrome console after setup:upgrade and setup:static-cache:deploy with the correct language.

Error parsing header X-XSS-Protection: 1; mode=block, 1; mode=block: expected semicolon at character position 14. The default protections will be applied.
(index):366 GET http://dev.domain.co.uk/pub/media/catalog/productno_selection 404 (Not Found)
productno_selection:1 GET http://dev.domain.co.uk/pub/media/catalog/productno_selection 404 (Not Found)
jquery-migrate.js:21 JQMIGRATE: Logging is active
require.js:1895 GET http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/en_GB/jquery_191.js req.load @ require.js:1895load @ require.js:1639load @ require.js:820fetch @ require.js:810check @ require.js:840enable @ require.js:1143enable @ require.js:1511(anonymous function) @ require.js:1128(anonymous function) @ require.js:132each @ require.js:57enable @ require.js:1090init @ require.js:774(anonymous function) @ require.js:1416
require.js:166 Uncaught Error: Script error for: jquery_191
http://requirejs.org/docs/errors.html#scripterrormakeError @ require.js:166onScriptError @ require.js:1681
require.js:1895 GET http://dev.domain.co.uk/pub/static/frontend/company/celo_theme/en_GB/script_code_header.js req.load @ require.js:1895load @ require.js:1639load @ require.js:820fetch @ require.js:810check @ require.js:840enable @ require.js:1143enable @ require.js:1511(anonymous function) @ require.js:1128(anonymous function) @ require.js:132each @ require.js:57enable @ require.js:1090init @ require.js:774(anonymous function) @ require.js:1416
require.js:166 Uncaught Error: Script error for: script_code_header
http://requirejs.org/docs/errors.html#scripterrormakeError @ require.js:166onScriptError @ require.js:1681


texts: Magento 2 Overwriting Templates - Destination directory for template files

texts:
I have created a new theme in Magento 2. This theme has LUMA as it's parent / fallback.

So I want to change the header.phtml file but I don't want to touch the core file so I've enabled paths from the backend so I can find out where the files are.

So, I now have the path to the core file:

/home/mydomain/public_html/mage/vendor/magento/module-theme/view/frontend/templates/html/header.phtml

Now I want to copy the header.phtml and paste it somewhere in my theme directory?

Well, that is my question ... Where should I place the copy of this file?


texts:
I have a doubt about 2 crons in Embedded ERP Plugin For Magento

Cron

update_stocks
execute_tasks

Whose cron execution expression are as below

<cron_expr>* */1 * * *</cron_expr>

Which i assume is used to run the cron every 1 hour
but the expression resolve to and the cron scheduler schedules these two tasks every minute , due to which i think the CPU usage of our server is going high.

My Question is whether is it intended that the above cron are scheduled to run every minute or is there an error in the expression and the correct expression would be

0 * * * *

to make it run once every hour.


texts:
I am building a contact form which calls a post controller and emails some of the posted values to a specified recipient.

My question Is How can I'secure' this form other than CAPTCHA? I looked at the Magento Contact form and that doesn't seem to have any mechanisms to stop someone simply calling the POST method and spamming the site.

Obviously I am checking/sanitizing inputs, but it seems like I should be at least incorporating a nonce or some kind of barrier.

Is there a 'best practice' in Magento?


texts: Magento 2: dataprovider getData() get called twice losing my requestdata

texts:
In magento 2 I created a grid through UI components. It gets populated with my dataprovide class getData method:

public function getData()
{
    $questionSetId = $this->request->getParam('questionset_id');

    if (!$this->getCollection()->isLoaded()) {
        $this->getCollection()->addFieldToFilter('questionset_id', $questionSetId);
        $this->getCollection()->load();
    }

    return $this->getCollection()->toArray();;

}

I don't know if its normal that this function gets called twice, I have a param question_set in my url but the second time getData() gets called, $questionSetId becomes null which means that no data will be loaded because of the use of a filter.

What am I missing here?

PS. Magento 2.1.9


texts: Magento 2.4.1: DDL statements are not allowed in transactions

texts:
I was trying to rollup a fresh Magento 2.4.1 with sampledata installation in my local machine but I was stuck on the mentioned error
DDL statements are not allowed in transactions
What I did:

Created a Magento 2.4.1 project using Composer
Install Magento using setup:install

Everything works fine until I started to install sampledata through bin/magento sampledata:deploy
Error:
...
Module 'Magento_SalesSampleData':
DDL statements are not allowed in transactions
PHP Fatal error:  Uncaught Exception: User Error: Some transactions have not been committed or rolled back in...

composer version: 1.10.17
PHP version: 7.4.11
Deploy mode: developer
I searched everywhere and find some solutions online but none of them worked.
This is really annoying since we are wasting so much time just for the setup instead of the actual time we are coding.


texts: Magento 2.2 - Custom options are not saved programmatically on cart update

texts: Initially, while adding an item to cart the custom options and other details are saved successfully to cart. When reupdating the cart with updated custom options are not saved in cart programmatically.


texts: Installed magento 2.3 CE with sample on windows 10 using Xampp. Installation was completed but after clicking on the "Go to admin" shows blank screen. please help


texts: User gets logged in but still shows error message in magento 2.3.3

texts:
My customer gets logged in successfully into their account but still magento shows error message.
https://nimb.ws/GicM2b
How to resolve this?


texts: Magento 2: How to get the price of a product?

texts:
I know this might be a simple question to ask, but I'm wondering what's the proper way to get the price of a product?

I know most of you might say "use Magento\Catalog\Api\Data\ProductInterface::getPrice()", but that returns the price like it's set in the admin. Just the value as it is in the database. But note that to answer the question "what's the price of the product?" there are several factors you need to consider:

What's the store view?
What's the current currency?
What's the tax?
Are the catalog prices including or excluding tax? (configuration settings)
Should I display / calculate taxes on the frontend? (configuration settings)
Is there a special price? (and what's the from/to date?)
Are there any special catalog price rules?
Are there tier prices?
If the customer is logged in, are there different prices?
Are there other modules that manipulate the price in some way?

As you can see, a simple getPrice() won't do. So what I'm wondering, is there any Service Contract that I'm not aware of that takes all of the above in consideration and returns me the proper price?


texts: Magento 2: Update shipping Methods on Custom field dropdown selection on Shipping form checkout page

texts:
i want to update shipping method on checkout page during custom field select option change in shipping form.

According to magento 2 default functionality shipping estimation reloads with zipcode and country field selction but i want this also reload with custom field.


texts: Magento 2 an extension to filter Multi stores by zip-code or address

texts:
Is there is a Magento 2 extension to show address and/or zipcode field on homepage header and ask the user for their location then purpose local store view for selected zip code?
I cant find any solution on the web. Looking For something 100% like bellow/
https://lolamarket.com
https://minibardelivery.com
thank you!


texts: Share login details on multiple websites in Magento

texts: I have set multiple websites on my magento store.I used Marius extension to share cart on different sites.Now i am facing login issue that i have to login on every site individually.I want that after login to one site it will automatically logged me in on other two sites.All the three sites are in one magento Folder.Should i use cookie but i am not sure that either it's good idea or not ? Any alternative way to share session among sites


texts: shopping cart rules for multiple countries?

texts:
OK, starting to panic, as I have a deadline today and cannot workout the logic for shopping cart rules. Can someone help?

I need to have
- country A and B, with subtotal of 150 or greater - gets free shipping
- country C, with subtotal of 250 or greater - gets free shipping

I can't work out how to have this nested logic working. Any tips pls!?

Fixed it with this:

If ANY  of these conditions are TRUE :
If ALL  of these conditions are TRUE :
Subtotal  equals or greater than  100
If ANY  of these conditions are TRUE :
Shipping Country  is  Austria
Shipping Country  is  Germany

If ALL  of these conditions are TRUE :
Subtotal  equals or greater than  200
If ALL  of these conditions are TRUE :
Shipping Country  is  Switzerland


texts:
Using Magento 1.9.2.2

I want to change Sub Total Label(Just label) everywhere...

I found that it's coming from

app/design/frontend/base/default/template/tax/checkout/subtotal.phtml

From this line

<td style="<?php echo $this->getStyle() ?>" class="a-right" colspan="<?php echo $this->getColspan(); ?>">
    <?php echo $this->getTotal()->getTitle() ?>
</td>

I've checked

app/code/core/Mage/Sales/Model/Quote/Address/Total/Subtotal.php
app/code/core/Mage/Sales/Block/Order/Totals.php

But not coming from both above files... so from where it can be coming?


texts: Cross-Domain Session sharing is not working Magento 1.9.2

texts:
I have 2 stores set up in two different domain names in one Magento Installation. I have enabled the SID on Frontend to share the session between the two stores using SID as an Url parameter. But it seems to be not working in any case. The login and cart session are still not able to share.

Is it due to any configuration regarding the server or in Magento we are missing some customization. I tried changing the session.use_trans_sid inside php.ini files. Then also it seems to be not working.

I am observing that the SID is in the Url but it not taking the session id instead it is creating a new session id. So please look into this and get back to me ASAP on this.


texts: Cleaning up Orphan Entries in core_config_data

texts:
Let's say I have a Magento 2 system that was migrated from Magento 1.
The folks who migrated this system ported over everything in the core_config_data table.  This includes configuration paths that don't exist in Magento 2, as well as configuration paths from extensions that are no longer installed on the system.
Are there tools for automating cleanup of this old data? If not, are there known techniques or workflows for cleaning up this old data?
Are there known bad effects for leaving these unused data fields in the core_config_data table? (other than future confusion for folks looking at this data)


texts:
I'm running the Amasty Invisible Captcha extension in Magento 1.7.x and keep getting 'Something is wrong'.

Tracking this down the extension gets an error when it tries to use getBody to read the response.  It appears that Zend_Http_Response Object indicates that the response is chunked, but in reality it is not

`2018-05-25T19:32:56+00:00 DEBUG (7): Zend_Http_Response Object
(
    [version:protected] => 1.1
    [code:protected] => 200
    [message:protected] => OK
    [headers:protected] => Array
        (
            [Content-type] => application/json; charset=utf-8
            [Content-encoding] => gzip
            [Date] => Fri, 25 May 2018 19:32:56 GMT
            [Expires] => Fri, 25 May 2018 19:32:56 GMT
            [Cache-control] => private, max-age=0
            [X-content-type-options] => nosniff
            [X-xss-protection] => 1; mode=block
            [Server] => GSE
            [Alt-svc] => hq=":443"; ma=2592000; quic=51303433; quic=51303432; quic=51303431; quic=51303339; quic=51303335,quic=":443"; ma=2592000; v="43,42,41,39,35"
            [Connection] => close
            [Transfer-encoding] => chunked
        )

    [body:protected] => ¬��1
�  нSȟS��s4���'#SHE$�{��xOC��5���;a[Ie-��Xx׏� �������0-�O�Ct�ºr��`�T��
��,�м¬�m�/g
)

I had to change from

if (!empty($googleResponse) && array_key_exists('success', $answer = json_decode($googleResponse->getBody()))) {

to

if (!empty($googleResponse) && array_key_exists('success', $answer = json_decode(gzdecode($googleResponse->getRawBody())))) {

Has anyone else seen this?  Amasty suggested I either pay them $59 or post here, so I chose the latter...


texts: Magento 2.3 performance drop after running php bin/magento setup:di:compile

texts:
While working on a development instance I installed the stripe payment module and then ran

php bin/magento setup:di:compile

I hadn't previously done this on this install and it's been running for over a month totally stable and with acceptable performance for a small aws instance. However since this was run the performance of the system has dropped to unacceptable levels and pins php7.2-fpm to 100%.

It's so slow even the cron jobs start backing up and consuming more and more cpu time.

Any ideas what might be going on and what I can do to debug it?

EDIT
I've added new relic onto the system and can see the following

Category    Slowest components  Count   Duration    %
Custom  Magento\Framework\Config\Dom::_mergeNode    731 38,700 ms   53%
Custom  Magento\Framework\Config\Reader\Filesystem::_readFiles  18  7,950 ms    11%
Custom  Magento\Framework\Config\Dom::_getMatchedNode   113 5,020 ms    7%
Custom  Magento\Framework\Config\Dom::validateDomDocument   8   2,790 ms    4%
Custom  Magento\Framework\ObjectManager\Config\Mapper\Dom::convert  7   2,740 ms    4%
Custom  Magento\WebapiAsync\Code\Generator\Config\RemoteServiceReader\Communication::read   1   2,570 ms    4%
Remainder   Remainder   1   12,700 ms   18%
Total time          72,500 ms   100%


texts: Out of Stock & Backorder Status: Does default magento behaviour require "In Stock" status to purchase a backorder item

texts:
When a product has:
qty <1, and
is set to "Backorders: Allow Qty Below 0..."

Is it also required that Stock Availability be set to In Stock before a customer can purchase this item?

For example:

Qty: 1,
Backorders: Allow Qty Below 0,
Stock Availability: Out of Stock

Can this product be purchased under default Magento behaviour? Or does it require stock availability to be set to "In Stock"?

Magento documentation is silent on this.


texts: How to get the an order through rest api?

texts:
Get the an order through rest api

Here is the script i tried

<?php

    $userData = array("username" => "admin", "password" => "Abcd1234");
    $ch = curl_init("http://example.com/index.php/rest/all/V1/integration/admin/token");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($userData));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Content-Lenght: " . strlen(json_encode($userData))));

    $token = curl_exec($ch);
    var_dump($token);

    //$data = array("id"=>1);
    $ch = curl_init("http://example.com/index.php/rest/V1/orders/000000021");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    //curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

$token = curl_exec($ch);

var_dump($token);

//var_dump(json_encode($data));

error message:

  {"message":"The consumer isn't authorized to access
  %resources.","parameters":{"resources":"Magento_Sales::sales"}

the admin already has "ALL" resources, i don't know why the error message will show that.


texts: Magento 1.9 and 2.3 admin details scrape attempts

texts:
I'm not sure if this is the best place for this post...  I checked around and it didn't seem like there was anywhere else to post it.

I just upgraded from Mage 1.9 to 2.3. In the last few months I have been getting emails submitted to my contact forms by scammers attempting to scrape my admin creds.

They send an email with a fake link to a non existent order and say they placed an order but need to change their shipping details. If I click the link it takes me to what looks like an admin panel but its not my URL. My guess is that they are attempting to scrape my admin deets. The email must have been submitted by a real person because I have google reCAPTCHA v3 on my current install.

This is the fake admin panel.

This is on of the emails

Does anyone have any tips on how to get these emails to not pass the security check? Is there something I can do to prevent emails with URLs from being submitted? I hope no one out there falls for this sucky hack attempt.

I got them on my old site as well. I don't get that many orders so I know its fake straight away. I ship the orders myself and would recognize the names of the most recent customers. But for someone with a bigger site with separate people fulfilling orders and processing customer emails it could slip through


texts:
I've managed to get a 100% picture quality on the fotorama slider when opening the picture, but on the product page the pictures are still compressed, getting good quality when clicking (opening) on them. I've changed the AbstractAdapter - set to 100% -, the Gd2.php set to quality=0 (no compression) and also the image.php got changed to $quality = 0 ;.

What can I do to get a full quality on the product page. It is very important to have a good picture quality to sell our services ...

Thank you in advance for some help!


texts: Default language changed in parts of admin backend

texts:
My default backend language is German. This week I've noticed that some texts in the backend changed language to English. For example:

Language dropdown in the footer is set to German. I've been developing a module but haven't changed any translation files. The module is now disabled - the problem still persists.

Do you know what happened or can advise how to investigate this?


texts:
I'm using Magento 1.9 and have set up a second store following the instructions here - https://www.properhost.com/support/kb/30/How-To-Setup-Magento-With-Multiple-Stores-And-Domains

When I go to domain2.com, it looks normal but all of the links on the page point to domain1.com.  Do I need to do something so all of my links are for domain2.com?

Thanks in advance!


texts: Magento 2 setShippingMethodsOnCart GraphQL mutation

texts:
I am try to implement Paypal Express with PWA, I am refer https://devdocs.magento.com/guides/v2.3/graphql/payment-methods/payflow-express.html link to implement Graphql API. I have completed 1 to 6 steps.
In 7 step i am try to implement setPaymentMethodOnCart mutation. In 7 step
As per magento link suggestion we need to pass PayPal token, Payer ID and Cart ID in setPaymentMethodOnCart mutation, but when i pass PayPal token, Payer ID to mutation i got the error Field \"token\" is not defined by type PaymentMethodInput, In 7 step description magento has mention we need to pass PayPal token, Payer ID in mutation but when i am try to do this i am getting error.

Request :

mutation {
  setPaymentMethodOnCart(input: {
      cart_id: "xxxxY2GZeLjGKdC4bea6R8dGFvXfxxxx"
      payment_method: {
          code: "payflow_express"
          token: "xxxx"
          payerid: "xxxx"
      }
  }) {
    cart {
      selected_payment_method {
        code
        title
      }
    }
  }
}

Anyone have idea how can we pass Token and Payer Id.


texts: add cash on delivery fee to the PDF invoice magento 1.9

texts:
I have enabled Cash on Delivery with a new extension. but the Fee doesn't show on the PDF invoice.

how can I make it shown on it?
Magento 1.9

I have added new extension for the COD because the default COD from Magento doesn't have fee.


texts: B2C/B2B website - Best practices and feedback

texts:
I am developing a Magento 1 store which caters to 80% B2C and 20% B2B  and I'd like to hear your opinion and experiences about what is the best way to go regarding stores vs website vs customer group layout handle.

My requirements look like this:

Same products with different prices and different templates for the catalog and product page
B2B will be produced on demand, so stock for B2B would either have to be infinite/9999 or not tracked (will use an extension for separate inventories)
Tax classes do not apply

In any case B2B customers will be required to login. I am wondering which you would consider the best option in regards of ease of administration and complexity:

Create XML customer group layout handle for showing different templates and use customer group pricing
Different stores with customer group pricing
Different websites with different product prices

The advantage of using different websites would be that I could disable frontend output of certain modules and would not have to make the customer group check inside the templates, but on the other hand it would probably create more database overhead and slow down indexing as the store grows.

I am curious to know if anyone has already done a similar setup and could share their experience.


texts: How to debug dropped Authorize.net transactions in M2

texts:
We are seeing seemingly random drops in responses from Auth.net using Magento 2.

With the debug log on, we saw a customer place 2 orders, the first has no response, and the 2nd, placed half an hour later, went through fine. There is no record of Auth.net ever receiving the first request, and the customers order is still in 'Pending' state (rather than 'Processing,' which occurs after the payment has been confirmed).

The 2nd order was placed, there is a record of the transaction in Auth.net and the customers order has been processed in Magento as expected.

How can I determine why the initial order did not receive a response? From the payment log:

[2018-08-31 16:53:04] main.DEBUG: array (
  'request' =>
  array (
    [order data] // FIRST ORDER, NO RESPONSE
  ),
) [] []
[2018-08-31 17:17:51] main.DEBUG: array (
  'request' =>
  array (
    [order data] // SECOND ORDER, SUCCESSFUL RESPONSE
  ),
) [] []
[2018-08-31 17:17:54] main.DEBUG: array (
  'response' =>
  array (
    'x_response_code' => '1',
    'x_response_reason_code' => '1',
    'x_response_reason_text' => 'This transaction has been approved.',
    ...
  ),
) [] []


texts: Keyboard "Enter" button is not calculating value

texts:
here  when we enter zip code [110001] & click on "check"
button through "mouse" its displaying shipping charges above "ADD TO CART" button.

but when we entered zip code and press "Enter" button from keyboard, than its not calcualting shipping charges.

we are using following code to find shipping charges :

phtml

<input placeholder="Enter your PIN Code" class="input-text validate-postcode<?php if ($this->isFieldRequired('postcode')):?>
required-entry<?php endif;?>" type="text" id="estimate_postcode" name="estimate[postcode]"
value="<?php echo $this->htmlEscape($this->getFieldValue('postcode')) ?>" onkeydown="if (event.keyCode == 13) { return false;}" />

script

<script type="text/javascript">
function estimateProductShipping()
{
    var estimationUrl = '<?php echo $this->jsQuoteEscape($this->getEstimateUrl());?>';
    var items = $$(['.shipping-estimation-form input',
                    '.shipping-estimation-form select',
                    '#product_addtocart_form input',
                    '#product_addtocart_form select']);

    var validationResult = true;

    // Check the valid input
    if (!items.map(Validation.validate).all()) {
        return;
    }

    var parameters = Form.serializeElements(items, true);
    $('shipping-estimate-loading-message').show();
    $('shipping-estimate-results').hide();
    new Ajax.Updater('shipping-estimate-results', estimationUrl, {
        parameters: parameters,
        onComplete: function() {
            $('shipping-estimate-loading-message').hide();
            $('shipping-estimate-results').show();
        }
    });

}
//]]>
</script>

I am trying following script. but its not working :

<script type="text/javascript">
function estimateProductShipping()
{
    var estimationUrl = '<?php echo $this->jsQuoteEscape($this->getEstimateUrl());?>';
    var items = $$(['.shipping-estimation-form input',
                    '.shipping-estimation-form select',
                    '#product_addtocart_form input',
                    '#product_addtocart_form select']);

    var validationResult = true;

    // Check the valid input
    if (!items.map(Validation.validate).all()) {
        return;
    }

    var parameters = Form.serializeElements(items, true);
    $('shipping-estimate-loading-message').show();
    $('shipping-estimate-results').hide();

    document.getElementById('zipcode').onkeypress = function(e){
        if (!e) e = window.event;
        var keyCode = e.keyCode || e.which;
        if (keyCode == '13'){

    new Ajax.Updater('shipping-estimate-results', estimationUrl, {
        parameters: parameters,
        onComplete: function() {
            $('shipping-estimate-loading-message').hide();
            $('shipping-estimate-results').show();
        }

        }
    });
    }
 }
}
//]]>
</script>


texts: Trying to make layered navigation accordion style (with divs)

texts:
Trying to make this work but seems not having any effect... What am I doing wrong?

With help from @Shyam I got the following working solution:

    <?php $_filters = $this->getFilters() ?>
    <?php foreach ($_filters as $_filter): ?>
    <?php if($_filter->getItemsCount()): ?>

        <div class="widget <?php echo strtolower($this->__($_filter->getName())) ?>">

                <?php echo $this->__($_filter->getName()) ?>

<?php echo $_filter->getHtml() ?>

    <?php endif; ?>
    <?php endforeach; ?>


texts:
Right now In magento we have four exam

Magento Front-end certified Developer
Magento Certified Developer
Magento Certified Developer Plus
Magento Solution Specialist

Can any one tell me which exam is more tougher and why, and what level of knowledge you should have before going to give one of the exam from above


texts: Override link color in custom less file, Magento2

texts:
I want to change the color of the links in my template.

How can I achieve this by using _theme.less?


texts:
I checked My website in Gtmetrix it is asking to Compress CSS & Js files.

How can I achieve this?


texts: How can I get tax rates for all countries?

texts:
I have set up tax rates for 60 countries but I want to have every country covered. I tried this in the CSV file

"* 19%","*","*","*","19.0000","","","","MwSt.",""

but Magento doesn't accept a * for all countries. Is there a list for all countries where I can just copy from?

Thank you!


texts: Magento 1.9.1. CE : Disabling core_url_rewrite

texts:
I'm looking for an effective solution to disable completely core_url_rewrite table. I've disabled the Url Rewriting on the backend, but each time i add or update a product, an url_key is written to this table.

I don't need this feature.

Anybody have a solution to skip this step when I add/update product or when a execute the reindexation.


texts: Magento 1.9 layout getChildHtml not loading

texts:
For some reason my childhtml is not loaded inside a template file.

I updated my local.xml file with:

<catalog_product_view>
    <reference name="product.info">
        <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs" template="page/html/breadcrumbs_product.phtml"/>
        <block type="catalog/product_list_related" name="catalog.product.related.top" as="related_top" template="catalog/product/list/related_top.phtml"/>
        <block type="catalog/product_view" name="seotitle" as="seotitle" template="catalog/product/seotitle.phtml"/>
        <!--Add Tabs-->
        <block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml">
            <action method="addTab" translate="title" module="catalog">
                <alias>description</alias>
                <title>Description</title>
                <block>catalog/product_view_description</block>
                <template>catalog/product/view/description.phtml</template>
            </action>
        </block>
    </reference>
</catalog_product_view>

Inside catalog/product/view/description.phtml I load:

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

But for some reason that file is not loaded. It works perfect for the default catalog/product/view.phtml template.

What am I missing?


texts:
I just upgraded to Magento 1.9.3.7 via SFTP. When I tried to reindex all indexes and recompiled everything, I received the following error:

PHP Fatal error:  Uncaught Mage_Core_Model_Store_Exception in /var/www/webroot/public_html/app/code/core/Mage/Core/Model/App.php:1377
Stack trace:
#0 /var/www/webroot/public_html/app/code/core/Mage/Core/Model/App.php(848): Mage_Core_Model_App->throwStoreException()
#1 /var/www/webroot/public_html/app/Mage.php(353): Mage_Core_Model_App->getStore(NULL)
#2 /var/www/webroot/public_html/app/code/core/Mage/Log/Helper/Data.php(47): Mage::getStoreConfig('system/log/enab...')
#3 /var/www/webroot/public_html/app/Mage.php(547): Mage_Log_Helper_Data->__construct()
#4 /var/www/webroot/public_html/app/Mage.php(811): Mage::helper('log')
#5 /var/www/webroot/public_html/app/code/core/Mage/Core/functions.php(247): Mage::log('Warning: simple...', 3)
#6 [internal function]: mageCoreErrorHandler(2, 'simplexml_load_...', '/var/w in /var/www/webroot/public_html/app/code/core/Mage/Core/Model/App.php on line 1377

Please suggest a solution to fix this error.


texts: product detail page - move block to primary product container

texts:
I would like to move the static block (a custom block from infortis ultimo theme) block_product_secondary_bottom to the container_product_primary_1 container after product.info.price. How do I do that? thanks

below is part of the catalog_product_view.xml

    <referenceContainer name="content">
        <block class="Infortis\Base\Block\Product\View" name="product-view-wrapper" template="product/view.phtml" before="-">
            <container name="container_product_image_1" label="Product View, Image Column" />
            <container name="container_product_primary_1" label="Product View, Primary Column, Container 1" />
            <container name="container_product_primary_2" label="Product View, Primary Column, Container 2" />
            <container name="container_product_secondary_1" label="Product View, Secondary Column, Container 1" />
            <container name="container_product_secondary_2" label="Product View, Secondary Column, Container 2" />
            <container name="container_product_lower_primary_1" label="Product View, Lower Primary Column, Container 1" />
            <container name="container_product_lower_primary_2" label="Product View, Lower Primary Column, Container 2" />
            <container name="container_product_lower_secondary_1" label="Product View, Lower Secondary Column, Container 1" />
            <container name="container_product_lower_secondary_2" label="Product View, Lower Secondary Column, Container 2" />
            <!-- Static blocks -->
            <block class="Magento\Cms\Block\Block" name="block_product_secondary_bottom">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_product_secondary_bottom</argument>
                </arguments>
            </block>
        </block>
    </referenceContainer>

    <!-- Insert product view blocks into the new product view wrapper -->
    <move element="product.info.main" destination="product-view-wrapper" />
    <move element="product.info.media" destination="product-view-wrapper" />
    <move element="bundle.options.container" destination="product-view-wrapper" />
    <move element="product.info.details" destination="product-view-wrapper" />
    <move element="catalog.product.related" destination="product-view-wrapper" />
    <move element="product.info.upsell" destination="product-view-wrapper" />

    <!-- Move some blocks to new positions -->
    <!-- <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final" /> -->
    <!-- <move element="product.info.social" destination="product.info.main" after="-" /> -->
    <move element="product.info.overview" destination="product.info.main" before="product.info.price" />
    <move element="container_product_primary_1" destination="product.info.main" before="product.info.price" />
    <!-- <move element="container_product_primary_2" destination="product.info.main" after="-" /> -->

    <!-- Move some blocks outside the "product.info.main" to manipulate their position inside template file -->
    <move element="page.main.title" destination="product-view-wrapper" />
    <move element="product.info.review" destination="product-view-wrapper"/>


texts: How to mention the magento version compatibility in composer.json

texts:
I am creating a module in Magento 2. Now I am writing composer.json. Here I write supporting PHP version

"require": {
    "php": "~5.6.0|^7.0.0",
  },

How do I write my module will be supported by Magento version greater than 2.1, not support by 2.0

I found

 "magento/framework": "^102.0.0",
"magento/module-backend": "^101.0.0"

What is the meaning of above lines . is it the version of Magento?
what are 102.0.0 means?


texts:
I'm trying to defer a CSS file through default_head_blocks.xml.
After reading through as much as possible on here - and across the internet - I came across an answer suggesting to add defer="defer". This appears to have worked well on my JS files, but not on CSS. Many of the responses to that solution also stated that they had issues. Could anyone here please help me understand the best way of going about deferring CSS through layout (default_head_blocks.css)? This is for a non-essential chat plugin we're using for customer service, which doesn't need to render right away.
Thank you!


texts: Migrate only customer and sales orders tables from Magento 2.1 to 2.4.1

texts: I need to migrate customer and sales tables from Magento 2.1 to 2.4.1. What would be the best way to do it ? As i know, magento provides migration tool. From the manuel, i see this tool is used for migration from magento 1 to magento 2.


texts: Magento 2 Add Group Title and its own Tabs in Customer Admin edit view

texts:
We need to show Separate group title and Tabs under it in Customer Admin edit view like attached.

We can see new tabs under 'CUSTOMER INFORMATION' Group if we do like this

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_form">
            <block class="[Modulegroup]\Customer\Block\Adminhtml\Edit\Tab\Companydetails" name="customer_edit_tab_company_details">
                <action method="setTabLabel">
                    <argument name="label" xsi:type="string">Company Details</argument>
                    <argument name="sort_order" xsi:type="number">10</argument>
                </action>
            </block>
        </referenceBlock>
    </body>
</page>

in app/code/[Modulegroup]/Customer/view/adminhtml/layout/customer_index_edit.xml

We need to show this new tabs also as a separate group and its sub tabs. How can we do that?


texts: Filter in left layered navigation not showing in Fresh installed Magento1.9.2.4

texts:
I have installed Magento 1.9.2.4, in which I have not written a single line of code there and not any custom or third party module installed there.

I have just created few categories and products at backend.

When I go category page (product listing page) at forntend, filter are not visible there below category filter.

There is an attribute color, I have assigned it on products.

But this attribute is not visible at frontend. Below are the things which I have checked double and sure about --

1) I have assigned color attribute to Default attribute set.

2) color attribute has Use In Layered Navigation option set to Filterable (with result)

3) Have cleared cache and reindex.


texts: Magento2 : How to remove product attribute for new attribute set using installation script

texts:
How to remove the existing product attribute with newly created product attribute set using InstallSchema or UpgradeSchema in Magento2.

I have created one attribute set "My Custm" now I want to remove the country_of_manufacture attribute from my "My Custm" set.


texts: How to add delivery step in checkout page in magento 2

texts:
I want to add delivery date step in checkout page.
I mean
Shiping -----> Delivery ------> Payment


texts: How to remove close button from minicart and when all product gets deleted then it should automatically close popup?

texts:
I overridden content.html file and removed below code

 <button type="button"
        id="btn-minicart-close"
        class="action close"
        data-action="close"
        data-bind="attr: { title: $t('Close') }">

</button>


texts: Link of image is not working in magento 2

texts:
I added one Image with a link. Now link is showing up in the console but nothing happens when I click on Image.

here is my code


texts: Layout Update XML for category not working - Magento 2.2.2

texts:
I want to use the different file for a category but not working.

For that I have change under Catalog > Categories >  Layout Update XML

I have check with both arguments and action but not working

Path of my list File : Magento_Catalog::product/my-own-list.phtml

Using Action

<referenceBlock name="category.products.list">
     <action method="setTemplate">
        <argument name="template" xsi:type="string">Magento_Catalog::product/my-own-list.phtml</argument>
     </action>
</referenceBlock>

Using Argument

<referenceBlock name="category.products.list">
<arguments>
<argument name="template" xsi:type="string">Magento_Catalog::product/my-own-list.phtml</argument>
</arguments>
</referenceBlock>


texts: Magento 2 : How to put custom text in form validation?

texts:
I have this message when i validate post code

How to change it?
I tried overriding postcode-validator.js

define([
'jquery',
'mageUtils',
'Magento_Ui/js/model/messageList'], function ($, utils, messageContainer) {
'use strict';

return {
    validatedPostCodeExample: [],

    /**
     * @param {*} postCode
     * @param {*} countryId
     * @return {Boolean}
     */
    validate: function (postCode, countryId) {
        var patterns = window.checkoutConfig.postCodes[countryId],
            pattern, regex;

        this.validatedPostCodeExample = [];

        console.log("RADI" + postCode + countryId);

        $.get("/checker/PostalCode/CheckPostalCode", {data:postCode}, function (data) {
            console.log("Response text " + data.data);
        });

        return true;

    }
};});

But this display only this default message. I tried adding this in postcode input field but no luck:

$('input[name=postcode]').attr('data-msg-required','Please can you work!.');


texts: Add Custom field for Category in magento2

texts:
I want to add TextArea in Admin Edit category Page.

How to do this.


texts: I do not know why, but when I now enter any category, it displays all products from the category. I have set limit listing 24 product to page but dispaly all products from category.


texts: Show popup when update qty in mini cart using ajax magento

texts:
When I update qty in mini cart if qty is greater than the qty of products in stock, I want to show popup "The requested quantity for ...(my product name) is not available." using AJAX.

How to do that?

Thanks very much.


texts: I would like to change the default grid/list view based on the category. There is 1 category I  would like to change to a list view only. Is this possible through Custom Layout Update under Manage Categories?


texts: How to check if product is already in cart Magento 1

texts:
I have products with one quantity for each product. So, I want to disable the Add to Cart button if that same product is in the cart and change the text of the button to Already in Cart, Go to Cart and to Change URL to Cart. How can I achieve this?? I am using Magento 1.9.3.8

Any help/suggestion is appreciated. Thank you!


texts:
If i have a product collection in a multi store environment and i wish to also retrieve a specific attributes value from another store with my collection result, how is the best way to do this?

For example, i have english, french and german store.

Each product has a custom attribute, called company_description.  I want to be able to be able to get the collection from one store but also retrieve the company_description as it is set in the other 2 store views also.

It needs a join but i dont how best to do the manual eav joining.

So -

// In english store context
$productCollection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('company_description');

I then need to do something with a join so i can get all 3 descriptions as:

company_description
company_description_fr
company_description_de


texts:
Magento 1.8.1

I'm having a problem with special price and grouped products.
If I set a special price and and a "to date", the price on productview page changes to the normal price but not on the productlist page. See images...
Special price = 36,40
Normal price = 43,80

Why will the price not change on the productlist page?


texts: Putting default for category and main website?

texts:
When I create a product I always forget to put the category and the website?
Is it possible to put a default for the main category and a default for the main website?
I have already put a default so that the stock is on for a product with this sql :

insert into core_config_data values ( null, ‘default’, 0, ‘cataloginventory/item_options/is_in_stock’, 1 );

Is there also something for the defaults of the category and the website?
thx
gp


texts: Data Migration Error related to CREATE TRIGGER

texts:
i'm getting the error when i try to run data step for the data migration tool. The extension "codisto" has been uninstalled while ago. Please advise

[Zend_Db_Statement_Exception]
  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th
  e right syntax to use near ';
  /* end codisto change tracking trigger */
  END;
  INSERT INTO m2_cl_cataloginvent' at line 4, query was: CREATE TRIGGER codisto_cataloginventory_stock_item_update AFTER UPDATE ON cataloginventory_stock_item FOR EA
  CH ROW
  BEGIN
  /* start codisto change tracking trigger */
  IF EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'codisto_product_change') THEN INSERT INTO `codisto_product_change` SET product_id = NEW.produ
  ct_id, stamp = UTC_TIMESTAMP() ON DUPLICATE KEY UPDATE product_id = product_id, stamp = UTC_TIMESTAMP(); IF;
  /* end codisto change tracking trigger */
  END;
  INSERT INTO m2_cl_cataloginventory_stock_item (`item_id`, `operation`) VALUES (NEW.item_id, 'UPDATE')ON DUPLICATE KEY UPDATE operation = 'UPDATE';
  END

  [PDOException]
  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for th

  e right syntax to use near ';
  /* end codisto change tracking trigger */
  END;
  INSERT INTO m2_cl_cataloginvent' at line 4


texts: How to move payment methods to the right side of checkout page of Magento 2?

texts: Move payment methods section to right side of the page in Magento 2 checkout, is there any possible way to do this in layout level?


texts: Display static block in category page based on applied filters in layered navigation?

texts: how display the static block content based on the applied filters in the category page of the Magento 2


texts: Update product visibility to search only programmaticallly. $product->setVisibility(3) does not work, break the script

texts:
I have this script to update product attributes, everything else run fine until i added this line below of code to update visibility to search only.
I know i can update it through catalog product grid, but would like to know why this doesn't work.

->setVisibility(3)

or

->setVisibility(search_only)

or

->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_SEARCH)

more details:

 /*check url key*/

 /*holder for new url key in case it's a duplicate*/
//$name = $product->getName();
//$url = preg_replace('#[^0-9a-z]+#i', '-', $name);
//$url = strtolower($url) . 'discontinued';
$currentURL = $product->getUrlKey();
$urlKey = $currentURL;
$storeId = 1;
//echo $storeManager->getStore()->getStoreId() . '
'; //here returned 1
    $isUrlDuplicate;
    $urlKey .= '.html';
    $connection = $resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);
    $tablename = $connection->getTableName('url_rewrite');
    $sql = $connection->select()->from(
                    ['url_rewrite' => $connection->getTableName('url_rewrite')], ['request_path', 'store_id']
            )->joinLeft(
                    ['cpe' => $connection->getTableName('catalog_product_entity')], "cpe.entity_id = url_rewrite.entity_id"
            )->where('request_path IN (?)', $urlKey)
            ->where('store_id IN (?)', $storeId)
            ->where('cpe.sku not in (?)', $sku);
    $urlKeyDuplicates = $connection->fetchAssoc($sql);
    if (!empty($urlKeyDuplicates)) {
    //  return false;
        $isUrlDuplicate = 0;
    } else {
        //return true;
        $isUrlDuplicate = 1;
        //if is duplicate, add eol to url
        $newURL = $currentURL . '-eol';
        $product->setStoreId(1)->setUrlKey($newURL);
        echo 'setting new url key to ' . $newURL  .'
';
    }
echo 'original url key is '.$currentURL . ' is duplicate? ' . ( $isUrlDuplicate > 0 ? 'yes' : 'no') .'
';

//$price = trim($data['price']);
echo 'Getting product SKU: '.$sku.', with EOL Status: '.$product->getIsEol().'
';
echo 'Updating product SKU: '.$sku.', with EOL Status: '.$status.'('.$option_id.')'.'
'; // .' and Price:'.$price.'
';
$product->setIsEol($option_id)   // use option_id here
->setStoreId(1) // this is needed because if you have multiple store views, each individual store view will get "Use default value" unchecked for multiple attributes - which causes issues.
->setCustomStockStatus($status_id)
->setMetaDescription('Discontinued')
->setVisibility(3)   //this line break the script  //VISIBILITY_IN_SEARCH VISIBILITY_IN_CATALOG VISIBILITY_BOTH
//->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED)
->save();

error_log

[07-Jun-2019 00:12:42 UTC] PHP Fatal error:  Uncaught PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'digital-to-analog-audio-converter.html-1' for key 'URL_REWRITE_REQUEST_PATH_STORE_ID' in /home/mystore/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /home/mystore/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/mystore/public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(93): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/mystore/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
#3 /home/mystore/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /home/mystore/public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT  INTO `u...', Array)
#5 /home/mystore/public_h in /home/mystore/public_html/vendor/magento/module-url-rewrite/Model/Storage/DbStorage.php on line 220


texts: No Shipping quotes being returned - receiving "Access Denied"

texts:
The UPS Shipping Method suddenly stopped working yesterday. Upon enabling debugging for the service, it returns:
    [result] => \\
\<TITLE>Access Denied\</TITLE>
\\
\
Access Denied\

You don't have permission to access "http&#58;&#47;&#47;www&#46;ups&#46;com&#47;using&#47;services&#47;rave&#47;qcostcgi&#46;cgi&#63;" on this server.\

Reference&#32;&#35;18&#46;44bc7768&#46;1610719663&#46;4729d456
\
\

I know it's likely to be a local configuration issue, but also wondering if the UPS endpoint was removed or changed recently?
I'm not sure how best to proceed. Any pointers would be greatly appreciated.


texts:
Magento 1.8 Admin Login Issue  . Unable to login admin for first time. again i try login admin for second time it is working fine.

I tried the below solution but No Luck

http://magento.stackexchange.com/questions/26071/magento-1-9-can-t-login-to-admin-panel
http://magento.stackexchange.com/questions/50213/chrome-and-ssl-problem-with-login-and-cart
https://www.yireo.com/tutorials/magento/magento-administration/651-unable-to-login-into-the-magento-backend
http://stackoverflow.com/questions/15491819/magento-admin-login-not-working-in-chrome-but-works-fine-for-firefox


texts: How many time I am able to upload my extension in Magento Marketplace?

texts:
I am upload my extension in Magento Marketplace but it is rejected more than 3 times for minor content error, I have question that Magento Marketplace give how many try to re upload my extension ?

Is there any limitation (No of try) to re-upload my extension ?


texts: Magento search Rest API how to get products all the detail in the response?

texts:
I want to get product all the detail in Search Rest Api response but Magento default is returning only id and custom_attributes attributes.
Api :- `http://127.0.0.1/magento/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=MS09
Response :-
{
"items": [
    {
        "id": 484,
        "custom_attributes": [
            {
                "attribute_code": "score",
                "value": "607.6608886718750000"
            }
        ]
    }
],
"aggregations": {
    "buckets": [
        {
            "name": "category_bucket",
            "values": [
                {
                    "value": "12",
                    "metrics": [
                        "12",
                        "1"
                    ]
                },
                {
                    "value": "16",
                    "metrics": [
                        "16",
                        "1"
                    ]
                }
            ]
        }
    ],
    "bucket_names": [
        "category_bucket"
    ]
},
"search_criteria": {
    "request_name": "quick_search_container",
    "filter_groups": [
        {
            "filters": [
                {
                    "field": "search_term",
                    "value": "MS09",
                    "condition_type": "eq"
                }
            ]
        }
    ]
},
"total_count": 1

}


texts:
I wanted to use https for all pages.

For this I tried changing unsecured base URL to https in web configuration and in back-end.

But at that time,the page is not loading at all, error is "too many redirects"

I am running in localhost,but used servo to get forwarding and there by using https.

This is how my htaccess file looks like

<IfVersion < 2.4>
order allow,deny
deny from all
</IfVersion>
<IfVersion >= 2.4>
Require all denied
</IfVersion>


texts: changing a Percentage value form a minus to a positive

texts:
I am using this code to work out how much much someone is saving on a sale product

<?php
   // Display Percentage
   $totalPercent = (($_finalPrice / $_regularPrice*1.2 ) *100) - 100;

   echo "
";
   echo "Saving you: ".round($totalPercent)."%";
   echo "
";
?>

It is giving me back the correct discount amount but it is displaying as negative
EG. when the customer save 44% is says Saving you: -44%
So the question is how can I convert the negative number to a positive?

Thank you


texts: Magento 2.3 - How to Attach file to welcome email

texts:
How do we send the welcome email with a file attached to it in magento 2.3.

I've found "Fooman Email Attachments", but it doesn't let me attach file to welcome email


texts:
Is there any way to install and setup progressive web apps on windows 10 ?
and suggest me best tutorial or guide me for same

ThankYou


texts: magento2 jquery element.click is not working

texts:
I have used anchor tag with some id, and want to perform ajax call on its call by using id.click() but its not working.here is my code in file view.phtml

and jquery is


texts:
I'd like to add a large/complex JS file to my module. It's this: https://github.com/google/open-location-code
From what I can tell, it's not being added at all.
/app/code/Abc/Pp/view/frontend/requirejs-config.js
var config = {
    map: {
        '*': {
            openlocation: 'Abc_Pp/js/openlocation',
        }
    }
};

/app/code/Abc/Pp/view/frontend/web/js/openlocation.js
//this is a large js file. do I need to add anything to it?

/app/code/Abc/Pp/view/frontend/templates/pp.phtml
require(['jquery', 'openlocation'], function($, openlocation) {

            OpenLocationCode.encode(43.807714,-79.462525, OpenLocationCode.CODE_PRECISION_EXTRA)
        });

I am not sure if this is related, but I see this error:
require.js:1895 GET http://blah.com/pub/static/version1608224210/frontend/abc/abc_theme/en_US/b.js net::ERR_ABORTED 404 (Not Found)


texts:
I am trying to install some extension with the way thats described in the docs.

I uploaded the unziped folder in my root directory and ran the command php f bin/magento setup:upgrade

this threw me the following error: Could not open input file: f

So I tried to replace f with the folder of my extension and entered

php dpd_magento bin/magento setup:upgrade

but nothing happened.

When I do it without the dpd_magento it works through some process but the extension, doesn't seem to be installed either way.

Edit

Seems that the module name is stated wrong - I can't find anything thats matching the commented name - see the following screenshot:


texts: Onepage checkout returns error 500 in Magento 1

texts:
I installed a theme in Magento 1 that is just working with onepage checkout. In general that is fine, but somehow it is not working. First, I type in my billing address/shipping address, but it stops and then it redirects me to the cart page.

However, if I debug the javascript in chrome, I get

  500 (Internal Server Error)

  POST

  http://127.0.0.1/magento/index.php/checkout/onepage/saveBilling/

So, I was searching for the saveBilling Method in /app/code/core/Mage/Checkout/Type/onepage.php. But this function works fine and returns no error.

Any idea what next steps I could do to find that error? is it possible to extend that Method maybe? If yes, how can I look up for it?


texts: How can i translate shipping address and order summary text in magento2

texts: I an not able to translate  Shipping address, Order summary text in Magento 2


texts:
I've always wondered what is the meaning of the tables :

eav_entity
eav_entity_datetime
eav_entity_decimal
eav_entity_int
eav_entity_store
eav_entity_text

They are always empty. They are created in versions before 1.6 in app/code/core/Mage/Eav/sql/eav_setup/mysql4-install-0.7.0.php and later they carried to the install script for versions 1.6+ /app/code/core/Mage/Eav/sql/eav_setup/install-1.6.0.0.php
I saw that there is a resource model linked to one of the tables Mage_Eav_Model_Resource_Entity_Store (maybe there are others) but nothing happens to/with it.

Is there any use to these tables or is this an other "feature" that was started and not implemented like the layout version or admin breadcrumbs for example.


texts: How to call custom 503 page without error message in developer mode?

texts:
I have create custom error template into pub\errors\custom folder and Customize 503.phtml template file and write custom message into it.

In Site Default Mode and Production Mode Template File Working Well except developer mode.

So, can anyone tell me how to call my custom template file message in developer mode.

Thanks in advance...!


texts: file_get_contents(): SSL operation failed with code 1. OpenSSL Error - Login Error

texts:
After submitting the email and password getting the below error. Kindly help me with this. As per the error login below is the error

 Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading in /home/decure/public_html/vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php on line 72


texts: Vimeo embad video not playing in magento2.3

texts:
When I add Youtube embed URL in an iframe then it is working fine but when I add Vimeo embed URL in an iframe then it showing error in the console like below:

Refused to frame 'http://player.vimeo.com/' because it violates the following Content Security Policy directive: "frame-src 'self' geostag.cardinalcommerce.com geo.cardinalcommerce.com 1eafstag.cardinalcommerce.com 1eaf.cardinalcommerce.com centinelapistag.cardinalcommerce.com centinelapi.cardinalcommerce.com www.paypal.com www.sandbox.paypal.com *.youtube.com *.cardinalcommerce.com *.google.com *.cybersource.com facebook.com www.facebook.com *.kxcdn.com youtube.com www.youtube.com platform.twitter.com google.com".


texts: How to edit the sorting order of New Products displayed on Magento homepage

texts:
I am showing new products on homepage with the code

{{block type="catalog/product_new" name="home.catalog.product.new" alias="product_homepage" template="catalog/product/new.phtml"}}

Now the results are shown from the oldest to newest.

How can i configure the ascending / descending, so i can see the newest to oldest ?


texts: Magento 2.4.2 Window10 localhost Xampp 404 not found

texts:
I just installed Magento 2, it shown the success page result however the homepage and admin is not found.

404 Not Found
The requested URL was not found on this server.
Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.4.16 Server at localhost Port 80

Magento 2.4.2
Window10 64
XAMPP 3.2.4
Elasticsearch-7.11.2
Composer 2.0.11


texts: All sorts of trouble with SSL offloaded via Cloudflare

texts:
We are setting up a new Magento 2.1.5, and use CloudFlare for some protection and offloaded SSL.

I have set Base URL to http://shop.shmakerspace.org and Secure Base to https://shop.shmakerspace.org

I set the Offload header to X-Forwarded-Proto, and HTTP_X_FORWARDED_PROTO and X_FORWARDED_PROTO to no avail.

We also set the following in the .htaccess:

SetEnvIf X-Forwarded-Proto https HTTPS=on

When I then apply that and clear all caches, the whole site goes crazy due to 404 errors for the static content.

I put a test.php with the phpinfo() in the site root, and I can see the X_FORWARDED_PROTO header, and also that HTTPS=on


texts: Magento 2: Problems Extending Product Image Gallery

texts:
I'm trying to change the image gallery so that it doesn't display the product name as a default image caption.  After tracing through the code I found the getGalleryImagesJson method of the Magento\Catalog\Block\Product\View\Gallery class that fit the bill.  I added my own class, extended the core one, set my preference line in di.xml and added the <sequence> node in my module.xml.  My class is being utilized and no errors are thrown.  However, even if I blank out my entire class so I'm not modifying any functionality at all, the thumbnail scroller at the bottom of the fotorama widget isn't there when my class is in use.  If I comment out the <preference> line in my di.xml the thumbnails come back.  This makes no sense at all and I'm stumped.  Any ideas?

di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Override the Product Image Gallery to remove the default caption -->
    <preference for="Magento\Catalog\Block\Product\View\Gallery" type="Mymodule\Catalog\Block\Rewrite\Product\View\CWGallery" />
</config>

module.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Mymodule_Catalog" setup_version="1.0.0">
        <sequence>
            <module name="Magento_Catalog" />
        </sequence>
    </module>
</config>

Mymodule/Catalog/Block/Rewrite/Product/View/CWGallery.php

Note: This is the final version of my rewrite.  Originally I had only overwritten the getGalleryImagesJson method.  When that didn't work properly I began adding more things, including the constructor and any usage of getConfigView

<?php
namespace Mymodule\Catalog\Block\Rewrite\Product\View;

use Magento\Catalog\Helper\Image;
use Magento\Framework\Data\Collection;
use Magento\Framework\Json\EncoderInterface;
use Magento\Catalog\Block\Product\View\Gallery;

class CWGallery extends Gallery
{
    public function __construct(
        \Magento\Catalog\Block\Product\Context $context,
        \Magento\Framework\Stdlib\ArrayUtils $arrayUtils,
        EncoderInterface $jsonEncoder,
        array $data = []
    ) {
        parent::__construct($context, $arrayUtils, $jsonEncoder, $data);
    }

    public function getGalleryImagesJson()
    {
        $images = json_decode(parent::getGalleryImagesJson(), true);

        $i = 0;

        foreach ($this->getGalleryImages() as $image)
        {
            if (!$image->getLabel())
                $images[$i]['caption'] = "";

            $i++;
        }
        return json_encode($images);
    }

    public function getImageAttribute($imageId, $attributeName, $default = null)
    {
        $attributes =
            $this->getConfigView()->getMediaAttributes('Magento_Catalog', Image::MEDIA_TYPE_CONFIG_NODE, $imageId);
        return isset($attributes[$attributeName]) ? $attributes[$attributeName] : $default;
    }

    /**
     * Retrieve config view
     *
     * @return \Magento\Framework\Config\View
     */
    private function getConfigView()
    {
        if (!$this->configView) {
            $this->configView = $this->_viewConfig->getViewConfig();
        }
        return $this->configView;
    }
}
?>

UPDATE

After struggling with this for hours I learned about the Plugin functionality in Magento 2 and tried that (I'm new to M2 so I don't know all the fancy new tools).  This works!  I did an after plugin for that same method and it successfully massages the caption without breaking the whole gallery widget.

But I would still like to understand why my original method didn't work.  It seems like everything was correct, no errors, and my code was being executed.  So why did it break things down the line?


texts:
I'm trying to add a new container to a layout (extending Magento Blank) but it's not rendering in HTML. I added the following to:

app/design/frontend/VENDOR/MYTHEME/Magento_Theme/layout/default.xml

<container name="mike.container" as="mikeContainer" label="Mike Container" htmlTag="div" htmlClass="mike-container" />

I cleaned the cache and refreshed the page and then looked at the source code rendered by my browser but a div with a class of "mike-container" doesn't exist.

Do I need to do something else?

Thank you


texts: magento2 how to change product price while change the value of text field?

texts:
Hi i would like to change my product price dynamically while change the custom option text field value.

I have written the code as shown below

app/design/frontend/Smartwave/porto/Magento_Catalog/templates/product/view/options/wrapper.phtml

<script>
require(["jquery","Magento_Catalog/js/price-utils"],
function(jQuery,priceUtils) {
var finalPrice=500;
var formatedPrice = priceUtils.formatPrice(finalPrice);
jQuery('span.price-final_price > span.price-wrapper >span.price').text(formatedPrice);
});
</script>


texts:
I’m looking for a faster way to retrieve a list of SKUs of "in stock" products.

I’m using this code

$products_collection = \Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('sku');

\Mage::getSingleton('cataloginventory/stock')->addInStockFilterToCollection($products_collection);

return $products_collection->getColumnValues('sku');

but it’s quite slow, because first it gets all products then filter them by "in stock".

Are there any faster query to execute? Maybe using an inverse style: first get only IDs of "in stock" products then get only their SKUs?


texts: Magento 2 Seo title product override not working

texts:
I overrided the Magento\Catalog\Block\Product\View.php adding this code

protected function _prepareLayout()
{
    parent::_prepareLayout();
    $this->pageConfig->getTitle()->set($title . '- suffix');

    return $this;
}

And added the
<preference for="Magento\Catalog\Block\Product\View" type="Indetach\Catalog\Block\Product\View" />

But it's not working....


texts: How can use CustomerData to store custom value in magento 2?

texts:
i want use CustomerData to store image & content on browser storage in magento 2.

I try to follow tutorial but  not get success yet
https://aionhill.com/magento-2-module-development-guide-part-4-knockout-js


texts: How to optimize custom product collection?

texts:
Actually i want to optimize my store. It takes 5 to 6s. I m using ready theme from theme forest. According to theme m doing some of customization according my requirements which i needed. ON this theme Already displayed new products collection and also sales collection. Now i want to load 2 more collection according to attributes.

So issue is on homepage product collection is load 4 times. If collection is load two times on homepage store will be load within 2s for now. For now i optimize some how my store but still will takes times to load within 4.5 to 5s because of product collection.

I am trying to get product collection by attribute. below code is working perfectly. It takes too much time to load. That's why my store is working too much slow. If i removed this code my store is load within 2 to 2.5s.

$_productCollection = Mage::getResourceModel('catalog/product_collection')
    ->addAttributeToFilter('popular_walldecal', array('eq' => 1))
    ->setPageSize(8);

$_collectionSize = $_productCollection->count();

foreach ($_productCollection as $product):
    $_product = Mage::getModel("catalog/product")->load($product->getID());
endforeach;

I have tried above code. If product collection loads within in ms. It will be affect on my store to page loading issue.

In above code i need to load again

$_product = Mage::getModel("catalog/product")->load($product->getID());

Otherwise i can't get all product data.

Can you help me to resolve out this issue? How to optimize this code.
Thanks in advance.


texts: It is possible to replace the city field in billing information using Xtento Custom Attributes plugin?

texts: I'm using Xtento Custom Attributes and I'm trying to replace the City field in both billing and shipping addresses but I just got a new field instead of a replacement, is there any way to replace this field using this plugin? thanks!


texts: List all customers with Magento collection resource iterator

texts:
I use resource iterator to loading large collections:

$customers = Mage::getModel('customer/customer')
                   ->getCollection()
                   ->AddAttributeToSelect(array('email','taxvat','gender',
                                         'createad_at'),'inner');

Mage::getSingleton('core/resource_iterator')->walk($customers->getSelect(),array('productcall'));

Then its show:

example@aa.es,000000T,2,1992-01-11 00:00:00

How can I list all customers instead of only one?


texts:
I installed a Magento 2  module from here using this link https://github.com/Sebwite/magento2-category-sidebar. using these commands

Include the repository: composer require sebwite/magento2-category-sidebar
Enable the extension: php bin/magento --clear-static-content module:enable Sebwite_Sidebar
Upgrade db scheme: php bin/magento setup:upgrade
Clear cache

But now I want to uninstall it using

sudo php bin/magento module:uninstall -r Sebwite_Sidebar

it says

  Sebwite_Sidebar is not an installed composer package

how to remove its structure database Mean to say completely remove it


texts: How to add floating menu to magento front end just like admin

texts: I need to add floating menu to magento front end, just like it is in admin, Some thing like this


texts: Cannot initialize the indexer process on Category Url Rewrite

texts:
Exception message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '66898000_1405186241-0-1' for key 'UNQ_CORE_URL_REWRITE_ID_PATH_IS_SYSTEM_STORE_ID'

I did a truncate on core_url_rewrite. When the following commands is executed:

php indexer.php --reindex catalog_url

It executed successfully. Back in the admin interface, i tried to re index all. This error

occured again.


texts: After Merge Js Admin panel menu not work?

texts:
I have merge recently css and js from magento backend. after this backend menu not work i got following error.

Uncaught TypeError: Cannot read property 'length' of undefined

I dont know what is problem with this.


texts: Reviews do not show up in the admin panel

texts:
On a catalog product page, users enter review in the form and click submit. Now I would expect the review to show up in the Catalog -> Reviews and Ratings -> Customer Reviews -> Pending Reviews.

It does not show up. What's wrong? Where do I need to look for?


texts: Why data bind template is not working on 2.2 or greater?

texts:
I was studying about Knockout.js and how it works with Magento 2.

Then I reached the topic: template integration, in the first sample of it I'm presented to this notation:

Which will try to render the template located at:

app/code/Namespace/Module/view/frontend/web/template/sample.html

It's working in Magento versions equals/lower than 2.1.

In greater versions it's throwing the following error:

Uncaught TypeError: Unable to process binding "template: function(){return 'Namespace_Module/sample' }"
Message: Cannot read property 'name' of undefined
    at RemoteTemplateEngine.makeTemplateSource (engine.js:55)
    at RemoteTemplateEngine.renderTemplate (engine.js:116)
    at executeTemplate (knockout.js:4886)
    at ko.dependentObservable.disposeWhen (knockout.js:4950)
    at evaluateImmediate (knockout.js:1737)
    at Object.ko.computed.ko.dependentObservable (knockout.js:1946)
    at Object.ko.renderTemplate (knockout.js:4942)
    at update (knockout.js:5080)
    at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)
    at evaluateImmediate (knockout.js:1737)

I was trying to understand why it's happening looking for the change in github, but it's not clear to me:

https://github.com/magento/magento2/commit/d99043c097816388b2aeec1c23e10bf15e064b28#diff-9ec27f11f8253078a99c9d1e979a07f3

Now it requires a bindingContext (which contain the name attribute requested in exception) but I don't know how it's initialized.


texts: Why is there a quote_address_id field in sales_flat_order_address table?

texts:
Just stumbled upon the quote_address_id property of sales/order_address entity (sales_flat_order_address table) which in my case is always NULL.

Well I wonder .. what is is for? My only guess it is used at the stage when order is not yet finalised but I failed to find a proof in the code. Another guess may be backward compatibility.

The existence of this property/column is not critical of course. Just a question of curiosity.


texts: Magento 2 - set cash on delivery not accepted to specific countries and states

texts:
I want  no COD is accepted in Saudi except for City of Jeddah with COD fees SR 20/shipment/AWB. COD in UAE is OK with no additional charges.
I'm using magento 2. Can anyone help?


texts:
Have tried below commands provided for similar queries to resolve reindex issue but failed.

php bin/magento indexer:info
php bin/magento indexer:status
php bin/magento indexer:reset
php  bin/magento indexer:reindex

But it does not works  magento 2.2.6 with elasticsearch5.6.9  even tried for elasticsearch2.4.1 it works for few but fails for catalog_product .

Media on my site is not fetched

"Product Indexed
Processing product 7272
Product marked disabled because not category found."
"ElasticSuite Category Indexing indexer process unknown error:
{"error":{"root_cause":[{"type":"index_creation_exception","reason":"failed to create index"}],"type":"illegal_argument_exception","reason":"Unknown TokenFilter type [phonetic] for [phonetic]"},"status":400}

ElasticSuite Thesaurus Indexing index has been rebuilt successfully in 00:00:01"

If changed to mysql reindex works but images are not stored in media section

Magento 2 Enterprise: Elasticsearch Indexing Issue
Have downgraded 5.6.9 to 2.4.1 but of no use.


texts: How avoid user authentication for one single url in htaccess?

texts:
SetEnvIf Request_URI "^/wp-content*$" AdminUri

AuthUserFile /public_html/.htpasswd

AuthType Basic

AuthName "My Secret Folder"

Require valid-user

I set up authentication in my site as above. I want to remove it for one URL i.e. abc.com/e-avis, but I need authentication for all other URLS


texts: Get disabled/inactive products from flat catalog product strucutre

texts:
I am trying to get all disabled products from magento using the following code but it returns only enabled products. I have enabled Flat Catalog Product options. Is there any way to get disabled configurable products using mysql or magento code?

$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('type_id', array('eq' => 'configurable'))
->addAttributeToSelect('*')
->addAttributeToFilter('status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_DISABLED));


texts: I want to make an authorization through OAuth 2.0 through postman. I have setup an integration now what should I do next?


texts: Magento 2 : get custom attribute options from custom eav entity type

texts:
In magento 2.3.1, I created custom eav_entity_type and attribute also assign under that custom eav_entity_type.

Now, I added attribute options programmatically in that attribute and that record I saved in eav_attribute_options and eav_attribute_options_value tables.

Now, I used this below code for get that all options. But, I return blank array.

 /*Get attribute details*/
    $attributeDetails = $this->eavConfig->getAttribute("custom_eav_entity_type", 'custom_eav_attr');
    print_r($attributeDetails->getData()); //return blanks

How do I get that all options?

Any help would be appriciated.

Thanks.


texts:
I am trying to download the current magento 2.1.0 release:

curl https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/info/filter/version/2.1.*

Output:

Magento Community Edition 2.1.0.zip                               Community Edition - Full          df0857dfa076e2044e0240c3022d63cb          2016-06-23 07:14:00          2.1.0          Magento-CE-2.1.0.zip
Magento Community Edition 2.1.0.tar.gz                            Community Edition - Full          a1bf0c943e831dbd580c7c9fc20ff090          2016-06-23 07:18:00          2.1.0          Magento-CE-2.1.0.tar.gz
Magento Community Edition 2.1.0.tar.bz2                           Community Edition - Full          26754879d674e4fc358d4133cc258212          2016-06-23 07:18:00          2.1.0          Magento-CE-2.1.0.tar.bz2
Magento Community Edition 2.1.0 with Sample Data.zip              Community Edition - Full          5dedd8c445f53e6753c06d56d243dd55          2016-06-23 07:19:00          2.1.0          Magento-CE-2.1.0+Samples.zip
Magento Community Edition 2.1.0 with Sample Data.tar.gz           Community Edition - Full          53f790dced5fba47ad2bd7c8e8175563          2016-06-23 07:19:00          2.1.0          Magento-CE-2.1.0+Samples.tar.gz
Magento Community Edition 2.1.0 with Sample Data.tar.bz2          Community Edition - Full          2e3bc5d400a417dd5d45f5697e7661b5          2016-06-23 07:20:00          2.1.0          Magento-CE-2.1.0+Samples.tar.bz2

curl -O https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/file/Magento-CE-2.1.0+Samples.tar.gz

Output:

401 Unauthorized

I need to download the source tarball, composer installation is not an option.


texts:
Is it possible to achieve this easilly with updating the sales_flat_order status info?
Or is this information defined in other db tables?


texts: Magento2 - Managing Module Activation at Store Level

texts:
Is it possible to manage activation of a Magento module at the store level.

I am aware that there is a setting to Disable Modules Output at Stores -> Configuration -> ADVANCED -> Advanced -> Disable Modules Output, but this only disables the module output, but the module is still loaded, and any core functionality changes and rewrites are still in play.

I am looking for a way to only load those custom modules which are needed for that particular store only.

Is there any way to achieve this ?


texts: Is it possible to re-run the Magento translation once an AJAX call has been made?

texts: I'm trying to re-run the string replace that Magento runs upon load for language translation. The reason for this is I have injected HTML (via AJAX) that happens at any point after the page load has completed.


texts: How to get the categories of the product collection loaded

texts:
I am having products that belongs to multiple categories.

eg :

Main category 1
 sub category 1
 sub category 2

Main category 2
 sub category 1
 sub category 2

.......

I am loading product collection from Main category 2 -> sub category 1
In this collection some of my products belongs to Main category 1 -> sub category 1 OR sub category 2 OR any other Main category (n)

I know categories comes as layered nav out of box in Magento. But here it is not showing up.

Is it because I am already Loading a sub category collection? And by any means can i get the categories of the current loaded collection?


texts: Magento 2.2.4 Attribute "manufacturer" only showing in simple product, not in other product types

texts: I've created attribute manufacturer. It only shows when I add simple product, but when I whant to add other type of product, attribute is not showing.


texts: Magento 2.2 - event to detect qty change

texts:
I need to detect a change of qty in product (backoffice change after edit is enough for me).
I was trying to do it with simple observer

<event name="cataloginventory_stock_item_save_after">
    <observer name="after_stockitem" instance="Company\Module\Observer\StockitemObserver" />
</event>

And in observer:
$item=$observer->getEvent()->getItem();

        if($item->getData('qty')!=$item->getOrigData('qty')) {
           // $this->helper->saveProductToUpdate($item->getProductId());
        }

But the problem is that stockItem (not like product or order) has origData empty. How else can i detect the change?


texts:
I am trying to add a few varchar fields to the sales/order_address table but am coming up against a column definition error.

I have the following code:

$oInstaller->getConnection()
    ->addColumn(
        $oInstaller->getTable('sales/order_address'),
        'address_email',
        array(
            'nullable' => false,
            'length' => 255,
            'type' => Varien_Db_Ddl_Table::TYPE_VARCHAR,
            'comment' => 'Company Email Address'
        )
    );

This returns the error: [message:protected] => Invalid column definition data

If I change the code to use Varien_Db_Ddl_Table::TYPE_INTEGER then the code runs and the column is added. I have tried removing the length and nullable attributes but to no avail.

EDIT

When updating the script is updated as follows then it works. Does anyone know what causes this error?

$oInstaller->getConnection()
    ->addColumn(
        $oInstaller->getTable('sales/order_address'),
        'address_email',
        Varien_Db_Ddl_Table::TYPE_VARCHAR . '(255)'
    );


texts: Generate confirmation Email after change password from frontend customer dashboard

texts:
How i can generate an email after customer change his password from frontend dashboard?

Basically i want to send confirmation email to customer after he change the password.


texts: After changing the base url to a non-existing site . Now if I refresh my page 404 error occurs.. and admin panel is also not working

texts: I am learning Magento2 and tried creating a store view through admin panel and changed the base URL to a non existing site. now after save config I don't able to access the admin panel or my site.?? 404 error occurs.! How to change my base URL to default site's base URL using command line and revert the changes that I have made.? thank you in advance! please help me.!


texts: Magento 2 inline translation not working

texts:
I am trying to use inline translations on Magento 2. Already when I open the translastion I see a weird screen.

When I resize the screen it becomes more clear.

but then comes the weird part, I add the translation and I see on screen that it's translated. When I refresh it's gone again.

I already cleared all cache / static content / redeployed / added the inline translate flag only on store level etc.

Any ideas?


texts:
Please Helpme on this,I have copied a live site to a development environment so I can do some testing. I've followed this tutorial to get everything up and running.

When I go to the site is says that there has been an error. The log says the following: "SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

I have multiple other magento instances running on the same machine and they all work. The database is on a different machine.

My local.xml is all correct and when I create a simple php test page which contains the following:

<?php
      $mysqli=mysqli_connect("[same data as local.xml]");
      if(mysqli_connect_errno()){
          printf("Connect failed: %s\n", mysqli_connect_error());
          exit();
      }else{
          echo "Connection succesfull!";
      }
?>

The page is returning: Connection succesfull!

I've tried: restarting apache2 and php5-fpm, clearing cache and session folder, removing the other .xml files in /app/etc except local.xml and config.xml.

Can somebody help me fix this problem?
Thanks in advance!

see link


texts:
What are the things we should note , if the Development of Magento modules in WAMP environment and the Production is LAMP environment,

Whenever i deploy the modules in linux , i got the problems related to the case sensitive of file names.

Please notify some common best practices , to avoid server compatibility problems for magento modules.


texts:
I'm trying to collect shipping address from order

$order = Mage::getModel('sales/order')->load($order_id, 'increment_id');

.......

 $order_Address= $order->getShippingAddress()->getFormated(true);

but it is printing me

Fatal error: Call to a member function getFormated() on a non-object

but when I calling it like this it prints me object

$order_Address= $order->getShippingAddress()


texts:
I try to add Size Chart block on product view page in Magento 2. I add this code in catalog_product_view.xml

<referenceContainer name="product.info.main">
    <block class="Magento\Catalog\Block\Product\View\Attributes" name="sizechart" template="product/view/sizechart.phtml"/>
</referenceContainer>

and this in the sizechart.phtml

<?php
$_helper = $this->helper('Magento\Catalog\Helper\Output');
$_product = $block->getProduct();
?>
<?php if ($_product->getData('size_chart')): ?>
    Size Chart
       <?php
       echo $block->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId($_product->getAttributeText('size_chart'))->toHtml();?>
<?php endif; ?>

Everything is okay for the simple products, but when I open a configurable product the size chart block in not displayed anymore.

What is the problem?

Thanks


texts:
In Magento 2, How we can create custom attribute for image upload for category.
I tried it using the install script and followed the core magento code for creating category attribute, It add an attribute but does not save the image for the category.


texts: Magento 2: Create a Ui Component form in admin panel

texts:
I want to create a Ui component form in Magento 2. I have created a module and here are my module files.

  registration.php

<?php /**
* Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
*/
\Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Learning_HelloPage',
__DIR__
);

  etc/module.xml

<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Learning_HelloPage" setup_version="0.0.1">
        <sequence>
            <module name="Magento_Catalog"/>
        </sequence>
    </module>
</config>

  etc/frontend/routes.xml

<?xml version="1.0"?>
<!--
/**
* Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">

        <route id="demo" frontName="demo">
            <module name="Learning_HelloPage"/>
        </route>

    </router>
</config>

  etc/adminhtml/routes.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/
Framework/App/etc/routes.xsd">
    <router id="admin">
        <route id="admindemo" frontName="admindemo">
            <module name="Learning_HelloPage" />
        </route>
    </router>
</config>

Here are the files I have created and suggest me how can I create a Ui component form in Magento admin panel.


texts:
I try to block catalog_search because in the search list appears only sql inyections, but I can't

in first time I disable mage_CatalogSearch in System/config/advanced but appears more entries.

after that I comment the call in frontend, the same result the sql inyection list ground,

I delete the Search forms in frontend for template, base and rv and nothing change.

I erase all search but some hours later appears more injections in the dashborad panel Last 5 search Terms

the most common are:

1+waitfor+delay+00%3A00%3A15+--modules.php%3Fname%3Dsaint%27A%3D0%3F><SCRIPT>alert(%27SAINT%27)<%2FSCRIPT>

the only change was when i limit to 1 char the search in system/config/catalog/catalog_search

and the list continue to grown with 1 char search terms.

Please i need help to control that, I don't understand how continue to appears the search terms with the module disabled and the forms erased, at the same time how prevent to not save this garbage in the db.


texts: How many products are allowed in Community?

texts:
Magento is increasing price for EE every year, now we are thinking of moving to CE from EE (not my idea).

While looking at the features that we are using in EE, I can easily compare with CE. I can also see those extensions are available in market for CE.

However when in terms of catalog, it's hard to tell. Nowhere, I could find how many products are allowed in CE. Also how many attributes can I add to CE?

Everyone is saying- not large amount of catalog are allowed in CE.

Anyone could clarify on this for me?

Also what are the pros and cons am I looking while moving to CE from EE? I know it's very broad to answer, but would like to hear few important points.


texts: Import categories and products under existing categories

texts:
In my Magento shop i have some categories like "Baby", "Persoonlijke verzorging",
"Wonen" with sub categories like "Slaapkamer", "Woonkamer" etc.

From my manufacturer i have a large csv file with lots of categories and products.
The categories names in the csv file of my manufacturer are ok, but i want them to be importerd under the already existing categories in my shop.

The csv file of my manufacturer looks like this:
articleNumber   title   brand   description ean weight  stock   price   recommendedPrice    taxPercentage   categoryId1 categoryId2 categoryId3 categoryId4 categoryName1   categoryName2   categoryName3   categoryName4   image1  image2  image3  image4  image5  image6  image7  image8  image9  image10 delivery    warranty
1030    "Hama 1030 Hamafix Diaramen 5x5 cm 100 Stuks"   Hama    "Materiaal: Kunstof Inhoud: 100 Diaformaat: 5 x 5 cm Filmformaat: KB 24 x 36 mm Uitvoering: Lijst Diadikte: 2,3 mm Systeem: Hamafix "   4007249010308   1   true    1   5   21  2593    3392            "Foto / Video"  "Diaprojektoren / Accessoires"          http://url.nl                                       "Direct leverbaar"

What i want to do is import all the products with magmi and with use of the magmi "On the fly category creator/importer". But if the categoryname1 from the csv file of my manufacturer equals "Foto / Video" it must be imported under an already existing category of my shop, lets say "Wonen".

The Magmi column "Categories" should than be like "Wonen/Foto / Video"

Is this possible with Magmi? or do i have to write a php script for this?
I also want to exclude some products and categories from the manufacturer csv file.
Lets say, if there is a column in the csv file like "Bricks". This column and all the products assigned to this column in the csv file, should not be imported.

Hope you guys can help me out with this one.

Thanks!