texts: M1 - View Multiple Select Attribute in Front End

texts:
I've created a product attribute in the admin panel and have added it to a product. These attributes are now showing within the tabs on the frontend, however I would like them to appear between the product short description and the SKU.

I've added the following code in the correct location within view.phtml, and this is showing correctly on the frontend if only one option is selected

<?php echo $_product->getAttributeText('product_use'); ?>

However if there are multiple items selected then the only thing that will show up on the front end is the word array


texts: How To Increase frontend session timeout to 10 day In Magento

texts:
I am trying to increase session time out limit to 10 days in magento for non logged in customer but it is expiring before may be witthin 1 days. I went to System->Configuration->Web->Session Cookie management and set 864000 value for the field Cookie Life time but still it is not expiring the session in specified time out limit. I don't know what is wrong with Magento frontend session.

My .user.ini  file contains

session.cookie_lifetime = 864000
session.gc_maxlifetime = 864000
memory_limit = -1
date.timezone = Asia/Kolkata
session.save_handler = redis

Cookie time is also correct. My Current time is 29/07/2017 03:41

Am I setting the limit at right place? Is there any other setting in magento backend to set the frontend session time out limit. server managed by serverpilot and also using cloudflare

UPDATE*

I'm using redis server. local.xml files contains

found in domain header

  set-cookie:frontend=33955232e53750ff997a3b8391324b1c;

  expires=Tue, 08-Aug-2017 10:45:53 GMT;

  Max-Age=864000; path=/;

  domain=example.com


texts: Magento 1, compiler gives 500 on disabled products

texts:
We have a pretty weird issue, if we enable the php compiler disabled products will return a 500 page. If we enable php errors using php_ini it returns a 200 but the page contains nothing.

In the logs there is nothing. No error is being logged, the only thing that shows up is the request in the access.log

{
"time":"2018-03-01T09:58:10+00:00",
"remote_addr":"172.28.128.1",
"remote_user":"-",
"host":"sitename",
"request":"GET /nl/5-gram-goud-baar-perth HTTP/1.1",
"status":"500",
"body_bytes_sent":"5",
"referer":"-",
"user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0",
"request_time":"0.136",
"handler":"phpfpm",
"country":"-",
"port":"80",
"ssl_cipher":"-",
"ssl_protocol":"-"
}

All I have managed to find out is that it crashes at a low-level as it won't reach the view, won't reach the block, won't reach the layout.

The server is running Nginx, on a Hypernode box. And magento 1.9.2.2


texts:
I copied a magento 1.9 installation from one host to a new. Then when I try activating the new installation I get a database error:

SQLSTATE[28000] [1045] Access denied for user 'testadmin'@'localhost' (using password: YES)

#0 /var/www/html/magento-development/lib/Zend/Db/Adapter/Pdo/Mysql.php(111): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /var/www/html/magento-development/lib/Varien/Db/Adapter/Pdo/Mysql.php(396): Zend_Db_Adapter_Pdo_Mysql->_connect()
#2 /var/www/html/magento-development/lib/Zend/Db/Adapter/Abstract.php(460): Varien_Db_Adapter_Pdo_Mysql->_connect()
#3 /var/www/html/magento-development/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#4 /var/www/html/magento-development/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#5 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource.php(179): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#6 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource.php(110): Mage_Core_Model_Resource->_newConnection('pdo_mysql', Object(Mage_Core_Model_Config_Element))
#7 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(320): Mage_Core_Model_Resource->getConnection('core_write')
#8 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(350): Mage_Core_Model_Resource_Db_Abstract->_getConnection('write')
#9 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(335): Mage_Core_Model_Resource_Db_Abstract->_getWriteAdapter()
#10 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Resource/Cache.php(53): Mage_Core_Model_Resource_Db_Abstract->_getReadAdapter()
#11 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Cache.php(478): Mage_Core_Model_Resource_Cache->getAllOptions()
#12 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Cache.php(520): Mage_Core_Model_Cache->_initOptions()
#13 /var/www/html/magento-development/app/code/core/Mage/Core/Model/App.php(1202): Mage_Core_Model_Cache->canUse('config')
#14 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Config.php(414): Mage_Core_Model_App->useCache('config')
#15 /var/www/html/magento-development/app/code/core/Mage/Core/Model/Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#16 /var/www/html/magento-development/app/code/core/Mage/Core/Model/App.php(424): Mage_Core_Model_Config->loadModulesCache()
#17 /var/www/html/magento-development/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#18 /var/www/html/magento-development/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /var/www/html/magento-development/index.php(84): Mage::run('', 'store')
#20 {main}

Can I reinstall or just set the db password somewhere?


texts: How to implement e-commerce tracking code in magento website

texts: The brief procedure, How to add e-commerce tracking code in Magento website.


texts: Show all products on one page in Magento 2

texts:
I need a page where all products should be displayed. All products from all categories, also including filters by attributes.

I have tried to use the following block

{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" template="catalog/product/list.phtml"}}

However, it doesn't work.

When I create a parent category I get nested categories and they are displayed under the All categories category, this is not what I need.

Please suggest a way to display all products on a single page.


texts: Custom Image upload field resulting in error

texts:
I'm using this code to upload images to a custom field in the admin panel:
 <item name="config" xsi:type="array">
                <item name="dataType" xsi:type="string">string</item>
                <item name="source" xsi:type="string">page</item>
                <item name="label" xsi:type="string" translate="true">Hero Image</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="formElement" xsi:type="string">fileUploader</item>
                <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                <item name="previewTmpl" xsi:type="string">Company_CmsPage/image-preview</item>
                <item name="required" xsi:type="boolean">false</item>
                <item name="uploaderConfig" xsi:type="array">
                    <item name="url" xsi:type="url" path="Company_CmsPage/hero_image/upload"/>
                </item>
  </item>

When images are uploaded I get the following error:
A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later.
Here is controller code Controller/Adminhtml/Cms/Upload.php
namespace ISM\CmsPage\Controller\Adminhtml\Cms\Heroimage;

use Magento\Framework\Controller\ResultFactory;

class Upload extends \Magento\Backend\App\Action
{
    /**
     * Image uploader
     *
     * @var \[Vendor]\[Module]\Model\ImageUploader
     */
    protected $imageUploader;

    /**
     * @param \Magento\Backend\App\Action\Context $context
     * @param \Magento\Catalog\Model\ImageUploader $imageUploader
     */
    public function __construct(
        \Magento\Backend\App\Action\Context $context,
        \Magento\Catalog\Model\ImageUploader $imageUploader
    ) {
        parent::__construct($context);
        $this->imageUploader = $imageUploader;
    }

    /**
     * Upload file controller action
     *
     * @return \Magento\Framework\Controller\ResultInterface
     */
    public function execute()
    {
        try {
            $result = $this->imageUploader->saveFileToTmpDir('hero_image');

            $result['cookie'] = [
                'name' => $this->_getSession()->getName(),
                'value' => $this->_getSession()->getSessionId(),
                'lifetime' => $this->_getSession()->getCookieLifetime(),
                'path' => $this->_getSession()->getCookiePath(),
                'domain' => $this->_getSession()->getCookieDomain(),
            ];
        } catch (\Exception $e) {
            $result = ['error' => $e->getMessage(), 'errorcode' => $e->getCode()];
        }
        return $this->resultFactory->create(ResultFactory::TYPE_JSON)->setData($result);
    }
}
?>

I've checked Magento and Server logs but haven't found anything.


texts: How to integrate SimpleSAMLphp IdP login system with Magento 2.x

texts:
I was working on SAML SSO (Single sign-on) flow between two sites (IdP and SP). I am using SimpleSAMLphp to achieve this, both IdP and SP are working correctly. Currently, SimpleSAMLphp is using its default login system.
My question is how to integrate SimpleSAMLphp's login system with a custom PHP application? I am using Magento 2.x in my case. Here example.com is my Magento instance and example.com/idp is the SimpleSAMLphp's IdP instance.
Can somebody please help me out with the steps on how to achieve this? Thank You.


texts: How to know what to write to pull through a product attribute Magento 2

texts:
Please excuse my ignorance as PHP 7 is completely new to me.

The more and more I work with Magento 2 the more I'm understanding objects.
But my question is:

You have objects the their contents such as:

$block->getFramePages()

or

$_product->getProductUrl()

as examples.

If I was to create a new attribute for a product say "Ready to go" answers "Yes"/"No"

How would I know how to pull it through to the page. What would be its equivilant to getFramesPages() for example?


texts: Blank Email Magento 2 - Order / Password

texts:
At my shop I have the problem that when someone creates a new order, the order confirmation (email) is simply displayed blank (white page). The email address is also not displayed correctly.

If you forgot Password you get the same blank page.

I tried also the standard configuration but doesn't works.

Thanks a lot for your help
Best Regards


texts: Shopping cart price rules do not apply to configurable products

texts:
I have a configurable product that has 12 associated products. One of those associated products needs to be part of a promotion.

Let's say the SKU for the configurable is J001 and the SKU for the simple product is J001-2D.

The attribute in the promotion is Container Size. The configurable doesn't have that attribute, but the associated products do.

If I create a shopping cart price rule that looks like the following:

That doesn't match anything. If I exclude everything (IE, Container Size Is Not whatever), it matches everything in the cart. This says to me that the promotion isn't matching the simple associated product.

Is this intended behavior? Is there a workaround?


texts: Error tyring to get to storage admin page

texts:
Appologies as I am not much of a dev, more unix admin... So please be patient and help :)

I get an error when I try to get to the Magento 2.3.2 storage admin area via:

Store->Configuration->Advanced->System:

1 exception(s):
Exception #0 (InvalidArgumentException): Unable to unserialize value.

Exception #0 (InvalidArgumentException): Unable to unserialize value.
<pre>#1 Magento\Framework\Flag->getFlagData() called at [vendor/magento/module-media-storage/Block/System/Config/System/Storage/Media/Synchronize.php:115]
#2 Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize->getSyncStorageParams() called at [generated/code/Magento/MediaStorage/Block/System/Config/System/Storage/Media/Synchronize/Interceptor.php:76]
#3 Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize\Interceptor->getSyncStorageParams() called at [vendor/magento/module-media-storage/view/adminhtml/templates/system/config/system/storage/media/synchronize.phtml:37]
#4 include('/var/www/html/ve...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#5 Magento\Framework\View\TemplateEngine\Php->render(&Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize\Interceptor#000000003bfc5ad7000000001c07e6a1#, '/var/www/html/ve...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#6 Magento\Framework\View\Element\Template->fetchView('/var/www/html/ve...') called at [generated/code/Magento/MediaStorage/Block/System/Config/System/Storage/Media/Synchronize/Interceptor.php:219]
#7 Magento\MediaStorage\Block\System\Config\System\Storage\Media\Synchronize\Interceptor->fetchView('/var/www/html/ve...') called at [vendor/magento/framework/View/Element/Template.php:301]
#8 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/module-backend/Block/Template.php:129]
#9 Magento\Backend\Block\Template->_toHtml() called at [vendor/magento/module-media-storage/Block/System/Config/System/Storage/Media/Synchronize.php:59]


texts: Magento 2 Fatal error: Uncaught Error: Cannot instantiate interface on catalog/product pages and widgets

texts:
Recently we've started experiencing issues on any pages that pull data from the catalog or individual products.

I'm not quite sure what the cause of this change was, as everything was working fine up until a couple days ago.

After enabling error logging, we are seeing the following error displayed on catalog/product pages:

  Fatal error: Uncaught Error: Cannot instantiate interface
  Magento\ConfigurableProduct\Pricing\Price\LowestPriceOptionsProviderInterface
  in
  /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:73
  Stack trace: #0
  /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(71):
  Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Configu...')

  1 /var/www/html/vendor/magento/module-configurable-product/Pricing/Render/FinalPriceBox.php(46):
  Magento\Framework\ObjectManager\ObjectManager->get('Magento\Configu...')

  2/var/www/html/var/generation/Magento/ConfigurableProduct/Pricing/Render/FinalPriceBox/Interceptor.php(14):
  Magento\ConfigurableProduct\Pricing\Render\FinalPriceBox->__construct(Object(Magento\Framework\View\Element\Template\Context), Object(Magento\Catalog\Model\Product\Interceptor),
  Object(Magento\ConfigurableProduct\Pricing\Price\FinalPrice),
  Object(Magento\Framework\Pricing\Render\RendererPool),
  Object(Magento\ConfigurableProduct\Pricing\Price\Confi in
  /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php
  on line 73


texts:
I want to make a multistore and already made the 3 different websites, stores and for every store 3 storeviews for languages.
the first shop is the german standard shop with 19% tax.
the second shop should be an austrian shop with 20% tax.
the third shop should be a swiss shop with CHF (Swiss Franks) as currency.
First of all, is this possible? And then how?


texts: Get product info in JSON/XML without authentication

texts:
Is it possible to get product info in JSON/XML format without using any authentication from a website using Magento.

For example, Shopify provides product's info as https://mystore/products/product-handle.json for a product available at https://mystore/products/product-handle


texts: Sharing Sessions Between Stores with Different Domains

texts:
I have three websites on a Magento installation, each has its own domain.

Now due to web-browser security you cannot access cookies from another domain, nor sessions.

Somehow I need to be able to pass temporary data between two different stores with different domains.

My specific use case:

I am using GeoIP to trigger a redirect to the correct countries store, however I also need to be able to manually override this. Now at the moment I am having the issue where I am manually overriding on the current store with a cookie, however when I am redirected to the other store, there is no cookie on the other store, so it falls back and looks up the users store based on GeoIP. However this then creates an infinity loop redirecting between too stores.

This is done by figuring out the website code for the store I want to use in index.php with a custom module and running Magento with the correct code. This handles all redirects etc for me then.


texts:
In Magento's admin panel, I can see that a visitor of my magento website entered the following search query in the webshop's search bar:

productName" and (4=4 xor 6=9)-- a

where productName was originally the name of a product we sell.

I know what and and xor are for (though usually (in frontend usage) it only works when entered fully capitalized, I believe), but otherwise I don't understand what the visitor was trying to do here.

I am wondering if this is a hacking attempt. Is this a possibility? If yes, what was this person trying to achieve, and how can I prevent such attempts in the future?


texts:
I am trying to disable a Magento programatically.For just trying I added the following code to myadmin header.phtml.

    // Disable the module itself
$moduleName="Thycart_Customcheckout"
        $nodePath = "modules/$moduleName/active";
        if (Mage::helper('core/data')->isModuleEnabled($moduleName)) {
            Mage::getConfig()->setNode($nodePath, 'false', true);
            echo Mage::getConfig()->getNode('modules/Thycart_Customcheckout')->active;
        }

        // Disable its output as well (which was already loaded)
         $outputPath = "advanced/modules_disable_output/$moduleName";
         if (!Mage::getStoreConfig($outputPath)) {
             Mage::app()->getStore()->setConfig($outputPath, true);
         }

On echoing

  Mage::getConfig()->getNode('modules/Thycart_Customcheckout')->active;

is returning me its false but actualy the module is not getting disabled from xml.

Also tried

  Mage::getConfig()->saveConfig();

returned a

  Front controller reached 100 router match iterations

Error.

Can someone please help to make the node active to false in config file .
Thanks.


texts: Magento 2: Form Validator is not a function

texts:
I am trying to use the new Magento 2 version and I have discovered that the form validator doesn't work as well.

When I try to add a product in the amdinistration panel I get this error:

Uncaught TypeError: $.validator.validateSingleElement is not a function

I have seen the requirejs-config.js and I can see the form validator. So why this happens?

The error seems to me clear but it's not so clear the solution for me. How have I to solve it?

thanks


texts:
My website's default URL is: dev4.wetag.ca

I added a second website to my Magento with the code: wetag_us
I want to give it this URL: dev4.wetag.me

SO I changed it's url in the admin panel configuration, and following tutorials I added these lines in .htaccess:

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on

SetEnvIf Host .*dev4.wetag.me.* MAGE_RUN_CODE=wetag_usa
SetEnvIf Host .*dev4.wetag.me.* MAGE_RUN_TYPE=website

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
RewriteRule .* - [L,R=405]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
</IfModule>

I also tried this:

RewriteCond %{HTTP_HOST} ^(.*)dev4\.wetag\.me
RewriteRule .* – [E=MAGE_RUN_CODE:wetag_usa]
RewriteCond %{HTTP_HOST} ^(.*)dev4\.wetag\.me
RewriteRule .* – [E=MAGE_RUN_TYPE:website]

none of them seemed to work, when i visit the new domain it says:

  This site can’t be reached
  dev4.wetag.me’s server IP address could not be found.
  Search Google for dev4 wetag me
  ERR_NAME_NOT_RESOLVED

I also tried to park  dev4.wetag.me on dev4.wetag.ca through WHM, but still not working.

Am I missing something? Please help!
Ps. I'm not a virtual machine or anything its on live server, CentOS.

Thank you !


texts:
I want to have 2 buttons on the product view page one will just add product to cart and it will not redirect it to cart. However other will add product to cart and also redirect the user to cart. So please guide me how this can be achieved.

I am adding my code here please check

<button type="button" class="button" onClick="addcart(this.id);productAddToCartForm.submit(this);redirectcart();"  id="buyitnowid">
             <?php echo $this->__('BUYNOW'); ?>
        </button>

Java script is

productAddToCartForm.submit = function(button, url) {
        if (this.validator.validate() &&  !addOptions.submittedForm) {
            var form = this.form;
            var url = form.action;

            if (weltpixel.quickview.inIframe) {
                parent.weltpixel.quickview.addToCart(url, $(form).serialize(true), addOptions);
            } else {
                weltpixel.quickview.addToCart(url, $(form).serialize(true), addOptions);
            }

            addOptions.submittedForm = true;
        } else {
            jQuery('html,body').animate({
                scrollTop: jQuery("#product-options-wrapper").offset().top -100
            });
        }
    }.bind(productAddToCartForm);


texts: Adding Custom JQuery script in purchase order html form in magento 2

texts:
pub\static\frontend\Store\name\en_US\Magento_OfflinePayments\template\payment\banktransfer.html

Need to add the Custom javascript or JQuery Script to disable the place order button in banktransfer.html file

My code looks like this,

        <input data-validate="{'required-entry':true}" type="text" name="payment[ownerkey]" class="input-text" value=""
               data-bind="attr: {
                                id: getCode() + '_ownerkey',
                                title: $t('Credit Key'),
                                'data-container': getCode() + '-ownerkey',
                                'data-validate': JSON.stringify({'required':true})},
                                valueUpdate: 'keyup' "/>

</fieldset>

            <button class="action primary checkout"
                    type="submit"
                    data-bind="
                    click: placeOrder,
                    attr: {'title': $t('Place Order')},
                    enable: (getCode() == isChecked()),
                    css: {disabled: !isPlaceOrderActionAllowed()}
                    "
                    disabled>

            </button>

require([ 'jquery', 'jquery/ui'], function(jQuery)
{
jQuery(function ($)
{

       jQuery(".action.primary.checkout").attr("disabled","disable");

}); });


texts: what to do if i can't access my Magento admin path, it directs me to other blog

texts:
I changed my admin URL in the admin panel of Magento and now can't get control of admin URL I tried with changing from local.XML file,

but still not accessible.


texts: Session and cookies are not removing in Magento

texts:
I am trying to set the cookie on user login basis and want to empty on logout. Login working perfect but logout didn't work. For that purpose I used this XML code :

    <customer_logout>
    <observers>
<customer_is_loggedout_observer>
                <type>model</type>
                <class>Easylife_Sales_Model_Observer</class>
                <method>customerLogout</method>
            </customer_is_loggedout_observer>
        </observers>
    </customer_logout>
        <controller_action_predispatch>
                <observers>
                    <customer_is_logged_in_observer>
                        <class>Easylife_Sales_Model_Observer</class>
                        <method>setHandle</method>
                    </customer_is_logged_in_observer>
                </observers>
            </controller_action_predispatch>
       <sales_quote_collect_totals_before>

And PHP code is in observer :

<?php

class Easylife_Sales_Model_Observer
{

    public function setHandle(Varien_Event_Observer $observer)
    {
  Mage::getSingleton('core/session', array('name'=>'frontend'));
$session = Mage::getSingleton('customer/session', array('name'=>'frontend'));
if($session->isLoggedIn()){

     $customerData = Mage::getSingleton('customer/session')->getCustomer();
   $name = 'loginuser';
          $value = $customerData->getId();

          Mage::getModel('core/cookie')->set($name, $value);

 }else if(Mage::getModel('core/cookie')->get('loginuser') > 0 ){

      Mage::getSingleton('customer/session')->loginById(Mage::getModel('core/cookie')->get('loginuser'));
 }

}

     public function customerLogout(Varien_Event_Observer $observer)
    {

      if (isset($_COOKIE['loginuser'])) {
         unset($_COOKIE['loginuser']);
        setcookie('loginuser', null, -1, '/');
      }
      Mage::getSingleton('checkout/session')->unsetAll();
       $cookieName = 'loginuser';
     $session = Mage::getSingleton("core/session", array("name"=>"frontend"));
     $session->unsetAll();
     $session->clear();

       //echo Mage::getModel('core/cookie')->get('loginuser');exit();

    }

}

I am trying to delete the cookie value and user session on logout click. It shows message of logout successfully and redirect to home page but when reload page it logged in? What I am doing wrong? The else condition is for multi-website where I want to logged in user when he logged in on one site.


texts: Remove trailing slash - Not just using htaccess

texts:
I have noted that Magento adds trailing slashes to most urls.

https://www.example.com/checkout/cart/
https://www.example.com/customer/account/create/

In my htaccess I have it to strip off the trailing slash and 301 redirect but I was wondering where in Magento I would need to edit to stop the trailing slash happening in the first place.

I have found http://developersushant.blogspot.co.uk/2014/12/remove-trailing-slash-from-magento-urls.html but this means moving Abstract.php to the local folder which I ideally dont wish to do


texts: Add column in Customer grid based on module's Model

texts:
Need to add a custom column in Customers grid from the status in the Module's Model.

i was using this code

config.xml

<adminhtml>
    <rewrite>
<customer_grid>Company_MyModule_Block_Adminhtml_Customer_Grid</customer_grid>
    </rewrite>
</adminhtml>

Company/MyModuleBlock/Adminhtml/Customer/Grid.php

public function setCollection($collection)
{
    //This is where the problem occurs
    $collection->getSelect()->joinLeft(
        array(
            'mycustomtable' => 'my_custom_table'
        ),
    'mycustomtable.customer_id = e.entity_id',
    );
    //This is where the problem occurs
    parent::setCollection($collection);
}
protected function _prepareColumns()
 {
     $this->addColumnAfter('custom_status',
         array(
             'header'=> Mage::helper('catalog')->__('Custom Status'),
             'index' => 'mytable_status',
             'align' => 'center',
             'width' => '20'
         ),
         'website_id'
     );

     return parent::_prepareColumns();
 }

The column is added and i can view it..i can populate the data from the same table(customers) but i am unable to populate data from any other table..(my_custom_table)

Thanks..


texts: Magento, automatically assign newsletter subscribers to newsletter subscriber group

texts: I have created the newsletter subscriber group on customer group, so I can apply discount to them, is there anyway to make it automatic, if someone subscribe to newsletter he/she automatically assign to newsletter subscribers group that had created?


texts: how can I set the type before order confirm in magento 2 in phtml file

texts:
In magento 1

$canApplyMsrp = Mage::helper('catalog')->canApplyMsrp($_item->getProduct(), Mage_Catalog_Model_Product_Attribute_Source_Msrp_Type::TYPE_BEFORE_ORDER_CONFIRM);

how can I set this in the magento 2.


texts: Programmatically created attribute option not in Layered Navigation without Admin Save

texts:
I am trying to programmatically add options to the color attribute from a data feed coming from another system. I am able to create the attributes, see them in the Admin, and even see them assigned to products in the storefront, but they are not available as filters in the Layered Navigation until after I go into the Admin and click "Save" on the color attribute. No changes are needed in the Admin for them to show up, simply clicking "Save" fixes the Layered Navigation filters.
This is the code that creates the option:
            $optionLabels = [];
            foreach ($this->getStoreIds() as $id) {
                $optionLabel = $this->attributeOptionLabelInterfaceFactory->create();
                $optionLabel->setStoreId($id)->setLabel($option);
                $optionLabels[] = $optionLabel;
            }

            $attributeOption = $this->attributeOptionInterfaceFactory->create();
            $attributeOption->setLabel($option);
            $attributeOption->setValue($option);
            $attributeOption->setIsDefault(false);
            $attributeOption->setStoreLabels($optionLabels);

            $optionId = $this->attributeOptionManagement->add(
                (int)$this->eavConfig->getEntityType(Product::ENTITY)->getEntityTypeId(),
                $attributeCode,
                $attributeOption
            );

I'm saving the attribute entity itself, saving the attribute to the attribute repository, and saving the attribute to the product attribute repository.
I programmatically reindex the attribute index and clean/flush the caches, and I've tried to compare the events being fired from the Admin and my code.
This is on Magento Open Source 2.3.5-p1.


texts: Configurable products showing below out of stock products

texts: I've just added some new configurable products to a category. They do show up but the problem is that they show up after the out of stock items. Everything in the category is sorted by best value which is the same for other categories but I don't have the same problem such as this one.


texts:
I am new to Magento extension development and looking for a way to implement a connection to our WMS. I have done some tutorials on extension development, but am a little stuck on where or how to make this thing.

My idea is as follows: whenever Magento looks for the inventory information on certain product (either in the front end or back end), I want it to refer to our WMS for actual information.

So I am thinking of an extension along the lines of:

Hook into the "request stock info" event (does that even exist?)
Call my extension's method getStockInfo($sku)
My getStockInfo($sku) will reply with correct information from my WMS.

Is this the way to implement functionality like this, or should I use different techniques?


texts: Magento2 Data migration getting stuck at Step Customer Attribute

texts:
We are trying to migrate Magento 1.9.2.0 to Magento 2.0.4 EE. We have added the missing tables and columns in M2 Database and then started running the below command.

php bin/magento migrate:data  vendor/magento/data-migration-tool/etc/ce-to-ee/1.9.2.0/config.xml.dist

  [2016-04-13 13:30:05][INFO][mode: data][stage: integrity check][step:
  EAV Step]: started [2016-04-13 13:30:05][INFO][mode: data][stage:
  integrity check][step: Customer Attributes Step]: started [2016-04-13
  13:30:05][INFO][mode: data][stage: integrity check][step: Map Step]:
  started [2016-04-13 13:30:05][INFO][mode: data][stage: integrity
  check][step: Url Rewrite Step]: started [2016-04-13
  13:30:05][INFO][mode: data][stage: integrity check][step: Log Step]:
  started [2016-04-13 13:30:05][INFO][mode: data][stage: integrity
  check][step: Ratings Step]: started [2016-04-13 13:30:05][INFO][mode:
  data][stage: integrity check][step: ConfigurablePrices step]: started
  [2016-04-13 13:30:05][INFO][mode: data][stage: integrity check][step:
  OrderGrids Step]: started [2016-04-13 13:30:05][INFO][mode:
  data][stage: integrity check][step: Tier Price Step]: started
  [2016-04-13 13:30:05][INFO][mode: data][stage: integrity check][step:
  SalesIncrement Step]: started [2016-04-13 13:30:05][INFO][mode:
  data][stage: setup triggers][step: Stage]: started [2016-04-13
  13:30:05][INFO][mode: data][stage: data migration][step: EAV Step]:
  started [2016-04-13 13:30:05][INFO][mode: data][stage: volume
  check][step: EAV Step]: started [2016-04-13 13:30:05][INFO][mode:
  data][stage: data migration][step: Customer Attributes Step]: started
  0% [>---------------------------] Remaining Time:

Please anyone can help.


texts: use system config value to disable code from requirejs-config.js

texts:
I would like to create a configuration setting in my module's adminhtml/system.xml to disable it's features.

I know how I can system config values to disable code in LayoutXML or PHP but is it possible to use it to disable code in <Module_dir>/view/frontend/requirejs-config.js.

I want to be able to enable JavaScript mixins for a particular store view, I can achieve it by creating a theme and moving my module's requirejs-config.js into the theme, but I would prefer to keep all my logic within the Module directory.


texts: Magento 2 Migration Tool - connection timed out

texts:
I followed all steps to establish a connection for migration magento 1 to magento 2. When trying to migrate it gives the following error:

  [Zend_Db_Adapter_Exception]   SQLSTATE[HY000] [2002] Connection timed
  out

  [PDOException]   SQLSTATE[HY000] [2002] Connection timed out

<source>
    <database host="mysqlmaster.d1.hypernode.io" name="doux" user="app" password="pwwww"/>
</source>
<destination>
    <database host="mysqlmaster.d2.hypernode.io" name="magento2" user="app" password="pwwww"/>
</destination>

thanks


texts: Magento 2 : How to install Porto theme using command prompt in Localhost?

texts: How to install theme in magento2  using command prompt ?


texts: How can I use the Product SOAP API when images have absolute URLs on a CDN?

texts:
I am working with a handful of stores which need to operate on the same catalog. Some stores can be implemented with as additional websites in the primary store's Magento installation, but others require their own servers and database instance.

The stores which require their own database must keep various data in sync for each product SKU. Additionally some of these stores are Magento version 1.6, some 1.7 and some 1.9.

So I set out to accomplish this with the SOAP API (version 1) and have had decent success until working with image media.

All images are hosted on a CDN account and need to reflect this when a database is synchronized with the master. It seems there is no way to set an absoute image URL with the Core SOAP API.

How can I accomplish this while cooperating with the SOAP API and maintain compatibility with Magento versions 1.6 - 1.9 ? I am not able to change any core files, but I can include the framework into my scripts and go from there.


texts: How to edit custom customer group attribute (column) in Magento 2?

texts:
Bonjour !

I try to edit some custom customer group fields in my Magento 2.3 but I don't know how to start.

I already have added some columns and displayed it in admin back-office with a module.

view/adminhtml/ui_component/customer_group_listing.xml

<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <columns name="customer_group_columns">
        <column name="siret">
            <settings>
                <filter>text</filter>
                SIRET
            </settings>
        </column>
        <column name="code_client">
            <settings>
                <filter>text</filter>
                Code client
            </settings>
        </column>
        <column name="zipcode">
            <settings>
                <filter>text</filter>
                Code postal
            </settings>
        </column>
    </columns>
</listing>

But now I want on the update form to have the capability to modify this fields (siret, code_client, zipcode)

For exemple, here I only have 2 fields but I want to add for example the zipcode in the form.

Thanks ;)


texts: Function call returning fatal error: Call to undefined function getRecentProducts()

texts:
Hi I am a newbie to magento. I'm trying to call a custom module block using getChildHtml() function which unfortunately is showing a fatal error: Call to undefined function getRecentProducts()

I am using magento 1.9.2.4

I have set up a child theme (childtheme) under magento default rwd theme.

I have copied page.xml from the default theme of rwd package.

I have also created a new layout file (home.phtml) and I am trying to get the block in this file.

I created a new block in active themes page.xml under <default> tag:

<block type="core/text_list" name="newreference" as="newreference"/>

Then in active themes local.xml:

<default>
    <reference name="newreference">
        <block type="recentproducts/recentproducts" name="recentproducts_recentproducts" template="recentproducts/recentproducts.phtml"></block>
    </reference>
</default>

And in my home.phtml file calling: getChildHtml('newreference');

The config file of module:

<?xml version="1.0"?>
<config>
  <modules>
    <Test_Recentproducts>
      <version>1.0</version>
    </Test_Recentproducts>
  </modules>
  <global>
    <blocks>
      <recentproducts>
        <class>Test_Recentproducts_Block</class>
      </recentproducts>
    </blocks>
    <models>
      <recentproducts>
        <class>Test_Recentproducts_Model</class>
      </recentproducts>
    </models>
  </global>
</config>

recentproducts.phtml

<?php
$products = $this->getRecentProducts();
?>

Recent Products

  <?php if (is_array($products) && count($products)) { ?>
    <?php foreach($products as $product) { ?>

        <a href="<?php echo $product['url'] ?>"><?php echo $product['name'] ?>

    <?php } ?>
  <?php } ?>

Recentproducts.php (block)

class Test_Recentproducts_Block_Recentproducts extends Mage_Core_Block_Template {
  public function getRecentProducts() {
    // call model to fetch data
    $arr_products = array();
    $products = Mage::getModel("recentproducts/recentproducts")->getRecentProducts();

    foreach ($products as $product) {
      $arr_products[] = array(
        'id' => $product->getId(),
        'name' => $product->getName(),
        'url' => $product->getProductUrl()
      );
    }

    return $arr_products;
  }
}

Recentproducts.php (model)

class Test_Recentproducts_Model_Recentproducts extends Mage_Core_Model_Abstract {
  public function getRecentProducts() {
    $products = Mage::getModel("catalog/product")
                ->getCollection()
                ->addAttributeToSelect('*')
                ->setOrder('entity_id', 'DESC')
                ->setPageSize(5);

    return $products;
  }
}

Any help would be highly appreciated.

Update:

I tried to get_class($this) and it is perfectly returning the right class which is Test_Recentproducts_Block_Recentproducts.

Its also returning getRecentProducts() as a class method.


texts: How do you set Allow Countries directly in the database, programmatically or using n98-magerun?

texts: I have a list of over 200 countries I need to allow for an EE 1.13 site. I'd prefer not to do this through the admin interface because it is tedious and I am error prone. Is it possible to set Allow Countries directly in the database, programmatically or using n98-magerun?


texts: Per page items not working in Magento 1.8.1

texts:
The "Per page" items dropdown in my magento website is not working at all. The default value is set to 12 items (list includes 12,24,36) , but loads all products by default. When i select 24, the page loads to the following url

'/accessories?limit=24'

but still loads all the products and no pagination appears. Could someone please point me in the right direction to fix this problem!

EDIT

The "Sort by" field is working. Only the Items per page is not.


texts:
In Magento2, how do we print the input data into notification messages for
- Error
- Success
- Warning
- Notice


texts: Changing The Order Price "Inc. Tax" and "Excl. Tax" is displayed

texts:
I am trying to change the way prices are displayed on the product page and category pages.

If

  Configuration -> Sales -> Tax -> Price Display Settings -> Display
  Product Prices In Catalog ---> "Including and Excluding Tax"

Magento by default display prices

$66

Excl. Tax: $60

I would like to display prices as

$60 Excl. Tax

$66 Inc. Tax

I have moved default.phtml to my child theme

  /app/design/frontend/mytheme/mytheme/Magento_Catalog/templates/product/price/amount/default.phtml

But now I have no idea what needs to be done.

<span class="price-container <?php /* @escapeNotVerified */ echo $block->getAdjustmentCssClasses() ?>"
    <?php echo $block->getSchema() ? ' itemprop="offers" itemscope itemtype="http://schema.org/Offer"' : '' ?>>
<?php if ($block->getDisplayLabel()): ?>
    <?php /* @escapeNotVerified */ echo $block->getDisplayLabel(); ?>
<?php endif; ?>
<span <?php if ($block->getPriceId() && $id!=''): ?> id="<?php echo $id ?><?php /* @escapeNotVerified */ echo $block->getPriceId() ?>"<?php endif;?>
    <?php echo($block->getPriceDisplayLabel()) ? 'data-label="' . $block->getPriceDisplayLabel() . $block->getPriceDisplayInclExclTaxes() . '"' : '' ?>
    data-price-amount="<?php /* @escapeNotVerified */ echo $block->getDisplayValue(); ?>"
    data-price-type="<?php /* @escapeNotVerified */ echo $block->getPriceType(); ?>"
    class="price-wrapper <?php /* @escapeNotVerified */ echo $block->getPriceWrapperCss(); ?>"
    <?php echo $block->getSchema() ? ' itemprop="price"' : '' ?>>
    <?php /* @escapeNotVerified */ echo $block->formatCurrency($block->getDisplayValue(), (bool)$block->getIncludeContainer()) ?>


texts: Ive done alot of reading that mounting var/sessions and var/cache to ram will give a performance boost. However would this still be beneficial if I am using SSD?


texts: Set Variable to Session in Plugin. Magento2

texts:
is there a way to Set a Session Variable in my Plugin?

If I do something like this:

private $checkoutSession;

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

I become this Error: Type Error occurred when creating object

can someone help me?

thank you in advance.


texts: Magento Products and Categories in the same page

texts:
I'm fairly new to magento, and i've been looking for this solution for a while...
Is it possible to show categories(ex : subcategories) and products on the same page ?
I didn't seem to find anything on stack and magento docs !
Thanks in advance !


texts:
How indexing works in Magento
What exactly it does?
Why it is required?


texts:
I'd like to add a custom attribute to listing products toolbar.
This is a dropdown attribute, that looks like this:

Available today
Available in 1-5 days
Available in 5-10 days

I have set "Used for Sorting in Product Listing" to "Yes" in attribute's configuration. As a result, products are sorted by the attributes text. But that's not correct.

I'd like to somehow ovveride the sorting function, and force it to sort this particular attribute by the attribute value ids, not the attribute value labels:

Available today (value id = 842)
Available in 1-5 days (value id = 843)
Available in 5-10 days (value id = 844)

Is that possible? Any ideas or guidelines?

What is the function that I could change to do this?


texts:
I have configurable products in my product catalog that i would like to assign a rule to the quanity in stock.

for example

if i sell sku 2005, inventory needs to remove 1 from sku abc and 1 from sku abcd
if i sell sku 2006 inventory needs to remove 1 from sku abc and 2 from sku abcd etc etc

if i sell sku 2007 inventory needs to remove 1 from sku ade 2 from sku adef and 3 from sku from adefg

Can anyone shed some light on programming this?


texts: Magento 1.9 - Order copy email not send, order update is OK

texts:
Using magento 1.9 and when I use the send order email copy method BCC it does not send the order email to the bcc adres, the customer does get the email.

When I do the same for order update it works fine.

I am not using the email queue, that's disabled with aschroder smtp.


texts: What is the use of Test/Unit folder in module ? What is the purpose?

texts:
In magento 2, I see in so many modules that there are Test/Unit folder available. I know little bit about that it used for unit test purpose.

But, I want to know that :

What is the purpose of this folder?
Advantage / Disadvantage
Actual use

Can any one eloborate in details with example ?

except this links :

https://www.magestore.com/magento-2-tutorial/magento-2-checkout-customization/
https://inchoo.net/magento-2/unit-testing-magento-2/


texts: Override value of magento order grid column

texts:
I want to show only first name in bill to and ship to magento order grid.

app/code/local/Mage/Sales/Model/Resource/Order.php

/**
     * Init virtual grid records for entity
     *
     * @return Mage_Sales_Model_Resource_Order
     */
    protected function _initVirtualGridColumns()
    {
        parent::_initVirtualGridColumns();
        $adapter       = $this->getReadConnection();
        $ifnullFirst   = $adapter->getIfNullSql('{{table}}.firstname', $adapter->quote(''));
        $ifnullMiddle  = $adapter->getIfNullSql('{{table}}.middlename', $adapter->quote(''));
        $ifnullLast    = $adapter->getIfNullSql('{{table}}.lastname', $adapter->quote(''));
        $concatAddress = $adapter->getConcatSql(array(
            $ifnullFirst,
            $adapter->quote(' '),
            $ifnullMiddle,
            $adapter->quote(' '),
            $ifnullLast
        ));
        $this->addVirtualGridColumn(
                'billing_name',
                'sales/order_address',
                array('billing_address_id' => 'entity_id'),
                $concatAddress
            )
            ->addVirtualGridColumn(
                'shipping_name',
                'sales/order_address',
                 array('shipping_address_id' => 'entity_id'),
                 $concatAddress
            );

        return $this;
    }

I tried with this function but no change.


texts: Persistent Cart for Guest Customers in Magento 1x

texts:
Is there any option to save cart data in cookies (persistent cart) for guest customers?

I need to save it for 1 year.

For registered customers, I'm able to enable it from System > Customers > Persistent Shopping Cart.


texts: Page cache issue, my plugin only works after the first page load

texts:
I have created a module that autoselects a currency based on the user's country using a plugin for Magento\Store\Model\Store::getDefaultCurrencyCode() .

On the first page load it will show the default website's currency, then on the second page load the currency will have been applied. If I disable full page cache then the correct currency will be selected on the first page load.

I guess that I need another plugin to update the page cache but I'm not sure what needs editing.

Here's the really simplified version of my plugin class:

<?php

namespace <vendor>\<module>\Plugin\Store\Model;

use Magento\Framework\UrlInterface;
use Magento\Framework\App\ObjectManager;

class Store
{
    protected $default_currency;

    public function aroundGetDefaultCurrencyCode(\Magento\Store\Model\Store $subject, callable $proceed)
    {
        $helper = ObjectManager::getInstance()->get('<vendor>\<module>\Helper\Data');
        $this->default_currency = $proceed();

        if ($helper->isEnabled())
            $this->getCurrencyCodeByIp($this->default_currency);

        return $this->default_currency;
    }

Here's my frontend/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">
    <type name="Magento\Store\Model\Store">
        <plugin name="AutoCurrency_Switcher" type="<vendor>\<module>\Plugin\Store\Model\Store" sortOrder="0" />
    </type>
</config>


texts: Magento 2.1.0 on Ubuntu 16.04 not running on PHP 7.0.4

texts:
I just tried to run Magento-CE-2.1.0. I use Ubuntu 16.04 and the php version is 7.0.4-7ubuntu2.
But I got this error when I wanted to run Magento:

  'Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read
  Magento System Requirements.'

What should I do? Can't I run Magento on ubuntu 16?


texts: Displaying new products with paging enabled

texts: I am struggling with a situation for last 2 days that i want to display the new products using pagination and all sorting and per page option enabled on the template i saw that there is no code for under core Block/New.php for such kind of functionality any one have solved this before please help to sort it out.


texts: Difference between base_price and base_original_price

texts:
What is the difference between base_price and base_original_price in Sales Orders object?

In which cases both these values differ?

I have noticed a difference between these values in two instances -

1) When there is a gift card added to the order

2) When "custom price" was used while creating the order

However, I'm not sure of the exact scenario.

Any help would be really appreciated


texts: Magento 2 form validation: minimum/maximum length

texts:
I'm trying to add some of the predefined validation to a form element but currently am failing. As fas as I can tell, all the validation rules can be added via classes, but no where does it say how to set paramaters for some of the rules. IE: max length.

Here's what I currently have that is not working (I've stripped out some of the non-pertinent attributes. I'm trying to set a minimum of 7 characters on the input.

<input name="telephone" id="telephone" data-validate="{required:true}" class="validate-length minimum-length-7 maximum-length-20 input-text" type="text" />

Thanks for your help


texts:
I am trying to migrate data from Magento 1.7 to Magento 2.2. We have several custom tables and we tried by using some of the tools available in the market, which are free.

However, The team came to the conclusion that we will write some script to migrate data instead of using a plugin/extention. (because we found that some of the attributes or data is not migrating properly, and we dont want to reply on such things blindly.)

What will be steps to migrate data using a custom written script? What things should we consider before writting the script? Please share your views.


texts: Please tell me why we use requirejs and require-configjs files and purpose of these two files on magento 2.Complete Details if Possible.


texts: How can I get Magento 2x admin path url in custom extension controller

texts:
Is this possible to get admin path url in custom module controller? How can I get for Magento 2x? there I don't have default admin in path.

<?php
/**
 * Copyright © 2015 Technologymindz. All rights reserved.
 */

namespace Technologymindz\Instagramfeed\Controller\Adminhtml\Insta;
use Magento\Framework\Controller\ResultFactory;

class Auth extends \Technologymindz\Instagramfeed\Controller\Adminhtml\Insta
{
   public function __construct(
        //other stuff you need here
        \Magento\Framework\App\DeploymentConfig\Reader $configReader
    ) {
        $this->configReader = $configReader;
        //other stuff you need here, like parent::__construct($context, $data);
    }
    /**
     * Items list.
     *
     * @return \Magento\Backend\Model\View\Result\Page
     */
    public function execute()
    {

                $config = $this->configReader->load();
                $adminSuffix = $config['backend']['frontName'];
        echo   $adminUrl = $this->_storeManager->getStore()->getBaseUrl() . $adminSuffix;
        die;

    }
}


texts: Magento Global Messages not displaying site wide

texts:
I have noticed that my site appears to no longer display any sort of global messages anymore.

I first noticed that there was no message being displayed if i entered the wrong password when logging in, but then realised that none of the messages are displaying anywhere.

As far as i can tell my templates haven't changed and still include the following line which is what is supposed to display the message

<?php echo $this->getMessagesBlock()->toHtml() ?>

Sample login page: http://www.diegocordero.com.au/magento/customer/account/login/

Thanks


texts: Pagination Not Showing on Category Pages - Magento 1

texts:
For some reason, Pagination is not showing on all of our category pages.

I've looked at other question on here and from what I've learned you need the page/html_pager block within catalog.xml for the category.

In this file we have a few instances of  and they all have this page/html_pager block.

Any ideas why the pagination is not showing?


texts: Magento2: css file modification does not apply

texts:
I am using Magento 2.2.4 and I need to design my website with the size of 70%. I am trying to override the css by a theme /custom_theme/web/css/style.css file as follows. But it didn't work. How to resolve this?

`.page-wrapper{width:70%}`


texts: How to hide or show div based on Magento Category or based on URL

texts:
I'm trying to get a div to show on a specific Magento webpage and hide on others. Specifically on the top Category level.

If someone can show me a code to do this which can be based off the Category ID or the website's URL, it would be perfect.

Within the div will be a basic button navigation which will take the user to another page.

The current code is currently in the 2columns-left.phtml, and as you can see there are buttons called: Wheels - Hubs - Rims - Spokes - Nipple Sets - Brake Discs.

This would be fine if all the categories had this option but they do not, so I need to make specific buttons for each top level category: Motocross-Enduro, Supermoto, Speedway, Road, Classic and Clearance.

http://smprowheels.ortigaprototypes.co.uk/motocross-enduro.html

So if anyone can help me in finding out a way to hide divs based on the magento category or url I'd appreciate it.


texts:
delivery slots will be:

11am - 1pm
3 -5 pm
5 – 7 pm
7-9pm
9-10:30 pm

User can choose any delivery slots for today and tomorrow .
Only those time slots will be available to choose which will have 3 hours difference in the later time and the time of placing the order
For eg. - If a person places an order at 4: 30 pm . then for today he can choose slots
7-9 , 9-10.30 only and all slots for tomorrow. He cannot choose slot 5-7 pm as the later time is 7 and the difference is 2.5 hours


texts: Elasticsearch single letter synonyms magento 2

texts:
i am trying to map the numbers between arabic-indic and arabic to allow showing same results regardless of the language the numbers written in , this issue specially happen to arabic users which they have a keyboard which switch the numbering also when switching language.
the arabic numbers can be found here :

What i done :
i did create synonyms from Magento>>Marketing>>Search Synonyms , i create one group for each number digit , for example i created one for the number 1 like this : 1,١
What happen
it did not actually work as i expected , searching for ١١١١ does not show same results as 1111


texts: Magento 2 override shipping estimate controller form

texts:
I want to override controller which is called when we estimate shipping and tax.

and controller ajax url is:

http://10.10.10.88/postnetship/rest/default/V1/guest-carts/92617c8345b9702c2928cde0cef5ff76/estimate-shipping-methods

How  I can add my custom code to estimate shipping cost.


texts: URL rewriting messing with facebook likes and tweets count

texts:
I have added the Google +1, Facebook like and Twitter buttons to the products page.

The problem is when 2 or more products are created with the same name, magento creates the url-key from the name while appending its id.
Now each time the Catalog URL Rewrites index is run the url-key changes and instead of appending the id, it appends id + 1, and if that URL already exists, it appends id + 1 + 1 etc... And each time it increments.

So, since the URL changed, and even though a 301 Redirect was created, Facebook wouldn't merge the like count, nor does twitter. Is there a settings somewhere, to stop Magento from keep changing the product URL on each Rewrite? Or is there nothing I can do about this?


texts:
On catalog page, I want to display custom attribute (code=inhoud2) near each product. I have tried to fetch it in different ways,
it works with other attributes with plain text fields but for attributes by which a value has to be chosen in the backend from a Dropbox
it will return a number instead of the chosen option.

Can anyone help me with this?
(Option "Used in Product Listing" and show on front end is set to Yes for this attribute).

methods I have used so far in the list.phtml are:

returns nothing

<?php echo $_helper->productAttribute($_product, $_product->getInhoud2(), 'inhoud2') ?>

returns numeric value

<?php echo $_product->getData('inhoud2'); ?>

returns numeric value

<?php echo $_product->getData('inhoud2'); ?>


texts:
I want to get date format

<?php $DeliverBy = $_product->getData('productlength'); ?>
<?php $i=$DeliverBy;
echo  date("d-m-Y",mktime(0,0,0,date('m'),date('d')+$i,date('Y')));?>

In this i add current date + same date based on attribute
productlength is a textbox attribute it have some number. So the out put is current date + productlength

it's working fine. It display
12.12.2015

But I want to **12. Dec.2015**


texts: Chrome and SSL: problem with login and cart

texts:
I have a domain with SSL and some problems ONLY with Google Chrome (v. 39.0.2171.95 m).

When a user tries to login with SSL (https: //www.mydomain.com/customer/account/login/), he returns to the login page (the same) and it doesn't go on... Come back always!

If a user tries to log in within the cart (because he is registered) after he added an item, it works fine (login) and all his items are in the cart (http:// www.mydomain.com/checkout/cart/). BUT when he clicks on Continue to checkout button, he returns on the cart page with his items (the same: http: //www.mydomain.com/checkout/cart/); if he clicks the 2th time on  Continue to checkout button, the cart becomes empty!!!

I have no problem with the Admin login and SSL (https:// www.mydomain.com/admin): it works fine.

If I change the base URL SECURE from https to http, it works!
All that only with Chrome..

This is my configuration on Magento:

Magento: v. 1.9.1.0.
Theme: Milano themeforest.net
One page checkout
Base URL unsecure: http: //www.mydomain.com
Base URL secure: https: //www.mydomain.com
use secure urls in frontend: yes
use secure urls in admin: yes
cookie filetime: 864001
cookie path: //
cookie domain: //
Use HTTP ony: no
Cookie Restriction mod: no
redirect to CMS-page if cookies are disabled: no

I tried also to remove cookie params with this code

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);

or this similar code:

session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
/*
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
*/
);

but it doesn't work :(


texts: Order Problem - Products lost from the invoice - Magento 2.3.1

texts:
For the payment methods I am using the Mollie extension. A customer has placed an order, and has paid for it correctly. But, the information that I can see in the order view is the following:

As you can see, Magento says that the client has paid everything except € 5.42 (but this is not true because I received the total money).

And also Magento does not include one of my products in the invoice. You can see in the following picture how Magento includes a product in the invoice but not the last one.

In addition, I can not change the status of the order. If I try to issue an invoice, I receive the following error:

Any idea why this happens and how to solve it? I have 5 orders like this, with products that do not appear on the invoice and Magento says they must be paid (but I received the full amount of the order)


texts: Magento Admin Issue: "admin/url/custom" missing from "core_config_data"

texts:
I stupidly applied a custom admin url within the Admin Panel. I know I know, I am suppose to do it in the local.xml but it kicked up an error.

I have attempted to remove the instance from database but I can't find the "admin/url/custom" row in "core_config_data". I've cleared my browser cache, I've deleted the "var/cache" and "var/session" folder and still no luck.

I've tried similar solutions to questions regarding getting a 404, but since the row doesn't exist I am unable to change it.

It boggles where the website is getting the custom url from. I tried searching the database but unable to find it anywhere.

When I remove the "custom" part of the admin url I can get logged in, but all the styling has disappeared. I tried removing the url from the Admin Panel in it's current state but it won't save my option.

Any advice appreciated.

I am using Magento 1.9.2.4.

Many thanks,
Lisa


texts: Inlcude in email template bank details when user choose "Bank transfer" payment method

texts:
In my store there are two payment methods enabled. One of these is the "Bank Transfer". I would like to be able to add the bank details in the "New order email template" only when the customer has choosen the "Bank Transfer" payment method.

Is there a way to check this information inside the template with something like

{{if payment == 'banktransfer'}}
 Bank Details
....
....
{{endif}}

or is there a way to use multiple template based on the payment method specified by the customer?


texts: Magento 1.9 pagination not working properly

texts:
I am working on Magento 1.9 and facing some Issue with the pagination on search page.
I have Selected "16" in products per page but it is Showing random number of products on pages.
same issue with list and grid view in all possible value options.
I have already tried re-indexing, cache flush.

Guide me to fix this issue.


texts:
My error/success messages in Magento has latency, means it appears when I go to the next page. i.e, When I add a product to cart, instead of showing a success notification message on the refresh of the page, it shows nothing and it appears when I browse to any other page next, then I see
Your product has been added to cart message.
Sometimes this happens all over the page and sometimes not. Random behavior

How to fix that, and move the notification message to the top instead of the bottom for all pages?

Something like this below header. It should for all pages, so instead of writing to <move> container in respective XML, I want to move it at the top for all pages.


texts: Magento 2.1 - Add category selector field in backend custom model form

texts:
I'm creating my custom model form on a backend module. I need to allow the admins to select one category for my model, so I wanted to use the Magento standard category selector, like this example :

How can I do ?

FYI, I'm using form fieldset to add fields, like this example:

$fieldset->addField(
        'field_name',
        'text',
        [
            'name' => 'field_name',
            'label' => __('Field Label'),
            'title' => __('Field Title'),
            'required' => false
        ]
    );

There are similar questions, but none of them has a valid answer for the moment.


texts:
I have a system when customer can create their own products. I added a custom attribute to the products called creator_id to save the id of the customer who created it.
Everything is working perfectly but now I want to retrieve all the products created by the customer. What SQL query can I use to retrieve that information.
I would need to check if the customer id = creator_id


texts: working with cachekeys Enterprise Edition 1.9

texts:
So I want to make sure magentos FPC doesn't mess things up in my header.  Based upon some logic I will load one of two sections.  Here is my thinking thus far:

On view: create key(1) or create key(2)

On subsequent views: access key(1) or key(2)

How do I fill these caches with my content?  I only need two different versions of the section -- it is not really dynamic.


texts: Enable the case sensitive to compile my Magento 2 module

texts:
I am running my Magento 2 in Ubuntu, can you guys please let me know to test/compile my custom module with case sensitive?
Where I can enable the case sensitivity? to check/compile custom module.


texts: how to set no-cache HTTP headers in controller in magento 2

texts:
I have read in Magento 2 Dev Docs for Public content  we can set no-cache HTTP headers for Controllers that don’t use layouts(last line in page).

  Controllers that don’t use layouts should set no-cache HTTP headers.

I have a controller which use data from session object and when we enable FPC it doesn't work.

So I'm thinking to set no-cache HTTP headers for that controller may get data from the session object.

Let me know if I'm wrong somewhere.

Thanks


texts: Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead

texts: I created login form. but I got this error. how can I solve this error.


texts: how to restrict category creation more than certain number in magento

texts:
My need is :

If I set category limit is 50.
when I try to create a 51-th category that will not be created
How I do this in magento.

and also,

how to I set limit for products like above.

any easy way available for this.


texts: Magento The requested URL /admin was not found on this server. Error

texts:
I have installed fresh Magento setup version 1.7. Now I want to access magento admin dashboard it is showing following error in browser.

Not Found

The requested URL /admin was not found on this server.
Apache/2.2.22 (Ubuntu) Server at localmagento17.com Port 80

I have check magento database table core_config_data but there is no entry for admin/url rows.

I have changed nothing in database or anywhere, Admin dashboad was used to access before for same installation.

If I need to add entires in database please let me know values for that.

Thanks


texts: How pass apple payload to payfort in magento2

texts:
how pass apple payload to payfort in magento2 this is my code for apple pay

$validationUrl="https://apple-pay-gateway-nc-pod5.apple.com/paymentservices/startSession";
$pemPwd = getenv("aalogics123");
$domainName = getenv("Jumla-sa.com");
$merchantId = getenv("merchant.test.applepay");
// JSON Payload
$validationPayload = '{"merchantIdentifier": "merchant.aalogics.applepay","domainName": "stage-uk.thetelecomshop.com","displayName":"AppleewrqwerqwePayDemoTestDev15"}';
try{    //setting the curl parameters.
        $ch = curl_init();
        if (FALSE === $ch)
            throw new Exception('failed to initialize');
        curl_setopt($ch, CURLOPT_URL, $validationUrl);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);

    curl_setopt($ch, CURLOPT_SSLCERT, '/var/www/certs/applepay.crt.pem');

    curl_setopt($ch, CURLOPT_SSLKEY,'/var/www/certs/apple.key.pem');
    curl_setopt($ch, CURLOPT_SSLCERTPASSWD, "test123");
    curl_setopt($ch, CURLOPT_POST, 1);

    curl_setopt($ch, CURLOPT_POSTFIELDS, $validationPayload);
    $content = curl_exec($ch);
    if (FALSE === $content)
    {
        print_r(curl_error($ch));
        throw new Exception(curl_error($ch), curl_errno($ch));
    }
    curl_close($ch);
    print_r($content);
    // $content is the Apple Response, it should be a merchant session object
    // but may need to do some manipulation here

}catch(Exception $e) {
    trigger_error(sprintf('Curl failed with error #%d: %s', $e->getCode(), $e->getMessage()), E_USER_ERROR);
}


texts: Magento 1.9 event observer to add script on next page load

texts:
I'm trying to add a script after the customer created a account.

So far I can target the event. But after the event is fired I can't seem to add the script to the next page load. Can someone point me in the right direction?

Cool > Marketing > etc > config.xml

<config>
<modules>
    <cool_marketing>
        <version>1.0.0</version>
    </cool_marketing>
</modules>
<frontend>
    <events>
        <controller_action_postdispatch_customer_account_createpost>
            <observers>
                <cool_marketing_create_account>
                    <class>cool_marketing_model_observer</class>
                    <method>createAccount</method>
                    <type>singleton</type>
                </cool_marketing_create_account>
            </observers>
        </controller_action_postdispatch_customer_account_createpost>
        <checkout_submit_all_after>
            <observers>
                <cool_marketing_checkout_create_account>
                    <class>cool_marketing_model_observer</class>
                    <method>createAccountCheckout</method>
                    <type>singleton</type>
                </cool_marketing_checkout_create_account>
            </observers>
        </checkout_submit_all_after>
    </events>
</frontend>

Cool > Marketing > Model > Observer.php

<?php
class Cool_Marketing_Model_Observer
{

public function createAccount($observer) {
    $this->loadLayout();

    $block = $this->getLayout()->createBlock(
        'Mage_Core_Block_Template',
        'account_create_success',
        array('default' => 'cool/account_create_success.phtml')
    );

    $this->getLayout()->getBlock('content')->append($block);

    $this->renderLayout();
}


texts: How to set the default value of "Is Active" to "yes" on a new category

texts:
I'm trying to set the default value as "Yes" for the Is Active field on New Category. The default value is no, and the store owner gets annoyed when the category doesn't show on the frontend. I've tried using function $attribute->getDataSetDefault('default_value',1); on app\code\core\Mage\Adminhtml\Block\Catalog\Category\Tabs.php, but it didn't work.

The div content on design/adminhtml/default/default/catalog/category/edit/form.phtml is generated dinamically on Tabs.php, on this call:

$block = $this->getLayout()->createBlock($this->getAttributeTabBlock(), '')
            ->setGroup($group)
            ->setAttributes($attributes)
            ->setAddHiddenFields($active)
            ->toHtml();

I tried to debug, but after a while I had an overflow on debug memory, and it crashed. I'm still trying this.

I also tried to look at configuration files to find where the attribute is created to see if a default value is set, but I haven't find it yet.


texts:
Is any one have experience about Azure with magento.
How to install Magento with Azure and how to see all code file with Azure
I am new to Docker and Kubernetes and I want to install magento2 with docker images on Azure server.
Any One know about this how it will work.


texts:
I'm using the Magefan Blog extension https://magefan.com/magento2-blog-extension
It displays blog with the URL https://www.example.com/blog
How can I use a Blog as a separate domain like https://blog.example.com


texts: How to add autoincrement serial number in ui component admin grid?

texts:
I have created grid using ui component. I want to add column serial number.

I added primary key i.e item_id of table. But if record gets deleted then serial number does not work.

=> Ex : I deleted record 2 then serial number column will display no. 1,3,4,5...

Is there any element which define autoincrement in xml.

     <column name="item_id">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="sorting" xsi:type="string">asc</item>
                <item name="label" xsi:type="string" translate="true">Sr No</item>
            </item>
        </argument>
    </column>

I tried sql query i.e

 set @row_number=0;
 select (@row_number := @row_number +1) as num,name from feedback

How to implement in magento 2?

  echo "set @row_number=0; ";
  $this->getSelect()->joinLeft(
    ['secondTable' => $this->getTable('sales_order')],'main_table.feedback_id = secondTable.entity_id',['main_table.name','(@row_number := @row_number +1) as num']);


texts: Magento 2 console notice - Fallback to JQueryUI Compat activated

texts:
Using Magento 2.3.3 seeing the below notice in our browser console.

  Fallback to JQueryUI Compat activated.
       Your store is missing a dependency for a jQueryUI widget.
      Identifying and addressing the dependency will drastically improve the performance of your site.  Compat.js

Could anyone provide any guidance on where to start to debugging this issue

Thanks


texts: PHP Fatal error after layered navigation is activated

texts:
I would like to activate layered navigation in our multi-store magento 1.7.

As soon as I activate it in a category, the following exception appears in the error-log:

`Call to a member function setTemplate() on a non-object in /xxx/xxx/xxx/app/code/core/Mage/Catalog/Block/Product/Abstract.php on line 192, referer: http://5.175.9.22/bs_de/vaporizer/zubehor/arizer-extreme-q`

Doesn't matter if our custom template or the modern template.
The code exits at the point where the first price block would be displayed.
We didn't made any modification in app/code/core/Mage.

What is going wrong? Any help?


texts: Magento2 - Get the newly added custom form post data from checkout form

texts: I have a custom form in my checkout page in the area shippingAddress at before-form. I am using the event checkout_onepage_controller_success_action, but $this->_request->getPost(); does not give me any data. It returns an empty array. Can anyone suggest how data can be saved into a new table from checkout form.


texts: Magento 2 - Create partial Credit Memo programmatically

texts:
I can create Credit Memo for invoice as given in this link.

Can anyone please help me to create Credit Memo with partial products and not returning all the products in invoice.


texts: Get Attribute Value using Attribute Code in Magento2

texts:
I have Attribute Code. Am trying to fetch value but this code is not fetching attributes values that are in the decimal table!

$_product->getResource()->getAttribute($attributeCode)->getFrontend()->getValue($_product);

!


texts:
For the default quicksearch, am adding a dropdown before quicksearch with values as all the categories available(like all products, living room, bedroom, cellphones, accessories, digital cameras and rest).

Now whenever user selects one dropdown value and searches for a item, then if the item belongs to the selected dropdown value then it should result values.otherwise it should say "NO items found for this category"


texts: catalog_product.list get storeview product name

texts:
I'm using SOAP to update META-data for a specific storeview. Basically I have a localised string where I add the product name to the actual text. However, for some reason I get the default name and not the store specific name. I have added the storeview code NO (Norwegian) to the call.

$client = new SoapClient('https://www.MY_DOMAIN/api/soap/?wsdl');

$session = $client->login('MY_USER', 'MY_PASS');

$_product = $client->call($session, 'catalog_product.list', array(),'no');

foreach($_product AS $val){
    echo $val['name']; //Output default name and not storeview name
    $meta_title = 'Köp ' . $val['name'] . ' på minbutik.com ';
    //Update code to follow which work and update
}


texts: Magento 2 categories backend error: Call to a member function getId() on null in /var/www/src/vendor/magento/framework/Data/Tree/Dbp.php:380

texts:
When I try to open Catalog->Categories in the backend, I get the following error:

Fatal error: Uncaught Error: Call to a member function getId() on null in /var/www/src/vendor/magento/framework/Data/Tree/Dbp.php:380 Stack trace:
#0 /var/www/src/vendor/magento/module-catalog/Block/Adminhtml/Category/AbstractCategory.php(167): Magento\Framework\Data\Tree\Dbp->loadEnsuredNodes(Object(Magento\Catalog\Model\Category\Interceptor), NULL)
#1 /var/www/src/vendor/magento/module-catalog/Block/Adminhtml/Category/AbstractCategory.php(120): Magento\Catalog\Block\Adminhtml\Category\AbstractCategory->getRoot()
#2 /var/www/src/vendor/magento/module-catalog/Block/Adminhtml/Category/Edit/SaveButton.php(25): Magento\Catalog\Block\Adminhtml\Category\AbstractCategory->hasStoreRootCategory()
#3 /var/www/src/vendor/magento/framework/View/Element/UiComponent/Context.php(268): Magento\Catalog\Block\Adminhtml\Category\Edit\SaveButton->getButtonData()
#4 /var/www/src/vendor/magento/module-ui/Component/AbstractComponent.php(116): Magento\Framework\View\Element\UiComponent\Context->addButtons(Array, Object(Magento\Ui\Component\Form in /var/www/src/vendor/magento/framework/Data/Tree/Dbp.php on line 380

Debugging had the following results so far:

$rootNode in src/vendor/magento/framework/Data/Tree/Dbp.php:380 is null
$tree->getNodeById($rootId) in src/vendor/magento/module-catalog/Block/Adminhtml/Category/AbstractCategory.php:167 returns an empty tree ($rootId =1)

I found a similar problem for Magento 1: https://stackoverflow.com/questions/25527086/fatal-error-call-to-a-member-function-getid-on-a-non-object-in-c-wamp-www-ma

The database has current values:

INSERT INTO `catalog_category_entity` (`row_id`, `entity_id`, `created_in`, `updated_in`, `attribute_set_id`, `parent_id`, `created_at`, `updated_at`, `path`, `position`, `level`, `children_count`)
VALUES
(1, 1, 1, 2, 0, 0, '2017-11-04 12:26:53', '2019-05-06 11:27:09', '1', 0, 0, 1),
(2, 2, 1, 2, 3, 1, '2017-11-04 12:26:53', '2017-11-04 12:26:53', '1/2', 1, 1, 0);

INSERT INTO `catalog_category_entity_int` (`value_id`, `attribute_id`, `store_id`, `row_id`, `value`)
VALUES
(1, 69, 0, 1, 1),
(2, 46, 0, 2, 1),
(3, 69, 0, 2, 1);

INSERT INTO `catalog_category_entity_varchar` (`value_id`, `attribute_id`, `store_id`, `row_id`, `value`)
VALUES
(1, 45, 0, 1, 'Root Catalog'),
(2, 45, 0, 2, 'Default Category');

eav_attribute

45 = name
46 = is_active
69 = include_in_menu

Does anybody know how to fix this?


texts:
Can I have two header.links blocks in the same default.xml file? So that one appears in the header-wrapper and the other in the store.menu

What I'm trying to do is have the join/register links in the header on desktop, but for mobile have them in the dropdown menu.

Cheers


texts: How to change Wordpress URL when it's already in subdirectory of Magento 2?

texts:
We are building a site on Magento 2 EE . The site will be a multi-site and each site will have its own Wordpress. We integrated Wordpress using a plugin, it sits in the subdirectory of Magento 2.

We are using Wordpress for blog, support, about us - and other content, we're using native Magento features for PIM.

We were told that www.example.com/intl/ belongs to Magento, so we can't change that.

So our vendor offered to use www.example.com/wp/post123 but what we actually want is: www.example.com/support/testcontact or www.example.com/blog/blogpost1

Does anyone have a solution for this and is it possible to have a dynamic URL for Wordpress so it doesn't have to be hardcoded? We're running on NginX.


texts: Catalog Price Rule in Percentage in group Product

texts: i want to add percentage in magneto2 catalog rule on list page show price i want to show percentage.


texts: Responsive a static block - Magento 1.9.2

texts:
I was able to create full width sliders on a single page using custom css added to the design tab for the page:

<reference name="head">
    <action method="addItem"><type>skin_css</type>
    <name>css/fullwidth.css</name><params/></action>
</reference>

However, static blocks added to that page ignore this and are not responsive. Anybody have any ideas on this?

  https://www.staging.jewelsbygrace.com


texts: How to Get Attributes options QTY in Magento 2

texts:
How to get Get Attributes specific options QTY in Magento 2.
Please Suggest me.
THANKS.


texts: Magento Patch: 9767 after install admin show Invalid Form Key

texts:
I install the security patch: 9767 on Magento version 1.9.3.0

after that, all forms like admin login form, customer login form, cart etc
all are working stop as well as admin show me error like Invalid Form Key. Please refresh the page.

I also revert the patch file manually one by one, but still, I face the issue
please help if you know the way.


texts:
I not understand how adding attributes programmatically to configurations like Color or Merchant.

Please, help me.


texts: Magento 2: How to get the current product in Observer?

texts:
Magento version: 2.0.2

ProductObserver.php

<?php
namespace Demo\Product\Observer;

use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class ProductObserver implements ObserverInterface
{
    public function execute(Observer $observer)
    {
        /* @var $product \Magento\Catalog\Model\Product */
        $product = $observer->getEvent()->getProduct();
        if(!$product) {
            $product = 888;
        }
        $data = array(
            'product' => $product,
            'value' => 333
        );
        $myfile = fopen("/file_path/Observer.txt", "w");
        fwrite($myfile, print_r($data, true));
        fclose($myfile);
    }
}

events.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="catalog_product_save_after">
        <observer name="owner_product_observer" instance="DianziBuy\Product\Observer\OwnerProductObserver" />
    </event>
</config>

This is my custom observer code & events setting above. when i click the save button of product, there is no product data is written into file and got a blank page.
So, what's wrong my code?


texts:
For some reason our site is not being indexed.  I am trying to step through all the things that might be causing this. Any help or pointers would be greatly appreciated.

I created 4 properties in Google Search Console for the 4 ways of accessing the site (https://www , http://www, https://, http:// ).  I also created a  set holding these 4.

The sitemap that I generated has the URLs as https://.  From this property I test one of the site maps and get 5599 warnings.  Issue “ URL blocked by robots.txt” -  Sitemap contains urls which are blocked by robots.txt.
I checked the robots.txt and I don’t see anything that should restrict it. If I test these URLs in the “Robots.txt Tester”  they are allowed.
I go into the “Fetch as Google”  and enter one of the examples.  I get “Complete” so it seems that it is OK.  A couple of times I did get “Temporarily unreachable” .
If I enter some of the products in the site map I always get “Temporarily unreachable”. Again, in the “Robots.txt Tester” they are allowed. I checked the URLS in a browser and they are OK.

This is a Magento 2.1.4 site.  We will be updating Magento soon but I don’t think that this is a Magento bug, but rather something that I am doing wrong.  Any help is greatly appreciated.


texts: Magento started displaying Fatal Error: getSummaryHtml() on non-object during product lookups and category listings

texts:
I was about to roll out a new module, and I started getting this error on the front end.  Products will not display.  They show the product name, then the page rendering fails and the error message appears:

  Fatal error: Call to a member function getSummaryHtml() on a non-object in /usr/local/apache2/htdocs/app/code/core/Mage/Catalog/Block/Product/Abstract.php on line 314

This function in the Magento Core library is as follows:

 public function getReviewsSummaryHtml(Mage_Catalog_Model_Product $product, $templateType = false,
    $displayIfNoReviews = false)
{
    if ($this->_initReviewsHelperBlock()) {
        return $this->_reviewsHelperBlock->getSummaryHtml($product, $templateType, $displayIfNoReviews);
    }

    return '';
}

Line 314 is the ' return $this->... ' statement.

If I comment out this line, the site appears to run fine.

My scripts perform product price and other attribute updates.  It also adds products if they are not found in the database.  My concern is that my import script isn't updating part of the product model correctly, and creating this error.

My module is built in /app/code/local, and deals exclusively with the backend.  I dropped the entire database and restored it to a known-to-be-solid version.  Therefore, I believe I may have accidentally deleted a file or in some way changed Magento's core functionality.  This is on the dev server.  On the live server, the same database runs just fine.

Everything was fine, the only recent files that I removed were in my custom module's specific design and code directories.

I have cleared the caches, reindexed everything, dropped the database and restored a known working version, the only thing left seems to be the codebase is somehow changed.

I am about to roll out my admin module, but I do not want to do that until I know what is wrong here.  Commenting out a line of Magento Core code on my live server seems like a hack fix.


texts: Magento2.3 - How to remove index.php from dynamic URL?

texts:
Magento 2.3.1 fresh install with sample data module.

In admin side

"Use Web Server Rewrite" : Yes
.htaccess is generated by default
rewrite mod is enable
server using php7.2 and apache2.4.38

virtual domain: http://magento2.local

http://magento2.local/index.php/category/product/view/id/260 - worked
http://magento2.local/category/product/view/id/260 - 404 not found

Virtual file.

<Directory />
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    Require all granted
</Directory>

I guess it was due to my Apache setup, but I cannot find where.
Any helps :(

Thanks in advance..!


texts:
For this problem We used this github code , now feature is working fine. but instead of stars, its displaying square boxes if we click inside textfield as here :

you can check here after clicking Add Review Tab.

git hub code

SrkaReviewStars = Class.create();
SrkaReviewStars.prototype = {
    initialize: function(reviewTableId){
        var _this = this;
        _this.ratingTable = $(reviewTableId);
        _this.ratings = {};
        _this.html = '';

        this.ratingTable.hide();
        this.ratingTable.select('tbody > tr').each(function(row, row_count){
            var ratingCode = row.select('.radio')[0].readAttribute('name');
            var ratingLabel = row.select('th')[0].innerHTML;
            var ratingOptions = [];
            row.select('.radio').each(function(radio){
                ratingOptions.push(radio.value);
            });

            _this.ratings[ratingCode] = {
                code: ratingCode,
                label: ratingLabel,
                options: ratingOptions
            };
        });


texts: Delay with event listeners through jQuery requirejs

texts:
Sometimes my event listeners work and the elements trigger the events, other times they do not. I believe it is due to a delay. However chrome states the page is fully loaded by the time. I'm clicking on elements. It is a matter of seconds, not milliseconds.

require(['jquery'],function($){
   $(window).load(function() {
       // Added event listeners here.
   });
});

Has anyone else encountered this?


texts: After shipping address is saved in checkout redirect customer to another url if shipping country is

texts:
After shipping adress is saved in checkout, redirect customer to another url if shipping country is for example US where could I do it?
I would use

if($this->getQuote()->getShippingAddress()->getCountry() =='US'){
redirect...
}

How could I do it ? thank you


texts:
I am trying to get a tab section done in default theme on a product page, which should display related products, upsell products and cross sell products.

Related and upsell is already working, but how do I add cross sell products.

I have been trying the following:

in layout.xml

<catalog_product_view>
....
   <reference name="content">
.....
      <block type="checkout/cart_crosssell" name="checkout.cart.crosssell" as="crosssell" template="checkout/cart/crosssell.phtml"/>

.....
And I am trying to call it in view.phtm template:

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

Like this it works for related and upsell but not cross sell. Maybe because it is in a different directory / section?

Any ideas how I can solve this issue?


texts: MessageManager Messages Not Showing Added Via Controller?

texts:
I have a controller that extends a class which is extending \Magento\Framework\App\Action\Action

I am expecting the following to show a message on the page, what am I doing wrong?

    $this->messageManager->addSuccess(__('Test message'));
    return $this->_resultPageFactory->create();

Edit: The messages do not show on the home page which I was redirecting to. However, when I did a catalogue search three of my success messages displayed that I had been trying to add. This leads me to believe that it is a layout problem.


texts: Change Meta tag information dynamically, with Jquery

texts:
I want to change contents of Meta tag dynamically,

Here is the code which which will call the function "changeMetaInformation()" of javascript

<a onclick="changeMetaInformation('<?php  echo Mage::helper('core/url')->getCurrentUrl();?>', '<?php echo $_product->getName()?>')" href="javascript:void(0)" title="<?php echo $this->__('Share on Facebook') ?>">

Now here is my function which will change the Meta tag information

<script>
function changeMetaInformation(url,name)
{
    jQuery('meta[property="og:description"]').remove();
    jQuery('meta[property="og:url"]').remove();
    jQuery('meta[property="og:title"]').remove();

    jQuery("head").append('<meta property="og:url" content="'+url+'">');
    jQuery("head").append('<meta property="og:title" content="Supermax">');

    javascript:popWin('https://www.facebook.com/sharer/sharer.php?u='+url+'&t='+name, 'facebook', 'width=640,height=480,left=0,top=0,location=no,status=yes,scrollbars=yes,resizable=yes')
}

And these are my Meta tags, the content of which I want to change dynamically.

<meta property="og:title" content="Join the best company in the world!" />
<meta property="og:url" content="http://www.sharethis.com" />
<meta property="og:image" content="http://sharethis.com/images/logo.jpg" />
<meta property="og:description" content="ShareThis is its people. It's imperative that we hire smart,innovative people who can work intelligently as we continue to disrupt the very category we created. Come join us!" />


texts: How to Add Desktop Version and Mobile Version Link?

texts:
I have added theme Exception for mobile user in System >> Configuration >> GENERAL >> Design.

And I want to add desktop version and mobile version link so the user can switch it.

I have no idea how to do this. Tell me where to start to make this feature?


texts: How to reset a form after form submission using ajax or how to empty the input fields in magento 2

texts: How to reset a form after submission (which is submitted using ajax)?


texts: Incremental Migration After Changes to Files & Extensions

texts:
I am planning to migrate Magento V-1.9 to V-2.1 with following steps.

Migration is planned as follows.

Looking for an expert advice:

Step 1: Migrate all Existing Data (Orders, Customers, Settings) to 2.1

Step 2: Start Installing Missing Themes and Extension. Configure it accordingly.

Step 3: Do the Delta Migration of Orders/Customers/Products.

Is there anything which can go wrong during delta migration?

I have gone through this advice: Best plan about delta migration

  My major concern is, new theme installation should not break the delta migration.


texts: how to add custom options to grouped products with customization..?

texts:
I have multiple simple product. and I have added this simple product in grouped product.
As I know Magento allows only the simple product with custom option. Now I want to add the custom option to each product in grouped product.
Please anyone knows about it How to add customization of it then help me. But without using paid extension..want With own functionality.


texts: SQL Error when I try to apply promotion rule

texts:
I'm trying to save a catalog price rule and getting the following SQL error:

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (MY_DB_NAME.catalogrule_group_website, CONSTRAINT
  catalogrule_group_website_ibfk_1 FOREIGN KEY (rule_id) REFERENCES
  catalogrule (rule_id) ON DELETE CASCADE ON UPDATE CASCADE)

I was getting this error last night when I was trying to apply a different rule, but it went away and the rule was applied after I reindexed (which may or may not be related).

I tried reindexing a few times today too, no dice. I consistently get this error when I try to apply any rule(s).

I'm not completely SQL ignorant, but am having trouble even beginning to debug. Can anyone point me in the right direction?

On version 1.6.1


texts:
I have the administrator account on my Magento shop and would like to prevent users with fewer rights to create categories.

If I go to Configuration>Permissions>Roles and strip a certain user role of the rights to manage categories, user will not be able to temper with them at all. I still want them to edit descriptions, images etc.

Is there any other way of how to:

deny the right to create a category?
deny the right to change sorting order of categories (using drag&drop)?

If I should do it programmatically, where do you suggest I start?

Thank you in advance for your help.


texts: Magento2.3.5 Multistore redirects to default store after visiting cart page

texts:
We have multiple stores setup which are UK EU and US. Our default store is UK. When we change store from UK to US or EU and adds product in cart then after visiting cart page the store redirects to defautl (UK) store.
We are using nexcess hosting. I can see when store redirects to default store view the store cookie got deleted.
Steps to recreate issue.
1 - visit website and change store from UK to US or EU.
2 - Go to product page and add product in cart.
3 - Go to cart page and refresh it (or proceed to checkout)
4 - It switches to UK store.


texts: Ask if user want to add another product (up selling ?)

texts:
I have two issues :

I need my user to add one product (1) on his cart. Then, when this product is added, I want to ask if the user wants to add another product (2)
The product (2) is available only if the product (1) is in the cart.

How to I do that ?


texts: Magento 2 : Join category name in product collection

texts:
I want to join category name in product collection. I want to use that in product grid filter which is used in my custom module.

This is my collection code. It's same as like this _prepareCollection() :

  vendor/magento/module-catalog/Block/Adminhtml/Product/Grid.php

protected $productFactory;

public function __construct(
    .....
    \Magento\Catalog\Model\ProductFactory $productFactory,
    .....
) {
    .....
    $this->productFactory = $productFactory;
    .....
}

protected function _prepareCollection() {
        $store = $this->_getStore();
        $collection = $this->productFactory->create()->getCollection()
            ->addAttributeToSelect(
                'sku'
            )->addAttributeToSelect(
            'name'
        )->addAttributeToSelect(
            'attribute_set_id'
        )->addAttributeToSelect(
            'type_id'
        )->setStore(
            $store
        );
}

EDIT :

$collection->getSelect()->join(
            'catalog_category_product',
            'e.entity_id = catalog_category_product.product_id'
        )->join(
            'catalog_category_entity_varchar',
            'catalog_category_entity_varchar.entity_id = catalog_category_product.category_id AND catalog_category_entity_varchar.attribute_id = (select attribute_id from eav_attribute where attribute_code = \'name\' and entity_type_id = 3)',
            ['categories' => new \Zend_Db_Expr('group_concat(`catalog_category_entity_varchar`.value SEPARATOR ",")')])
            ->group('sku');

How to do it?

Any help would be appriciated.

Thanks.


texts: Fresh installation of Magento 2 - store loads fine, admin login fails with CURLPROTO_HTTP error

texts:
Fresh Magento2 manual installation on Ubuntu 16.04. Store with samples displays fine. Admin page with user and password displays fine too.

Once credentials are entered and trying to login, getting

  There has been an error processing your request error on page and "Error log record number: 714486746083".

In the log/report folder of my Magento installation, I can see the error:

  {"0":"Notice: Use of undefined constant CURLPROTO_HTTP - assumed 'CURLPROTO_HTTP' in /var/www/myserverexample.com/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50","1".."

I checked:

sudo apt-get install php7.1-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.1-curl is already the newest version (7.1.18-1+ubuntu16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 299 not upgraded

Permissions:

Any suggestion?


texts: Magento 2 Checkout Validation doesn't work

texts:
I've created a module which extends the magento 2 checkout, where I've added another field according with the magento documentation:
http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_form.html

This has worked and they are displayed on the frontend, however the validation causes a weird error.
If I use:

<item name="validation" xsi:type="array">
 <item name="required-entry" xsi:type="string">true</item>
 </item>

As per the documentation, the field shows an asterisk (showing this is a required field), however upon submitting the form the error doesn't display and it doesn't prevent the form submitting.


texts: Custom bootstrap overriding my luma theme style

texts: I added the external bootstap in my custom theme I want to be it before style-l.css I referred Load Custom CSS After style-l.css For Home Page but it's only working from home page, not for other, please help me with this