texts:
First of all what I know :
Index management is useful for increasing store performance.
EAV has one disadvantage.it will store data in different tables. So that retrieving data is time-consuming.
So that we will store data into a single table.
when data is changed we will update this single table (nothing but indexing update)
mysql trigger:
perform some query actions based on some table insert/update/delete.
So Magento using a trigger for example when the price is updating it will store entity_id into the changelog table.
there is a statement in devdocs for implementing triggers magento2 using Magento/Framework/Mview.
can you anyone explain the flow of this functionality.
I mean what is view, action, processor etc?


texts: Prevent Magento to empty cart after failed payments on magento 2

texts:
Hoping someone can help me.

When a customer cancels their order. The cart empties the basket. I can see solution for code injection for MAGE magento 1 to save the cart but nothing for magento 2.

Can you help or guide me with a magento 2 solution?
Thanks in advance,
Samantha


texts: Magento 2 Adyen issues orders aren't processed

texts:
We are using magento 2.3.5
Our orders are begin processed by Adyen. It was working correctly in the beginning and now suddenly the following error is popping up and the order doesn't get the right status.
Does anyone has experience is this issue?
Below is an old example, but we are having a lot more of these.
Adyen says it's related to Magento. The amount is 14145 and that's also paid in Adyen.
I don't understand where the amount 22240 is coming from.
In the logging I can see:
{"is_exception":false} []
[2020-11-12 17:48:24] AdyenLoggerTest.ADYEN_NOTIFICATION_CRONJOB: The grandtotal amount is 14145 and the total order amount that is authorised is: 22240 {"is_exception":false} []
[2020-11-12 17:48:24] AdyenLoggerTest.ADYEN_NOTIFICATION_CRONJOB: This is a partial AUTHORISATION, the amount is 14145 {"is_exception":false} []
Adyen already looked into this matter, but could find why we are having differences.
Why is authorised: 22240?
Thanks in advance.
Regards,
Pascal


texts: Getting value from product attributes in Magento 2

texts:
I have custom attributes for my products. Some attributes are in text format and some are in select list. I want to print those attributes in my template.
Here is code I am using:
`

$attributes = $_product->getAttributes();
$attrSetID = $_product->getAttributeSetId();
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$resource = $objectManager->get('Magento\Framework\App\ResourceConnection');
$connection = $resource->getConnection();
$sql = "select attribute_group_id from eav_attribute_group where attribute_group_name = 'Additional Attributes'  AND attribute_set_id=$attrSetID";
$data = $connection->fetchAll($sql);
$groupId = array_pop($data);
if ($groupId && $attributes) {
    foreach ($attributes as $attribute) {
        if ($attribute->isInGroup($attrSetID, $groupId['attribute_group_id'])) {
            if ($attribute->getFrontend()->getValue($_product) == 'No') {
                $attrCode = $attribute->getAttributeCode();
//              $atest = $_product->getResource()->getAttribute($attrCode)->getFrontend()->getValue($_product);
//              $options = $attribute->getSource()->getAllOptions();
            } else {
                echo  $attribute->getFrontendLabel() . ' : ' . $attribute->getFrontend()->getValue($_product) . '<br />';
            }
        }
    }
}

And my problem is that Magento print only attributes which are not select type. For attributes that are select type Magento print "No".

I tried to print selected value of attribute like this, but output is still "No".

$_product->getResource()->getAttribute($attrCode)->getFrontend()->getValue($_product);
$_product->getAttributeText('custom_attribute_code')

In google I found only couple solutions for Magento 1x, so if someone can help me, i would appreciate it.
Thank you.


texts: Google reCaptcha disabled but shop still making request to google

texts:
I have disabled Google Recaptcha for Customer and Admin in Magento 2 backend and I also disabled the module with

bin/magento msp:security:recaptcha:disable

but no matter which shop page I load, I always see requests towards

https://www.gstatic.com/recaptcha/api2/v1563777128698/recaptcha__de.js
https://www.google.com/recaptcha/api.js?onload=globalOnRecaptchaOnLoadCallback&render=explicit

I do not want to have these requests due to GDPR and in general, if I disable a service, I expect this to happen and not having any backdoor which still pulls code from somewhere.

Has someone an idea where these requests are coming from and how I can disable them?

Shop Version: Magento 2.3.2 Open Source

Thank you!


texts: Magento 1.9 excl. and incl. product price displaying same at checkout

texts:
Currently I am having an issue for displaying same incl and excl at tax price. previously it was working fine but now it is not. I have not change any settings.

Please can anyone tell in which tables tax incl and excl prices are saved. So I can look into that.

It is working fine at catalog and details page i.e. both pages displaying the correct prices.

Thanks


texts:
We're uploading 3k+ products via Magmi and have run scripts to create rules and exclude certain categories.  We have a separate .csv with MAP pricing for certain SKUs.  Thoughts on how to apply the MAP .csv to those SKUs from the original product run?  And avoid changing to MAP pricing product by product.

*MAP pricing means - Minimum Advertised Price - manufacturer's restrictions on the lowest we can actually advertise the price.

Workaround - MAP pricing feature should hide the price if it falls below the given MAP price til user adds it to cart.


texts: how to select multiple images with magento form field

texts:
I have the question i am posting is sily and asked many times on this forum but no wer the answer posted by others was solved my issue.

my question is i have fieldset of file and need to upload images with multiple so i had used

 $fieldset->addField('optionimage', 'file', array(
        'label'     => $helper->__('Option Image'),
        'required'  => false,
        'name'      => 'optionimage[]',
        'multiple'=>true,
        'multiple'=>'multiple'
  ));

but i am failed to add multiple the above field


texts:
I want to inherit the existing blank or luma theme in magento 2. After installation, I copied the theme from C:\xampp\htdocs\magento2(root_directory)\vendor\magento\theme-frontend-luma and pasted inside app\design\frontend\package_name\theme_name and also modified theme.xml registration.php composer.json according to my theme name. Now when I change the configuration at backend am able to see the theme in the browser. But there is no view(for layout) folder inside any of the module.

Is there any mistake in my method of inheriting the theme? or is there any solution? Help me.


texts: Magento2 around method in plugin to save extra field data in newsletter

texts:
I am new to magento 2 and i would like to add extra field to newsletter so i created a module with plugin to call aroundsubscribe method to save the new field data while subscription but i am unable to do so.

Plugin class is

namespace Microwebby\Micro\Module\Plugin\Newsletter;

use Magento\Framework\App\Request\Http;

class Subscriber {
  protected $request;

  public function __construct(

    Http $request
  ) {

    $this->request = $request;
  }

  public function aroundSubscribe($subject, \Closure $proceed, $email) {
    $result = $proceed($email);
     if ($this->request->isPost()) {
      $subscriber_country = $this->request->getPost('subscriber_country');

      $subject->setCSubscriber_country($subscriber_country);

      try {
        $subject->save();
      }catch (\Exception $e) {
        throw new \Exception($e->getMessage());
      }
    }

    return $result;
  }
}

In system.log i can see the trace

Microwebby\Micro\Module\Plugin\Newsletter\Subscriber->aroundSubscribe(Object(Magento\Newsletter\Model\Subscriber\Interceptor), Object(Closure), 'rashidtahir05@g...')

Anything else needed to help please mention so that i can provide you.

I want to add extra field to newsletter subscription form.

thanks


texts: Add text to Order Totals block in Admin > Sales > Order > Reorder >View Magento 1

texts:
How do i add some text on order totals in this section in picture ?  Magento 1
Add text to Order Totals block in Admin > Sales > Order > Reorder >View


texts: Message in gift options with maximum size allowed

texts:
I need help, I would like to set a maximum size for the message text area in gift options in magento 2.

I'm a beginner in magento development, and any help will be happy.


texts: How to get Admin Label for Attibute Options

texts:
Cause I don't find an answer for my problem (posted HERE) I try to explain it in other way.

How can I get the Admin Label for Specificed Attribute Options?

With the code below I get the Current Store View's Label for Specificed Attribute but I need to change it to get the Admin Label.

I found THIS ARTICLE and THIS QUESTION but I don't understand what I have to do.
How I have to change the code below?

Thanks.

$attrs  = $_product->setStoreFilter(0)->getTypeInstance(true)->getConfigurableAttributesAsArray($_product);
foreach($attrs as $attr) {
    if(
(0 == strcmp("finish", $attr['attribute_code']))||
(0 == strcmp("structure", $attr['attribute_code']))
) {

        $options    = $attr['values'];

        foreach($options as $option) {
            //var_dump($option);

            $__ll = str_replace(array('^', '$'), array('', ''), $option['store_label']);

            //print "{$option['store_label']}
";

            $filter = $option['store_label'];

            $macro = '';

            if ($filter[0] == '^'){

                            $macro = substr($filter, strpos($filter, "^")+1, strpos($filter, "$")-(strpos($filter, "^")+1));

            }

            $url = strtolower(str_replace(array('"', ' '), ' ', $macro).'_'.trim(str_replace('^'.$macro.'$', '', $option['store_label']))).'.jpg';

            $url = str_replace(' ', '', $url);
            $url = str_replace('è', 'e', $url);
            $url = str_replace('é', 'e', $url);
            $url = str_replace('à', 'a', $url);
            $url = str_replace('ì', 'i', $url);
            $url = str_replace('ò', 'o', $url);
            $url = str_replace('ù', 'u', $url);
            $url = str_replace("'", "", $url);

            array_push($newmenu, array("url" => $url, "filter" => ''.trim(strtoupper(str_replace('^'.$macro.'$', '', $option['store_label']))).'
', "macro" => '' . $macro . ''));

            //echo $__ll.'
';

        }

    }

}


texts: Magento 2: Rest API products "custom_attributes" add selected attribute value "label"

texts:
Magento 2 product rest API provided custom_attributes and details provided attribute_code and value in /V1/products/:sku API. But V1/products rest API not included custom_attributes details attributes label in products.

I want to need custom_attributes in to the selected attribute value label

  Method: GET

  URL: http://localhost/magentosample230/rest/V1/products/sku

Actual Response:

    "custom_attributes": [
        {
            "attribute_code": "color",
            "value": "59"
        }
   ]

Expected Response:

"custom_attributes": [
    {
        "attribute_code": "color",
        "value": "59",
        "label": "white"
    }
]

Any have idea how to get in rest API product selected attribute value "label"

Any help would be appropriated. Thanks.


texts: Access page content from cms/page from head.phtml

texts:
I have the following code in template/page/html/head.phtml which tries it best to supply facebook with an apropriate sharing image.(og:image)

Everything works, except for the part that I'm trying to get the content text of a cms/page.
Logic dictates that if I use Mage::getSingleton('cms/page')->getContent() that I should get the HTML content of the cms page being viewed.
However, 0 is returned to my function so I'm stuck with my default images on cms pages.

What am I doing wrong?

<?php
// viewing a product, get the image of the product for social sharing
if (Mage::registry('current_product'))
    {
    echo Mage::helper('catalog/image')->init(Mage::registry('current_product'), 'small_image')->resize(213);
    }
// this is where I get nothing returned from the content of the current page being viewed.
elseif($cms_content = Mage::getSingleton('cms/page')->getContent())
    {
    $src = array();
    $pos = 0;
    while(strpos($cms_content,'<img ',$pos)!== false)
        {
        // do a lot of complicated stuff here, not relevant for question
        }
    $theone = isset($src[0]) ? $src[0] : false;
    echo $theone;
    }
// show default image
else
    {
    echo 'default image url';
    }


texts: M1 - find orphaned simple non visible products

texts:
I need to find/identify non-visible simple products that are missing the link to their configurable parent

query logic is supposed to be

products in catalog_product_entity & catalog_product_entity_int (not visible & enabled) but not in catalog_product_super_link

The following gives me no results which isnt right (an attempt at editing an existing query)

select
A.sku
FROM
catalog_product_entity A
INNER JOIN
catalog_product_entity_int B
ON A.`entity_id` = B.`entity_id`
WHERE
A.type_id = 'simple' AND
(( B.`attribute_id`='102' AND B.`value`='1') ## product is not visible
AND
(B.`attribute_id`='96' AND B.`value`='1')) ## product is enabled
AND(
B.`entity_id` NOT IN(
SELECT DISTINCT
(`product_id`)
FROM
`catalog_product_super_link`
)    )


texts:
Is there a simple standalone PHP script that I can just put on a server and see if it meets the system requirements for Magento 2 to run?
For Magento 1 there is one going around by the name of magento-check.php and it was pretty useful.
Is there something similar for Magento 2?


texts:
Hi i am tring to set up cron in magento using config.xml. but anyreason its not working,
Here is the code which i am using.

config.xml

<?xml version="1.0"?>
<config>
    <global>
        <models>
            <mycompany_mymodule>
                <class>Mycompany_Mymodule_Model</class>
            </mycompany_mymodule>
        </models>
    </global>
    <crontab>
        <jobs>
            <mycompany_mymodule>
                <schedule><cron_expr>*/10 * * * *</cron_expr></schedule>
                <run><model>mycompany_mymodule/observer::importproduct</model></run>
            </mycompany_mymodule>
        </jobs>
    </crontab>
</config>

Observer.php

<?php
class Mycompany_Mymodule_Model_Observer {
    public function Importproduct() {
        Mage::log('cron works!!',null,'cron.log');
    }
}  ?>

but its not working, can anybody help me.
Thank you in advance..


texts:
This is my translation file in a custom extension:

/html/xyz/app/code/FireGento/MageSetup/i18n/de_DE.csv

I changed one translation in that file and afterwards I executed this to gather the translations:

php bin/magento i18n:collect-phrases -o app/code/FireGento/MageSetup/i18n/de_DE.csv app/code/FireGento/MageSetup/

I also cleared the cache, but the translation is still the old term. Is that the wrong approach?

Magento 2.2.5


texts:
How can I remove default fonts ('Open Sans', 'Helvetica Neue' and Helvetica)? I just use Arial and sans-serif only..

Thanks


texts: Migrate customer and order data from M2 to M1

texts:
We are migrating a Magento2 site to Magento1
What would be the best way to get customer and order data over from Magento2 to Magento1?
Should we build an API bridge or are the database tables similar enough that we can just do a dump and import?


texts: Get a list of media gallery image URL's from getMediaGalleryImages

texts:
I need to get a comma separated list of image URL's from a product's media gallery.

I have successfully managed to load getMediaGalleryImages so that if I...

var_dump ($product->getMediaGalleryImages());

... I can see each image being loaded with it's attributes, i.e:-

["url"]=> string(89) "https://www.example.com/media/catalog/product/x/x/x-image.jpg"

I just haven't managed to figure out how to list them in an array like:-

https://www.example.com/media/catalog/product/x/x/x-image.jpg, https://www.example.com/media/catalog/product/x/x/x-image_1.jpg, https://www.example.com/media/catalog/product/x/x/x-image_2.jpg

Struggling to get the syntax right I think...


texts: Difference in output between Model method and Test/Unit method for Model?

texts:
I have created one more custom attribute (custom_image_type) based on frontend_input = media_image.

I just ran the following File level unit test on below file.
\Magento\CatalogImportExport\Test\Unit\Model\Import\Product\ImageTypeProcessorTest::testGetImageTypes

File level executing command on Magento 2.4 instance.
/usr/bin/php7.4 /var/www/html/magento2/vendor/phpunit/phpunit/phpunit --configuration /var/www/html/magento2/dev/tests/unit/phpunit.xml.dist --filter Magento\\CatalogImportExport\\Test\\Unit\\Model\\Import\\Product\\ImageTypeProcessorTest --test-suffix ImageTypeProcessorTest.php /var/www/html/magento2/vendor/magento/module-catalog-import-export/Test/Unit/Model/Import/Product --teamcity

and respective model file is as follows:
\Magento\CatalogImportExport\Model\Import\Product\ImageTypeProcessor::getImageTypes

I get the passed result instead of failure.
Further I looked at the assertEquals condition and i can see below:
$this->assertEquals(
        ['image', 'small_image', 'thumbnail', 'swatch_image', '_media_image'],
        $typeProcessor->getImageTypes()
);

$typeProcessor->getImageTypes()  - I tried to execute this method via script and I get the latest result with custom_image_type as well.
But when i tried to see the array difference(by removing any of the default media_type) I do not get the custom_image_type while executing Unit Test and getting failures (as expected).
Does any one know ? I suspect the resource that is passing on $typeProcessor would be the reason.


texts:
For example, there is project at www.example.com

How can I download this project and edit it on localhost.
I am using nginx.

Can someone explain to me what I have to do step by step!?


texts: Where does Magento 2 Generate Image URLs

texts:
I recently switched a Magento 2 system from serving public files out of

/path/to/magento

to serving files out of

/path/to/magento/pub

i.e. I wanted Apache to use the index.php file in the pub folder.  However, Magento is still generating image and asset URLs with pub in the URL

http://magento.example.com/pub/static/frontend/Magento/luma/en_US/mage/calendar.css

instead of

http://magento.example.com/static/frontend/Magento/luma/en_US/mage/calendar.css

This is happening for images, javascript, and css file.

The obvious question: Why is this happening, how can I fix it.

The less obvious question: Where does the PHP logic reside for adding pub to asset URL so I can debug this myself.

Cache had been cleared with a

rm -rf var/generation/*
rm -rf var/cache/*


texts: magento : different shipping cost for some products

texts:
We have a default shipping cost of 1,95 euro flat rate.

We'd like to have a 4,95 shipping cost for bulkier / heavier products.

We tried using a plugin for shipping cost per product.

This results on : if you have 2 products in the cart it calculates not 4,95 but 2x4,95=9,90

Is there a way to get (SOME) products to have 4,95 shipping default and the rest should keep the 1,95 shipping cost?


texts: Cart coupon code form isn't working after AJAX refresh

texts:
I am working to make the cart to work with AJAX, for update or remove products from the cart, the problem I am facing is that for some strange reason the onclick HTML attribute isn't working after the complete AJAX "reload" of the cart and well I could not find the problem for this, I tried to restore the onclick function and it didn't work.

Here is the HTML code for the form:

<form id="discount-coupon-form" action="http://proyecto-c.pengostores.mx/checkout/cart/couponPost/" method="post">

Código de cupón

        Código de cupón
        <input type="hidden" name="remove" id="remove-coupone" value="0">

            <input class="input-text" type="text" id="coupon_code" name="coupon_code" value="">

                <button type="button" title="Canjear" class="button2" onclick="discountForm.submit(false)" value="Canjear">Canjear</button>

</form>

And the script that instanciate the funciton on the onclick attribute:

And it looks like the form isn't getting validated or something.
Any help is appreciated, thanks


texts:
I am having difficulty setting magento price filter.

It seem to be showing the wrong url when selecting any price range

Wrong url: https://www.mysite.co.uk/pc-components/components?price%5B0%5D=0&price%5B1%5D=25

But when I change the url to https://www.mysite.co.uk/pc-components/components?price=0-25

It works fine

I have gone through all the settings and nothing seem to be wrong with it.

Can some one tell me how to fix this issue


texts: magento2 checkout page on PayPal button click open window and loading only & strip give following error

texts:
when checkout page on paypal method choose then click then new window open and loading only after few sec it's close nothing happening and strip select option then only error give following image in showing . please help me as i know you kind of heart im beginner in this field please help me.
Thanks in Advance and stay home and be safe.


texts: modman overwriting our whole directory, how does it merge with existing contents?

texts:
we have the following modman file set-up

app/code/local/XXX/*                        app/code/local/XXX/
app/design/frontend/base/default/layout/*   app/design/frontend/base/default/layout/
app/etc/modules/*                           app/etc/modules/
app/locale/*                                app/locale/

The problem is that for example

app/locale/*                                app/locale/

overwrites all directories. app/locale/* on github contains De_de and en_us directories. These directories already contain files on the Magento server.

Now how can I make modman, clone all files from github in match app/locale/* --- but then merge with already existing files, instead of overwriting the whole directory

Solution now seems to be

app/locale/da_DK/*                                        app/locale/da_DK/
app/locale/de_DE/*                                        app/locale/de_DE/
app/locale/en_US/*                                        app/locale/en_US/

So to date I understand that if, one uses /* in modman

independent files are copied 1 by 1 and overwritten if they exist (expected)
folders are copied 1 by 1 and overwrite everything in the already existing folder (not expected; we would expect to loop through directory a level lower and then link file per file)


texts:
In our current configuration Magento generates labels to be printed on a laser printer. I am trying to find out how to configure it to generate labels to be printed on the thermal printer provided by fedex.

We are using Magento CE 1.9.1.1


texts: Show price of configurable products in magento 2

texts:
As we all know, for configurable products, magento2 takes the lowest price of the simple product to display on product listing page. We cannot assign price for the configurable product.
My issue is i dont want to show the lowest price instead i want to do customisation for either of the 2 options.
1. Want to enable price for configurable product and display that.  https://prnt.sc/svpayy
2. I want to filter simple product from configurable product based on attribute value and show price of that product on listing page. https://prnt.sc/svpckt

Which of the above option is possible..
Please help me.


texts:
I know how to setup a Magento ecommerce store but I ran into this small issue where the quantity of products I can put in my cart exceeds the number of available stock in the database.

Example scenario; I have Product-X with a qty of 23 in my inventory. When a user views product-X, user has the option to choose buy qty by clicking on an increment(simple 'plus' sign) button. I would like this button to be disable when the qty counter shows 23(stock available in inventory). I can do this in basic PHP by matching with the database, how would you do this in Magento though?

Any help would be much appreciated.


texts: Shipping is not shows at checkout in magento 1.9

texts:
When I add a product in the cart it shows grand total with shipping charges included as you can see in the first image.

But when I go for checkout at shipping method options then it shows "Sorry, no quotes are available for this order at this time." as you can see in the second image
and I can't proceed forward from here....
Please solve this problem
Thank you


texts:
I am having the following issues with using rapidflow for importing products into Magento and I was hoping someone could advise.

After uploading configurable products, the inputs in the configurable options container within the product view on the frontend are inactive (you can't select any options).

Several products have the same main image and a small image. It is uploading the main image, but not declaring it as the small image as well (same values in both fields).

Help would be appreciated! Thank you!
The following files in the zip file below contain an example of the product import where I am having trouble with the small_image and the CPSA that is not yielding inactive inputs on the front end.
http://alluringassets.com/caitlin/rapidflowhelp.zip


texts: Magento 2: Automatically maintenance mode

texts:
We have several stores running on EKS (Kubernetes) and for some reason one of the stores enter on maintenance mode for no reason:
Unable to proceed: the maintenance mode is enabled.

We are using Magento Enterprise 2.3.1.
There is no one going into the containers to enable maintenance mode, even when there is no code deploy or users using the stores (this is a stage environment) the maintenance mode appears.
When we have the OPs team take a look at the var/.maintenance.flag, the file was created by root and sometimes it takes time to be deleted.
Looking at the logs I can see that sometimes the store will throw errors for an hour or just a few minutes.

Has anyone been affected by this? It looks like schedule backups and setup:upgrade commands can create the flag, but these are not running when the flag is created.

Thanks.


texts: Have Heat Maps and/or Mouse Tracking led to improved conversion rates in Magento?

texts:
I need to confirm or disprove some assumptions on navigation and layout for new RWD design. Looking at new tools to provide some useful data. Have enough traffic to run 5000+ tests per page.

Question is, from experience, is there a preferred collection method (heat maps or mouse tracking) for Magento that delivers actionable results without causing issues w/design, js, performance, etc.

Thanks!


texts: Adding a button to Sales Order View using observer not working

texts:
I am trying to add a simple generic button to the Sales Order View page using the adminhtml_widget_container_html_before event but no matter what I try the button will not appear.

Here is my code:

/app/etc/modules/ZeroBars_Approvebutton.xml

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

/app/code/local/ZeroBars/Approvebutton/etc/config.xml

<config>
    <modules>
        <ZeroBars_Approvebutton>
            <version>0.0.1</version>
        </ZeroBars_Approvebutton>
    </modules>
    <global>
    <models>
        <zerobars_approvebutton>
            <class>ZeroBars_Approvebutton_Model</class>
        </zerobars_approvebutton>
    </models>
    <helpers>
        <zerobars_approvebutton>
            <class>ZeroBars_Approvebutton_Helper</class>
        </zerobars_approvebutton>
    </helpers>
    <adminhtml>
    <events>
        <adminhtml_widget_container_html_before>
            <observers>
                <zerobars_approvebutton>
                    <class>zerobars_approvebutton/observer</class>
                    <method>adminhtmlWidgetContainerHtmlBefore</method>
                </zeroBars_approvebutton>
            </observers>
        </adminhtml_widget_container_html_before>
    </events>
</adminhtml>
</config>

/app/code/local/ZeroBars/Approvebutton/Model/Observer.php

<?php

Class ZeroBars_Approvebutton_Model_Observer
{
    public function adminhtmlWidgetContainerHtmlBefore($event) {

        $block = $event->getBlock();
        if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
            $block->addButton('do_something_crazy', array(
                'label'     => Mage::helper('module')->__('Button'),
                'onclick'   => "setLocation('{some location}')",
                'class'     => 'go'
            ));
        }
    }
}

The method for adding a button on the page seems pretty straightforward so I am not sure why it is not working. Is there a possibility that another extension is overriding it?


texts: How to override core model in custom module for SOAP & REST API?

texts:
I want override Magento\Sales\Model\Order\ShippingAssignmentBuildermodel only for Soap & REST API.

I have tried following:

SOAP API:

  app\code\AR\Sales\etc\webapi_soap\di.xml

<preference for="Magento\Sales\Model\Order\ShippingAssignmentBuilder" type="AR\Sales\Model\Order\ShippingAssignmentBuilder"/>

REST API:

  app\code\AR\Sales\etc\webapi_rest\di.xml

<preference for="Magento\Sales\Model\Order\ShippingAssignmentBuilder" type="AR\Sales\Model\Order\ShippingAssignmentBuilder"/>

Model File:

  app\code\AR\Sales\Model\Order\ShippingAssignmentBuilder.php

<?php
/**
 * Copyright Â© 2013-2017 Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace AR\Sales\Model\Order;

use Magento\Sales\Api\Data\ShippingAssignmentInterface;
use Magento\Sales\Api\Data\ShippingAssignmentInterfaceFactory;
use Magento\Sales\Model\OrderFactory;

/**
 * Class ShippingAssignmentBuilder
 * @package Magento\Sales\Model\Order
 */
class ShippingAssignmentBuilder extends \Magento\Sales\Model\Order\ShippingAssignmentBuilder
{

    /**
     * @return ShippingAssignmentInterface[]|null
     */
    public function create()
    {
        $shippingAssignments = null;
        ...
        ...
        ...

        return $shippingAssignments;
    }
}

Model is successfully override in my custom module but below data is not getting


texts: How to get product by id and products filtered by attribute in magento 2

texts:
I have the following code in my Block/Main.php:

<?php
namespace Foo\TireSearch\Block;
class Main extends \Magento\Framework\View\Element\Template
{
    protected $productCollectionFactory;

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory
    )
    {
        $this->productCollectionFactory = $productCollectionFactory;
        parent::__construct($context);
    }

    function _prepareLayout(){

        $collection = $this->productCollectionFactory->create();
        $product = $collection->load(21704);
        var_dump($product->getData());

        exit;
}

By my understanding, this should show the data for the product with id 21704, but I seem to be seeing all the products, along with the query at the beginning:

SELECT `e`.* FROM `catalog_product_entity` AS `e`array(11821) { [0]=> array(15) { ["entity_id"]=> string(5) "18710" ["attribute_set_id"]=> string(1) "4" ["type_id"]=> string(12) "configurable" ["sku"]=> string(9) "CONTI_DWS" ["has_options"]=> string(1) "0" ["required_options"]=> string(1) "0" ["created_at"]=> string(19) "2016-05-18 20:42:55" ["updated_at"]=> string(19) "2016-05-18 20:42:55" ["price"]=> string(8) "150.2900" ["tax_class_id"]=> string(1) "2" ["final_price"]=> string(8) "150.2900" ["minimal_price"]=> string(8) "150.2900" ["min_price"]=> string(8) "150.2900" ["max_price"]=> string(8) "150.2900" ["tier_price"]=> NULL }
[1]=> array(15) { ["entity_id"]=> string(5) "18711" ["attribute_set_id"]=> string(1) "4" ["type_id"]=> string(12) "configurable" ["sku"]=> string(8) "DURATRAC" ["has_options"]=> string(1) "0" ["required_options"]=> string(1) "0" ["created_at"]=> string(19) "2016-05-18 20:42:55" ["updated_at"]=> string(19) "2016-05-18 20:42:55" ["price"]=> string(8) "185.9800" ["tax_class_id"]=> string(1) "2" ["final_price"]=> string(8) "185.9800" ["minimal_price"]=> string(8) "185.9800" ["min_price"]=> string(8) "185.9800" ["max_price"]=> string(8) "185.9800" ["tier_price"]=> NULL } ...

What am I doing wrong? And If I wanted filter the products by some attribute stored in the database, how would I do that? For example, say there is information about the size (cm) of each of my products in the database, How can I filter the products by this attribute? Thanks


texts:
What the best way of checking if an order has been fully paid?
I typically would do
$order = $this->orderRepository->get($orderId);
if ($order->getBaseTotalDue() > 0) {
   //not fully paid
}

However as per https://github.com/magento/magento2/issues/28853 I have been burnt by Magento as it told me the order was fully paid however we hadn't received the payment
Therefore I want to see if there is a better way of checking if the order has been fully paid
As a note, I was using Paypal Express as the payment method and I am using Magento 2.3.5-p1
Cheers


texts: How to add url variable setup for html page in magento 2?

texts:
I have onepage.html file and How to setup a url variable in data-bind. is there any js file to add this. Billing address html file and related billingadres.js is there. but there is no js file for onepage.html. how to add data-bind for this file.

Back to Shopping Cart


texts:
I cleared my test orders from Magento 2 with these steps:
https://stackoverflow.com/questions/37861046/how-to-remove-test-orders-from-magento2

However when I go to Sales->Orders at first it works. But after I create my second order the page gives an error msg:

Item (Magento\Framework\View\Element\UiComponent\DataProvider\Document) with the same ID "2" already exists.

How to solve this error?


texts: Magento 2: How to get address from customer's object?

texts: I want to get country, state and city of a customer. Any idea?


texts: custom transactional email special characters issue

texts:
I have an issue with transactional emails with special characters (é, è, à, etc.)

For the "Official Emails" such as "order_new.html" which are sent by magento core, everything works fine and all the special characters are well displayed in the mailbox.

But for custom transactional emails I define in Backend and send using custom modules special characters are not displayed correctly

ex : Ã©tÃ© vÃ©rifiÃ©s avec succÃ¨s

I tried defining utf-8 encoding both in email template and in the module code with setHeader(), but I have the same result.

Here is my code :

$mail = Mage::getModel('core/email')
        ->setToName($ToName)
        ->setToEmail($ToEmail)
        ->setHeader('Content-type', 'text/xml; charset=UTF-8')
        ->setBody($processedTemplate)
        ->setSubject('tototototo')
        ->setFromEmail($senderEmail)
        ->setFromName($senderName)
        ->setType('html');


texts: Magento2. Customer repository change attribute does not work

texts:
Everything is simple as an egg, but it does not work. Please help to figure out why. If you need more details - please let me know.

/**
 * @param int $customerId
 * @param int $addressId
 *
 * @return int
 */
public function setDefaultBillingAddress($customerId, $addressId)
{
    $customer = $this->customerRepository->getById($customerId);
    $customer->setDefaultBilling($addressId);
    $this->customerRepository->save($customer);
}

Customer is loading well, address with such ID exists. When I dived into customerRepository->save($customer) from the beginning everything is also well, but at some moment (probably when it saves customer to registry and tries to load it again - my new value is lost)

Upd.1 Is it core issue?

  Magento\Customer\Model\ResourceModel\CustomerRepository (row. 236)

Magento removes customer from registry for some reason, then tries to load it from registry. It doesn't exist there and load from DB. Is it ok? Customer wasn't saved because it happen between beginTransaction() and commit()

Upd.2

It refers only to this particular attribute default_billing, saving customer firstname work well

Upd.3

The issue is near backend model of default_billing attribute. It has following code:

/**
 * @param \Magento\Framework\DataObject $object
 * @return void
 */
public function afterSave($object)
{
    if ($defaultBilling = $object->getDefaultBilling()) {
        $addressId = false;
        /**
         * post_index set in customer save action for address
         * this is $_POST array index for address
         */
        foreach ($object->getAddresses() as $address) {
            if ($address->getPostIndex() == $defaultBilling) {
                $addressId = $address->getId();
            }
        }
        if ($addressId) {
            $object->setDefaultBilling($addressId);
            $this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode());
        }
    }
}

It looks for some post_index flag, which doesn't exist anywhere. Searching for post_index or postIndex don't give more results, than those from backend models (billing, shipping)


texts: Address in registration form Magento 1.8.1

texts:
I install 2 different extensions to add address in registration form.

The issue that appears in both is that when I change country, The states do not refresh and continue showing us states.

I think is a theme problem.

Here is the register.phtml code:

 public function getRegion()
    {
        if (false !== ($region = $this->getFormData()->getRegion())) {
            return $region;
        } else if (false !== ($region = $this->getFormData()->getRegionId())) {
            return $region;
        }
        return null;
    }


texts: Magento 2 bar disappeared in Sales Order Grid after adding column

texts:
My custom module adds a column to the Sales Order grid. The problem is that the bar above the Grid disappeared. This is shown in the screenshots.
With my module:

Without my module:

In order to add the columns I use:

In view/adminhtml/ui_component/sales_order_grid.xml :

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="sales_order_columns">

        <column name="create_invoice" class="Vendor\Module\Ui\Component\Listing\Column\ColumnCreateInvoice">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="label" xsi:type="string" translate="true">Create invoice</item>
                    <item name="component" xsi:type="string">Vendor_module/js/grid/columns/create_invoice</item>
                    <item name="sortable" xsi:type="boolean">false</item>
                    <item name="visible" xsi:type="boolean">true</item>
                </item>
            </argument>
        </column>

    </columns>
</listing>

In Ui/Component/Listing/Column/ColumnCreateInvoice.php :

define([
    'Magento_Ui/js/grid/columns/column',
    'jquery',
    'mage/template',
    'Magento_Ui/js/modal/modal',
    'ko',
], function (Column, $, ko) {
    'use strict';

    return Column.extend({
        defaults: {
            bodyTmpl: 'ui/grid/cells/html',
            fieldClass: {
                'data-grid-html-cell': true
            }
        },

        getUrl: function (row) {
            return row[this.index+'_Url'];
        },
        getOrderId: function (row) {
            return row[this.index + '_orderId'];
        },
        getLabel: function (row) {
            return row[this.index + '_html']
        },

        preview: function (row)
        {
            $.post(this.getUrl(row)).then(function(response)
            {
                if(response.descriptionResponse != '')
                    alert(response.descriptionResponse);
            })
        },

        getFieldHandler: function (row)
        {
            return this.preview.bind(this, row);
        }
    });
});


texts: Magento : How to set product type as 'Simple product' when adding new product? OR how to change the product type from virtual to simple?

texts:
Currently, when I am adding new product its product_type is set to 'Virtual'.

I am adding simple product as shown in below image.

Why this is happening while adding the product of type simple.


texts: Magento 2: How to load my custom js file after footer?

texts:
JS File Path: web->js->swap.js

default_head_block.xml

    <referenceContainer name="before.body.end">
        <block class="Magento\Framework\View\Element\Text" name="swapjs">
            <arguments>
                <argument name="text" xsi:type="string"><![CDATA[<script type="text/javascript" src="js/swap.js"></script>]]></argument>
            </arguments>
        </block>
    </referenceContainer>

File path not found 404 Error. Please help me to solve this issue.


texts:
I have installed magento 1.9.2.3 version.

My client requirements is to take the Order Amount total in a Day.

Let say he want to know how many order comes in a day and what is the Order Amount.

Can anybody let me know how can we do this because i am new in magento?

thanks


texts:
I have the situation that I want to migrate a Magento 1.6.2.0 database to Magento 2.1 using the data-migration-tool. The tool is mapping some fields by the entity_type_id. My problem is that the entity_type_ids in Magento 1 are customized. My solution would be to change them to their original values, so the migration tool will work. Sometimes there are foreign key contraints in tables, sometimes not, so it's not just updating the id's in the eav_entity_type table.

Can anyone provide one or multiple SQL Queries that change the entity_type_ids (consistently) in all tables? I don't care about custom tables from extensions.


texts: Magento 2 data migration fail (Notice: Undefined offset 1 Eav/Data.php on line 209)

texts:
we're migrating 1.8.1.0 to Magento 2.1. When we go to migrate data, I hit this error:

[2016-07-18 18:40:19][INFO][mode: settings][stage: integrity check][step: Settings Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:19][INFO][mode: settings][stage: integrity check][step: Stores Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:19][INFO][mode: settings][stage: data migration][step: Settings Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:22][INFO][mode: settings][stage: data migration][step: Stores Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:22][INFO][mode: settings][stage: volume check][step: Stores Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:22][bin/magento migrate:data -r vendor/magento/data-migration-tool/etc/ce-to-ce/1.8.1.0/config.xml
Reset the current position of migration to start from the beginning

[2016-07-18 18:40:29][INFO][mode: data][stage: integrity check][step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:29][INFO][mode: data][stage: integrity check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:30][INFO][mode: data][stage: integrity check][step: Map Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: Url Rewrite Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: Log Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: Ratings Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: OrderGrids Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: Tier Price Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: SalesIncrement Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: integrity check][step: PostProcessing Step]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:36][INFO][mode: data][stage: setup triggers][step: Stage]: started
100% [============================] Remaining Time: 1 sec
[2016-07-18 18:40:38][INFO][mode: data][stage: data migration][step: EAV Step]: started
28% [========>-------------------] Remaining Time: 1 sec

  [Exception]
  Notice: Undefined offset: 1 in /var/www/vhosts/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 209

Has anyone come across this and any solutions?


texts:
I want to install Redis cache in my magento website so first I need to install Redis cache in my server and after that need to add some code in my Magento app/etc/local.xml file that I know but I am getting error that Connection to Redis failed after 2 failures.

Below is my process to install redis cache in server and website so if there is any mistake help me to solve this.

May I need to install PhpRedis extension ? and how and where to install it?in server or website? Also I thing I need to add cronjob so where can I add cronjob? in magento root directory's cron.php file?

first of all I connect my server using putty and go to root directory of website and after that I run below command that I find from http://redis.io/download

$ wget http://download.redis.io/releases/redis-3.2.0.tar.gz

$ tar xzf redis-3.2.0.tar.gz

$ cd redis-3.2.0

$ make

$ src/redis-server

after doing this I go to magento_root/app/etc/local.xml and place below code in <globle> tag.

<cache>
      <backend>Cm_Cache_Backend_Redis</backend>
      <backend_options>
        <server>redis11.i</server>
        <port>6379</port>
        <persistent></persistent>
        <database>0</database>
        <password></password>
        <force_standalone>0</force_standalone>
        <connect_retries>3</connect_retries>
        <read_timeout>10</read_timeout>
        <automatic_cleaning_factor>0</automatic_cleaning_factor>
        <compress_data>1</compress_data>
        <compress_tags>1</compress_tags>
        <compress_threshold>20480</compress_threshold>
        <compression_lib>lzf</compression_lib>
      </backend_options>
    </cache>

    <session_save>db</session_save>
    <redis_session>
        <host>redis1.i</host>
        <port>6379</port>
        <timeout>2.5</timeout>
        <persistent></persistent>
        <db>0</db>
        <compression_threshold>2048</compression_threshold>
        <compression_lib>lzf</compression_lib>
        <log_level>4</log_level>
        <log_broken_locks>0</log_broken_locks>
        <max_concurrency>10</max_concurrency>
        <break_after_frontend>5</break_after_frontend>
        <break_after_adminhtml>30</break_after_adminhtml>
        <first_lifetime>600</first_lifetime>
        <bot_first_lifetime>60</bot_first_lifetime>
        <bot_lifetime>3600</bot_lifetime>
        <disable_locking>0</disable_locking>
        <min_lifetime>60</min_lifetime>
        <max_lifetime>86400</max_lifetime>
    </redis_session>

I think I have mistaken somewhere in local.xml file to put correct value for all tags so please look at all tags and if anyone knows please help.

UPDATE

Most of the thing in local.xml file I copy from internet and past to my file so I don't know some of the tags for what? so subsequently don't know that what is the correct value for these tags?


texts: Description text moves to the top of the product page

texts:
Description text which contains a span tag, moves to the top of the page.

Example:
Description text in back end - "Buy this beautiful (span class="blue">)blue(/span) dress today. Free shipping."

In front end the description text displays correctly. However, at the very top of the product page, the text following the span tag is also displayed:

"blue dress today. Free shipping."


texts: Register password strength meter not working in Magento 2.2.5 CE

texts:
I have a fresh installation of Magento 2.2.5 CE & tried to create new user on frontend when we type password like Password1

strangely strength meter not showing like weak, strong, very strong its simply say no password but passed the password validation.

Validation Rule:

    Password

        <input type="password" name="password" id="password" title="Password" class="input-text valid" data-password-min-length="8" data-password-min-character-sets="3" data-validate="{required:true, 'validate-customer-password':true}" autocomplete="off" aria-required="true">
Minimum of different classes of characters in password is 3. Classes of characters: Lower Case, Upper Case, Digits, Special Characters.

                Password Strength:
                No Password

Image:

Looking forward to:

1) is this Magento bug? if yes share the bug link.

2) need workaround for this? or point out to fix this.

Thanks


texts: Magento query to sort products alphabetically

texts:
Does anyone know if there is a query string to sort products alphabetically within the product list

?product_list_order=position
?product_list_order=price

The above works but the below doesn't?

?product_list_order=desc
?product_list_order=asc


texts: Magento 2.2.4 - incredibly slow only on remote machine. Problem already starts with php bin/magento

texts:
So lately after some updates on my life site I found out it got extremely slow. From < 1 sec response to more than 4 secons TTFB with varnish and over 30 seconds without. (Production mode)

I found out the problem starts already when using php bin/magento
Here is a comparison of a classic cli php -v call and php bin/magento

time php -v:
real    0m0.170s
user    0m0.056s
sys     0m0.068d

time php bin/magento:
real    0m27.561s
user    0m26.364s
sys     0m1.000s

Can anyone help trace the root of this issue. I tried everything. Super frustrating.


texts: How to maintain the customer's active quote after Magento 2 database migration?

texts:
As per our client requirement, after our Magento1 to Magento2 data migration they expecting that all the active quote customers should not loose their cart items when they back.

To be more clear, A user added a product few weeks ago in Magento1 cart. Now we have migrated to Magento2 with all the Magento1 quote and order data.
Now the user trying to see his cart again, he should see his cart with all the items he added, with Magento2.

We are using Redis cache and sessions.

We have tried to use the same sid session values.

My question here is, Whether we have a possibility to maintain the same Magento1 sessions in Magento2 as well? and how to persist the cart between magento1 and magento2?


texts: Breaking bundles into individual line items without custom code

texts:
We have a few bundled items as a part of a "mix and match" promo. They work great in that the customer can pick two different items and they are sold as a pair. There is just one problem - and that is working with our third party logistics partner for fulfillment. Looking at an invoice for a particular order with a bundle, it lists only the parent "bundle" sku. This is problematic when we send the invoice to the warehouse as that parent sku doesn't actually exist, and they have no information as to what individual child skus to fulfill. How can we make the invoices list the child skus instead of just the parent sku?

In the bundle edit page, I found this dropdown, but I can't find any documentation as to what exactly it does. Will toggling this accomplish my goal?

I've found a few other stackexchange posts here and here that deal with the same issue but they are pretty old and either don't exactly solve my problem or deal with the source code.

I should also add I do not have access to the source code so manually extending the functionality is out of the question. I may have access to install some plugins but I will have to go through our host.

Thanks


texts: after payment fail the order cancel automatically magento2

texts: when I canceled the order or payment fail the order has been canceled automatically, but actually when the payment fails the order status has not changed to canceled in magento2.


texts: Add tag "noscript" in HEAD for CSS files ( Magento 2)

texts:
I want to add tag "noscript" in head.

 <head><noscript id="deferred-styles">
    <link  rel="stylesheet" type="text/css"  media="all" href="http://dev.magento2.com/magento2/pub/static/frontend/Magento/xtheme/en_US/mage/css1.css" />
    <link  rel="stylesheet" type="text/css"  media="all" href="http://dev.magento2.com/magento2/pub/static/frontend/Magento/xtheme/en_US/mage/css2.css" />
</noscript></head>

I have tried with below xml(default_head_blocks.xml) code but not working.

<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configura`enter code here`tion.xsd">
<head>
<noscript id="deferred-styles">
    <css src="css/css1.css" order="1" />
    <css src="font-awesome/css/css2.css" order="2" />
</noscript>
</head>


texts: is it correct to change all magento folders permission to 755 and all files to 644 using chmod?

texts:
is it correct if i change all files permisson to 644 and all folders to 755 using following commands?

find . -type f -print0 | xargs -0 chmod 0644
find . -type d -print0 | xargs -0 chmod 0755


texts: Magento2 - Is it safe to delete entries for deleted order from inventory_reservation table?

texts:
I have delete test order data using Mageplaza Delete Order plugin.
All of the test orders state was processing. So now I am facing issue with salabale qty because of order deletion.
To fix this issue I searched on the google then I found when order get placed magento will reserve qty in "inventory_reservation" table against the order placed SKU.
When I delete the order the from Mageplaza Delete Order plugin "order_cancelled" event is not getting added into the reservation table.
Because of this salable qty showing wrong and  I am not able to add that item into the cart from store front.
So I want delete such entries from the inventory reservation. So Is it safe to delete the records from inventory_reservation table?
Kindly advise Thanks in advance.


texts: Translation not working for "please specify shipping method"

texts:
We've opened our Magento store a few weeks ago. We are located in the Netherlands and only sell items on the Dutch market, so the entire site is in Dutch. Thanks to some excellent translation packs, that was simple.

But:
I've been unable to translate the error customers get when they forget to specify the shipping method when using OneStepCheckout. The error logically shows: "Please specify shipping method." But this line isn't translated in Dutch. Inline translation doesn't work because it's apparently somewhere in Javascript. When searching Google, I only found one relevant article from 2008 which links to a bug in Magento which was solved long ago, unfortunately the link it refers to is dead.

Because there isn't a lot to find about this specific issue, it may be something specific in my setup or extensions.

I use:

The latest version Magento Community Edition (1.7.2.)
Extension: IWD OneStepCheckout
Template: Ultimo theme from Themeforest
Nothing else that might cause the problem I think

Thanks for the help,


texts: Configure path mapping for Magento 2 xdebug in phpstorm

texts:
I have xdebug set up in phpstorm. However every time I load my Magento 2 app the script get.php opens 3 times in the debugger and breaks. I also get the error
"The script '/pub/get.php' is outside the project.
Click to set up path mappings."
My files are on the localhost, using MAMP.
I'm just starting with xdebug, and can't get this configured.


texts: You always get people saying never to modify the core magento files (/app/code/core/), but what about the /js/mage/ files?  Will this get overwritten when you upgrade magento?  Is there an alternative place to create them (e.g. with core in /app/code/local/mage/)?


texts: custom place order redirect with ORDERID

texts:
I'm implementing a new payment method for magento2

here is my js code :

define(
[
    'jquery',
    'Magento_Checkout/js/view/payment/default',
    'Magento_Checkout/js/action/place-order',
    'Magento_Checkout/js/action/select-payment-method',
    'Magento_Customer/js/model/customer',
    'Magento_Checkout/js/checkout-data',
    'Magento_Checkout/js/model/payment/additional-validators',
    'mage/url',
],
function (
    $,
    Component,
    placeOrderAction,
    selectPaymentMethodAction,
    customer,
    checkoutData,
    additionalValidators,
    url) {
        'use strict';

        return Component.extend({
            defaults: {
                // template: 'YOUR_NAME_SPACE_Testpayment/payment/testpayment'
                template: 'Magento_SamplePaymentGateway/payment/form'

            },
            placeOrder: function (data, event) {
                if (event) {
                    event.preventDefault();
                }

                placeOrder = placeOrderAction(this.getData(), false, this.messageContainer);

                    $.when(placeOrder).fail(function () {
                        self.isPlaceOrderActionAllowed(true);
                    }).done(this.afterPlaceOrder.bind(this));
                    return true;
                }
                return false;
            },

            afterPlaceOrder: function () {
                window.location.replace(url.build('mymodule/startpayment/ORDER_ID/'));
            },

        });
    }
);

First question ... how can I fill that ORDER_ID (how to get the order_id after order placed)

2nd question : am I doing it right (logically) ...?

I want to redirect to my module then redirect to bank page for doing payment then redirect back to my shop for saving transaction data
is it logically correct way in Magento 2 when payment should be done on an external site?


texts: Where I can find exception or error logs in magento 2?

texts: I am new to Magento. Please tell me where the errors are stored in Magento?


texts: Magento 1.9: How to stop sending mails to a specific domain?

texts: Aim is to change the Magento (1) code in order to stop sending mails to addresses ending with "@specific.com". All other mails shall be sent as usual only mails to this address (ending) shall be blocked from being sent.


texts: Magento2 - Modify surrounding divs of layouts

texts:
I'm using the 2columns-left as a layout for my category pages and I want to modify these divs, change their classes, without having to add javascript afterwards. I can already modify the templates that handle the content inside thoses divs, I just want to change these divs' classes.

     ...

     ...

I can't seem to find a solution to this problem. I have looked around in the vendor module looking for some kind of meta-layout, but I'm not actually sure what I should be looking for. Can you help ?


texts:
I have got a strange issue with Order Number in Magento.

Recently when one order was placed on my website the Order number came was 100000350,Ideally it should have been 100000370 as my previous order numbers were 100000369 and 100000367. I have attached the screenshot below for it

Moreover, I have checked for the error logs but haven't found any entry of it. We are using SagePay and PayPal as the payment gateway for it.

Can anyone guide me on this?


texts:
Is there a way to add dynamic parameter options to a widget?

For example, I know the tutorial here tells you you can set up parameters like this in your widget.xml file:

<?xml version="1.0"?>
<widgets>
<some_unique_widget_name type="block_group/block_path" translate="name description" module="modulename">
    <name>Widget name</name>
    <description>Short widget description</description>
    <parameters>
        <first_option translate="label">
            <!-- General option properties -->

            <!-- Defines if the option is allowed to be empty -->
            <required>1</required>
            ... etc ...

But in my situation, I'd like the parameters to vary based on database values.

Is this possible? Or is there another solution? Or am I looking at this the wrong way entirely?

Thank you.


texts: Add vertical slider to product page (view more images)

texts: I am searching for a vertical slider for my product page. I tried http://codepen.io/thirdender/pen/aOYyGb but it doesn't work. Any other solution?


texts: I want to add a custome phtml file (that is placed in custome theme/template/brand/brand.phtml)  to a newly created cms page


texts: Magento Attribute working the same as weight

texts:
I need another attribute for each product in Magento that works in the same way that weight does.

When the order is placed I want to be able to call the attribute but for it to already have done

product1.new_attribute + product2.new_attribute + product3.new_attribute = new_attribute

The reason I need this is for my shipping, I want to be able to tell me courier how many boxes Im sending for each order 1 box can be made up of a number of different products.

Can any one point me in the right direction as Im not sure where to start?


texts: Magento2 : How to add something in my css / less file?

texts:
I have a question about something I do not understand what comes from this topic:
hide-the-qty-box-in-bundle-product

I want to apply Method 1, which is very simple, but I totally do not understand. In which file, in which location, I can add the indicated piece of text.

And what do I have to do to make this work? (is that what is stated in "note", I understand that piece :))

Thank you for helping.

edit:

For more clarity:
If you make a bundle product, you will see quantity boxes on the front page. This is totally unnecessary and I would like to hide.

I have found the right file: _custom.less
I found it in

  app/design/frontend/Infortis/ultimo/web/css/_custom.less

in _custom.less i put the code:

.bundle-options-container .nested .field.qty:last-child
{
    display : none;
}

The file has correct file permissions (777 to be sure)

With Putty I gave the following commands:

php bin/magento setup:static-content:deploy -f
php bin/magento setup:static-content:deploy nl_NL -f
php bin/magento cache:flush

In my browser I have emptied the cache.  Unfortunately no result.


texts: Table is not being created while directly using UpgradeSchema

texts:
I want to create a table using UpgradeSchema directly. but on doing so table is not being created. I am attaching the codes below.

code for Upgradeschema.php

<?php
namespace Insync\AddtoCart\Setup;

use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Magento\Framework\DB\Ddl\Table;

class UpgradeSchema implements UpgradeSchemaInterface
{
  public function upgrade(SchemaSetupInterface $setup,
  ModuleContextInterface $context)
{
    $setup->startSetup();
    $this->newTable($setup, $context);
    $setup->endSetup();
}
public function newTable($setup, $context)
{
    if (version_compare($context->getVersion(), '1.2.3') < 0)
    {
        $tableName = $setup->getTable('insync_addtocart_upgrade');
        if ($setup->getConnection()->isTableExists($tableName) == true)
        {
            $connection = $setup->getConnection();
            $connection->dropTable($connection->getTableName($tableName));
        }
        if ($setup->getConnection()->isTableExists($tableName) != true)
        {
            $table = $setup->getConnection()
                ->newTable($tableName)
                ->addColumn('id', Table::TYPE_INTEGER, null, [
                    'identity' => true,
                    'unsigned' => true,
                    'nullable' => false,
                    'primary' => true,
                    'auto_increment' => true
                     ], 'id')
                ->addColumn('name',Table::TYPE_TEXT,255,
                    ['nullable => false'],
                    'Name')
                ->addColumn('type', Table::TYPE_TEXT, 255, [
                    'nullable' => false
                     ], 'Type')
                ->addColumn('created_at',
                    \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP,
                    null,
                    ['nullable' => false, 'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT],
                    'Created At');

            $setup->getConnection()->createTable($table);
        }
    }
}

}


texts:
Besides 'Category', 'Material', 'Brand', 'Color', 'By price range', 'Color Group', and 'Price', I'd like to add the filter 'Shipped by'

This is what I have in my view:
app/design/frontend/{my_theme}/template/catalog/layer/view.phtml

Code:

                <?php $_filters = $this->getFilters() ?>
                <?php $allowedfilter = Array('Category', 'Material', 'Brand', 'Color', 'By price range', 'Color Group', 'Price'); ?>
                <?php foreach ($_filters as $_filter): ?>
                    <?php if ($_filter->getItemsCount() && in_array($_filter->getName(), $allowedfilter)): ?>

                            <?php echo str_replace(' Group', '', $this->__($_filter->getName())) ?>

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

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

Now, this is what I have in my filter:
app/design/frontend/{my_theme}/template/catalog/layer/filter.phtml

Code:

<?php
$brandsort = Array();
if (preg_match('/Brand/i', $this->getName())) {
    $attribute = Mage::getModel('eav/entity_attribute')->load('brand', 'attribute_code');
    $option_col = Mage::getResourceModel('eav/entity_attribute_option_collection')->setAttributeFilter($attribute->getId())
        ->setOrder('sort_order');
    foreach ($option_col as $theoption) {
        if ($theoption['sort_order'] < 1) $theoption['sort_order'] = 999;
        $brandsort[$theoption['option_id']] = $theoption['sort_order'];
    }
}

$items = $this->getItems();

$branditems = Array();
if (preg_match('/Brand/i', $this->getName())) {
    foreach ($items as $key => $item) {
        $items[$key]['sort_order'] = $brandsort[$item['value']];
    }
    function cmp($a, $b) {
        return $a['sort_order'] - $b['sort_order'];
    }

    usort($items, "cmp");
}

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

        <a href="<?php echo $this->urlEscape($_item->getUrl()) ?>">
            <?php if ($_item->getCount() > 0): ?>
                <?php if (file_exists('skin/frontend/{my_theme}/images/colors/' . strtolower(str_replace(' ', '_', $_item->getLabel())) . '.jpg') && preg_match('/Color/i', $this->getAttributeModel()->getFrontendLabel())):
                    echo 'getLabel())) . '.jpg" alt="' . $_item->getLabel() . '" />';
                endif; ?>
                <?php echo $_item->getLabel() ?>
            <?php endif; ?>

        <?php if ($this->shouldDisplayProductCount()): ?>
            (<?php echo $_item->getCount() ?>)
        <?php endif; ?>

<?php endforeach ?>

I found this code that I think it does what I want, but I don't know how to integrate it to my existing code:

$items->joinField('manages_stock','cataloginventory/stock_item','use_config_manage_stock','product_id=entity_id','cataloginventory_stock_item.use_config_manage_stock=1 or cataloginventory_stock_item.manage_stock=1');

What I want is to filter products given the values of use_config_manage_stock and manage_stock i.e. products that are shipped from the stores of shipped by the manufacturer.

It doesn't have to be this way, I'm just bringing what I have so far.

Any help will be appreciated.


texts: How to add attributes set column to category products grid?

texts:
How to add attributes set column to

category products grid
under

Catalog -> Manage Categories -> Category_to_be_edited

I've added a special price since it was already available in the collection.

But I need to have the attribute set also

can someone help?


texts: Manage Categories page does not work properly

texts:
When going to edit categories, the forms below the tabs will not show up.
While the page is loading, the form will actually be displayed for a split
second but disappears once the page has fully loaded.
This has happened before, and the solution was to delete the cookies and/or
browser cache.
This fix does now not work anymore. I have spend countless hours researching
issue, but with out success.
Any advice is appreciated.

Firefox console:

  Loading mixed (insecure) display content “http://website.com/skin/adminhtml/default/default/images/grid-cal.gif” on a secure page[Learn More] c64a534a377bfd0bd489c70a9c034540.js:2048:28
  Loading mixed (insecure) display content “http://website.com/skin/adminhtml/default/default/images/pager_arrow_left_off.gif” on a secure page[Learn More]  c64a534a377bfd0bd489c70a9c034540.js:2048:28
  ReferenceError: jQuery is not defined[Learn More]  c64a534a377bfd0bd489c70a9c034540.js%20line%20612%20%3E%20eval:1:1
  unreachable code after return statement[Learn More]  c64a534a377bfd0bd489c70a9c034540.js:17869:4
  Blocked loading mixed active content “http://website.com/js/blank.html”[Learn More]  ff8f148eab111d681708a973266943fa
  Loading mixed (insecure) display content “http://website.com/skin/adminhtml/default/default/images/pager_arrow_right_off.gif” on a secure page[Learn More]  ff8f148eab111d681708a973266943fa
  GET http://website.com/skin/adminhtml/default/default/images/pager_arrow_right_off.gif [Mixed Content][HTTP/1.1 200 OK 1338ms]
  Blockquote


texts: Error while fetching a request token using postman

texts:
POST: http://127.0.0.1/magento/oauth/token/request

This api returns an error in response: cannot create request token because consumer token is not a verifier token.

oauth_problem=Cannot+create+request+token+because+consumer+token+is+not+a+verifier+token


texts: WYSING editior isnot working in magento 2 admin


texts: How to get and add Core Table data in magento2

texts:
I need to get and add a new Core table data. So, I tried based on get custom table data way(Model, ResourceModel) but it's not working for me.

For example I need to collect customer_group data

What I did: (Using Api)

      <?php
        namespace Vendor\Module\Controller\Index;
        use Magento\Checkout\Model\Cart as CustomerCart;
        use Magento\Customer\Model\Session;
        use Magento\Customer\Api\Data\GroupInterfaceFactory;
        use Magento\Customer\Api\Data\GroupInterface;
        use Magento\Customer\Api\GroupRepositoryInterface;

        class Test extends \Magento\Framework\App\Action\Action
        {

            protected  $_groupDataFactory;

            protected $dataObjectProcessor;

            public function __construct(
                \Magento\Framework\App\Action\Context $context,
                Session $csession,
                \Psr\Log\LoggerInterface $logger,
                \Magento\Framework\Registry $coreRegistry,
                GroupRepositoryInterface $groupRepository,
                GroupInterfaceFactory $groupDataFactory,
                \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor

            )
            {
                $this->dataObjectProcessor = $dataObjectProcessor;
                parent::__construct($context,$groupRepository,
                    $groupDataFactory);
            }

            public function execute()
            {

                        try
                        {
                         $customerGroup = $this->_groupDataFactory->create();
                         $this->_logger->addDebug(serialize($customerGroup));

                        }
                        catch (\Exception $e)
                        {
                           // echo $e;
                        }
                    }
                }
            }

        }

Model Way:

           protected $_groupFactory;

            public function __construct(
                \Magento\Framework\View\Element\Template\Context $context,
                \Magento\Customer\Model\Group $groupFactory

            )
            {
                parent::__construct($context);
                $this->_groupFactory=$groupFactory;
            }

            public function getTableData()
            {

                $result=$this->_groupFactory->create()->getCollection();

                var_dump($result);

            }

Both above way not working for me , Suggest me How to get and add a data to  core table.


texts:
I know there's a million of these questions with answers but I still can't solve this. It does create the line in the core_resource table, but my install script is supposed to die to show it's running, and it isn't.

Relevant code: (with changed Namespace/Module names)
/var/www/html/app/code/local/Namespace/Module/etc.config.xml

<config>
<modules>
    <Namespace_Module>
        <version>0.0.1</version>
    </Namespace_Module>
</modules>
...
<global>
    ...
    <models>
        <module>
            <class>Namespace_Module_Model</class>
        </module>
    </models>
    <resources>
        <module_setup>
            <setup>
                <module>Namespace_Module</module>
                <class>Namespace_Module_Model_Resource_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </module_setup>
    </resources>
</global>
</config>

In /var/www/html/app/code/local/Namespace/Module/Model/Resource/Setup.php:

class Namespace_Module_Model_Resource_Setup extends Mage_Core_Model_Resource_Setup {}

And then I made my installer script in /var/www/html/app/code/local/Namespace/Module/sql/module_setup/mysql14-install-0.0.1.php:

echo 'Running This Upgrade: '.get_class($this)."\n <br /> \n";
die("Exit for now");

My steps for testing if it's working is this. I clear my cache from the Admin Cache Management page (although I have caching disabled anyways). Then I delete my module_setup entry from core_resource. Then I go back to the admin panel and refresh the page. When I do so, it recreates module_setup in the table, however it doesn't appear to execute my mysql14-install-0.0.1.php script because it doesn't die. Nothing appears in the logs (yes they're enabled). Please can someone see what I'm missing here? Is it a simple naming scheme or directory issue? I've been over the tutorials and answers so many times and still can't see what's wrong.


texts: TLS 1.0 and TLS 1.1 Disablement in authorize.net

texts:
I got email from the Authorize.net team regarding TLS disablement as following:

Your Payment Gateway ID: 1234567
Dear Authorize.Net Merchant:
As you may be aware, new PCI DSS requirements state that all payment systems must disable early TLS by 2018. Transport Layer Security (TLS), is a technology used to encrypt sensitive information sent via the Internet. TLS is the replacement for Secure Sockets Layer (SSL).

In preparation for this requirement, Authorize.Net plans to disable TLS 1.0 and TLS 1.1 on the following dates:

Sandbox: COMPLETE
Production: September 18, 2017

We have disabled the sandbox in advance of production to allow you and your developer time to test your website or payment solution and ensure you are no longer using TLS 1.0 or 1.1 prior to September 18th.

Please contact your web developer or payment solution provider, as well as your web hosting company, to confirm that they can support TLS 1.2 for your API connections.

In addition, we plan to retire the 3DES cipher (a data encryption standard) in production soon. However, the date has not yet been finalized. We will notify you once it has.

Please refer your developer or solution provider to our API Best Practices for cipher recommendations, details about TLS 1.2 platform support, and other integration suggestions.

Note: If you are not using the current version of your web browser, please take a few moments to upgrade it now. Browsers released prior to 2014 may not support TLS 1.2. You can check your browser’s TLS support by visiting https://www.howsmyssl.com/.

Thank you for your attention to this matter and for being an Authorize.Net merchant.

i am not understanding what to do with this in magento? Currently i am using default authorize.net method of magento.


texts: custom Customer attribute value not save while customer register

texts:
I have created test attribute using install script it is successfully created.I have added attribute input field in register.phtml

When I register customer my custom attribute value won't save. Do I need to rewrite any model or create any plugin?


texts: If I have a customer object, what would be the best/fastest way to get a list of orders placed by that customer?


texts: Magento 2: Is there any way to use 3rd party ( External ) url for showing product image?

texts:
I just need to use product image from 3rd party url. Is there any way to do this?

I am not able to use default magento import functionality because my product image size is above 1TB and product is above 600k . so i am not able do this thing.

Any idea please share..


texts: what is the equivalent xml file for layout xml in magento 2

texts:
How to write the corresponding layout xml file in Magento 2?

<?xml version="1.0"?>
<layout version="0.1.0">
 <catalogsearch_result_index>
    <reference name="catalogsearch.leftnav">
        <action method="setTemplate">
            <setTemplate>tagalys_search/filter.phtml</setTemplate>
        </action>
    </reference>
      <reference name="content">
        <reference type="catalogsearch/result" name="search.result">
            <reference name="search_result_list">
                <reference name="product_list_toolbar">
                    <action method="setTemplate">
                        <template>tagalys_toolbar/toolbar.phtml</template>
                    </action>
                 </reference>
            </reference>
        </reference>
    </reference>
</catalogsearch_result_index>


texts:
I'm new to magento and i don't have any idea about how I can run specific PHP function when user order completion.
can anyone explain me how I can do this?
I read about event/observer but I don't understand how to use
Thanks


texts: How to rewrite model Mage_Catalog_Model_Product_Attribute_Backend_Media?

texts:
I'm re-writing catalog/product_attribute_backend_media model in my module using folllowing configuration

    <global>
        <models>
            <catalog>
                    <rewrite>
                        <product_attribute_backend_media>Makery_S3image_Model_Product_Attribute_Backend_Media</product_attribute_backend_media>
                    </rewrite>
            </catalog>
        </models>
    </global>

and my model file is like

<?php
class Makery_S3image_Model_Product_Attribute_Backend_Media extends Mage_Eav_Model_Entity_Attribute_Backend_Abstract
{
//snip

While saving product after uploading image, I'm getting error

  Invalid backend model specified:
  catalog/product_attribute_backend_media


texts: Is there a free module or way to add discount on customer based?

texts: I know there is a way for the customer group in promotions but is their any way to assign promotions to individual customer based on attribute e.g customer user name, id or email e.t.c


texts: Cannot correct php.ini error in Magento 2.0.2

texts:
Hello I'm using the latest magento source files from magento website. I've installed the files via directions on the support documentation of magento website and at the Readiness Check point i get the follwing errors:

  our PHP Version is 5.6.14, but always_populate_raw_post_data = 0.
  $HTTP_RAW_POST_DATA is deprecated from PHP 5.6 onwards and will be
  removed in PHP 7.0. This will stop the installer from running. Please
  open your php.ini file and set always_populate_raw_post_data to -1. If
  you need more help please call your hosting provider.

all other php checks are correct.

When I begin to debug the error with trying to find the php.ini file. I have:

Created the phpinfo.php page to determine where the php.ini file is located.

I get this information

2. I CANNOT FIND THE PATH FOR /opt/php56/lib/php.ini


texts: Get product list by ids in CMS page [ Magento 2 ]

texts: I want to create cms page and will show products list as per given ids in admin editor.


texts: Creating multistore configurable products

texts:
I have a few configurable products created with XML import that are presents on 5 stores with different language, and color as super attribute.

When the simple products are linked to the configurable is there any way to have different label color for each language?

And a way to change the name of the confifurable product per store? I have tried with setStore() before product loading, after loading, by just saving the name, even adding entry in the database...

Any help will be fully appreciate. Thanks for your time :)


texts: How to override cookie lifetime for a controller in Magento 2

texts:
I have searched this on google but did not find any thing helpful.

When a user does login using my custom login page then the SID should be generated such that its lifetime is say 20 years no matter what is set through the Admin.

Just to test, I have modified the following function in /vendor/magento/framework/Session/Config.php file
to

protected function configureCookieLifetime()
    {
        $lifetime = $this->_scopeConfig->getValue($this->lifetimePath, $this->_scopeType);
        return $this->setCookieLifetime(0, 0); //Original syntax return $this->setCookieLifetime($lifetime, self::COOKIE_LIFETIME_DEFAULT);
    }

And after modifying when I login then It sets the PHPSESSID to year 2038. Which is what I want.

But how can I override this in my custom module so that I check if the controller is "mycontroller" then I set the lifetime to 0 otherwise normal core code will be executed.


texts: Magento 2: It does not redirect me correctly

texts:
I have different store views, one with code 'en' (this works) and one with code 'es_es' (this does not work and redirects me to the home).

This is the condition that redirects:

if ($result[0] == self::HTTP_CODE_OK) {
                            $this->sendEmailSuccessCreateRma($result[1]);
                            $this->messageManager->addSuccessMessage(__('RMA was created successfully'));
                            $this->_redirect('sap/rma/index');
                        } else {
                            $this->messageManager->addErrorMessage($result[1]);
                        }

And this statement in thephtml:

                    <button type="submit" class="action primary" data-role="rma-submit">
                        <?= __('Submit Request') ?>
                    </button>


texts: How does theme inheritance work in Magento 2 / How to modify Luma

texts:
As I understood it, in a derived theme I should overwrite web/css/source/_theme.less to add my one styles / variables.

When I extend Magento/blank it works fine. But when I extend Magento/luma and make a _theme.less file with a few custom settings, some styles are lost.

I think there is a fallback handling (as in Magento 1) which just "replaces" the themes _theme.less with mine.

How can I extend the luma theme and just add my one styles? Or should I always stick to blank when creating own themes?


texts: no extensions showing with ./mage list-installed

texts:
I have a whole list of extension .xml files in var/package, all readable by web user but when I do ./mage list-installed nothing shows at all so I can't manage any of them. Can anyone suggest what I can do.
Running CE 1.8.1.
Thanks.

UPDATE:
found that downloader/cache.cfg looks corrupt. Can't read it via ssh at any rate.

Can I recreate this?


texts: Magento 2 - How to customize Shipping Label pdf print-out

texts:
I want to change the design and layout of my print shipping label pdf print-outs to make a simple and clean print for the employes to work through.
Is there any extension / tutorial / anything else which shows how to make this possible ?


texts: Swagger redirecting to login when going from Production mode to Developer

texts:
When I tried to set my production mode instance to developer mode I can not get swagger to load.

If I go to mystore.com/swagger it will redirect to the login page.

Deploy mode is set to developer. I also cleared the data in var/view_preprocessed and generated/ folders. Then cleared cache as well. I also restarted php-fpm and nginx.

I am on Magento 2.2.7

Still I can not get swagger to load.


texts: What is more stable, efficient and powerful to use, 1.7 or the latest (1.9?)

texts:
I was wondering as far as Magento versions go which is the best to use? I was having a discussion about it and how good it is and it came up in conversation that Magento 1.7 is the best to use, over the latest version (I think it's 1.9).

I'm new to Magento and was wondering, from a professionals stand point, which is the most powerful, stable and efficient to use? This isn't to settle anything, I'm curious to just see what other Magento shop owners/developers have to say on this subject.

I don't so much want this to be a poll, I'm more asking is 1.7 better than the current release or not. Are there actually any flaws (bugs) security wise present? Thanks.


texts:
Iam intended to get recent posts in two page one on Homepage other on blog page and I found the code for getting recent pages.The below code is for home page

<?php if ($posts = $this->getRecent()): ?>

<?php echo Mage::helper('blog')->__('RECENT POSTS'); ?>

            <?php foreach ($posts as $post): ?>

<a href="<?php echo $post->getAddress(); ?>" ><?php echo $post->getTitle(); ?><?php //echo $post->getPostContent(); ?>

            <?php endforeach; ?>

<?php endif; ?>

I duplicated this code and saved other file and added this extra line <?php //echo $post->getPostContent(); ?>to be visible in blog page.
Now I also found this code is extracting from  a certain Last.php page

 protected function _toHtml()
    {
        $this->setTemplate('aw_blog/widget_post.phtml');
        if ($this->_helper()->getEnabled()) {
            return $this->setData('blog_widget_recent_count', $this->getBlocksCount())->renderView();
        }
    }

I also duplicated this code by replacing

$this->setTemplate('aw_blog/widget_post.phtml'); this code and by pasting duplicated .phtml page name and here my problem occured when I call this page all my sidebar section from my blog page loosing.Please help me to solve this.


texts: How to securely run PHP scripts in Magento 2

texts: I know that we can run php scripts by placing our script in root of magento 2 folder and we can load products, orders etc via object manager and perform our desired functionality. although this method a lot easier and quick too but its highly unsecure. Is there any secure way to run php scripts in Magento 2?


texts: Fatal error: Class 'Lanot_EasySticker_Helper_Data' not found in /public_html/app/Mage.php on line 546

texts:
I am getting the following error (except a different class each time applicable to the extension) every time I try to install an extension: Fatal error: Class 'Lanot_EasySticker_Helper_Data' not found in /home/aaadmin/public_html/app/Mage.php on line 546. I have seen it on the dashboard, and in some modules- not til accessing the configuration area. This is the part in Mage.php that reads the following:

 /**
     * Retrieve helper object
     *
     * @param string $name the helper name
     * @return Mage_Core_Helper_Abstract
     */
    public static function helper($name)
    {
        $registryKey = '_helper/' . $name;
        if (!self::registry($registryKey)) {
            $helperClass = self::getConfig()->getHelperClassName($name);
            self::register($registryKey, new $helperClass);
        }
        return self::registry($registryKey);
    }

If it's a permission issue. I haven't seemed to be able to figure it out. Please advise.


texts: I would like to create a user on database with the minimum required privileges for Magento. Anyone done this?


texts: Disable Next button to prevent order placement based on shipping address information in Magento 2

texts:
We need to disable Next button on the shipping page to prevent fraud orders to certain addresses like carry forwarders and out of country. Are there any open source or paid extensions to disable order placement or disable Next button based on restricted addresses data lookup from a custom table?

What is the right place if this has to be done in a custom module and approach, without any product attributes and customer group data, since customer(s) can create new account each time they order?

Thanks


texts: Magento 1.9.3.7 the session id is too long or contains illegal characters

texts:
Looking at my log files: specifically the system.log file; I can see multiple entries of the following:

  The session id is too long or contains illegal characters, valid
  characters are a-z, A-Z, 0-9 and '-,'
  /app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 134

Rather strange, as I am using a pretty default setup of the magento version 1.9.3.7.

Looking online I cannot see anyone has faced this issue or fix. Was wondering if anyone could help identify the cause or fix to this issue?


texts:
By default the Magento URL for the review form is:

www.domain.com/(producturl)-reviews#review-form.

But in this page the review-form is a section in the reviews page.

I want to load the review-form in unique page with a URL something like:

www.domain.com/(producturl)-review-form.

This review-form will only be the form for this product.

How can I achieve that?


texts:
I have a CSV files with customer data, i like to send a email notification to the user once the account is created.
    So i like to know,in Magento(1.9) core have any email notification functionality for import user(for account creation)?


texts:
In magento 1.9.x

 "Mage registry key "_singleton/customer/session" already exists"

I have tried all possible solution from google but didn't worked any help would be great.


texts: How to display different menu in each store

texts: Am using magento 1.9.2.3. I want to create seperate website at backend, have same theme for both websites but only menu category should be different. Someone kindly suggest a solution to this scenario. Also kindly guide me how to give url in localhost.


texts: How Magento 2.1.x minicart renders items, image and price

texts: How Magento 2 minicart renders items, image and price.


texts:
I had stuck on one issue.this is my configuration filed from the system.xml

<topnav_laptop translate="label">
  <label>My Dropdown:</label>
  <comment>Source model provider Magento's default Yes/No values</comment>
  <frontend_type>Multiselect</frontend_type>
  <sort_order>90</sort_order>
  <show_in_default>1</show_in_default>
  <show_in_website>1</show_in_website>
  <show_in_store>1</show_in_store>
  <source_model>Neo_Topnav_Model_Adminhtml_System_Config_Source_Laptop</source_model>
- <!-- <source_model>Neo_Career_Model_Career</source_model>
  -->
  </topnav_laptop>

I have toOptionArray() with the following code at Laptop.php

public function toOptionArray(){
        $topnavi_model = new Neo_Topnav_Model_Topnavi();
        $navi_model = $topnavi_model->laptopdata();
        //$themes = $this->laptopdata();
        return $navi_model;
      }

public function getCatAttributes() {
        $layer = Mage::getModel("catalog/layer");
        $r = Mage::getModel('catalog/category')->load(3);
        $layer->setCurrentCategory($r);
        $validAttributes = array();
        //print_r($layer->getFilterableAttributes()); exit;
        foreach ($layer->getFilterableAttributes() as $attribute) {
            //allow only select attributes - you can implement your additional filters here
            if ($attribute->getFrontendInput() == 'select'){
                $validAttributes[] = $attribute;
            }
        }
        //print_r($validAttributes); exit;
        $result = array();
        $i = 0;
        foreach($validAttributes as $validAttribute){
            $result[$i]['value'] = $validAttribute['attribute_id'];
            $result[$i]['label'] = $validAttribute['attribute_code'];
            $i++;
        }
        //echo "<pre>"; print_r($result);
        return $result;
        //return $validAttributes;
    }

    public function laptopdata(){
            $lappa = array();
            $lapp = $this->getCatAttributes();
            $lappa = $lapp;
            return $lappa;
        }

In Neo_Topnav_Model_Topnavi model i have a function called laptopdata which returns array.but in the toOptionArray function i am getting empty array.where's when i am accessing the laptopdata() outside magento i am getting array.

Please Help me.


texts: Catalog > Manage Categories Shows No options for Edit

texts:
I have searched for a solution and increased the memory limit, but it was of no use.
I have over 12,000 products on my catalog. Is it because of that? I am on a vps server with 8GB RAM.
What can be the reason for this? Please suggest.


texts: How do I change the default/cached thumbnail size?

texts:
I keep searching for it, but all I get are answers about changing the size on the store page and different views. What I want is to alter the size of cached thumbnail size that I get with

  $product->getThumbnailUrl();

when I upload the new product and Magento creates the small image and thumbnail, not when I retrieve it.


texts: Magento 2 create grid for two existing database table

texts: I want to create a grid using uiComponent. I required to get data from two existing table catalog_product_entity and cataloginventory_stock with join query.


texts: when to use di.xml for my custom module class?

texts:
For example i have following two classes.

<?php
namespace Namespace\Modulename\Model;
class Message
{
    public function getMessage()
    {
        return 'Hello World!';
    }
}
?>

<?php
namespace Namespace\Modulename\Model;

class Example
{
    protected $messageObject;
    public function __construct(Message $messageObject)
    {
    $this->messageObject = $messageObject;
    }

    public function sendHelloAgainMessage()
    {
      return $this->messageObject->getMessage();
    }
}
?>

I dont need to create below xml in di.xml.because objectmanager take care creation of object automatically from constructor type(means here Message)

 <type name="Namespace\Modulename\Model\Example">
            <arguments>
                <argument name="messageObject" xsi:type="object">Namespace\Modulename\Model\Message</argument>
            </arguments>
    </type>

But my doubt is in which time i have to create above xml?

update

for example please look at <type name="Magento\Catalog\Helper\Product">   di.xml in catalog module.

<argument name="catalogSession" xsi:type="object">Magento\Catalog\Model\Session\Proxy</argument>

if i give directly that class name(Magento\Catalog\Model\Session\Proxy) in constructor instead of in xml?

public function __construct(
        \Magento\Framework\App\Helper\Context $context,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Catalog\Model\Session\Proxy $catalogSession,


texts: Re-direct Category Menu item to different URL

texts:
I want to redirect my Menu sub item to a different URL how can I do that?
Like Blog Menu Item to
Dropbox.com

I want the Blog menu to be redirected to : a seperate URL to new website for example: www.wordpress.com
The Sub category Item are not shown In front End But is present and Enabled
at back-end admin dashboard.


texts: Security patch supee-8788 - Can it be applied to Magento 2.0.6 community edition?

texts: I would like to know if the supee-8788 security patch can be applied to magento 2.0.6 as I am unable to find any documentation on it relating to magento 2.0.6 ?


texts: How to do product listing in custom module page?

texts:
How to do product listing on custom module page?

I have tried but it prints array.


texts: how to get custom attribute select option values from custom table in Magento 2.3.5

texts:
I want to get attribute option value which is created from admin side in using custom field in magento 2.3.5
please anyone can have knowlwdge about it then please share with me.
Thank you in advance.


texts: Fatal error: Class 'Magento\Setup\Module\I18n\Locale' not found

texts:
I have just upgrade Magento version to 2.3.5 and when I am trying to login into admin I am getting error like
Fatal error: Uncaught Error: Class 'Magento\Setup\Module\I18n\Locale' not found in /cache/vendor/magento/module-release-notification/Model/ContentProvider/Http/HttpContentProvider.php:60 Stack trace: #0 /cache/vendor/magento/module-release-notification/Ui/DataProvider/Modifier/Notifications.php(202): Magento\ReleaseNotification\Model\ContentProvider\Http\HttpContentProvider->getContent('2.3.5', 'community', 'en_us') #1 /cache/vendor/magento/module-release-notification/Ui/DataProvider/Modifier/Notifications.php(106): Magento\ReleaseNotification\Ui\DataProvider\Modifier\Notifications->getNotificationContent() #2 /cache/vendor/magento/module-release-notification/Ui/DataProvider/NotificationDataProvider.php(104): Magento\ReleaseNotification\Ui\DataProvider\Modifier\Notifications->modifyMeta(Array) #3 /cache/vendor/magento/framework/View/Element/UiComponentFactory.php(318): Magento\ReleaseNotification\Ui\DataProvider\NotificationDataProvider->getMeta() #4 /cache/vendor/magento/framework/View/Element/UiComponentFactory.php(218) in /cache/vendor/magento/module-release-notification/Model/ContentProvider/Http/HttpContentProvider.php on line 60

Once I refresh the page it has gone and all working fine. just get error while login first time.
Any idea about Error? any help appreciated


texts: I'm using magento 2.1, and is not showing Prev, Next buttons on category page, I have 200 products, and should show 16 on page, it shows the 16 products but not next, prev buttons, so I can't navigate to other pages, any suggestion to fix this? It does it also with blank or luma theme, so it shouldn't that the problem.