texts: How to add custom option type image to the cart item in order review page using observer?

texts:
I want to add custom option type as image to quoteitem in checkout review page using observer which observer event is controller_action_predispatch_checkout_onepage_index and it fires when goes to checkout page.

In event call in config.xml

<controller_action_predispatch_checkout_onepage_index>
<observers>
<hackathon_presentation>
<type>singleton</type>
<class>modulename/observer</class>
<method>salesCollectBefore</method>
</hackathon_presentation>
</observers>
</controller_action_predispatch_checkout_onepage_index>

and then in my Observer.php

public function salesCollectBefore($observer)
    {
    $quote_items = $quote->getItemsCollection();
        foreach ($quote_items as $item) {
        $customisation['upload_logo'] = "test.png";
            $additionalOptions = array(
                array(
                    'code'  => 'my_code',
                    'label' => 'Logo',
                    'print_value' =>  ''logo'',
                    'option_value' => ''.$customisation['upload_logo'].'',
                    'value' => $customisation['upload_logo'].
                )
            );
            $item->addOption(
                array(
                     'code'  => 'additional_options',
                     'value' => serialize($additionalOptions),

                )
            );
        }
    }

It does not allow me to show as a link to download the image, It shows only the image name . I want to add the image link in order review page and it should be downlodable from the link. How can I achieve this. Can anyone help here? Plz...


texts: Magento 2: Add resources to module and use them in template?

texts:
Where do I have to add js, css, and images in my module?

In Magento 1 I had an image stored in

  /skin/frontend/base/default/black/Newsletter2Go/img/ajax-loader.gif

where do I have to put it in Magento 2 and under which path is this image accessible afterward?


texts: magento deploy:mode:set production fails with MAMP PRO

texts:
I'm running a development installation on MAMP PRO and when I'm trying to deploy:mode:set production it fails at setup:static-content:deploy. When running setup:static-content:deploy directly from CLI it succeeds without problems.

Any ideas what might be wrong?

Stack trace on GitHub.


texts: Layer navigation shows not matching attributes with custom products collection

texts:
I have to try to implement alphabetical order for custom product collection in default category products listing page.

Our custom products collection is working fine but left side layer navigation is not displayed matching attribute with option values based on custom products collection. kindly refer the attachment image.

How to deal with this side layer navigation? Kindly advice me.


texts: Difference between Absolute and Fixed Product Custom Option Price Type Magento

texts:
Can anyone tell me the difference between absolute and fixed product custom option pricing in Magento?

I have used fixed price before, but I am not able to understand the working of absolute pricing, it doesn't add in product price when I add the product to the cart.


texts: I want to update Magento version from 1.9.1.0 to Magento1.9.2. What are the security issues in Magento1.9.2?


texts: I have installed a Magento theme but could not see Homepage block for this theme

texts:
New them installed Homepge block is not shown, only Home page for luma is available. How shall I change the homepage now?
I tried creating new homepage and linked it Store >> General >> Web >> Default page >> CMS Home Page.
But it did not work.


texts: Magento Commerce connection from webshop

texts:
netstat tells me there is connection from/to (?) magentocommerce, for instance:

tcp        0      0 server_ip:49737       server_ip:80            TIME_WAIT   -
tcp        0      0 server_ip:39654       66.211.190.109:80       TIME_WAIT   -
tcp        0      0 server_ip:39655       66.211.190.109:80       TIME_WAIT   -

I can reproduce these logs (the number of lines from 66.211.190.109 varies a lot) when logging from backend on the 'magento connect' interface. Mainly by clicking 'check for updates'.

Are these logs only produced by user interaction or is there any automatic connection?
If that's auto-connections, can we set somewhere a time window for it?


texts:
I have created a folder in pub/media by refer this link

  Magento2 Creating a new directory

But i can't insert any images in this folder

How to insert the images in specific folder

Thanks


texts: Magento 2.2.5 - Categories are not getting saved in the database

texts:
In my Magento 2.2.5 Store, When I try to edit the existing categories content and press the save button, the categories content stays the same, there is no change being reflected in the admin panel,frontend as well as the database. Though the save button shows You saved the category without any errors.

I have checked that my cron jobs are working fine, I have also increased the memory_limit value to 512 in php.ini. All the other changes are working fine.

One thing to be noted, that I have recently migrated the data from magento 1.9, just in case if it is related to data migration.

The question below is very similar to my problem for better understanding:

Magento 2 - Category not save

Please, give me your suggestions


texts: The requested Payment Method is not available When creating an order

texts:
We get The requested Payment Method is not available error when we try to create order using REST api.payment method works fine with all online orders and i am using given api.

  Request- (Put)

http://MyHost.com/rest/V1/carts/67/order
json-{ "paymentMethod": { "method": "free"}}

  Response-

{
  "message": "The requested Payment Method is not available.",
  "trace": "#0 /chroot/home/folder/html/vendor/magento/module-quote/Model/QuoteManagement.php(337): Magento\\Quote\\Model\\Quote\\Payment->importData(Object(Magento\\Framework\\DataObject))\n#1 [internal function]: Magento\\Quote\\Model\\QuoteManagement->placeOrder(67, Object(Magento\\Quote\\Model\\Quote\\Payment))\n#2 /chroot/home/folder/html/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array)\n#3 /chroot/home/folder/html/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\\Webapi\\Controller\\Rest->processApiRequest()\n#4 /chroot/home/folder/html/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#5 /chroot/home/folder/html/vendor/magento/framework/App/Http.php(135): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#6 /chroot/home/folder/html/vendor/magento/framework/App/Bootstrap.php(258): Magento\\Framework\\App\\Http->launch()\n#7 /chroot/home/folder/html/index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http))\n#8 {main}"
}

Did I miss something About setting ?

and i am using following steps to create an order.

Create customer-

curl -g -X POST "$base_url/index.php/rest/V1/customer" \ -H "Authorization: Bearer $token" \ -H "Content-Type:application/json" \ -d '{"customer":{"email":"sunny.kumar@web.biz","firstname":"sunny","lastname":"kumar","store_id":1,"website_id":1,"addresses":[{"region":{"region_code":"WA","region":"Washington","region_id":62},"region_id":62,"country_id":"US","street":["1401 Pennsylvania Ave NW, Washington"],"telephone":"1 202-628-9100","postcode":"DC 20004","city":"Washington","firstname":"sunny","lastname":"kumar","prefix":"Mr."},{"region":{"region_code":"WA","region":"Washington","region_id":62},"region_id":62,"country_id":"US","street":["1401 Pennsylvania Ave NW, Washington"],"telephone":"1 202-628-9100","postcode":"DC 20004","city":"Washington","firstname":"sunny","lastname":"kumar","prefix":"Mr.","default_shipping":true,"default_billing":true}],"disable_auto_group_change":0}}'

Create cart-

Creates an empty cart and quote for a specified customer.

curl -g -X POST "$base_url/index.php/rest/V1/customer/{customerId}/carts/" \ -H "Authorization: Bearer $token"

Add Product To Cart

curl -g -X POST "$base_url/index.php/rest/V1/carts/67/items" \ -H "Authorization: Bearer $token" \ -H "Content-Type:application/json" \ -d '{ "cartItem": { "quote_id": "67", "sku": "Test-Sku", "qty": 2 } }'

Get Payment Method

curl -g -X GET "$base_url/index.php/rest/V1/carts/67/payment-information" \ -H "Authorization: Bearer $token"

response-
[
  {
    "code": "free",
    "title": "No Payment Information Required"
  }
]

Place Order

curl -g -X PUT "$base_url/index.php/rest/V1/carts/67/order" \ -H "Authorization: Bearer $token" \ -H "Content-Type:application/json" \ -d ' { "method": { "method": "free" } } '


texts: 404: Page not found after apply SUPEE-14015 patch

texts: I'm using Magento 1.9.2.4 version, after applying patch for my magento website, i got this error in every page:


texts:
I can't add subcategory in "Catalog > Categories", I get the following error message :

  Something went wrong while saving the category.

In var/log/debug.log, I have this :

  [2017-11-13 04:34:03] main.CRITICAL: SQLSTATE[HY000]: General error:
  1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE
  TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a
  non-transactional context only, and require that AUTOCOMMIT = 1.,
  query was: CREATE TEMPORARY TABLE
  tmp_select_fc67d54614b698ebb1a8d4d6da400330 (PRIMARY
  KEY(url_rewrite_id),INDEX HASHKEY_ENTITY_STORE USING
  HASH(hash_key),INDEX ENTITY_STORE USING
  HASH(entity_id,store_id)) ENGINE=INNODB IGNORE (SELECT e.,
  CONCAT(e.store_id,'_', e.entity_id) AS hash_key FROM url_rewrite
  AS e WHERE (entity_type = 'category') AND (entity_id IN('13')))
  {"exception":"[object] (Zend_Db_Statement_Exception(code: 0):
  SQLSTATE[HY000]: General error: 1787 When
  @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY
  TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional
  context only, and require that AUTOCOMMIT = 1., query was: CREATE
  TEMPORARY TABLE tmp_select_fc67d54614b698ebb1a8d4d6da400330 (PRIMARY
  KEY(url_rewrite_id),INDEX HASHKEY_ENTITY_STORE USING
  HASH(hash_key),INDEX ENTITY_STORE USING
  HASH(entity_id,store_id)) ENGINE=INNODB IGNORE (SELECT e.,
  CONCAT(e.store_id,'_', e.entity_id) AS hash_key FROM url_rewrite
  AS e WHERE (entity_type = 'category') AND (entity_id IN('13'))) at
  /var/www/html/myproject/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235,
  PDOException(code: HY000): SQLSTATE[HY000]: General error: 1787 When
  @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY
  TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional
  context only, and require that AUTOCOMMIT = 1. at
  /var/www/html/myproject/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"}
  []

My database is on an Aliyun RDS server, I have no access to GTID parameters.

How can I fix this issue ?


texts: Magento 2 Configurable product radio button after need to short description show

texts:
facing some issues on magento 2 configurable product the variation have radio button i want to show short description for each variation radio button below, every product having different variation.

Sample screen -- https://ibb.co/CHnM128

my product url -- http://magento.rudrakshamart.com/bazee-damase-duma-truma.html

How to achieve this plz help me..

Thanks...


texts:
I have size option for all configurable products the problem here is that the values not sorted as needed, let me explain i've these values

array('XXS', 'XS', 'S', 'M', 'L', 'XL', 'XXL', 'XXXL', 'XXXXL');

and the way it appear in the site is like this

array('XXXXL', 'XXXL', 'L', 'M', 'S', 'XL', 'XS', 'XXL', 'XXS');

in the back end the product with the associated products.

I need the order to be like what's in box #2 but what i got in the size is what i have in box #1

How could i do that and thanks in advance.


texts: Magento 2 website behaves weird when new browser (that has never visited the site) visits the site

texts: Each time I get to my website with a browser that has never get to it, deleted modules/extensions appear, some css does not load, ecc, how can I fix that problem? The next time I go to the site, it acts normally


texts: Magento 2 get current time and week days

texts:
I use the following code in my Magento 1 store, but I want to convert it to Magento 2. I load this in a custom .phtml file to display on a CMS page.

How can rewrite the following for Magento 2?

CODE:

<?php $weekday = Mage::getSingleton('core/date')->date('w');
$hour = Mage::getSingleton('core/date')->date('G.i');
$closedDates = array('01-01', '22-04', '30-05', '10-06', '26-07', '25-12', '26-12', '31-12');
$closedDatestime = array('24-12');
$date = Mage::getSingleton('core/date')->date('d-m');?>


texts: Remove Price attribute from a custom product type

texts:
I have created a new product type that doesn't need a price attribute so I would like to hide the tab in the backend in a similar way as Grouped product are.

How can I accomplish this ?


texts:
I am trying to port a Woo-commerce Payment Gateway over to Magento 1.9

The payment system redirects the user to an online processing form, the user enters their info on that site, then based on success or failure, the user is redirected back to the magento site.

The payment processor requires me to make one last api call from the magento site to complete the order (can be run for both success or failure). In Woo-commerce I run the api call on a static return page, then redirect the user to the woo-commerce success of failure pages based on the results of the api call.

I am having a little trouble trying to figure out how to run a function on return or how to set/make a success page.

Any help would be appreciated!


texts: Magento 1.8.1 Issue to send Product email to friend despite other notifications works

texts:
I am using Magento CE 1.8.1 version and I have installed Aschroder SMTP module and have an Amazon SMTP server and I’ve noticed that only email a friend does not send mail and according to this site.

The problem is with the SMTP server. So I followed their instruction and modified app/code/local/Mage/Sendfriend/Model/Sendfriend.php for the send() function but it did not work:

public function send()
{
    if ($this->isExceedLimit()){
        Mage::throwException(Mage::helper(‘sendfriend’)->__(‘You have exceeded limit of %d sends in an hour’, $this->getMaxSendsToFriend()));
    }

    /* @var $translate Mage_Core_Model_Translate */
    $translate = Mage::getSingleton(‘core/translate’);
    $translate->setTranslateInline(false);

    /* @var $mailTemplate Mage_Core_Model_Email_Template */
    $mailTemplate = Mage::getModel(‘core/email_template');

    $message = $message."Message sent by: ".$this->getSender()->getName()." ".$this->getSender()->getEmail();
    $sender = array(
        ‘name’ => Mage::getStoreConfig('general/store_information/name'),
        ‘email’ => Mage::getStoreConfig('trans_email/ident_general/email')
    );

Thank you for any guidance that you can provide.


texts: Admin Dashboard - Unexpected token } in JSON at position 33

texts:
I know there are many questions here about the unexpected token in JSON error but nothing seems to apply in my case.
In my case I log into the admin backend and get this error:

I managed to find the part which causes the error in the source code (Source page in browser):

I as well managed to figure out that it is inside the notifications container but I do not know which block causes the error. And I don't know which template is responsible for the code.

Anyone knows which block generates this code or which template contains it?

I already did the following:

cleared cache
removed static content
static content deploy
removed vendor and did a composer install
removed generated code

Any help is very appreciated.


texts: Rewrite block that is extended by other blocks

texts:
For example Mage_Tax_Block_Sales_Order_Tax. This block is used on the site itself but within the admin area Mage_Adminhtml_Block_Sales_Order_Totals_Tax is used which extends from it.

Now I want to change a function of this block. To do that I wanted to rewrite it but this function will only work for the site then. The block for the admin area will still extend from the base block and not my rewrite. Do I have to rewrite both blocks (seems bad because of redundancy) or is there a more elegant way to solve this?


texts: Magento 2 hide side bar if customer not logged in

texts: I want to hide the price side bar if the customer is not logged in on the product category list page.


texts: My first problem regarding the invoice is solved when I used DejaVuSans.ttf font instead of Magento default font that removes the boxes that are hiding the Rupee Signs. My new problem is, the SKU number, Price, Qty, Tax, Subtotal of the product is not coming aligned below their respective headers in invoice when i downloaded the invoice from the admin panel by clicking on Print button. All info are coming slightly moved towards to its right. I attached the screenshot for proper understanding. Still this issue is not solved.


texts: Magento 1.9:check out page not redirect to sucess page with event sales_order_place_after

texts:
I am beginner to magento & trying to develop a module for sending message when any order placed, with this module i am able to generate(send/recive) message but check out page not redirect to success page

etc/config.php

<?xml version="1.0"?>
<config>
    <modules>
        <Abc_Sms>
            <version>0.0.1</version>
        </Abc_Sms>
    </modules>
    <global>
        <models>
            <abc_sms>
                <class>Abc_Sms_Model</class>
            </abc_sms>
        </models>
         <events>
            <sales_order_place_before><!-- observe the event -->
                <observers>
                    <abc_sms>
                        <class>abc_sms/observer</class>
                        <method>newCheckout</method>
                    </abc_sms>
                </observers>
            </sales_order_place_before>
        </events>
    </global>
</config>

Model/Oberver.php

<?php
class Abc_Sms_Model_Observer
{
    public function newCheckout($observer)
    {
        $order_id = $observer->getEvent()->getOrder()->getId();
        $order_no = $observer->getEvent()->getOrder()->getIncrementId();
        $order = Mage::getModel("sales/order")->load($order_id);

        $billing_address = $order->getBillingAddress();
        $billing_telephone = $billing_address->getTelephone();

        $msg = "Thank you for your purchase! Your order # is: ".$order_no;
        //sms api start

        $ch = curl_init();
        $user="****@gmail.com:****";
        $receipientno = $billing_telephone;
        $senderID="TEST SMS";
        $msgtxt = $msg;
        curl_setopt($ch,CURLOPT_URL,  "http://api.mVaayoo.com/mvaayooapi/MessageCompose");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, "user=$user&senderID=$senderID&receipientno=$receipientno&msgtxt=$msgtxt");
        $buffer = curl_exec($ch);
        if (empty ($buffer)) {
            echo " buffer is empty ";
        } else {
            echo $buffer;
        }
        curl_close($ch);
        //sms api
    }
}
?>

Thanks in Advance for help


texts: I want to view purchase item information in sales, orders. i do not see an option to show this information, like what item the person actually bought.


texts:
In Magento 2 how to receive request array? $_POST and $_GET too as we did in Magento 1:

Mage::app()->getRequest()->getPost()


texts:
I am trying to use a block from catalog/product_view in catalog/product_list but I can't get the block to render. Below is the code that I'm trying to call from template/catalog/product/list.phtml.

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


texts: Show custom module configuration in Admin Menu not in Store -> Setting -> Configuration

texts:
I am creating a custom module , now wanted to add module configuration options like enable/disable options . I found many post that shows how to create these options using system.xml but in that way it add the option in Store -> Setting -> Configuration

Till now i am able to crate configuration section In Store -> Setting -> Configuration as shown below.

Any one share any post or link in which i can learn how to create these options in module admin menu pages not in Configuration page.

I am trying to create same sections in my module page as we have in Magento 1.9.x

In  /var/www/html/magento2/app/code/CompanyName/ReviewRating/etc/adminhtml/system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="reviewrating" translate="label" sortOrder="10000">
            Reviewrating
        </tab>

            reviewrating
            <tab>reviewrating</tab>
            <resource>CompanyName_ReviewRating::reviewrating</resource>
            <group id="general" translate="label" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                Item creation by schedule
                <field id="enabled" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                    Enabled
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="cron_expression" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0" canRestore="1">
                    Add Item Cron Expression
                </field>
            </group>

    </system>
</config>

In /var/www/html/magento2/app/code/CompanyName/ReviewRating/etc/adminhtml/menu.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
    <menu>
        <add id="CompanyName_ReviewRating::parent" title="ReviewRating"
             module="CompanyName_ReviewRating" sortOrder="100"
             resource="CompanyName_ReviewRating::parent"/>

        <add id="CompanyName_ReviewRating::index" title="ReviewRating Index"
             module="CompanyName_ReviewRating" sortOrder="10"
             action="reviewrating/index" resource="CompanyName_ReviewRating::index"
              parent="CompanyName_ReviewRating::parent"/>

         <add id="CompanyName_ReviewRating::settings" title="Settings" module="CompanyName_ReviewRating" sortOrder="30" action="adminhtml/system_config/edit/section/reviewrating/" resource="CompanyName_ReviewRating::settings"/>
    </menu>
</config>


texts: Add Column to Admin > Sales > Orders Grid

texts: How can I add a column to the grid in the Admin section under Sales > Orders?


texts: How do I get my Collection to use a different DB connection?

texts:
So I have extended a Magento collection to obtain my own collection only I want to use a different DB connection.  What I have attempted to do is define the connection in config.xml like so:

<global>
    <resources>
        <externaldb_write>
            <connection>
                <use>externaldb_database</use>
            </connection>
        </externaldb_write>
        <externaldb_read>
            <connection>
                <use>externaldb_database</use>
            </connection>
        </externaldb_read>
        <externaldb_setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </externaldb_setup>
        <externaldb_database>
            <connection>
                <host><![CDATA[localhost]]></host>
                <username><![CDATA[db_username]]></username>
                <password><![CDATA[db_password]]></password>
                <dbname><![CDATA[db_name]]></dbname>
                <model>mysql4</model>
                <type>pdo_mysql</type>
                <active>1</active>
            </connection>
        </externaldb_database>
    </resources>
</global>

and then in my overriding constructor, do:

class VMR_Customreports_Model_Resource_Storeoverview_Collection extends     Mage_Reports_Model_Resource_Order_Collection
{
        public function __construct()
        {
                parent::__construct();

                $resource = Mage::getSingleton('core/resource');
                $conn = $resource->getConnection('externaldb_read');

                $this->setConnection($conn);
        }
.....
}

This doesn't appear to have any effect.  I would have expected an error if it didn't work.  What do I do?

UPDATE: After more debugging, I note that this code below returns the original db connection and not the one I defined in my XML.  Why is that?

$conn = $resource->getConnection('externaldb_read');


texts:
Good evening all!

Firstly, I'd like to apologise if this question has already been asked, however, I couldn't find anything. Secondly, I'd like to say that I am new to Magento so, if I'm being stupid, please let me know!

Anyway.....In the 'Manage Categories' area of Magento I had previously assumed that clicking on a pre-existing category would load the category data into the form on the right for editing. However, I have two installs (one live, one local) that have exactly the same issue - the data is never shown - it merely reloads the 'New Root Category' page.

So, I looked at the ajax call that is being made when I click on the category and this does indeed return the 'New Root Category' HTML. The URL looks a little odd though?

http://magento.local/admin/catalog_category/edit/key/000141f111845c06b2618a0fcf04914c/?url=admin%2Fcatalog_category%2Findex%2Fkey%2F4b51ab928415eedcc6c96e59a750704aid/6/&isAjax=true

(I am using admin rewrites if you're wondering where index.php has gone.)

Local Machine:

Ubuntu 12.04
Nginx 1.1.9
PHP 5.5.14

Remote/Live Server:

Ubuntu 14.04 LTS
Nginx 1.4.6
PHP 5.5.9

Thank you in advance for all your help.

Regards


texts: Please let me know which event observer is to be used when user is redirected to view cart in magento 2.2


texts:
<?php
try {
    require __DIR__ . '/app/bootstrap.php';
} catch (\Exception $e) {
    echo $e->getMessage() . PHP_EOL;
    exit(1);
}
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);
/** @var \Magento\Framework\App\Http $app */
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$app->launch();
$objectManager = $bootstrap->getObjectManager();
$productFactory = $objectManager->create('Magento\Catalog\Model\ProductFactory');
$collection = $productFactory->create()->getCollection();
foreach ($collection as $key => $value) {
    echo "<pre/>";print_r($value->getData());exit;
}
echo 'Total products:', $collection->getSize(), PHP_EOL;

This code output like - Total products:0
When i disable foreach it shows me correct product count.
Foreach not working with collection even product count is correct.


texts:
When I try to save the media from the admin panel in store-> configuration-> advanced-> system-> Storage Configuration for Media
I set Media Storage: Database and select a db and sync but this does not work, when I see the image url of a product it shows something like:
"Http: //m2.local/get.php/tmp/catalog/product/t/e/test_5.jpg" I do not know what that "get.php" means if I set back the media file to the local file system the images work fine .

I'm skipping a step? I do not see any new tables in the database. and not erros in exception log.


texts: Product List Esi Cache Policy Turpentine

texts:
I'm trying to implement an esi cache policy for Product List in Turpentine.
I have Magento 1.9.1.0.
This is the code I used:

<catalog_category_layered>
        <reference name="product_list">
            <action method="setEsiOptions">
                <params>
                    <access>private</access>
                    <registry_keys>
                        <current_category/>
                    </registry_keys>
                </params>
            </action>
        </reference>
    </catalog_category_layered>

This code works when I load product list.
I have problem when I filter the list with custom attributes. In this case I always see list filtered with current category.
What code I should add to see list filtered by attributes?

Thanks


texts: How can I delete configurable product attributes?

texts:
Trying to delete a configurable product attribute and it comes up with a
"This attribute is used in configurable products." Error.

The product associated with this attribute is now disabled but we don't really want to delete it if we can help it (we want to keep a record of this for customers). We need to delete these as we have almost 200 configurable attributes like this. This becomes really slow with 2 stores and 300+ attributes when loading a product (Mage::getModel('catalog/product')->load($id) // all attributes loaded).

I was wondering if there is there away to either stop Magento from loading all configurable product attributes not associated with the product when load() is called or reduce the number of configurable attributes we have without deleting the products. (Perhaps we could create a single dummy attribute to replace all the configurable product attribute that we don't use) ?

Any ideas?

Thanks in Advance,


texts: Removing Tax and tax computation based on If else statement

texts:
How can I remove the Tax/GST based on Account Details Dropdown Group plus the fact that the computation must also be correct.

This is the Account details

If Group is ICT then it should hide or remove tax/gst in order totals which is below

And the Grand Total must be correct as well.

I just need which files to edit then after that I can squeeze my way in.


texts: Color swatches in filter layered navigation

texts:
In Filter by Color, I have 3 colors red, brown and blue displaying in filter layered but I need to show them as red, blue and brown square boxes.

How to display it?

Please suggest a solution!


texts: How to check where is db structure of the search bar in magento version 2.1.1?

texts: The search of my website is a mess which made in Magento version 2.1.1.When search any product it gives not the actual product. I have installed plugins, but it also not affect it. Anyone has a better suggestion for it?


texts:
I need to keep the products in the cart when checkout, or copy last order quote to current session quote. I tried:

$quoteA = Mage::getModel('sales/quote')->load($order->getQuoteId());
$quoteB = Mage::getSingleton('checkout/session')->getQuote();

$quoteB->merge($quoteA);

$quoteB->collectTotals()->save();
$quoteB->save();

But this not worked, how can I do this? Thanks.


texts: Change minimum order amount for some articels

texts:
I have set a minimum order price but I would like some articles to ignore this minimum.

Where do I start with this?


texts: Magento 2 Programmatically adding a ViewModel to a Block when Creating it

texts:
I have hit a problem when trying to create a block in a controller in so much as I need the block created in the controller to also create a ViewModel type object.

What I am trying to achieve but I wish to do this via code in the controller rather than using the layout file:-

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <Block name="expert.reviews.tab" class="Bub\AdvancedReview\Block\ExpertReview\ExpertReviews" template="Bub\AdvancedReview::expert_reviews.phtml">
                <arguments>
                    <argument name="advanced-review-helper" xsi:type="object">Bub\AdvancedReview\Helper\BlockHelper</argument>
                </arguments>
            </Block>
        </referenceBlock>
    </body>
</page>

My code in the controller is as follows:-

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

namespace Bub\AdvancedReview\Controller\Product;

use Magento\Framework\App\ResponseInterface;
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\View\Result\Layout;
use Magento\Review\Controller\Product as ProductController;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;

class ExpListAjax extends ProductController implements HttpGetActionInterface
{
    /**
     * Show list of product's reviews
     *
     * @return ResponseInterface|ResultInterface|Layout
     */
    public function execute()
    {
        /** @var \Magento\Framework\View\Layout $layout */
        $layout = $this->_view->getLayout();

        /** @var \Bub\AdvancedReview\Block\ExpertReview\ExpertReviews $block */
        $block = $layout->createBlock(\Bub\AdvancedReview\Block\ExpertReview\ExpertReviews::class,null,['advanced-review-helper' => 'Bub\AdvancedReview\Helper\BlockHelper']);
        $block->setTemplate('Bub_AdvancedReview::expert_reviews.phtml');
        $layout->createBlock()->setData();

        return $this->getResponse()->setBody($block->toHtml());
    }
}

Does anybody know if this can be done?

Thankyou in Advance


texts:
I am developing for magento 2. I have an instance of \Magento\Sales\Model\Order and I want to get a list of all of the transactions associated with the order.

How can I do this?


texts: M2 Shipping Configuration class "interceptable" via around before or after mechanism

texts:
I'm having trouble creating a plugin to execute an around interception on a shipping configuration file.

Running on version M2.0.7

Here's the excerpt from my di.xml file showing the class I wish to intercept

<type name="Magento\Shipping\Model\Config\Source\AllMethods">
    <plugin name="allmethodsplugin"
        type="Somevendor\Somemodule\Plugin\Shipping\AllMethodsPlugin"
        sortOrder="1"
        disabled="false"/>
</type>

Below is an excerpt from my AllMethodsPlugin file showing the method I wish to intercept via the "around" mechanism

namespace Somevendor\Somemodule\Plugin\Shipping;

class AllMethodsPlugin
{

...

public function aroundToOptionArray(\Magento\Shipping\Model\Config\Source\AllMethods $subject, \Closure $proceed)
{
    $result = $proceed();
    //do some custom processing here
    return $result
}

It appears this interception is ignored.

I can see from stepping through the code that the configuration is loaded from my di.xml file and I have other working plugins configured in the same file. I can't see any errors in my configuration but welcome to any feedback here.

I don't see any generated class for the AllMethods class, which makes me suspect there is a config error here or it is ignored for interceptors.

I can work around this using argument replacement for the AllMethods variable passed into the calling class. However, I would like to know if this is in fact a limitation in M2?


texts: Magento API gives Access Denied when trying to add a coupon

texts:
I am using the SOAP API for Magento (v1.5.1.0) and have managed to get the entire process of creating a cart, adding user, adding billing/shipping addresses, payment methods, etc. working, however I cannot get Coupons to work.

The code I'm using is as follows:

if ($couponCode != '') {
    try {
        $result = $this->magentoservice->shoppingCartCouponAdd($sessionId, $cartId, $couponCode);
    } catch (Exception $err) {
        return $this->returnError($err->getMessage());
    }
}

I've tried with both a guest user and a registered user and I keep getting the same exception thrown - "Access denied.". As far as I can see from the limited documentation and forums posts this isn't even an expected error.

$sessionId and $cartId are definately valid. The $couponCode if entered directly on the magento frontend works.

Can anyone advise me how I might be able to solve this?


texts: Child theme does not load menu or parent theme components

texts:
i'm using magento 2.1.6.

I'm using the theme everything and I want to extend one of their child themes into a new child theme. I am using these files and this structure:

folder:

  app/design/frontend/MyCompany/newstylechild/

folders:

  Magento_Theme > layout > default.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo.svg</argument>
                <argument name="logo_img_width" xsi:type="number">200</argument>
                <argument name="logo_img_height" xsi:type="number">200</argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

  media > preview.jpg

  web > css > source > variables > _body.less

  web > images > logo.svg

  web > js

files in themechild:
registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::THEME, 'frontend/MyCompany/newstylechild', __DIR__
);

theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>NewStyle Child</title>
<parent>Emthemes/everything_newstyle</parent>
<media>
<preview_image>media/preview.jpg</preview_image>
</media>
</theme>

========================

After changes, i run this commands:

  rm -rf var/di/* var/generation/* var/cache/* var/log/*
  var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*

  php bin/magento setup:upgrade

  php bin/magento setup:db-schema:upgrade

  php bin/magento setup:di:compile

  php bin/magento setup:static-content:deploy

  php bin/magento indexer:reindex php

  bin/magento cache:clean

  php bin/magento cache:flush

After this, i apply in CONTENT > design (configuration), like this image:

But in the frontend, just appears this:

I think some configuration is missing, as it does not load some tabs in STORES> configuration (design) (image here)

what can I do? thanks in advance.


texts: Order Total Report showing blank while export in CSV or XML in Magento2.2.2

texts: Go to Reports -> Customers -> Order Total Report apply filter its shows the record as according to filter but when you export the CSV or XML its showing the blank data


texts: magento 2.2.2 You need to choose options for your item

texts:
I want to add a configurable products to cart via ajax, for this I have tried below code but it always raised the error “You need to choose options for your item”.

  Code

public function execute() {
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $quote = $objectManager->get('\Magento\Checkout\Model\Cart');
        $productId = 20318;
        $product = $objectManager->create('\Magento\Catalog\Model\Product')->load($productId);

        $cart = $objectManager->create('Magento\Checkout\Model\Cart');
        $params = array();

        $options = array(
            "194" => "445",
            "202" => "447",
            "193" => "416",
            "201" => "439",
            "197" => "430",
            "196" => "427",
        );
        $params['qty'] = 1;
        $params['product'] = 20318;

        $params['super_attribute'] = $options;

        $cart->addProduct($product, $params);
        $cart->save();
    }

Can anyone please let me know whats the issue?

I have also tried the below code but it raised the same error.
https://magento.stackexchange.com/a/198818/38685
https://magento.stackexchange.com/a/183836/38685


texts: Magento2: Error 404 on homepage after migration and changing theme

texts:
I migrated my data to a new magento v2.3.1 installation. Everything is working fine expect the homepage. I have set the cms page but the error still persists. When I view the page from Content > Pages it gives this error

{"0":"Notice: Undefined offset: -5867 in \/var\/www\/aslive\/lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm.php on line 302","1":"<pre>#1 Magento\\Framework\\Search\\Dynamic\\Algorithm->_findValueSeparator() called at [lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm.php:179]\n#2 Magento\\Framework\\Search\\Dynamic\\Algorithm->calculateSeparators() called at [lib\/internal\/Magento\/Framework\/Search\/Dynamic\/Algorithm\/Improved.php:70]\n#3 Magento\\Framework\\Search\\Dynamic\\Algorithm\\Improved->getItems() called at [lib\/internal\/Magento\/Framework\/Search\/Adapter\/Mysql\/Aggregation\/Builder\/Dynamic.php:56]\

I have tried the solutions suggested here https://github.com/magento/magento2/issues/11028 and here https://github.com/magento/magento2/issues/6625 but I still can't get through.


texts: Magento2 Check value of attribute for IF statement

texts:
I am trying to check if an attribute is set to yes then show this block.

<?php if($_item->getAttributeText('free_shipping_toggle')=='1'): ?>
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('free-shipping-list-marker')->toHtml();?>
<?php else: ?>
<!--Placeholder for other statement-->
<?php endif; ?>


texts: Adding bundle items to cart creates recursive dependency error

texts:
Item at http://wenderella.com/castaging/index.php/fruit-basket.html

It is a bundle product, a fruit basket, with dynamic pricing. Each fruit is a simple product with no stock management.

Option 1 (Required): Add a fruit - watermelon, pineapple or honeydew - Dropdown input, you can select qty of fruits you want

Option 2 (Not Required): Add another fruit - watermelon, pineapple or honeydew - Dropdown input, you can select qty of fruits you want

When I just add Option 1 or Option 2 to cart, there's no problem, it goes through.

But if I select something in both options (e.g. I choose a watermelon in option 1, then a pineapple in option 2), the following error occurs:

  Fatal error: Nesting level too deep - recursive dependency? in /home/blacklea/public_html/wenderella.com/castaging/app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php on line 134

I followed all steps to create a bundle product exactly (or so I think). What am I doing wrongly??

I have tried disabling all extensions and the error remains.

Version: CE 1.9.3


texts: I want to enable captcha on guest checkout in Magento 2.3.1. I am using one step checkout

texts:
I want to enable captcha on guest checkout in Magento 2.3.1. I am using the one-step checkout.

I know that it is a simple question and you can follow this nice article to do that: https://www.mageplaza.com/kb/how-to-enable-customer-login-register-captcha-magento-2.html

However, I believe that there is something wrong with my Magento installation and it is not showing me "Check out as guest" option in form section inside Captcha.

Can I enable "Check out as guest" option manually using the command line or terminal or FTP?


texts: Magento 1: best approach to change product prices on the fly

texts:
So I have this requirement where I need to round product prices based on several criteria for one specific currency.

So when watching the catalog (category view / product view whatever) the prices need to be updated on the fly.

I managed to get it right by using the following observer:

<frontend>
    <events>
        <catalog_product_get_final_price>
            <observers>
                <update_price_on_the_fly>
                    <type>singleton</type>
                    <class>Vendor_Module_Model_Observer</class>
                    <method>roundPrice</method>
                </update_price_on_the_fly>
            </observers>
        </catalog_product_get_final_price>
    </events>
</frontend>

Then in my observer I did:

public function roundPrice(Varien_Event_Observer $observer) {

    // check if are using NZD conversion
    if (!preg_match("/NZD/i", $code = Mage::app()->getStore()->getCurrentCurrencyCode())) {
        return;
    }

    $newPrice = $this->_getPriceLogic($observer->getProduct());
    $observer->getProduct()->setFinalPrice($newPrice);
}

That works fine for the product view page but does not work on the category page. It seems like catalog_product_get_final_price event is not dispatched on the category page.

I tried to observer catalog_product_collection_load_after event and use the following code but it does not seem to work entirely.

Instead of displaying my rounded price is displays:

rounded price as low as original price

public function roundPriceCollection($observer) {

    // check if are using NZD conversion
    if (!preg_match("/NZD/i", $code = Mage::app()->getStore()->getCurrentCurrencyCode())) {
        return;
    }

    $event = $observer->getEvent();
    $products = $observer->getCollection();
    foreach( $products as $product ) {
        $product->setFinalPrice($this->_getPriceLogic($product));
    }
    return $this;
}

Thus I'm wondering what is the best approach to implement such feature.


texts: Magento2 catalogrule promotions, ability to choose price or special_price?

texts:
By default catalogrule promotions are applied to price field. Changing this was one classic request in most Magento 1 projects we have managed

One approach could be to apply catalogrule promotions to the lowest value of price & special_price, for instance, this way https://stackoverflow.com/questions/18120342/catalog-price-rules-applied-to-special-price

A better, more complete, approach could be having a price selector when editing catalogrule rules, so admin users can choose which price they want to apply for the rule they are editing

In Magento2, I have seen price value seems to be retrieved in Magento\CatalogRule\Model\Indexer\RuleProductsSelectBuilder::build() method

$priceAttr = $this->eavConfig->getAttribute(\Magento\Catalog\Model\Product::ENTITY, 'price');

This is called, among other places, in Magento\CatalogRule\Model\Indexer\ReindexRuleProductPrice::execute() method, which seems to be responsible for catalog rule prices updates

So, the easy part (using special_price instead of price) apparently could be achieved just rewriting that Magento\CatalogRule\Model\Indexer\RuleProductsSelectBuilder::build() method

Any ideas to achieve the hard one?


texts: How to add new theme name to grunt CLI command to run grunt tool in Magento 2?

texts:
When we clone new theme from existing parent theme in Magento 2. How we can execute less:newThemName command using grunt CLI ?

As well as how grunt watch will look any changes into newly created theme ?

I have created new theme app\design\frontend\Vendor\luma2

My theme.xml is

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Config/etc/theme.xsd">
    <title>Luma 2</title> <!-- your theme's name -->
    <parent>Magento/luma</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
    <media>
        <preview_image>media/preview.png</preview_image> <!-- the path to your theme's preview image -->
    </media>
</theme>


texts: How to override admin custom shipping rate?

texts: How to override admin custom shipping rate like that image attachment? If any extension in magento please share with me.


texts: change body class according to storeview in magento2

texts: I have two store views one is default and another is arabic. I need the store have to take another body class which is written for arabic. How to do change the class of the body while clicking arabic button


texts: Magento 1.8.1 - adding simple products to configurable product categories

texts:
I need to add all my simple products associated with a configurable product to the same categories as the configurable.

I do not want to have to complete this manually nor do i want to purchase an extension.

Is there a way to do this?

Thank you
Krystle


texts: How to get customer address, email and phone after successfull registration

texts:
I have an Observer for customer registration which sends an email to the admin on success. My registration form has all address fields. Sending the mail works already.

Customer Name, StoreName and Company I have already but I still need the complete address data: street, ZIP, country ,phone, email to send it in my mail.  How can I retrieve this data?

Can anyone help?


texts: Need to change the category url in magento2

texts:
I need to change the Category url. I am updating the url in Search Engine Optimization.
URL is /brickwebb.html but need to change shop/brickwebb.html.
This is not updating and getting shop-brickwebb.html.

Does anyone have a solution for this?

Thanks


texts: Magento doesn't let me login unless I release some memeory

texts:
I have two websites hosted on the same amazon server which are developed in magento. Initially both worked fine but for sometime both these website don't let me upload product images, don't let me login both frontend and backend until I remove some files from cache or somewhere. When I checked the server already had 62 GB of free space.
Could anyone suggest me how to fix this issue? Your help would be appreciated.
Thanks.


texts: How to implement gift message form functionality in cart page?

texts:
I need to implement gift message form functionality in cart page. Currently gift message option is available in the shipping method page (if gift option enabled in admin). This same functionality  I need to implement in cart page. I used the below code in cart.phtml

<div id="onepage-checkout-shipping-method-additional-load">
   <?php echo $this->getLayout()->createBlock('checkout/onepage_shipping_method_additional')->setTemplate('checkout/onepage/shipping_method/additional.phtml')->toHtml(); ?>
    </div>

After using this code gift form showing correctly but the messages are not saving in database properly. Please help me how to handle this.


texts:
I get The cookie with "X-Magento-Vary" cookieName couldn't be sent. if I try to open a previous order in the customer account.

Why is this happening?


texts: Disable magento's compression of product images

texts:
I have created versions of my product images that look exactly how I want them to when viewed on the web. They are also at a size (weight) that I find acceptable. The problem is, once I upload to magento, some automatic compression kicks in and all images go ugly.

How do I disable all image compression (which I assume is the only thing making them ugly)? I want it disabled on the product page, the catalog page, the cart and anywhere else my product images might show up. I'm happy with the automatic resizing, just not the compression.

Can only find really old and conflicting answers to this so I would love to hear how you pros feel about this today with magento 1.9.


texts: Pressing "Flush magento cache" button in admin panel leads to "Currently unable to handle this request"

texts:
Please help me to understand the issue if my question is not related to "magento.stachexchange". Everything is fine in my magento installation but this button

Pressing “Flush Magento cache” button in admin panel leads to “Currently unable to handle this request”

Where should I look for the cause or the problem? Is it permission issue?


texts: Who are some affordable ($500/m) Magento Ready Website Hosting Providers?

texts:
Our IS Department has been tasked with finding a website hosting solution that is Magento ready. Our budget is approximately $500.00 monthly, enabling us to move away from all of our current hosting providers. We are hoping you can recommend some Magento ready website hosting providers.

Based on various discussions, our selection criteria are as follows:

Mandatory (Required)

Magento Ready – the provider is aware of Magento, and has built their infrastructure in consideration of (or is compatible with) Magento requirements
Fully Managed – the server will be kept up to date by the supplier (OS, third party applications, etc.) – but not Magento (version, updates, etc.)
Dedicated Server(s) – the provider will provide us with dedicated server(s) that are not shared with other clients
Secure Access – the OS and software need to be secure (SFTP, etc.)

Important

NOC Center – department that assists in defending attacks and mitigating responses on behalf of their customers – also responsible for the maintenance and overall health of network and internal resources

Nice to have’s

DDoS attack ready – be able to help mitigate DDoS attacks and other attack vectors
Load Balanced – two or more servers that work together to offset heavy loads between them
Redundancy – provisioning of failover server – sometimes located in a different geographica location
Backups – able to regularly backup the website
Magento Updates – supplier to automatically apply Magento updates as provided by Magento
Servers are Geographically dispersed around the globe – enables sites to remain up in case of disasters and ensures high-availability in other countries

We have 7 websites and we wish for them all to share the same Magento installation. We estimate our requirements as follows:

Hard drive space - 50-75GB
Memory - 8GB
Bandwidth - 1TB

Should we find that the expected requirements price ourselves above our approved price ceiling, or outpace the ability to have all installations on one server, then we may need to have more than one server provisioned.

According to paperwork offered by Magento, the following represents our Server Sizing (Peak):

Page views per day                 29,930
Page views per hour                5,000
Orders per day                     250
Orders per hour                    100
Concurrent Magento Admin Users     2
Concurrent Sessions                1
Concurrent requests per minute     1

We must accommodate an approximate growth factor of 30% per following years.  Magento will be provisioned to accommodate a single URL for all regions with different views for languages and currencies, and will be integrated with NetSuite, Celigo, Payflow Pro, PayPal, and Avatax.

Kindly provide us with a list of recommended website hosting providers that meet our criteria, or direct us to the correct place.


texts:
when I install a new theme I do this commands via Putty:

php bin/magento setup:upgrade

how can I fix this problem?
I'm working on Magento 2.1.0

  PHP Warning: Uncaught Exception: Warning: require(/var/www/vhosts/a.com/httpdocs/setup/config/application.config.php): failed to open stream: No such file or directory in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/Console/Cli.php on line 57 in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61


texts: Magento 2: How to Show Discount Coupon Applied Code Product wise?

texts:
In Shopping Cart, I have 2 products. When I am applying the Promo Code it's going to apply on only 1 product as per the Shopping Cart/Promotion Rules.

I would like to show discount code on basis of Product (Product based discount code)

How to display product wise discount on Shopping Cart/Mint Cart & all other relevant pages? I want to achieve below thing please refer the below image.


texts: How to modify Color Swatches From vertical to horizontal in Layered navigation

texts:
hi I need to modify magento layered navigation colour swatches from vertical............

to horizontal....

But I did not got any idea...like which file is responsible for this...Basically...i need to modify vertical to horizontal....
pls help..


texts: Magento - Moving from Ip address to Domain Name

texts:
I am running magento 1.9.2.3 on my Linux server with Cpanel and I can access my Store via a dedicated IP address (E.X 259.259.259.259), Now I wish to point my server DNS to my domain name (www.example.com) so that I can access the store via domain name.

My Question: Since nothing is changing at the server side, will Magento works perfectly after moving to the domain name? Or there are some changes I am required to do?


texts: Import orders / invoices from old installation

texts:
Due to an very old magento installation we moved our new client over to a complete new magento installation. this because the old one was full of hacks and such.

We still have a backup of course. but he asked us to import all financial order/invoice data so he can do comparisons of he's revenue.
is there a good way or best practice to do this?


texts:
Why nothing is visible in the customer page in the admin panel?

what is wrong?

InstallData.php

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Eav\Model\Config;
use Magento\Customer\Model\Customer;

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface
$context)

    {

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);

        $eavSetup->addAttribute(

            \Magento\Customer\Model\Customer::ENTITY,

            'suspend_account_customer',

            [
                'type'         => 'varchar',
                'label'        => 'Suspend Account Customer',
                'input'        => 'text',
                'required'     => false,
                'visible'      => true,
                'user_defined' => false,
                'position'     => 999,
                'system'       => 0,
            ]
        );

        $suspend_customer = $this->eavConfig->getAttribute(Customer::ENTITY, 'suspend_account_customer');

        $suspend_customer->setData(
            'used_in_forms',
            ['adminhtml_customer']

        );
        $suspend_customer->save();
    }


texts:
We are using MSI Multistock (multisource) and want to be able to ship from multiple sources in M2 in one shipment. In short it does the following

sell items from multiple sources as shown in image
when shipping apply multisource shipping, and deduct 1st as much as possible from source 1, then continue to source 2 (actual just like the column 'deduct' in the screenshot)

Currently we can only select 1 shipping source because it is a dropdown. We would rather like to assign multiple sources just like the deduct from column in the overview.
Amasty has something in their extension for MSI, the problem is that it adds a lot of other features as well. We only need multisource shipping.
Question: HOw could we add multisource shipping as a shipping algoritm that applies per default for all orders /w the logic of 1st deduct from prio 1 source, if not enough continue to next. And Ship all in 1 shipment.


texts: Country drop down change based on geoIp location on cart page

texts:
When any guest user comes at cart page I want to change the country drop-down based on guest geoIp location.

Here I am adding the actual picture.


texts: Form / Form_Container not finding each other

texts:
Disclaimer: I know there are hundreds of thousands of questions about this already on the internet, but I just cannot find the solution to my problem. Maybe I'm overlooking something.

I have a working admin page with a Form_Container. If I'm not mistaken, it should find the form (its child) on its own, given the right parameters. However, there is no form child element and the site gives me an error telling me something along these lines.

Here's the container:

class Adornis_TPS_Block_Adminhtml_Tradeplace_Product_Get extends Mage_Adminhtml_Block_Widget_Form_Container {

public function __construct() {
    parent::__construct();

    $this->_objectId = 'get';
    $this->_blockGroup = 'adornis_tps_adminhtml';
    $this->_controller = 'tradeplace_product';
    $this->_mode = 'edit';

    $this->_updateButton('save', 'label', Mage::helper('adornis_tps')->__('Get Data'));
    $this->_updateButton('save', 'onclick', "setLocation('".$this->getUrl('*/*/save')."')");
}
}

And here's the form:

<?php

class Adornis_TPS_Block_Adminhtml_Tradeplace_Product_Get_Form extends Mage_Adminhtml_Block_Widget_Form {

public function _prepareForm() {
    $form = new Varien_Data_Form(array(
        'id' => 'form',
        'action' => $this->getUrl('*/*/save', array('ean' => $this->getRequest()->getParam('ean'))),
        'method' => 'post',
        'enctype' => 'multipart/form-data',
    ));
    $form->setUseContainer(true);
    $this->setForm($form);

    $fieldset = $form->addFieldset('ean_input', array(
        'legend' => Mage::helper('adornis_tps')->__('EAN Input'),
    ));

    $fieldset->addField('title', 'text', array(
        'label' => Mage::helper('adornis_tps')->__('EAN'),
        'class' => 'required-entry',
        'required' => true,
        'name' => 'ean'
    ));

    return parent::_prepareForm();
}
}

And finally, here is the relevant section from the config.xml (<global><blocks/></global>)

        <adornis_tps_adminhtml>
            <class>Adornis_TPS_Block_Adminhtml</class>
        </adornis_tps_adminhtml>

EDIT: As requested, here is the controller (TpsController.php):

<?php

class Adornis_TPS_Adminhtml_TpsController extends Mage_Adminhtml_Controller_Action {

public function indexAction() {...}

public function getAction() {
    $templateBlock = $this->getLayout()->createBlock('adornis_tps_adminhtml/tradeplace_product_get');
    $this->loadLayout()->_addContent($templateBlock)->renderLayout();
}

public function saveAction() {
    var_dump($this->getRequest()->getPost());
    //echo $this->getRequest()->getParams('ean');
}
}


texts: Which tables can be truncated/deleted before doing a full reindex?

texts:
I'd like to re-index my whole catalog in magento after finding out some corrupt data exists within a few tables.

This question/post on stackexchange helped me quite a bit in the good direction:
https://stackoverflow.com/questions/12205714/list-of-tables-to-safely-truncate-in-magento

What I'm wondering though, is if there are more tables which can be truncated/deleted safely (which will be repopulated by doing a full re-indexation).

In particular i'm wondering about all of these tables:

catalog_product_index_eav
catalog_product_index_eav_decimal
catalog_product_index_eav_decimal_idx
catalog_product_index_eav_decimal_tmp

etc.. (all other catalog_product_index_* tables)

Are those safe to truncate if i'm going to perform a full re-indexation of my catalog? (products & categories)


texts:
We have an issue with load style CSS:

Warning: include(/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php): failed to open stream: No such file or directory in /home/log/domains/domain.com/public_html/vendor/composer/ClassLoader.php on line 444

Warning: include(/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php): failed to open stream: No such file or directory in /home/log/domains/domain.com/public_html/vendor/composer/ClassLoader.php on line 444

Warning: include(): Failed opening '/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php' for inclusion (include_path='/home/log/domains/domain.com/public_html/generated/code:/home/log/domains/domain.com/public_html/generated/code:/home/log/domains/domain.com/public_html/vendor/magento/zendframework1/library:.:/usr/local/php71/lib/php') in /home/log/domains/domain.com/public_html/vendor/composer/ClassLoader.php on line 444

Warning: include(/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php): failed to open stream: No such file or directory in /home/log/domains/domain.com/public_html/vendor/magento/framework/Code/Generator/Io.php on line 160

Warning: include(/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php): failed to open stream: No such file or directory in /home/log/domains/domain.com/public_html/vendor/magento/framework/Code/Generator/Io.php on line 160

Warning: include(): Failed opening '/home/log/domains/domain.com/public_html/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php' for inclusion (include_path='/home/log/domains/domain.com/public_html/generated/code:/home/log/domains/domain.com/public_html/generated/code:/home/log/domains/domain.com/public_html/vendor/magento/zendframework1/library:.:/usr/local/php71/lib/php') in /home/log/domains/domain.com/public_html/vendor/magento/framework/Code/Generator/Io.php on line 160

Fatal error: Uncaught Error: Class 'Magento\Framework\Event\Config\Reader\Proxy' not found in /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:111 Stack trace: #0 /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array) #1 /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...') #2 /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): Magento\Framework\ObjectManager\Factory\Compiled->get('Magento\\Framewo...') #3 /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): Magento\Framework\ObjectManager\Factory\Compiled->create('Magento\\Framewo...') #4 /home/log/domains/ge in /home/log/domains/domain.com/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 111

I try to rename folder generated, deploy the system, delete pub/static/ but still, issue. Any solution?


texts: Magento 2.3.4: Refresh window.checkoutConfig

texts:
We are adding shipping price of quote object to myTestData which is pulled onto the page using window.checkoutConfig.myTestData:
use Magento\Checkout\Model\ConfigProviderInterface;

class Config implements ConfigProviderInterface
{
  protected $checkoutSession;

  public function __construct(
    \Magento\Checkout\Model\Session $checkoutSession
  ) {
    $this->checkoutSession = $checkoutSession;
  }

  /* Get Quote */
  public function getQuote()
  {
    return $this->checkoutSession->getQuote();
  }

  /* Return Config Details */
  public function getConfig()
  {
    $config = [];
    $config['myTestData'] = $this->getQuote()->getShippingAddress()->getShippingAmount();

    return $config;
  }

This returns the proper shipping amount on first load of the cart, but if we change shipping method, myTestData does not get updated to reflect the new value. How can we make sure window.checkoutConfig.myTestData gets refreshed if / when cart is updated?
EDIT, if not using checkoutConfig, is there another way to pass dynamic block variables to javascript object any time the cart updates?


texts: Magento2 Graphql get select attribute options label instead of option id

texts:
I am using v2.4 in which in the products query I am getting the Optionid of select attribute instead of attribute option label.
Like if i try to get color(select type) then I get value of red instead of label Red
So anybody can help me get the label instead of id
Here is my sample code
query {
 products(search:"test", pageSize: 15, sort: {price: DESC}) {
  total_count
  items {
    name
    sku
    color
    price_range {
      minimum_price {
        regular_price {
          value
          currency
        }
      }
    }
   }
 }
}


texts: How to load products from a specific category based on special price availability?

texts:
I have following code

$promoCatId = (int)Mage::getStoreConfig('promoprodsec/promoprodgroup/promocategoryid');

$products = Mage::getModel('catalog/category')->setStoreId($store)->load($promoCatId)
    ->getProductCollection();
$allProductsInPromoCategory = $products->getAllIds();

It gives me all the products of $promoCatId category.

Now I want to get all the products which are not having special price or the special price date range has expired from all the products of  $allProductsInPromoCategory

How can I accomplish this without using foreach loop and again loading every product collection again?

foreach ($allProductsInPromoCategory as $promoprod) {
    Mage:getModel('catalog/product')->load( $promoprod);

    //do validation for the special price criteria
}


texts: How to control my account navigation Links?

texts:
Why the following links are displayed in My account section even user not been subscribed/registered for this features and also they are not been used commonly by the users in the website.

Billing Agreements
Recurring Profiles
My Applications

It would be good if it can be displayed when user has subscribed/registered to those features in the website.

Because as I see in my day to today development, many clients gets confused and ask for removing this links.

There are other links like the following which are very commonly to be used  by any registered customer.

Account Dashboard
Account Information
Address Book
My Orders


texts: Mage_Core_Exception - Ebizmarts SagePaySuite - Magento 1.9.3.1

texts:
We've been getting increasingly intermittent errors that occurs when customers try to check out using SagePay
I've looked in the exception.log and found the following.
2020-08-05 11:18:46.000000 (1596622726.7568) ERR:
exception 'Mage_Core_Exception' with message 'Your order could not be completed, please try again. Thanks.' in /home/x2/public_html/shop/app/Mage.php:595
Stack trace:
#0 /home/x2/public_html/shop/app/code/local/Ebizmarts/SagePaySuite/controllers/DirectPaymentController.php(181): Mage::throwException('Your order coul...')
#1 /home/x2/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Ebizmarts_SagePaySuite_DirectPaymentController->callback3dAction()
#2 /home/x2/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('callback3d')
#3 /home/x2/public_html/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#4 /home/x2/public_html/shop/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#5 /home/x2/public_html/shop/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 /home/x2/public_html/shop/index.php(83): Mage::run('', 'store')
#7 {main}

I have contacted SagePay support (opayo.co.uk) and they can't point out what the issue is.
I have also contacted the hosting support and they can't see obvious issues from their side.
Any ideas as to what might cause this?


texts: Magento 2.3.3 - Change price in catalog product view

texts:
I want to change the price in the Catalog View Page, I use a price attribute with the name rrp, and I need when customers are logged to display this price attribute otherwise display the normal price. I do this in Category Page like this:

                <?php
                $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                $customerSession = $objectManager->get('Magento\Customer\Model\Session');
                if($customerSession->isLoggedIn()) {
                ?>
                    <?= /* @noEscape */ $block->getProductPrice($_product) ?>
                <?php } else { ?>

                        <span class="regular-price" id="product-price-<?php $_product->getId() ?>">

                                <?php $pricingHelper = $this->helper(\Magento\Framework\Pricing\Helper\Data::class); ?>
                                <?php echo $pricingHelper->currency($_product->getData('rrp'), true, false); ?>

                <?php } ?>

But how I can do the same for Product View?

Thank you


texts: How do I update minimum required quantity for configurable products for specific attributes

texts:
Magento: 1.9.2.0

I have a configurable product listed in magento store. This configurable product has more than 200 simple products(sizes) associated with it. The attributes are Length X Width X Thickness (cm). I have 9 sizes for thickness 5 each for lengths and widths.

Now I want to limit the minimum_cart_qty=5 for thickness<=2.5cm.

In other words whenever a customer chooses a thickness 2.5, 2, 1.5 or 1cm The system should not allow them to add products to cart.

Actually these are 4x5x5 = 100 simple products that need to be updated.

Problem here is bulk updating minimum cart quantity, I don't want to update via product stocks because that messes my images.
I believe it is possible by Magmi but I don't know how to use Magmi.

How do I achieve this?

Problem with bulk attribute edit is that how do I know which products to select as the product names and SKU's are not based upon sizes.


texts:
I've added the following observer which adds a custom text field to the CMS Page Information:

$fieldset = $form->addFieldset('lcms_author_fieldset', array('legend'=>Mage::helper('cms')->__('Custom'),'class'=>'fieldset-wide'));

$fieldset->addField('author', 'text', array(
  'name'      => 'author',
  'label'     => Mage::helper('cms')->__('Author'),
  'title'     => Mage::helper('cms')->__('Author'),
  'disabled'  => false,

  'value'     => $model->getauthor()
));

How could I change this to be a dropdown? Ideally the select options would be generated from an attribute but I don't mind hard-coding them if it makes it 10x easier.


texts: attribute not being added to flat tables when reindexing

texts:
I have a custom multiselect product attribute:

eav_attribute:

   attribute_id: 290
 entity_type_id: 4
 attribute_code: my_attribute_code
attribute_model: NULL
  backend_model: eav/entity_attribute_backend_array
   backend_type: text
  backend_table: NULL
 frontend_model: NULL
 frontend_input: multiselect
 frontend_label: Style
 frontend_class: NULL
   source_model: NULL
    is_required: 0
is_user_defined: 0
  default_value:
      is_unique: 0
           note: NULL

catalog_eav_attribute:

                     attribute_id: 290
          frontend_input_renderer: NULL
                        is_global: 0
                       is_visible: 1
                    is_searchable: 0
                    is_filterable: 0
                    is_comparable: 0
              is_visible_on_front: 0
         is_html_allowed_on_front: 0
          is_used_for_price_rules: 0
          is_filterable_in_search: 0
          used_in_product_listing: 1
                 used_for_sort_by: 0
                  is_configurable: 1
                         apply_to: NULL
    is_visible_in_advanced_search: 0
                         position: 0
               is_wysiwyg_enabled: 0
          is_used_for_promo_rules: 0
                    search_weight: 1

When i reindex i can see the column being added to the flat tables.  But the value is always NULL

What am i not doing correctly?


texts: Is there a way to use multiple URLs for one Magento setup?

texts:
I am planning to use Magento with multiple languages.

I was thinking of doing this:

English:

Magento: //website/store/[...](params for Magento)

French:

Magento: //website/magasin/[...](params for Magento)

I am using Apache server and I have access to the .htaccess file.

I am using Magento 1.7.

So is there a way for Magento to support this?


texts: multi site development site showing in google

texts: I have been testing a multi store environment on Magento 1.9 in the same install that I have my primary live site, and have realized that the content is being indexed twice by Google.  Can I create a robots.txt to prevent the 2nd domain in the multisite from being indexed?


texts:
I am trying to modify my breadcrumbs, but problem is that I am unable to get all links. What I am trying to do is showing selected menu on left side and Home / Primary Menu on the right only Example
Selected category/Home/ category

. Reference link

enter link description here

<?php if ($crumbs && is_array($crumbs)) : ?>

        <?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
            <li class="item <?php /* @escapeNotVerified */ echo $crumbName ?>">
            <?php if ($crumbInfo['link']) : ?>
                <a href="<?php /* @escapeNotVerified */ echo $crumbInfo['link'] ?>" title="<?php echo $block->escapeHtml($crumbInfo['title']) ?>">
                    <?php echo $block->escapeHtml($crumbInfo['label']) ?>

            <?php elseif ($crumbInfo['last']) : ?>
                <?php echo $block->escapeHtml($crumbInfo['label']) ?>
            <?php else: ?>
                <?php echo $block->escapeHtml($crumbInfo['label']) ?>
            <?php endif; ?>

        <?php endforeach; ?>

<?php endif; ?>


texts:
when I login to admin panel it's successfully login but  login screen remain same ,does not redirect to dashboard show proper URL ( like that admin/admin/dashboard/).

I want to know why this happen , it redirect to dashboard when i click to url /refresh


texts:
In Magento 1.9.3.x..we have upgrade php version from 5.6 to 7.3.after that we are facing issue like
Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in app/code/core/Mage/Core/functions.php on line 61 . function look like below
function __autoload($class)
{
if (defined('COMPILER_INCLUDE_PATH')) {
    $classFile = $class.'.php';
} else {
    $classFile = uc_words($class, DIRECTORY_SEPARATOR).'.php';
}

include($classFile);

}
we have replace with
function spl_autoload_register($class)
{
if (defined('COMPILER_INCLUDE_PATH')) {
    $classFile = $class.'.php';
} else {
    $classFile = uc_words($class, DIRECTORY_SEPARATOR).'.php';
}

include($classFile);

}
But again it throws an fetal error like
Fatal error: Cannot redeclare spl_autoload_register() in app/code/core/Mage/Core/functions.php on line 71
Please help me...my live site is not working because of this upgradation..


texts: Admin page cant be reached on Magento 2 installation on wamp server

texts:
After installation on local wamp server the admin page cannot be found when i click on the 'Launch Magento Admin' or follow the admin address. I do get a home page when i visit http://localhost/magento/
Magento version 2.3.9 and wamp version 3.1.9


texts: Magento 2.1: Hide block when product collection is empty

texts:
In Magento 2.1 I am trying to hide a specific block in the layout when the loaded product collection is empty. Is there a way to do it via XML or via PHP?

The container I would like to remove/hide is this:

<container name="div.sidebars" htmlTag="div" htmlClass="col-md-3 col-lg-2" before="main">
        <container name="div.sidebar.main" htmlTag="div" htmlClass="sidebar sidebar-main">
            <container name="sidebar.main" as="sidebar_main" label="Sidebar Main"/>
        </container>
        <container name="div.sidebar.additional" htmlTag="div" htmlClass="sidebar sidebar-additional" after="div.sidebar.main">
            <container name="sidebar.additional" as="sidebar_additional" label="Sidebar Additional"/>
        </container>
</container>


texts: CSS and JS are not calling for Multi- website in Magento-2.2.4

texts:
I am working on Magento-2.2.4.

So, my url is as follows : http://puppetkart.com/ and on Luma theme.

My requirement is as follows :

I have created second website and store and store view for this newly created website in admin panel. My new website is http://vizag.puppetkart.com/  And added this url at Base url section for this new website.
I have created sub domain and managed the DNS also. Edited the index.php which is in new folder

Replaced:

$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER);

/** @var \Magento\Framework\App\Http $app */

$app = $bootstrap->createApplication('Magento\Framework\App\Http');

$bootstrap->run($app);

With:

$params = $_SERVER;

 $params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'vizag'; //Webite code as same in admin panel

 $params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

 $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);

 /** @var \Magento\Framework\App\Http $app */

 $app = $bootstrap->createApplication('Magento\Framework\App\Http');

 $bootstrap->run($app);

When i open my new website http://vizag.puppetkart.com/, CSS and js are not calling properly.

Can anyone please guide me to create multi websites.


texts: Magento SOAP API deletes the products in cart upon setting user address (CE 1.7)

texts:
'm working on an ECommerce mobile app which consumes magento's SOAP API for fetching products, adding them to cart and checkout. The checkout used to work fine, however it's giving me troubles now. When I set cart_customer.addresses for checkout, my products get deleted from the shopping cart.

This is a strange problem as cart_customer.addresses has nothing to do with products in cart. Please help me with this. We are using the default SOAP API v1.0 and no customizations have been made to it.

Here's my code to set addresses.

$addressBill["mode"] = "billing";
$addressShip["mode"] = "shipping";
$addresses = array($addressBill, $addressShip);

$setCustomer = array('cart_customer.set', array($cart, $customer));
$setAddress = array('cart_customer.addresses', array($cart, $addresses));
$shipping = array('cart_shipping.list', $cart);
$payment = array('cart_payment.list', $cart);
$calls = array($setCustomer, $setAddress, $shipping, $payment);
try {
    $result = $client->multicall($session, $calls);
}
catch (Exception $e) {
    die (json_encode(array("code"=>"104", "error"=>"Could not place order")));
}


texts: addAttributeToFilter with mutiselect values

texts:
I have to apply filter on base of field "status", which is multi select.i.e if I have to filter for following values "Closed,Completed,On Hold",I tied following

$orderCollection    = Mage::getModel('sales/order')->getCollection();

 $orderCollection->addAttributeToFilter('status', array('in' => array('Closed','Completed','On Hold')));

This is not working,


texts: Cannot Connect Magento with SSL/TLS Error

texts:
There was an error downloading 'https://103.21.128.85/index.php/api/v2_soap/index/?wsdl'. The request was aborted:

  Could not create SSL/TLS secure channel.

Metadata contains a reference that cannot be resolved: 'https://103.21.128.85/index.php/api/v2_soap/index/?wsdl'.

  Could not establish secure channel for SSL/TLS with authority
  '103.21.128.85'.

The request was aborted:

  Could not create SSL/TLS secure channel.

If the service is defined in the current solution, try building the solution and adding the service reference again.

Please assist in reported issue as already hanging about 1 month, still cannot resolve even after trying so many methods?

Thanks.


texts: Magento Commerce 2 comes with NewRelic module-new-relic-reporting module. It automatically logs transactions. It is possible to add custom parameters by calling the newrelic_add_custom_parameter function. Currently NewRelic displays only those transactions which are "Most time consuming" or with "Slowest Average Response Time" or "Apdex most dissatisfying" or with "Highest throughput". I want the NewRelic dashboard to display all transactions if they have a specific custom parameter. How to achieve that?


texts: How can I programatically set login and trans_key for authorizenet payment method config?

texts:
I am trying to automate the config and deployment of a Magento 1.9 store. I have a load script that does everything I need it to except for configuring the authorize.net payment method's login and trans_key properties.

Here is a sample code block that configures everything except the credentials (123456 in this example):

// already have Mage
Mage::getConfig()
->saveConfig('payment/authorizenet/active', '1', 'default', 0)
->saveConfig('payment/authorizenet/payment_action', 'authorize_capture', 'default', 0)
->saveConfig('payment/authorizenet/login', '123456', 'default', 0)
->saveConfig('payment/authorizenet/merchant_email', 'me@home.com', 'default', 0)
->saveConfig('payment/authorizenet/title', 'Credit Card (Authorize.net)', 'default', 0)
->saveConfig('payment/authorizenet/trans_key', '123456', 'default', 0)
->saveConfig('payment/authorizenet/cgi_url', 'https://test.authorize.net/gateway/transact.dll', 'default', 0)
->saveConfig('payment/authorizenet/cgi_url_td', 'https://api.authorize.net/xml/v1/request.api', 'default', 0)
->saveConfig('payment/authorizenet/order_status', 'processing', 'default', 0)
->saveConfig('payment/authorizenet/test', '0', 'default', 0)
->saveConfig('payment/authorizenet/debug', '0', 'default', 0)
->saveConfig('payment/authorizenet/currency', 'USD', 'default', 0)
->saveConfig('payment/authorizenet/email_customer', '0', 'default', 0)
->saveConfig('payment/authorizenet/cctypes', 'AE,VI,MC,DI', 'default', 0)
->saveConfig('payment/authorizenet/allowspecific', '0', 'default', 0)
->saveConfig('payment/authorizenet/useccv', '0', 'default', 0)
->saveConfig('payment/authorizenet/min_order_total', '0', 'default', 0)
->saveConfig('payment/authorizenet/min_order_total', '0', 'default', 0)
->saveConfig('payment/authorizenet/sort_order', NULL, 'default', 0)
->saveConfig('payment/authorizenet/allow_partial_authorization', '0', 'default', 0)
->saveConfig('payment/authorizenet/centinel', '0', 'default', 0);

Everything besides login and trans_key gets successfully set this way, but I need those fields to be set too.

How do I set the payment gateway credentials programatically assuming I have access to the Magento core API?


texts: Adding a configurable item to cart via ajax

texts:
I've inherited a project which lists configurable products in the catalog view, as well as listing the simple products attached to that configurable product. For example;

Configurable Product: Sandpaper
Items: 40grit sand paper, 50grit sand paper, 60grit sandpaper.

We've had to upgrade from 2.2.2 to 2.2.7, which has caused the ajax add to cart we were using to stop working.

I've attempted to debug as best I can, but I'm just about ready to throw the computer out the window.

According to the original solution, making a POST request to

http://{website}/{category}/{configurable-product-page}.html?options=cart

With the following payload

form_key: "nEcvSLTQFbHNKTNJ"
product: "2014"
qty: "2"
super_attribute[173]: 81
super_attribute[174]: 83
super_attribute[223]: 326
uenc: "aHR0cDovL2RyYWtlLmxvY2FsL2FicmFzaXZlcy8xMTVtbS1nYXJyeXNvbi1jZXJhbWlxLWZsYXAtZGlzY3MuaHRtbD9vcHRpb25zPWNhcnQ,"

Should add to product to the cart. Instead, it no longer does this and throws me a front end error of

"You need to choose options for your item."

The response from the server is to just return

{backUrl: "http://{website}/{category}/{configurable-product-page}.html?options=cart"}

What do?


texts: detect onchange event of country dropdown

texts:
I am using select2 jQuery plugin to make Magento HTML select nicer. The plugin replaces the actual select with a set of tag which replicate the functionalities of the select. Doing in this way I am missing some default beahviour of Magento select, such as the switch between dropdowns countries and address input field when United States are selected.

Anyone knows where this functionalities are inside Magento js scripts?


texts: Magento2 API must use fully qualified namespaces?

texts:
In Magento2.1, I see almost all API use the fully qualified namespaces in the function param and PHPDoc, instead of using importing and aliases, like PageRepositoryInterface and BlockRepositoryInterface in the vendor\magento\module-cms\Api directory.

I forgot where I saw it, but I remember someone said Magento2 API must use fully qualified namespaces, is that true? If it is true, what is the reason?

For Example

<?php
namespace Magento\Cms\Api;

interface PageRepositoryInterface
{
    /**
     * Save page.
     *
     * @param \Magento\Cms\Api\Data\PageInterface $page
     * @return \Magento\Cms\Api\Data\PageInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function save(\Magento\Cms\Api\Data\PageInterface $page);
}

Can it rewrite to below?

<?php
namespace Magento\Cms\Api;

use Magento\Cms\Api\Data\PageInterface;

interface PageRepositoryInterface
{
    /**
     * Save page.
     *
     * @param PageInterface $page
     * @return PageInterface
     * @throws \Magento\Framework\Exception\LocalizedException
     */
    public function save(PageInterface $page);
}


texts: Want to change logo and search box position in magento 2.3

texts:
I want chnage my logo and search box position from bydefault.

I want change logo and search box position with HOME tab


texts:
I'm tiring to create shipment for orders using php external script on magento version 1.9.3.4

But shipment is not create in order and not sending the email, it didn't throw any error info at all. i tried change by codes but nothing happens.

The order item loop also working fine. can someone know about the issue of these code or is there need to do some other codes to create shipment

Thank You

     require_once('../app/Mage.php');
        umask(0);
        Mage::setIsDeveloperMode(true);
        Mage::app(0);

            $comment = 'Hello test';
            $email = true;
            $includeComment = true;
            $order = Mage::getModel('sales/order')->loadByIncrementId('100000052');

            $convertor = Mage::getModel('sales/convert_order');
            $shipment = $convertor->toShipment($order);

            foreach ($order->getAllItems() as $orderItem)
            {

                $item = $convertor->itemToShipmentItem($orderItem);
                $shipment->addItem($item);
//test name show product name which indicate order items retrieve fine
                echo $orderItem->getName();

            }

            Mage::register('current_shipment', $shipment);

            $shipment->register();
            $shipment->addComment($comment,true);
            $shipment->setEmailSent(true);
            $shipment->getOrder()->setIsInProcess(true);

            $transactionSave = Mage::getModel('core/resource_transaction')
                ->addObject($shipment)
                ->addObject($shipment->getOrder())
                ->save();

            $shipment->sendEmail(true);
echo 'this also showing which means script runs without fetal errors';


texts: Loading Javascript file when module load

texts:
I am developing custom Module in Magento 1. Now I would like to load my module specific JS file when then module enabled. In this regard I used below xml code in a separate xml file named as module name which is placed inside layout folder. My module don't have any controller.

<default>
    <reference name="head">
        <action method="addJs">
            <js>brand_logo.js</js>
        </action>
    </reference>
</default>

But the JS file is not loading at the time of module loading.

How can I do that??


texts:
How to add clear shopping cart button in Magento 2

In this I added in minicart but I want it in cart page.


texts: How to make a pop up window and filled it with product suggestions

texts:
Ideally I want to use Observers when a client presses the buttons "Add to basket" or "Proceed to Checkout" to make a pop up window and make some suggestions on products.
My problem is how can we make a pop up window with magento. Is there a way to make a .phtml and use that as a pop up window?
Or the only way is to do it using jquery. I don't want to change the standard behaviour of the buttons, just to add some suggestions with products from the site.


texts: How to edit the change password validation message for customer in magento 2?

texts:
suppose , after a customer login into the website(you may need to sign up first as a customer), after a customer login then he click on change password option from the drop down , he will reach a window where he will type his new password --- But while typing the password he will see this error validation message "Minimum length of this field must be equal or greater than 8 symbols. Leading and trailing spaces will be ignored." , I want to edit this message , please guide me how can i do this. Thanks :)
Adding URL - wwww.mydomainname.com/customer/account/edit/changepass/1


texts: Got error: CRITICAL: Broken reference: No element found with ID 'checkout.header.wrapper'

texts:
I got this error in system.log:

  main.CRITICAL: Broken reference: No element found with ID
  'checkout.header.wrapper'

and the checkout page is blank.


texts: trying to display static block for category—will only display category view

texts:
I’m trying to set up a static block for my categories. I created a phtml file, then linked this file to the static block I created:

{{block type="catalog/navigation" template="catalog/navigation/sub_navigation.phtml"}}

Then I went the Cataglog->Manage Categories and selected"Static Block Only” under Display Setting->Display mode. I selected the static block I just created.

However, when I navigate to that category on my site, it just displays the regular category view (the layout I created under template->category->view.phtml in my template folder).

Any idea what I’m doing wrong here? I tried re-indexing everything, to no avail.


texts: Magento 2 How to get the configurable products related all child products in list page using object manager?

texts:
Magento 2 in how to get the configurable products related all child (simple products QTY) in list page using object manager?

Please give me a solution this questions?


texts: Magento 2 : Item order details not showing after migration for old records

texts:
I have migrate magento1 to magento 2.2.5, after migration in old order records item details are not showing in backend.

In database all details are available but still item not showing in backend only Product name and price are displayed.

Can anyone have fix of this issue?


texts: Track ingredients from products (breakfast service)

texts:
I'm working on a breakfast service website, and the company wants to be able to track the stock of the ingredients, so they know what and when they have to buy new ingredients for their breakfasts. I've already checked the Magento Connect website for extensions and Google for answers, but i don't know where to look elsewhere for help.

I've also tried adding the ingredients manually, and then set the breakfasts up as Bundled Products, but there is another problem: The customers should also be able to customize 2 set breakfasts that contain a set number of ingredients, they should only be able to add ingredients to it and not be able to remove the required ingredients from that product.

Any help on the matter would be much appreciated.


texts: Magento extension not working in my layout

texts:
I have just installed a new extension for my Magento webshop. It's a count down function that shows when to order if the order is to be shipped the same day
When using the standard layout the extensions works:
When I switch to my own layout rwd/default - the counter disappears:

I have installed other extensions and the all works perfectly with my layout. How do I fix this?


texts: How to Create Custom Helper Class in Magento2 then Call ProductRepository to get Product details

texts:
Actually I need to  Create a Helper Class in Magento2 then Call ProductRepository in

  app/code/{vendor}/{module}/Helper/Data.php

to load Product details by sku and return   Product Details in cart page and display

  app/code/{vendor}/{module/view/frontend/templates/cart/item/default.phtml


texts: Magento 2.1 product urls end with .html.html - why?

texts:
I cannot figure out what settings would prevent this from happening. Also cannot figure out how to fix the urls that have been set this way already.
Thanks
Sam


texts: Product discontinued with very similar alternative available

texts:
We've got a product listed which has generated quite a buzz. I know that there's quite a lot of inbound links to it. We've now realized it's being discontinued but a very similar replacement model is available.

What is the best practise in Magento for implementing redirect in an SEO-optimized manner in which link juice will be preserved.

I've read this article on Moz which states:

  Since 301s lose some link juice in the process and good anchor text is so valuable for ranking in Google

Which strategy can I employ with Magento to maintain as much of the link juice as possible while re-directing to the updated model of this product, which is replacing said discontinued unit?


texts:
How to add a custom attributes from backend in
registration page in magento 2

Refer Image:


texts: Magento permission error after clearing cache

texts:
when I clear the cache, I get this following error:

Error in file: "/var/www/public_html/app/code/local/Wyomind/Simplegoogleshopping/sql/simplegoogleshopping_setup/mysql4-install-5.0.0.php" - Please make sure that / is writable by web-server.

Then after 20-30 sec, my site is working normally again.

The files have permission 777.

Tried to change the whole path to 777, but that didn't help.


texts: Magento 2.3.2 backorder is not working when check in 2.3.1 its working perfectly but not in 2.3.2

texts: I am using magento 2.3.2 and I am trying set backorder allow below quantity 0 and manage stock yes, but in frontend outof stock product add to cat button not showing.


texts: My Magento version 1.9 suddenly reported an error yesterday,There has been an error processing your request

texts:
My Magento version 1.9 suddenly reported an error yesterday. Before that, I didn't make any changes. Consulted the service provider, they said cPanel was not updated.
Edit with current solution: I've edited the /lib/Zend/Locale/Format.php replacing all iconv_strpos with strpos and it works for now.But, I found that the product does not display currency, what should I do?


texts: M2 - Can i set the how filters on admin page(Catalog/Order) show as default?

texts:
Outside of Magento1, the filters ware hidden until an admin clicks filter icon on Magento2. But it is so irritating to me whenever i want to search product name and sku.

Can i make them fixed as opened like this??

Thank you


texts:
I am customizing the back end of a store and need to display the field of custom text that is printed on each product in an order

i tried

<?php $orderq = Mage::getModel('sales/order')->load($orderId); $itemsq
= $orderq->getAllVisibleItems(); foreach ($itemsq as $itemq):
    $optionsq = $itemq->getProductOptions();
    foreach ($optionsq as $optionq):
           echo $optionq;
    endforeach; endforeach; ?>

and it does not work is there a different ->get to output the info?