texts:
I'm using magento 1.9.1

I have a script which is getting the magento session GrandTotal outside the magento system.
I mean i have php file called grandtotal.php and i have placed it to the magento main directory.

Here is the code in grandtotal.php:

<?php
error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
require_once $mageFilename;
$app = Mage::app('default');
Mage::app();

Mage::getSingleton('core/session', array('name' => 'frontend'));

ini_set('display_errors', 1);

$customer_id = Mage::getSingleton('customer/session')->getId();

$GrandTotal = Mage::getModel('sales/quote')->loadByCustomer($customer_id)->getGrandTotal();
$HalfTotal = $GrandTotal / 2;

 function SetTotal(Mage_Sales_Model_Quote_Address $address) {
            $address->setGrandTotal($HalfTotal);
            $address->setBaseGrandTotal($HalfTotal);
            }

echo "Grand: $GrandTotal<br>Half: $HalfTotal";
?>

I'm trying to set the grandtotal but it's not happening.

I'm successfuly getting the grandtotal but i can not set it to something else.


texts: 'optionsPrice' is null or not an object in IE7 & IE8

texts:
I have been brought onto this Magento site which has configurable products staring at £0.00. There's a JavaScript error concerning the 'optionsPrice' object which only occurs in IE7 & 8. I cannot find any information about this error anywhere. See the screenshot below.

Here's one of the pages: http://www.printloft.co.uk/standard-delivery-5-7-working-days-116537.html

The error occurs in configurable.js, when the optionsPrice object is used on line 285:

optionsPrice.changePrice('config', {'price': price, 'oldPrice': oldPrice});
optionsPrice.reload();

I've tried disabling any additional JavaScript but am officially at a dead end as nothing is pointing me to what the problem is!

Any help or advice would be much appreciated.


texts: Magento 2 Multi-site second site domain not working

texts:
I have Magento 2.1.7 with 2 websites.

First site is www.domain.com

second site is second.domain.com

The scope for users is website so that each website has its own users.
The first website everything works great users can get email recover password etc.

The problem is with my second website that i have in a subdomain. Users don't receive any mail from this. If i try to reset the code from backend i get the message user will receive the mail but no mail is being sent.

Probably i haven't done something in the settings correct but i am new to Magento and don't know what i might have done wrong i search the forums but couldn't find a solution.

Also i don't know if this is related to my mx records

domain.com. A   111.111.111.111
second  A   111.111.111.111
ftp A   111.111.111.111
mail    A   111.111.111.111
pop A   111.111.111.111
smtp    A   111.111.111.111
www A   111.111.111.111
www.second  A   111.111.111.111
domain.com. NS  ns1.domain.com.
domain.com. NS  ns2.domain.com.
domain.com. MX  0 aspmx.l.google.com.
domain.com. MX  10 alt1.aspmx.l.google.com.
domain.com. MX  10 alt2.aspmx.l.google.com.
domain.com. MX  20 alt3.aspmx.l.google.com.
domain.com. MX  20 alt4.aspmx.l.google.com.
domain.com. TXT "v=spf1 a mx ip4:111.111.111.111 ~all"

This is how i set up the index.php for the second domain.

require __DIR__ . '/app/bootstrap.php';

$params = $_SERVER;

$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'second';

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

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

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

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

$bootstrap->run($app);

If anyone has any idea thank you.


texts: Magento 2: Best practice create model class

texts:
First thing, I have a question on this topic Optimize load model memory

Then I have some questions for the best way to create a Model to load or save data to Database?

Could you please explain which of these options are bad and which are better.

1: Using Factory?

2: Using Dependencies?

3: Using Repository?

Or could you please suggest to me some other way that does it better?

Thank for any explanation.


texts: Magento Cloud How to Set Access-Control-Allow-Origin

texts:
In Magento Cloud hosting, how to add following configuration,

Header set Access-Control-Allow-Origin a.com

When I login to Magento Cloud I have only read access to the server files. Is there a way to do this.?


texts:
In my website back end suddenly throw SQLSTATE[HY000]: General error: 2006 MySQL server has gone away this error how to i fix.

#0 /home/fitfusjv/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/fitfusjv/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/fitfusjv/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home/fitfusjv/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `core_fl...', Array)
#4 /home/fitfusjv/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `core_fl...', Array)
#5 /home/fitfusjv/public_html/lib/Zend/Db/Adapter/Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/Resource/Db/Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/Abstract.php(225): Mage_Core_Model_Resource_Db_Abstract->load(Object(Mage_Core_Model_File_Storage_Flag), 'synchronize', 'flag_code')
#8 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/Flag.php(119): Mage_Core_Model_Abstract->load('synchronize', 'flag_code')
#9 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/File/Storage.php(84): Mage_Core_Model_Flag->loadSelf()
#10 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/Observer.php(47): Mage_Core_Model_File_Storage->getSyncFlag()
#11 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/App.php(1338): Mage_Core_Model_Observer->addSynchronizeNotification(Object(Varien_Event_Observer))
#12 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Core_Model_Observer), 'addSynchronizeN...', Object(Varien_Event_Observer))
#13 /home/fitfusjv/public_html/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('controller_acti...', Array)
#14 /home/fitfusjv/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(529): Mage::dispatchEvent('controller_acti...', Array)
#15 /home/fitfusjv/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php(160): Mage_Core_Controller_Varien_Action->preDispatch()
#16 /home/fitfusjv/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(407): Mage_Adminhtml_Controller_Action->preDispatch()
#17 /home/fitfusjv/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#18 /home/fitfusjv/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#19 /home/fitfusjv/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#20 /home/fitfusjv/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /home/fitfusjv/public_html/index.php(87): Mage::run('', 'store')
#22 {main}

How to  i fix it???


texts: Custom attributes give error after ordering (with ideal)

texts:
I'm about to set my webshop live.
Today I installed Ideal payment and suddenly when I order a product I get an error.
The error only pops up when I use Ideal as payment.

Fatal error: Call to a member function getId() on a non-object in /usr/home/xxx/domains/xxx.nl/public_html/app/design/frontend/base/default/template/email/order/items/order/default.phtml on line 29

This is the code and my custom attributes: (Verpakking, EAN, Z-index)

<?php $_item = $this->getItem() ?>
<?php $_order = $this->getItem()->getOrder(); ?>
<?php $_product = Mage::getModel('catalog/product')->load($_item->getProduct()->getId()); ?>

        <?php echo $this->htmlEscape($_item->getName()) ?>

        Verpakking: <?php echo $_product->getVerpakking(); ?>

        EAN: <?php echo $_product->getEancodeeenheid(); ?>

        Z-index: <?php echo $_product->getZindexnummer(); ?>

It has to do with these custom attributes, without them there is no error.


texts:
I need to install new admin theme for my magento admin panel.

Can anyone suggest free admin theme to me.

 Then if I install that admin theme, What kind of issues I will face in js related.?

and

Installing admin theme is a good idea or bad one.?


texts: Magento 2 - Freight options for UPS possible?

texts:
Magento 2.2.4

Running a B2B store on M2 CE 2.2.4, we tend to have some larger orders in both price and weight. Looking through the default shipping method options, FedEx gives a minimal amount of freight options in

3 Day Freight
2 Day Freight
1 Day Freight

Which I suppose could be better but atleast gives options, it doesn't appear UPS allows for any such options, so if the product weight for the order goes over the set amount (mind you, I've tried raising that to absurd amounts like 10,000 lbs and it still won't give any type of quote, so I assume the UPS API has it's own weight restrictions), it won't supply any quote at all and just throws the default error message of This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us..

Are there UPS Freight options available for Magento 2?


texts: In Magento 2, how to disable a menu for particular admin user


texts: How to restrict shipping address per country and allow any billing address?

texts:
I'm using a multi-website Magento configuration with per country specific prices and rules.

Magento allows to specify countries allocated to each store in admin area which is solves half of the problem, however our business model allows customer to use any billing address and restrict shipping destination from each store individually.

For example we have a warehouse in US which ships items withing USA and UK warehouse which ships items internationally except USA.

Currently Magento checkout (OneStepCheckot) presume, that if billing address is set, shipping address is optional or billing address can be used instead, this approach can be accurate for majority but in our case it's supposed to be opposite. What we care about is a destination, as final price might vary due to many factors like customs, local authority tax etc.

Can some one suggest how it can be achieved?


texts: Magento 2: Display shipping method but don't allow to select

texts:
I'm using the table rate shipping method and providing a Free shipping method above 99.
So if the subtotal is below 99 then I need to display the Free shipping method but don't allow it to select by the customer.
Please give me some suggestions.


texts: Magento2.2 - File Upload Field from Order Comment Section

texts:
I have override following files for

Displaying File Upload Fields -
Magento_Sales::order/view/history.phtml
To Process Comments
-Magento\Sales\Controller\Adminhtml\Order\AddComment
To Display Block - Magento\Sales\Block\Adminhtml\Order\View\History

When i change <input name="history[file]" type="file" to <input name="history[attachment]" type="text" it works. Input text value can be received at controller level. Looks like file input is not processed in controller.


texts:
Magento 2 how to create customer file attribute,file type must be csv,doc,xlsx

I search and also tried but not working.

Here is my code - InstallData.php

<?php
namespace W3solver\Callforprice\Setup;

use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Customer\Model\Customer;
use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet;
use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory;

class UpgradeData implements UpgradeDataInterface {

    protected $customerSetupFactory;
    private $attributeSetFactory;

    public function __construct(
    CustomerSetupFactory $customerSetupFactory, AttributeSetFactory $attributeSetFactory
    ) {
        $this->customerSetupFactory = $customerSetupFactory;
        $this->attributeSetFactory = $attributeSetFactory;
    }

    public function upgrade( ModuleDataSetupInterface $setup, ModuleContextInterface $context ) {

        if (version_compare($context->getVersion(), '1.0.4') < 0) {

            $setup->startSetup();
            $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

            $customerEntity = $customerSetup->getEavConfig()->getEntityType('customer');
            $attributeSetId = $customerEntity->getDefaultAttributeSetId();

            $attributeSet = $this->attributeSetFactory->create();
            $attributeGroupId = $attributeSet->getDefaultGroupId($attributeSetId);

            $customerSetup->addAttribute(\Magento\Customer\Model\Customer::ENTITY, 'twilio_image', [
                'type' => 'text',
                'label' => 'Twilio Image',
                'input' => 'file',
                "source" => '',
                'required' => false,
                'default' => '0',
                'visible' => true,
                'user_defined' => true,
                'sort_order' => 210,
                'position' => 210,
                'system' => false,
            ]);

            $image = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'twilio_image')
                    ->addData([
                'attribute_set_id' => $attributeSetId,
                'attribute_group_id' => $attributeGroupId,
                'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit'],
            ]);

            $image->save();
            $setup->endSetup();
        }
    }
}


texts: Magento 2 display old price AND special price in category list

texts:
In my old 1.7.0.2 version, I have in a category product list :

"special_price" instead of "regular_price" like : 200$ instead of 350$

As I understand Magento2 change the way of setting special_price for a configurable product, but also the way of this special_price is display (seems to display the lowest price for simple products associated)

How Can I display the old price AND the special_price in Magento2 ?

PS : I use only configurable products


texts: Magento 2: How to move category description to main column

texts:
How can I move the category description from top of the page into main column of the category page just above product list toolbar?

I guess it should be doable by extending the catalog_category_view.xml in

  app/design/frontend/{Company}/{Theme}/Magento_Catalog/layout

but for some reason I can't manage to do that with move element tag.

I have this in my

  app/design/frontend/{Company}/{Theme}/Magento_Catalog/layout/catalog_category_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
  <body>
      <move element="category.description" destination="category.products" />
  </body>
</page>

And this in my

  app/design/frontend/{Company}/{Theme}/Magento_Catalog/templates/category/products.phtml

<?php echo $block->getChildHtml('category.description'); ?>
<?php if (!$block->isContentMode() || $block->isMixedMode()): ?>
   <?php echo $block->getProductListHtml() ?>
<?php endif; ?>


texts:
Shipping method are not showing on shipping page

  Sorry, no quotes are available for this order at this time

Thanks.


texts: Google WebMaster Tool Reports Odd Duplicated Meta Tags

texts:
I have a doubt that someone more experience might be able to help me.

Google Webmaster Tool has advised me about duplicated tags and contents in the website I work for. However, when I see the pages related to the duplication they actually are the same URL but with inexistent or odd ends like those:

Pages with duplicate meta descriptions

  ANTHONY MEN'S FACIAL MOISTURISER, lowest price guaranteed, hassle
      free returns.

www.xxxxxxxx.com.au/anthony-all-purpose-facial-moisturiser-70g-16573.html
www.xxxxxxxx.com.au/anthony-all-purpose-facial-moisturiser-70g-16591.html
www.xxxxxxxx.com.au/anthony-all-purpose-facial-moisturiser-70g-16595.html
www.xxxxxxxx.com.au/anthony-all-purpose-facial-moisturiser-70g-16615.html

The actual URL is

www.xxxxxxxx.com.au/anthony-all-purpose-facial-moisturiser-70g-1.html

My question is:

Why do those odd number come in the end of the URLs making duplicated content in Google Webmaster Tool?

Also we have URLs like that www.xxxxxxxx.com.au/home-gifts-c-959/gifts-for-him/0 with "/0" in the end of it that is being reported by WMT. Do you know why this is happening in Magento?


texts: Kaspersky false positive in onepage checkout, Magento 1.9 CE

texts:
Well, I tested my checkout on a Windows machine that has Kaspersky antivírus active, and got a redirect to the shopping cart on order completion.

http://forum.kaspersky.com/lofiversion/index.php/t304311.html also has this problem, a false positive.

Anyone fancy why in the source it triggers that event in Kaspersky ?

  Denied:
  http://magento9.mydomain.com.br/checkout/onepage/saveShippingMethod/
  (análise usando o banco de dados de URLs de phishing)
  http://magento9.mydomain.com.br/checkout/onepage/saveShippingMethod/
  20/10/2014 17:03:02

I am looking on how to submit that to kaspersky, just posted to raise awareness.


texts: Auto create shipment id as soon as New order arrives in magento 1.9.2

texts: I want to auto create the shipment id for the magento order as soon as the order arrives, the shipment id gets created only when we invoice, so can you please tell me how to do it as soon as order arrives?


texts: Magento V1.9* What happens when an Order Status has no order state - Paypal fails to cancel order after disputed transaction

texts:
Magento V1.9.4.5
Interesting edge case came to my desk
Problem paypal IPN fails to create credit memo and cancel order after paypal has dispute and reversed the transacti
Date/Time week later after shipped !!  PM|PayPal Canceled Reversal
Customer Not Notified
IPN "Canceled_Reversal". A reversal has occurred on this transaction due to a complaint about the transaction from your customer. Transaction amount $. Transaction ID: ""
Date/Time PM|PayPal Reversed
Customer Not Notified
IPN "Dispute". Case type "Dispute". Case ID "" Buyer claims that he did not receive goods or service.
Date/Time PM|PayPal Reversed
Customer Not Notified
IPN "Reversed". A reversal has occurred on this transaction due to a complaint about the transaction from your customer. Transaction amount -$ Transaction ID: ""
Date/Time PM|Complete
Customer Not Notified
Riskified Status: fulfilled
Date/Time PM|Complete
Customer Notified
Date/Time PM|Processing
Customer Not Notified
Riskified Status: fulfilled
Question: What happens when an Order Status has no order state as none of these order status had a assigned state
referring to magentodomain.com/index.php/admin/sales_order_status/
Question:
Is a blank state assigned "processing" by default ?

Our ERP picked this up as "processing" after disputed
-whereas should be canceled

Status
status code
default status
state code

PayPal Canceled Reversal
paypal_canceled_reversal

PayPal Reversed
paypal_reversed

Pending PayPal
pending_paypal

Changed it to

Status
status code
default status
state code

PayPal Canceled Reversal
paypal_canceled_reversal
No
canceled [Canceled]

PayPal Reversed
paypal_reversed
No
holded [On Hold]

Pending PayPal
pending_paypal

Pending Paypal left blank because this never appears in 7yrs of orders

Question 2 explain default please

what happens if default is blank
what happens when default is yes
what happens when default is no


texts: In my custom module I used Ajax. I want to change product count depending on the layout. How to get home page layout programmatically in controller method?


texts:
I'm trying to update some order statuses via the API.

Currently making use of Magento v1.9.3.3

I'm sending it to http://www.mytestserver.com/index.php/api/soap/

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:call soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <sessionId xsi:type="xsd:string">valid-key-here</sessionId>
         <orderIncrementId xsi:type="xsd:string">189</orderIncrementId>
         <status xsi:type="xsd:string">complete</status>
         <comment xsi:type="xsd:string">some stuff here</comment>
         <notify xsi:type="xsd:string">false</notify>
         <resourcePath xsi:type="xsd:string">order.addComment</resourcePath>
      </urn:call>
   </soapenv:Body>
</soapenv:Envelope>

No matter what status or increment ID we apply, we always get

         100
         Requested order not exists.

Trying this via soapUI and we can see our keys are correct, but can't understand why we are getting this generic message.


texts: Magento 2 : Admin Data Grid is not displaying correctly

texts:
I have fresh install magento 2.1.5. Every thing is working well except admin data grid. I also run php bin/magento setup:static-content:deploy, but issue still exists.

When I use inspect element i found that th tag around span tag is missing.

How I solve this issue, This issue is with all ui component grid.


texts:
I am using bellow code. It seems works fine in firefox and IE But not in Crome browser for skip popup blocking.

new Ajax.Request('<?php echo $this->getUrl('custom/index/addcountry') ?>', {
    asynchronous: false,
    method: 'post',
    parameters: str,
    onSuccess: function(respo) {
        window.open(respo.responseText,'_blank' );
    }
});

In Crome browser popup block how to skip popup blocking.


texts: Magento 2: How to add Text Box in Admin Listing?

texts:
I need to add texbox in below code.

$this->addColumn(
                'qty', [
            'header' => __('Qty'),
            'type' => 'text',
            'index' => 'qty',
            'header_css_class' => 'col-id',
            'column_css_class' => 'col-id'
                ]
        );

So user can input quantity row wise


texts: How to add group in custom registration form in magento 2

texts:
In the frontend signup, how to add a group in customer registration form in Magento 2.2.2

See the screenshot :
https://prnt.sc/jsuu4a

I have set the default group to be Please select in the backend:
Stores > configuration > customers > customers configuration > Default Group to be Please Select

But it didn't show in the frontend.


texts: Partial refund option missing (Qty to Refund)

texts:
In Magento, you have the option to do a partial refund, meaning only refund some of the products / qty from the original order. This option seems to be missing in my store. Normally it is possible when creating a Credit Memo to define the ‘Qty to Refund’ for each product on the order/invoice. But I’m missing the option/column of "Qty to Refund”

I did some research and it looks like my extension "TinyBrick/Authorizenetcim” is responsible for this. Its the only enabled Payment method.

I tried adding the code below to the TinyBrick/Authorizenetcim classes but that didn’t fix the issue

protected $_canCapturePartial = true;

Does anyone know how to fix this? Every help is much appreciated. Thank you

Best information I’ve found for this:

http://www.magentocommerce.com/boards/9401/viewthread/14698/P15/

http://www.magentocommerce.com/wiki/welcome_to_the_magento_user_s_guide/chapter_8#credit_memo_options


texts:
I'm using magento 1.6.0 with multi language (English and Russian).
in my modified theme , there are some phrases that I want to translate (about us, my account .. etc).
I understood that the language is reading from a file (csv files).
In which csv file do I need to add my new phrases for the footer page?

Thanks
Guy


texts: I'm tyring to add image attribute to product by installer

texts:
I'm trying to add an image attribute by the following code:

<?php
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
$installer->startSetup();

$installer->addAttribute('catalog_product','my_image_attribute_1',
    array (
        'group'             => 'General',
        'type'              => 'varchar',
        'frontend'          => 'catalog/product_attribute_frontend_image',
        'label'             => 'Additional product image',
        'input'             => 'media_image',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
        'visible'           => true,
        'required'          => false,
        'user_defined'      => false,
        'configurable'      => false,
        'visible_on_front'  => true,
        'default'           => '',
        'class'             => '',
        'source'            => ''
    )
);

$installer->endSetup();

The attribute is created but I can't see it on product edit page.

UPDATE:

Ok this code adds only a radio Button to default image gallery.
Hm I wanted to create a custom upload form for a single image...


texts:
Following is the title of my product in Magento store.

I want to use the same exact phrase for

Nose Wash Sign 7 x 10 In GRN and BK/WHT, 9NYA5

the above string has (11 words 45 characters)
So is it possible to get the exact product currently it's showing Your search returned no results?

Is there a configuration search with the exact phrase or any other extension that will solve the issue?


texts: DKIM body signing issues on Magento emails

texts:
I've got magento 2.3 running on apache with php 7.2.  I've got email going out through postfix.  I'm trying to get DKIM set up using opendkim.  The issue i'm seeing is that emails with html formatting (such as the out-of-the-box newsletter subscription confirmation) email fail the DKIM check on the receiving end with the error "body hash did not verify".  I can generate simple text-only emails using the newsletter feature in Magento and those go out and get signed without issue.  I'm suspecting the issue is related to something splitting long lines somewhere around 998 characters.  I believe perhaps this long line length is causing issues with openDKIM.  I'm trying to figure out where this line splitting is occurring so I can throttle it back to around 900 characters.

Any ideas oh what could be going on are helpful.  Maybe i'm barking up the wrong tree with the line length thing.


texts: Programmaticaly change attribute product type ( apply_to )

texts:
Scenario:
I have created a new product type (configurable_b), that extends the configurable product type.

The issue is that when I edit the product in the backend I cannot see many attributes.

The reason are:

Many attribute are assigned specifically to configurable so I need to manually assign them to the configurable_b type.
Even if the attribute is assigned to all product types, I need to save the attribute to display in my new configurable_b

Any way to fix this programmatically ?

Cycle on every attribute:

assign it to configurable_b if they are assigned to configurable
fix the issue with the attribute assigned to all product type

NOTE
I will accept also info that help me to create a script by myself, what I really miss is where the association to product type/attribute (apply_to) is stored in DB

Thansk


texts: Magento 2: add fields to products collection

texts:
Ok so I'm trying to implement a simple export to CSV massaction on the Magento 2 Catalog products grid.

I've successfully created the mass action item, as well as the admin controller.

I am able to retrieve a CSV, however, it is missing the following fields from the original catalog products grid, I do not understand why:

Product name
Price
Special Price

Basically I want to be able to retrieve the product collection generated in app\code\Magento\Catalog\Block\Adminhtml\Product\Grid.php and to use it in my controller.

I've based my controller development on another massaction controller thinking it would do the trick but it does not.

Here is my admin controller:

<?php
namespace DigitalPianism\ProductExport\Controller\Adminhtml\Productexport;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\App\Response\Http\FileFactory;
use Magento\Framework\Controller\ResultFactory;
use Magento\Catalog\Controller\Adminhtml\Product\Builder;
use Magento\Backend\App\Action\Context;
use Magento\Ui\Component\MassAction\Filter;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;

class ExportCsv extends \Magento\Catalog\Controller\Adminhtml\Product
{
    /**
     * Massactions filter
     *
     * @var Filter
     */
    protected $filter;

    /**
     * @var CollectionFactory
     */
    protected $collectionFactory;

    /**
     * @var \Magento\Framework\App\Response\Http\FileFactory
     */
    protected $_fileFactory;

    /**
     * @param Context $context
     * @param Builder $productBuilder
     * @param Filter $filter
     * @param CollectionFactory $collectionFactory
     */
    public function __construct(
        Context $context,
        Builder $productBuilder,
        Filter $filter,
        CollectionFactory $collectionFactory,
        FileFactory $fileFactory
    ) {
        $this->filter = $filter;
        $this->collectionFactory = $collectionFactory;
        $this->_fileFactory = $fileFactory;
        parent::__construct($context, $productBuilder);
    }

    /**
     * @return \Magento\Backend\Model\View\Result\Redirect
     */
    public function execute()
    {
        $collection = $this->filter->getCollection($this->collectionFactory->create());
        // Write headers to the csv file
        $content = "id,name,url,sku,price,special_price\n";
        foreach ($collection->getItems() as $product) {
            $content .= "\"{$product->getId()}\",\"{$product->getName()}\",\"{$product->getProductUrl()}\",\"{$product->getSku()}\",\"{$product->getPrice()}\",\"{$product->getSpecialPrice()}\"\n";
        }
        // Return the CSV file
        $fileName = 'products.csv';
        return $this->_fileFactory->create(
            $fileName,
            $content,
            DirectoryList::VAR_DIR
        );
    }

    /**
     * Customer access rights checking
     *
     * @return bool
     */
    protected function _isAllowed()
    {
        return $this->_authorization->isAllowed('Magento_Catalog::manage');
    }
}


texts: Translate a label for checkout page "ZIP/POSTAL CODE" to just "POST CODE" : Magento2

texts:
does anyone know if there is a way to create a label for the checkout on teh admin panel? we need to change the standard text "ZIP/POSTAL CODE" to just "POST CODE" at teh checkout.

I am new on this, thanks for your help.

Regards

Rodrigo


texts: Clicking row in catalog product grid doesn't work

texts:
I am facing very unusual error on clicking the row in catalog product grid. Normally, it should open the product edit page. But now it does nothing, except the error that I am getting in console.

However, the edit link under action column is working.
So, if anyone can solve this, Please help!!


texts: magento 2 in how to products value will be imported?

texts:
I have three csv files
1).products attributes.
2).products details files.
3).products attributes values files .

first 2 files will be imported but attributes csv files not imported.

Error:

products attributes values not set, thus attributes values?

Please give me any solutions


texts:
How can I hide all products which have 1 seller (I want to show only if it has more than 1 sellers) (My website list products from multiple sellers)

I found that It's possible to add filter at app/code/core/Mage/Catalog/Block/Product/List.php

 protected function _beforeToHtml()
    {
        $toolbar = $this->getToolbarBlock();

        // called prepare sortable parameters
        $collection = $this->_getProductCollection();

        // use sortable parameters
        if ($orders = $this->getAvailableOrders()) {
            $toolbar->setAvailableOrders($orders);
        }
        if ($sort = $this->getSortBy()) {
            $toolbar->setDefaultOrder($sort);
        }
        if ($dir = $this->getDefaultDirection()) {
            $toolbar->setDefaultDirection($dir);
        }
        if ($modes = $this->getModes()) {
            $toolbar->setModes($modes);
        }

        // EDIT HERE - This demo will filter all products without Images
        $collection->addAttributeToFilter('image', array('neq' => 'no_selection'));
        // EDIT HERE - This demo will filter all products without Images

        // set collection to toolbar and apply sort
        $toolbar->setCollection($collection);

        $this->setChild('toolbar', $toolbar);
        Mage::dispatchEvent('catalog_block_product_list_collection', array(
            'collection' => $this->_getProductCollection()
        ));

        $this->_getProductCollection()->load();

        return parent::_beforeToHtml();
    }

Filtering by ProductCollection is easy but how can I filter products by the following code? You can see to get sellers list it's not coming from productcollection

$count=0;
$sellers=Mage::getModel('assineproduct/assineproduct')->getSellerList($_product->getId());
foreach($sellers as $seller){
    $coll=Mage::getModel('assineproduct/saleslist')->getCollection();
    $coll->addFieldToFilter('mageproownerid',array('eq'=>$seller['seller_id']));
    $coll->addFieldToFilter('mageproid',array('eq'=>$seller['product_id']));
    $count++;

}


texts: Error with magento after extension uninstall

texts:
I tried out the instagram extension , and it didt work. I then wanted to uninstall it.
I did.

When i try to edit a product now i get this  (from log file ) :

2014-06-21T21:13:17+00:00 ERR (3): Warning: include(Mage/Instagramconnect/Model/Source/Instagram/User.php): failed to open stream: No such file or directory  in /home/7/w258759/www/lib/Varien/Autoload.php on line 93
2014-06-21T21:13:17+00:00 ERR (3): Warning: include(Mage/Instagramconnect/Model/Source/Instagram/User.php): failed to open stream: No such file or directory  in /home/7/w258759/www/lib/Varien/Autoload.php on line 93
2014-06-21T21:13:17+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Instagramconnect/Model/Source/Instagram/User.php' for inclusion (include_path='/home/7/w258759/www/app/code/local:/home/7/w258759/www/app/code/community:/home/7/w258759/www/app/code/core:/home/7/w258759/www/lib:.:/usr/share/php:/usr/share/pear')  in /home/7/w258759/www/lib/Varien/Autoload.php on line 93

If i reisntall the plugin , it works..

Does anyone know how to fix this?


texts:
How to make a plugin for a model and turn one of its fields into a different value.
For example, in the documentation, they make an after plugin for the model and return a different value.
    public function afterGetName(\Magento\Catalog\Model\Product $subject, $result)
    {
        return '|' . $result . '|';
    }

How to do the same only through around?
My modules do not have get name methods and the like. I have a standard Model, I load it through Factory in my class and create a method to get all data from modules using:
    public function getAllMyData()
    {
        return $this->friendFactory->create()->getCollection();
    }

and use plugin
    public function aroundGetAllMyData(\My\Module\ViewModel\MyViewOnModel $subject, callable $proceed)
    {
        return $subject;
    }


texts:
I am working on a magento website that i did not create.
on the product page there are hardcoded custom options:

<textarea name="notes"></textarea>

i am trying to look for why the name is 'notes' i cannot find that in the option.
i would like to add another option however i do not know how to save it.
so if i find out why the name of the textarea is notes and it works to save i would probably figure out how to add new hard coded options.


texts:
I have a magento template from templatemonster with an automatic newsletter pop up. The newsletter pops up immediately after page load. I would like to delay the pop up by 5 seconds. I am new to javascript but have found this code within the relevant magento folder:

jQuery(document).ready(function() {
                var newsPopup       = jQuery('#newsletterpopup');
                var newsPopupClose  = newsPopup.find('.close');
                var showNewsPopup = sessionStorage.getItem("showNewsPopup");

                if (showNewsPopup != '0') {
                    newsPopup.modal();
                };

                newsPopupClose.click(function(){
                    sessionStorage.setItem("showNewsPopup", '0');
                });
            });

Is this the correct place to be able to delay the pop up? What do I need to do to add a 5 second delay to the pop up?


texts: how to know action page of any magento extension?

texts: I fallowed more than 10 magento's extension and also little bit customization in Magento but it was very difficult for me. where will action of extension call?


texts:
I'd like to have a different view - that you could select in the product admin panel - for bundle products.

Instead of the default view I'd like to do something more visual with the images of the products that user can select in the bundle, more interactive.

I'm struggling trying to do it in the right way regarding Magento structure. What would you recommend? What do you think is the best way to do that?

I know I need to create a new module, I have already created it and I can select it in the product admin panel. But I'm not sure if the better way is create a new block, or a new page template, or a new product view...

Thanks!


texts: New Custom Module Page Layout not Showing in CMS Drop Down

texts:
I have created a new custom-module for unique page layouts to be used for certain cms-pages within magento-1.9.0.1. The module appears and is enabled in admin > configuration > advanced menu.

Despite this, the option for the page layout does not appear in

CMS > Pages > Home > Design Tab >Layout drop down menu.

I created the following file in: app > code > local > Custompage > Templates > etc > config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Custompage_Templates>
        <version>0.1.0</version>
    </Custompage_Templates>
</modules>
<global>
    <page>
        <layouts>
            <one_column_home translate="label">
                <label>1 column home page</label>
                <template>page/1column-home.phtml</template>
                <layout_handle>page_one_column_home</layout_handle>
            </one_column_home>
            <!-- add more layouts here -->
        </layouts>
    </page>
</global>
</config>

I also have created the following file: app > etc > modules > Customepage_Templates.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Customepage_Templates>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Page />
            </depends>
        </Customepage_Templates>
    </modules>
</config>

Finally I have created a copy of 1column.phtml in: app > design > frontend > mypackage > mytheme > template > page > 1column-home.phtml

A fresh pair of eyes and help would be appreciated.


texts: is creating block within template in magento 2 good practice

texts:
I often see in phtml templates blocks being creating dynamically like below:
$block->getLayout()->createBlock(BlockClass)->toHtml();

I worry whether this is good practice and particularly whether the block will be cached eventually or whether it can create an overhead in the page load?
Has anybody any ideas whether the cache is not applying for these blocks?


texts: How to resolve 'No such entity.' error in Magento 2?

texts: I am trying to setup the project in my local environment.I have changed the domain name in core_config_data table for path web/unsecure/base_url & web/secure/base_url and removed cache directory from var but still I am getting message No such entity. and errors attached at the screenshot. what is the way to resolve this?


texts: How do I access the store's information from within my custom module

texts:
class Index extends \Magento\Backend\App\Action{
    /**
     * @var PageFactory
     */
    protected $resultPageFactory;

    /**
     * @param Context $context
     * @param PageFactory $resultPageFactory
     */
    public function __construct(
        Context $context,
        PageFactory $resultPageFactory
    ) {
        parent::__construct($context);
        $this->resultPageFactory = $resultPageFactory;
    }

    /**
     * Index action
     *
     * @return \Magento\Backend\Model\View\Result\Page
     */

     public function execute(){
        /** @var \Magento\Backend\Model\View\Result\Page $resultPage */

        $resultPage = $this->resultPageFactory->create();
        $resultPage->setActiveMenu('Queueapp_Queueapp::queueapp_auth');
        $resultPage->getConfig()->getTitle()->prepend(__('Queueapp'));

        $this->setPageData();

        return $resultPage;
     }

     protected function setPageData(){
         // I want to access store data here e.g store name etc
        // $store   = Mage::app()->getRequest()->getParam('store');
        $store = "me";

        return $store;
     }
}


texts:
Can I link one user to two or more websites?. For example, while creating a new customer,we have to select one website from drop down Associate to Website as shown

Here I want to select multiple websites. Is it possible?. If yes, how (I think by changing eav eattribute website_id ), and what possible areas to be changed.


texts: Magento Checkout Expand Tax (Show: Product and Shipping Tax)

texts:
In my store in the Checkout I charge taxes for Products and Shipping.
When I click on Total Tax (+ signal), to expand taxes charged, I only see Taxable Goods (15%) which includes a total for Product and Shipping combined.

For example
Subtotal: $50
 Shipping & Handling: $10.00
 Taxable Goods (15%): $9.00 (calculated as follows: $50 + $10 and multiplied by 15%)
 +Tax $9.00 (expand)
Grand total: $69.00

Any ideas how to add Shipping and Handling to expandable tax breakdown ?


texts: Shopping Cart Price Rule Not Working in magento 1.6.0

texts:
I have a magento store running 1.6.0 and I cannot get a shopping cart price rule to work.
I have set below condition but this condition are not worked. I am not able to how to work below rule

Any ideas as to where I am going wrong as this is killing me... any input is appreciated.


texts: Magento 2 - Is it OK to remove Magento standard CSS completely?

texts:
I'm making a website using my own theme. I wonder if it's an OK practice to remove Magento's standard CSS styles-m.css and styles-l.css, and only using my own CSS?

    <remove src="css/styles-m.css"/>
    <remove src="css/styles-l.css"/>

I tried to remove this two CSS files. but I realized that some features is not working anymore. For example the minicart and the pagination is not showing. I guess it's because this two features are using javascript, and once the CSS is removed, the javascript stopped working as well? My website is otherwise looking good with my own CSS, besides som features (I think they are all javascript related) not working as expected.

So is it recommended to remove Magento CSS files completely?


texts:
I'm seeing examples of putting the DataProvider class in the following location:
[YourNameSpace]\[YourModule]\Model\[ComponentName]\DataProvider
However, the documentation makes me believe it should live in this location:
[YourNameSpace]\[YourModule]\Ui\DataProvider\[YourComponentName]\DataProvider
Are both of these acceptable locations or do they have different purposes? I'm reading through the documentation but unfortunately it really just doesn't provide a solid example (unless I'm missing it).


texts: I want to move the search bar from right to the center of the homepage using xml.


texts: Setting of custom filter for customer and order grid in Admin

texts: we have more than 3000 customers on site and we need to to display particular records. I am setting the custom count under per page drop down but it will take 999 max, how can i make it custom filter count.


texts: when changing anything in the xml of the checkout cart index.xml file, the price next to the freight stops appearing in magento 2.3.5. I'm trying to organize the layout of the content but in any case the price of freight simply disappears when changing anything. Has anyone had this problem? I tried to replace the Magento_checkout folder in: vendor / magento / module-checkout / view / frontend / layout / checkout_cart_index.html, for: app / design / frontent / / / Magento_Checkout / layout / checkout_cart_index. html, But even so when trying to edit the checkout_cart_index file, the value that is next to the freight disappears. I do not know what to do. Help me please.


texts: How to remove an input in form created billing-address.html by ko in Magento 2

texts:
I have to remove fax input from billing-address  in checkout process.
( when you check out "My billing and shipping address are the same" and the form appears )

Found that is generated here :

  Magento > Checkout > view > frontend > web > template > billing-address.html

<!-- ko template: 'Magento_Checkout/billing-address/form' --><!-- /ko -->

No idea where those inputs are generated, i only want to remove fax from there, allready tried to remove fax from checkout_index_index.xml layout with no luck. I dont understand how "ko" works or where i can change this.


texts:
Situation

To get this out first thing: I am not a Magento developer. Don't know much about it. I just consult when it comes to server and project management issues. I'll occasionally get my hands dirty with a rough patch for issues, but I don't know anything about the "Magento Way" of doing things.

We have a Magento site (1.9.3.4) we perform active development on. We have a production server and a development server.

Problem

Magento (like WordPress) is very database-dependent. We can version and transfer code without issue. We need an easy and reliable method for merging the databases, however.

On production we want to retain products, orders, reviews, site configurations (such as URL), etc; and on develop we want to retain CMS, plugin configurations (especially troublesome when we install a new plugin), etc.

Currently, I manually backup both databses, trim out the table I don't want from each, and combine them. I then push the resulting Frankensteinian database to production. This is as error prone as you can imagine.

There has to be a better way to do this.

Other Paths

I've toyed with the idea of a shared database, but that isn't ideal, as unapproved changes to products and pages would reflect on the production site.

I've also toyed with the idea of piping the database dumps into Git, but that still requires me to know which tables to keep from each respective database.

Update

Now that I think about it, would the better path here be to have a second "staging" store on the production environment rather than a separate development server? Caveats?


texts: Module created gives Error filtering template: {Classname} does not implement BlockInterface

texts:
I need a way to show products from a category and created a module following the advice of this answer of Marius (https://magento.stackexchange.com/users/146/marius) here: Magento 2: get product collection using category id

I did create a new module though with these files:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    '{Company}_GetProductCollection',
    __DIR__
);

as registration.php in app/code/{Company}/GetProductCollection

Then

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="{Company}_GetProductCollection" setup_version="1.0.0"></module>
</config>

as module.xml in in app/code/{Company}/GetProductCollection/etc and

<?php

namespace {Company}\GetProductCollection\Block;

class CeloGetProductCollection
{

  protected $categoryFactory;

  public function __construct(

      \Magento\Catalog\Model\CategoryFactory $categoryFactory
  ){

      $this->categoryFactory = $categoryFactory;

  }

  public function getCategory()
  {
    $categoryId = $this->getCategoryId();
    $category = $this->categoryFactory->create()->load($categoryId);
    return $category;
  }

  public function getProductCollection()
  {
    return $this->getCagetory()->getProductCollection()->addAttributeToSelect('*');
  }

}

as CeloGetProductCollection.php in app/code/{Company}/GetProductCollection/Block

I registered the module successfully with setup:upgrade.

Then bound the file into the page Home Page with:

{{block class="{Company}\GetProductCollection\Block\CeloGetProductCollection" category_id="15" template="Magento_Theme::html/discover_news.phtml"}}

and discover_news.phtml is in my theme directory. Having this content:

<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
?>
<?php foreach ($this->getProductCollection() as $product) : ?>
    print_r($product,true);
<?php endforeach;?>

What's missing? Because I get the page but instead the oroduct info I get:

  Module created gives Error filtering template:
  {Company}\GetProductCollection\Block\CeloGetProductCollection does not
  implement BlockInterface

Anyone know what's wrong?


texts: Can we built all magento native app functionalities with GraphQL?

texts:
I am working on Inhouse product so I need some good suggestions

Can I built all basic functionalities of magento app with graphQL ?


texts: How to inject adminhtml values as an array in Magento2

texts:
I am trying to inject all the values of a given path in the configuration as an array. I know I can inject Magento\Framework\App\Config\ScopeConfigInterface and get it from there using ScopeConfigInterface::getValue('my_path') but the problem is I am using a third party library that uses some config values and it expects an array to be injected.

I have worked it around by creating a new class that extends such a library and then call the parent constructor with the objects injected and also passing along an array I extract using ScopeConfigInterface::getValue('my_path'). However I would like to inject them directly to avoid unnecessary redundancy code. Any Ideas?

This can be summarized to how can I inject the value returned by a method in the di.xml.


texts: Magento 2.1 extension how to load everywhere?

texts:
I created an extension in my local environment.
So far I'm able to set some parameters from the admin

I also created a frontend route, so I can access a custom page at

http://localhost/magento/myextension/index/index

And I have the associated controller

/app/code/Tony/myExtension/Controller/Index/Index.php

Now I'd need to

1. Add options to load my extension on certain page types (eg. Cart, Home, Product) in system.xml

I already created

app/code/Tony/myExtension/etc/adminhtml/system.xml

2. Read this options from my Helper.

I have created my Helper here

app/code/Tony/myExtension/Helper/Data.php

Any help is appreciated.

Thank you.


texts: Validating Installed Magento Connect Packages

texts:
Does Magento have any built in way to validate that a Magento Connect package is correctly installed?  If not, is there any existing code snippet that will extract a file list from an extension and check if the extension is actually installed?

Context: Often, when installing files via the Magento Connect GUI, the web-server won't have the proper permissions to write files out to the system.  This should result in a failed installation.  However, the way the Magento Connect GUI is coded, Magento Connect will report that the extension installed successfully, and mark in its data store that the extension is installed regardless of whether it could actually install the extension files.

This leads to an extension being listed as installed in Magento Connect, but not actually being on the file system.

Short of coding something up myself, is there any way to validate an extension is installed correctly?  Using the GUI, the ./mage CLI, or even a short shell script that calls some existing Magento method.

Lacking that, has anyone written a stand alone script to do this?


texts: cataloginventory_stock_status entry issue Magento 2

texts:
I did not get an entry in cataloginventory_stock_status table after indexing.
Product stock entry is exist in cataloginventory_stock_item table.
I have checked this thing in Magento 2.2.5 in default version and that things working fine.
I did not know where I made mistake.
I think I have made mistake in any configuration setting.
Please suggest me in which configuration setting I made mistake and I disabled Manage Stock. When I check in Magento I found below query during indexing.

SELECT `e`.`entity_id`, `cis`.`website_id`, `cis`.`stock_id`, IF(cisi.qty > 0, cisi.qty, 0) AS `qty`, IF(cisi.use_config_manage_stock = 0 AND cisi.manage_stock = 1, MAX(cisi.is_in_stock), 1) AS `status` FROM `catalog_product_entity` AS `e` CROSS JOIN `cataloginventory_stock` AS `cis` INNER JOIN `cataloginventory_stock_item` AS `cisi` ON cisi.stock_id = cis.stock_id AND cisi.product_id = e.entity_id INNER JOIN `catalog_product_entity_int` AS `mcpei` ON e.entity_id = mcpei.entity_id AND mcpei.attribute_id = 97 AND mcpei.value = 1 WHERE (cis.website_id = 0) AND (e.type_id = 'simple') AND (e.entity_id IN(21801, 21802, 21803, 21804, 21805, 21806, 21807, 22000)) GROUP BY `e`.`entity_id`, `cis`.`website_id`,`cis`.`stock_id`.

This query result added in cataloginventory_stock_status table but this query returns no result. You can review that select query in <root>/vendor/magento/module-catalog-inventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php line number 225


texts: Cannot declare interface , because the name is already in use

texts:
After creating a simple interface in my new module. I typed in bin/magento setup:di:compile, and I get an error saying that the name is already in use.

Here is my code:

namespace Company\Test\Api;

/*
 *  @api
 */
interface XyzInterface {
    public function getSomething();
}

Then I get this error:

Repositories code generation... 1/7 [====>-----------------------]  14% 2 secs 52.0 MiBPHP
Fatal error:  Cannot declare interface Company\Test\Api\XyzInterface, because the name is already in use in .../app/code/Company/Test/Api/XyzInterface.php on line 13

The line is the "interface XyzInterface"
I am not sure what I am doing wrong.


texts:
I'm using 2.3.2 and having the issue outlined in this post:
Magento 2 Bulk Actions not Starting

And now I'm needing to remove the "Not Started" actions from the queue (as listed in the Bulk Actions Log). How would I accomplish this safely?

(edit: I did implement the fix from the linked thread, and it seemed to be successful, but seemed to be blocked by other bulk actions in the queue that haven't started)


texts: Magento 2 : how to override pagination in admin panel?

texts:
I have created a tab in admin panel and I'm showing my custom grid in that tab.
magento2 by default shows 20 records in a grid but I want to show more than 20 records by default.

i have found this core file:

  vendor\magento\module-backend\Block\Widget\Grid.php

protected $_defaultLimit = 20;

I want to override this file so I have created the custom module.

File1: Di.xml

<type name = " Magento\Backend\Block\Widget\Grid " >

    <plugin name="Test_fullActionNameAlert_backend_grid" type="Test\FullActionNameAlert\Block\Widget\Grid" sortOrder="10" />

 </type>

File2: Grid.php

namespace Test\FullActionNameAlert\Block\Widget;

/*use Magento\Backend\Block\Widget\Grid as WidgetGrid;*/

class Grid extends \Magento\Backend\Block\Widget\Grid
{

    protected $_defaultLimit = 50;
}

I have already run all necessary commands, but still, this script isn't working.

Thanks.


texts: Magento2: Import custom options from product programmatically

texts:
I want to import custom options from  existing product programmatically.My custom options are copied but options having values are not imported.It throws invalid option value error.

I am using below code:

  $customOptions = $this->_objectManager->get('Magento\Catalog\Model\Product\Option')->getProductOptionCollection($product);

    try {

        if (count($customOptions->getData()) > 0) {
            foreach ($customOptions->getData() as $key => $value) {
                $output[] = $this->array_except($value, ['option_id', 'product_id', 'sku']);
            }
            foreach ($output as $arrayOption) {
                $this->createOption($arrayOption, $product);
            }
        }
 public function createOption($arrayOption, $product)
{
    try {
        $product->setHasOptions(1);
        $product->setCanSaveCustomOptions(true);
        //$product->save($product);
        $option = $this->_option
            ->create()
            ->setProductId($product->getId())
            ->setStoreId($product->getStoreId())
            ->addData($arrayOption);
        $option->save();
        $product->addOption($option);
        $product->save();
    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        $this->messageManager->addError(
            __('The custom options cannot be assigned to the product.' . $e->getMessage())
        );
    }

}


texts:
I need to override Mage_Tag_Model_Resource_Tag_Relation for a site I'm working on.

I have already created my class that extends Mage_Tag_Model_Resource_Tag_Relation:

class Web_Core_Model_Tag_Resource_Tag_Relation extends Mage_Tag_Model_Resource_Tag_Relation
{
    public function loadByTagCustomer($model)
    {
    [...]
    }
}

And placed that in the file app/code/local/Web/Core/Model/Tag/Resource/Tag/Relation.php

In the module's config.xml (which is activated, since there are other parts of the module that are working, I added:

<global>
  <models>
    <core>
      <rewrite>
       <mage_tag_model_resource_tag_relation>
        Web_Core_Model_Tag_Resource_Tag_Relation
       </mage_tag_model_resource_tag_relation>
     </rewrite>
    </core>
 </models>
</global>

I'm guessing this is wrong, since it is not working... How should I declare the overriding in my config.xml? Am I in the right track?


texts: Display products under Multiselect options

texts:
We have around 10 products in one category with category name as "custom" & id = "40"

We created some "Brands" [values] in backend.

Once we click on each brand, it will display like below image:

In above image, below Status field, we want to create a Multiselect box [similar like store view] and we want to display those 10 products assigned to category "custom" in multi-select box.

app/code/local/Company/Brand/Block/Adminhtml/Item/Edit/Tab/Min.php

<?php
class Company_Brand_Block_Adminhtml_Category_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form
{
    /**
     * Preparation of current form
     *
     * @return Outthink_Brand_Block_Adminhtml_Category_Edit_Tab_Main
     */
    protected function _prepareForm()
    {
        $model = Mage::registry('brand_category');

        $form = new Varien_Data_Form();
        $form->setHtmlIdPrefix('brand_');

        $fieldset = $form->addFieldset('base_fieldset', array (
                'legend' => Mage::helper('brand')->__('General information'),
                'class' => 'fieldset-wide' ));

        if ($model->getCategoryId()) {
            $fieldset->addField('category_id', 'hidden', array (
                    'name' => 'category_id'
            ));
        }

        $fieldset->addField('category_name', 'text', array (
            'name' => 'category_name',
            'label' => Mage::helper('brand')->__('Category Name'),
            'title' => Mage::helper('brand')->__('Category Name'),
            'required' => true,
        ));

        $fieldset->addField('cat_order', 'text', array (
            'name' => 'cat_order',
            'label' => Mage::helper('brand')->__('Category Order'),
            'title' => Mage::helper('brand')->__('Category Order'),
            'required' => false,
        ));

        /**
         * Check is single store mode
         */
        if (!Mage::app()->isSingleStoreMode()) {
            $fieldset->addField('store_id', 'multiselect',
                    array (
                            'name' => 'store_id[]',
                            'label' => Mage::helper('brand')->__('Store view'),
                            'title' => Mage::helper('brand')->__('Store view'),
                            'required' => true,
                            'values' => Mage::getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true) ));
        }
        else {
            $fieldset->addField('store_id', 'hidden', array (
                    'name' => 'store_id[]',
                    'value' => Mage::app()->getStore(true)->getId() ));
            $model->setStoreId(Mage::app()->getStore(true)->getId());
        }

        $fieldset->addField('is_active', 'select',
                array (
                        'label' => Mage::helper('brand')->__('Status'),
                        'title' => Mage::helper('brand')->__('Category Status'),
                        'name' => 'is_active',
                        'required' => true,
                        'options' => array (
                                '1' => Mage::helper('brand')->__('Enabled'),
                                '0' => Mage::helper('brand')->__('Disabled') ) ));

        $form->setValues($model->getData());
        $this->setForm($form);

        return parent::_prepareForm();
    }
}

I will give 50 bounty points if it worked for me.


texts: How to Configure Action Log in Magento 2 Community Edition?

texts: Is there any method to View admin action log in Magento 2 Community Version. I have been looking for it but only found the reference for Magento 2 Enterprise Version.


texts:
CREATE TABLE `admin_user` (
      `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID',
      `firstname` varchar(32) DEFAULT NULL COMMENT 'User First Name',
      `lastname` varchar(32) DEFAULT NULL COMMENT 'User Last Name',
      `email` varchar(128) DEFAULT NULL COMMENT 'User Email',
      `username` varchar(40) DEFAULT NULL COMMENT 'User Login',
      `password` varchar(255) NOT NULL COMMENT 'User Password',
      `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'User Created Time',

is here is the problem--->`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'User Modified Time',

      `logdate` timestamp NULL DEFAULT NULL COMMENT 'User Last Login Time',
      `lognum` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'User Login Number',
      `reload_acl_flag` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Reload ACL',
      `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'User Is Active',
      `extra` text COMMENT 'User Extra Data',
      `rp_token` text COMMENT 'Reset Password Link[...]

MySQL said: Documentation
    #1293 - Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

I am installing a new magneto2 theme while importing sql I got this error.

I am using sql version PHP Version 5.6.30 on a PLESK server


texts:
First time here although I do read through the forums.

On Saturday night 3rd March I'm guessing I had an auto update to Magento 2.2.3, before this update everything had been working fine.
I am now getting a white screen on my home page and I can't access the admin area as that is also a white screen.
I haven't messed with any of the coding.

My error log shows:

  [05-Mar-2018 07:23:18 UTC] PHP Fatal error:  Class 'Zend\Stdlib\Glob' not found in /home/bud/public_html/vendor/magento/framework/Filesystem/Glob.php on line 14

I have tried searching this error but there are so many different answers and a lot of them from previous versions.

Any help would be greatful.

Cheers


texts:
I am trying to get the product Id but below are given the conditions through which I want to get Id of the product.
I have SKU of the product. but using that sku I want to get Id of that product.
It is necessary condition to get product Id using SKU no other way I want....


texts:
Magento version 2.2.6

I have a problem with the addition of a product price and a selected attribute (or more) price(s)

In this shop I have entered the prices 'excluding VAT'.

The product page is displayed correctly.
However, once I select an option, the VAT attribute is added to the product price excluding VAT.

This is not correct.
See example; the total sum must be 1185 euros.

Any suggestion or help will be appreciated


texts: Observer for Attribute Save After, Delete

texts: I know Observer for Attribute Set Save After is eav_entity_attribute_set_save_after . But I couldn't figure out if there is an observer for save attribute after and delete attribute after?


texts:
I'm not able to find where to remove the "Newsletter unsubscribe" box on the left col.

You can find this here: http://outlet.redmouse.at/index.php/aussen.html

On the left there is this newsletter box.

Where can I remove this?

I hope you can help me.


texts: run observer function depend on payment method, how?

texts:
I want to run an observer function depend on payment method, how can I do this?

public function CompleteOrder($observer)
{
    ......
}

Now I want to run this function only when payment method is cashondelivery ....!

when I use code below, in the frontend, when customer click on final button for checkout, if payment method be not cashondelivery then order can not be completed!

public function CompleteOrder($observer)
{
    $method = $observer->getEvent()->getMethodInstance();
    if ($method->getCode() == 'cashondelivery')
    {
       ...
    } else {
       return false;
}


texts: Price and text shopping card overlap in RWD theme

texts:
When I go to a category products are display but the product price and the text for adding the product to the shopping card overlap. This happens in every browser and also on mobile devices.

See picture.

I noticed this happens when the description for the product contains more words.

Can somebody please help me how to resolve this?


texts:
Magento 2 rest api get params returns empty array can any one tell me where I am going wrong.

i/p: in postman body => raw => json
{
    "orderids":[1,2,3]
}

(or)

{
    "orderids":"1"

}

(or)

{
    "orderids":{
        "0":"1",
        "1":"1",
        "2":"1"
    }
}

<?php
namespace Test\OrderGridSync\Model;
use Test\OrderGridSync\Api\SyncInterface;

class Sync implements SyncInterface
{

protected $_request;

public function __construct(
    \Magento\Framework\App\Request\Http $request
) {
   $this->_request = $request;
}

/**
 * return order ids
 * @api
 * @param mix $orderids
 * @return mix
 */
public function syncOrders() {
    print_r($this->_request->getParams());
    die('testing');
}
}

o/p:-

Array
(
)
testing


texts:
I have generate google sitemap through  Magento adminpanel.

I have set Product URL Suffix(html) and Category URL Suffix(html) in the configuration.

This suffix are not showing in sitemap.xml.

It just show like below URL,

  www.site.com/men/t-shirt/crew-neck-t-shirts

but its throw 404 with url suffix

And also i have disabled some parent categories, like

-root category
   - Men
     - T-shirt // i have disable this category
       - Crew Neck
       - V Neck

So the sitemap generate for the category like this

  www.site.com/men/t-shirt/crew-neck

but i need to show like this

  www.site.com/men/crew-neck

how to achieve this. I have checked in the following collection

Mage::getResourceModel('sitemap/catalog_category')->getCollection($storeId)

Mage::getResourceModel('sitemap/catalog_product')->getCollection($storeId)

but no luck.

Any suggestions will be appreciated.


texts:
I have this on my site

how when i select optione

how do i get the space back in between


texts: Sometimes dont load images on product page

texts:
Sometimes, going to the product page, I do not see pictures of the product, they are uploaded to the network, I see them, but they do not appear on the product page

what it can be connected with and how it can be solved, thanks


texts: Adding extention_attributes to Oder not working

texts:
There's an extension in my project and I want to include one of its attributes in the Order object so that Zapier can see that field.

I don't have to save that field, it's saved somewhere else, so I just want to append it in the Order object inside extension_attributes.

Here's the approach:

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\Sales\Api\OrderRepositoryInterface">
        <plugin name="save_custom" type="My\Project\Plugin\OrderSave"/>
        <plugin name="get_custom" type="My\Project\Plugin\OrderGet"/>
    </type>
</config>

extension_attribute.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="custom" type="My\Project\Api\Data\CustomAttributeInterface" />
    </extension_attributes>
</config>

Api/CustomInterface.php

<?php

namespace My\Project\Api\Data;

interface CustomInterface
{
    const NAME = 'custom';

    /**
     * Return value.
     *
     * @return string|null
     */
    public function getValue();

    /**
     * Set value.
     *
     * @param string|null $value
     * @return $this
     */
    public function setValue($value);
}

OrderGet.php

<?php

// ... some code

class OrderGet
{

    // constructor and other code...

    public function afterGet(
        OrderRepositoryInterface $subject,
        OrderInterface $resultOrder
    ) {
        $resultOrder = $this->getCustomAttribute($resultOrder);

        return $resultOrder;
    }

    private function getCustomAttribute(OrderInterface $order)
    {
        try {
            $somwhere = $this->someFactory->create();
            $somwhere->load($order->getIncrementId(), 'order_id');

            if (!$somwhere->getId()) {
                throw new NoSuchEntityException('No custom entity found for id' . $order->getIncrementId());
            }

            // This will get the custom value from the database
            $customAttributeValue = $this->someHelper->getCustomConfig($somwhere->getData('some_id'));

        } catch (NoSuchEntityException $e) {
            return $order;
        }

        $extensionAttributes = $order->getExtensionAttributes();
        $orderExtension = $extensionAttributes ? $extensionAttributes : $this->orderExtensionFactory->create();
        $customAttribute = $this->customAttributeFactory->create();
        $customAttribute->setValue($customAttributeValue);
        $orderExtension->setCustomAttribute($customAttribute);
        $order->setExtensionAttributes($orderExtension);

        return $order;
    }
}

What am I missing? And how can I include the same custom field in the api call to /orders not only /order/:id.


texts: How many different ways to insert image in magento cms page?

texts:
i tried to insert image with two different ways like through CMS pages in that select page and in content use below code:

and another way is by click on the "insert image" button.

Is there any other way for for insert image in CMS page?


texts: Magento 2 - setting a container class programatically

texts:
How can I retrieve a container from the layout programmatically and then set/update the htmlClass?

I would like to be able to do something like the following:

$container = $layout->getContainer('main.content');
$container->setAttribute('htmlClass', 'className');


texts:
How do I dynamically set a radio button on a custom grid?

so far I have tried: (each attempt has had both value and values)

'value'    => array('checked'), //not based on db value but to see if it worked

'value'    => $this->getdata('is_default') // var_dump shows it is null

'value'    => $this->getIdFieldName('id_default')

none checked the button below is my code if that helps

class [classname] extends Mage_Adminhtml_Block_Widget_Grid
    protected function _prepareColumns()
    {
        $this->addColumn('is_default', array(
            'header'   => $this->__('Default'),
            'filter'   => false,
            'type'     => 'radio',
            'index'    => 'is_default',

        ));

        return parent::_prepareColumns();
    }

EDIT

After further investigation into this issue I have found this class Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio and reading the code I believe that it is possible to set the button as checked, am I right? or have I read the code wrong? or am I looking in the wrong place?

/**
 * Renders grid column
 *
 * @param   Varien_Object $row
 * @return  string
 */
public function render(Varien_Object $row)
{
    $values = $this->getColumn()->getValues();
    $value  = $row->getData($this->getColumn()->getIndex());
    if (is_array($values)) {
        $checked = in_array($value, $values) ? ' checked="checked"' : '';
    } else {
        $checked = ($value === $this->getColumn()->getValue()) ? ' checked="checked"' : '';
    }
    $html = '<input type="radio" name="' . $this->getColumn()->getHtmlName() . '" ';
    $html .= 'value="' . $row->getId() . '" class="radio"' . $checked . '/>';
    return $html;
}


texts:
how to create a custom mega menu  in magento 1.x
like below image


texts: Magento 2 - Order status after shipment and invoice

texts:
I'm using Magento 2.1.3

I would like to change the order status to custom "waiting for courier" after shipping and invoice is created instead of "complete".

Right now I'm using event "sales_order_shipment_save_after" but it's not enough.

Where can I find it?


texts: magento 2 customer account navigation make collapsible for tablet

texts:
I am trying to make customer account navigation collapsible for tablet. Could anyone let me know which js or css file I need to edit for this?

Please see the below image to what I want:

Please help me out this.


texts: Magento 1.9 not able to save upsell/related/cross sell products

texts:
I upgrade my store to last Magento version 1.9.2.4 and I add ssl, When I try save a new product or edit an existing product in Magento everything is saved correctly except upsell/related/cross sell products. Product is being saved with no errors. In var/log/ I don't have any errors. If I hit edit again the upsell product I selected before wasn't saved.

Update:

I try to turn off the https and now upsell/related/cross sell products can be selected from admin product page, what I can do to solve this, to work with https?

My server is on nginx and to work my store with https I add this in index.php

foreach (array(
    'SERVER_PORT' => 443,
    'HTTP_X_FORWARDED_PROTO' => 'https',
    'HTTP_CF_VISITOR' => '{"scheme":"https"}'
) as $key => $values) {
    if (isset($_SERVER[$key]) && $_SERVER[$key] == $values) {
        $_SERVER['HTTPS'] = 'on';
        break;
    }
}


texts: Can we disable Addresses Tab in the Magento Admin Customer Grid

texts:
In Magento Admin panel, on the customer grid section we have Customer view,Account Information, Addresses, Orders etc. In that is it possible to hide the Address Tab . Even if the customer has addresses.

Reason for hide : some of the customer has the more than 300 addresses. in that time. It is taking more time to save the customer information. Most of the time the browser get struck and browser gets killed. Mostly we will not update the Addresses through admin.

can anyone suggest how to achieve this.

Awaiting for your valuable reply.


texts: How to disable or hide the core ACL resources in Magento 2

texts:
How to disable or hide the core module ACL resources in magento 2 with the custom module. I have tried the following syntax and it does not work:

<resource id="Magento_Backend::content" remove="true">


texts: sitemap.xml shows different base path when generate

texts:
I have generated the sitemap for my live instance. But after generating it
it is showing staging url in xml sitemap.

When I see my xml sitemap in the browser for live site, it shows the links with staging URL...

is there any setting that i am missing


texts: Magento 2 Show special prices start and end dates

texts:
I have added a product with special price, Template is already showing special price with original price strike through over it

I want to show special price start and end dates beneath product price, how to achieve this

I have tried this with custom theme to override price in My/CustomTheme/Magento_Catalog/layout/catalog_product_view.xml in a hope it will show my template underneath product.info.price of the original applied theme

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
    <referenceContainer name="content">
      <block class="Magento\Catalog\Block\Product\View" name="product.info.price.special.dates" after="product.info.price" template="special.phtml">
    </referenceContainer>
  </body>
</page>

and will show dates in special.phtml


texts: Magento not calculating the shipping cost - Table rates (Basic setup)

texts:
I am having huge problems getting Table Rates Shipping Method to calculate the shipping cost.

I´ve setup the Tables rates as follows (Norwegian translation):

Land,Fylke/stat,Postnummer,"Vekt (og over)",Leveringspris
NOR,*,*,0.0100,39.0000
NOR,*,*,0.3700,79.0000

and also set weight for each product, but the shipping cost always shows zero. That´ll say, no shipping cost is never calculated.

See this screenshot: https://www.dropbox.com/s/yeiel45lum11mca/Screenshot%202015-03-23%2010.20.11.png?dl=0

Any ideas on why this happen? I am very new to Magento so any help will be highly appreciated on this.


texts: How works getChild() method in Magento 1.9

texts:
Can anyone explain how works getChild() method because I have some lines of code that use this method and I don't know exactly what it does. This is the code:

if ($this->getChild('name.after')) {
    $_nameAfterChildren = $this->getChild('name.after')->getSortedChildren();
    foreach ($_nameAfterChildren as $_nameAfterChildName) {
        $_nameAfterChild = $this->getChild('name.after')->getChild($_nameAfterChildName);
        $_nameAfterChild->setProduct($_product);
        $_products[$_product->getId()]['name_after'] .= $_nameAfterChild->toHtml();
    }
}

I have this code in two different parts, one is on product listing page and one on a block that I want to display on homepage. The problem is that on the product listing page works perfectly and the code is executed ($this->getChild('name.after') this returns true) but on the other part returns false and it doesn't execute the code inside the if statement.

Can anyone can tell me how should my xml files looks like?


texts: How to add custom dropdown in checkout page magento2

texts: I want to add custom dropdown in checkout page where dropdown contain following value:option1 and option2


texts:
A couple of extensions showings their advertisements in magento notification section of the Magento admin.

How do I stop the extensions from showing up in the notifications permanently


texts: Magento Extends CartController and Add new PostAction

texts:
I extended the controller CartController and I added a post action

class Zap_PayFee_Checkout_CartController extends Mage_Checkout_CartController
    {

        public function indexAction() {
            Mage::log('IndexAction');
            parent::indexAction();
        }

        public function estimatePayFeePostAction()
        {
            Mage::log('Estimate Payfee Action Post');
        }
    }

my config.xml

...
    <frontend>
        <routers>
             <checkout>
                <args>
                    <modules>
                        <zap_payfee before="Mage_Checkout">Zap_PayFee_Checkout</zap_payfee>
                    </modules>
                </args>
            </checkout>
        </routers>
    </frontend>
    ......
    <global>
        <rewrite>
                <zap_payfee_checkout_cart>
                    <from><![CDATA[#^/checkout/cart/#]]></from>
                    <to>/payfee/checkout_cart/</to>
                </zap_payfee_checkout_cart>
        </rewrite>
    </global>
...

payfee.phtml

<form id="payfee-cart" method="post" action="<?php echo $this->getUrl('checkout/cart/estimatePayFeePostAction') ?>">
    <fieldset>
    <?php foreach($methods as $method =>$type):?>

        <input type="radio" name="payfee" value="<?php echo $type['value'];?>"><?php echo $type['label'];?>
    <?php endforeach;?>
    </fieldset>

                <button type="button"
                        title="<?php echo $this->__('Get PayFee') ?>"
                        onclick="coPayFeeMethodForm.submit()"
                        class="button">

                        <?php echo $this->__('Get PayFee') ?>

                    </button>

</form>

the indexAction () works while estimatePayFeePostAction ()
does not work

what is my url address ? action= getUrl('checkout/cart/estimatePayFeePostAction')


texts: How to create "custom" code pool in magento like community and local

texts:
I need to create code pool in Magento. I need to know how to create code pool.

Can we create a custom code pool in Magento?

I created a module in Magento which can be used in community and local.

I also need that in other work. so i need how to create code pool in magento which name. should to be custom.

I want to create code pool in magento and that will be in app/code/ like

community
core
local
custom


texts: Magento 2 how to add eav attribute for store information?

texts:
How can I add an eav attribute for store? I practically need to add a post code but storeview scope. The problem is that the post code for store information has website scope.
I have addedd eav attributes before, but what would be the ENTITY and how can I change to storeview scope?
Something like this:
/** @var EavSetup $eavSetup */
            $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
            /**
            * Add attributes to the eav/attribute
            */

            $eavSetup->addAttribute(
                \Magento\Store\Model\???::ENTITY,
                'is_featured',
                [
                    'group' => 'General',
                    'type' => 'int',
                    'backend' => '',
                    'frontend' => '',
                    'label' => 'Post Code',
                    'input' => 'text',
                    'class' => '',
                    'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
                    'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                    'visible' => true,
                    'required' => false,
                    'user_defined' => false,
                    'default' => '1',
                    'searchable' => false,
                    'filterable' => false,
                    'comparable' => false,
                    'visible_on_front' => false,
                    'used_in_product_listing' => false,
                    'unique' => false,
                    'apply_to' => ''
                ]
            );

This is the place where I need to add it.

Thanks!


texts: Amasty Extension - Sales Reps and Dealers - Change Dealers Programmatically

texts:
Extension "Sales Reps and Dealers" by Amasty

I have the User ID of my customer and the Dealer ID of the Dealer I want them to have, how can i programmatically change their dealer to the new one?

In my observer when a customer is successfully registered I grab their ID:

$customerId = $observer->getCustomer()->getId();

Then I load the customer with:

$customer = Mage::getModel('customer/customer')->load($customerId);

At this point I also have the dealer's ID but don't know how to change the customer's dealer to that dealer.  It doesn't show as an attribute when I var_export the $customer.


texts: I need to get my orders information by using REST Api end point. Please suggest me any solution as soon as possible.


texts: Ignoring special characters during catalog search

texts: I want to ignore special characters while catalog search. When a user enters any special character in the search box, the search shall find results for the combination both with and without special characters, even a whitespace. e.g searching for 122hj7 12w will search for 122hj7 12w results as well as 122hj712w results.


texts: How to use "sales_quote_collect_totals_before" Observer in magento2?

texts: I want to use event  sales_quote_collect_totals_before observer in Magento2.


texts:
I have created a couple of new templates that replace the header on my theme and I've created a new header container that contains the new blocks I'm using to render the templates.

What I want to know is, how do I go about pulling through the catalogue top navigation (store/category navigation) into one of these blocks? What is considered best practice?

Thanks

Gareth


texts:
I'm trying to add a custom Js to my custom template.

local.xml

<?xml version="1.0"?>
<layout>
    <default>
       <reference name="head">
           <action method="addItem"><type>skin_js</type><name>js/main.js</name></action>
        </reference>
    </default>
</layout>

I've placed my .JS in the skin folder. I've repeatedly refreshed my cache. But it won't output the console.log i've placed in it. <?php echo $this->getChildHtml() ?> is also in head.phtml


texts:
I was in the process of following a tutorial showing how to make a module on my dev machine. The module didn't work for me so I decided to remove all files relating to it.
Now i'm getting the following error:
Still scratching my head over this as I can't find anything relating to it!
Any ideas please?

Fatal error:  Class 'Mage_Newslettersubscribe_Helper_Data' not found in C:\xampp\htdocs\magento\app\Mage.php on line 547


texts:
I have this layout for my products/category view:

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

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

                <?php // This left_first block will display above the main content on smaller viewports ?>
                <?php if ($_leftContent = $this->getChildHtml('left_first')): ?>

<?php echo $_leftContent;   ?>

                <?php endif; ?>

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

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

        <?php echo $this->getChildHtml('footer_before') ?>
        <?php echo $this->getChildHtml('footer') ?>
        <?php echo $this->getChildHtml('global_cookie_notice') ?>
        <?php echo $this->getChildHtml('before_body_end') ?>

In <?php echo $this->getChildHtml('category_title') ?> I want to display my .phtml file that I've created:

<?php
    $_helper    = Mage::helper('catalog/output');
    $_category  = Mage::registry('current_category');
    if ( ! $_category) {
        $categoryId = Mage::app()->getRequest()->getParam('id', false);
        $_category = Mage::getModel('catalog/category')
            ->setStoreId(Mage::app()->getStore()->getId())
            ->load($categoryId);
    }
    $_imgUrl = $_category->getImageUrl();
?>
<?php
    if (!$_imgUrl){
?>

<?php
    }
?>

        <div class="container row" style="<?php if($_imgUrl): ?>background-image: url(<?php echo $_imgUrl; ?>);<?php endif; ?>">

<?php echo $_helper->categoryAttribute($_category, $_category->getName(), 'name') ?>

                    <?php echo $this->getChildHtml("breadcrumbs"); ?>

But, I can't achieve that... I don't know what I'm mising...

I've created this entry in my local.xml inside of <catalog_category_view> tag

<reference name="category_title">
    <block type="core/template" name="page.header" template="page/html/page_header.phtml">
        <block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
    </block>
</reference>

What I'm missing? Do I need to modify page.xml or catalog.xml ? If yes, could you give me an example what should be added there to make it work?

Thanks guys.


texts: How to get the category page view mode in final_price.php file in Magento 2

texts:
I am displayed the tier price like table structure in Category List/Grid Mode successfully. Now I am trying to disable the table structure in Category Grid Mode. But I can't get the category view mode $block->getMode() in root/module-catalog/view/base/templates/product/price/final_price.phtml file.

Category List Mode

Category Grid Mode

In Grid Mode UI not well so I need to disable or need to show normal price. So how to get the Category page view mode in this file. So that I can write logic on this page.

Any help on this?


texts:
I installed Magento's latest version on the XAMPP server. But, I'd like to add zoom for product images the same as Magento 1.

How to enable zooming on the product page?


texts: Magento 2 - How to create the batch file to export product to csv file

texts:
In Magento 2, How to create the batch file to export product to csv file?
May you show me step by step, Thanks!


texts: Magento 1.9.1 - Emails being sent by the new email queue?

texts:
According to the Magento 1.9.1 release notes:

  all Magento e-mails (including order confirmation and transactional) are now queued

However, I cannot see how any emails except the new order and order update emails are being queued.

In this answer you can see the only two places that appear to use the queue.

Am I missing something obvious that would have the queue instantiated for emails such as the contact form POST in Mage_Contacts_IndexController?

I cannot see anything, which makes me think the release notes are wrong, someone please show me the error of my ways?


texts: Customer reporting - Address and payment methods

texts:
I would like a report that details all customers, their full address/contact details and payment methods.

Is there an easy way to get this or am I going to have to go to Manage Customers and export information via each individual record?


texts: Mystery whitespace before calling ->createBlock

texts:
I've setup a custom .phtml block that I need to add in various places in a couple of different files. To do this I'm using the following code:

<?php echo $this->getLayout()->createBlock('core/template')->setTemplate('page/template/newsletter.phtml')->toHtml(); ?>

For some reason, this seems to be rendering some random Whitespace before the block itself, see attached image.

I'm using Magento 1.9.1

Here are the contents of my custom .phtml file, although from playing with the template calling it I'm pretty sure the whitespace is added in before the block/content!

        <?php echo $this->__('Email Signup') ?>

            <select class="newsletter-title">
                <option value="Mr">Mr</option>
                <option value="Mrs">Mrs</option>
                <option value="Miss">Miss</option>
                <option value="Ms">Ms</option>
                <option value="Dr">Dr</option>
            </select>
            <input type="text" class="newsletter-firstname" placeholder="First Name">
            <input type="text" class="newsletter-lastname" placeholder="Last Name">

        <input type="text" class="disabled" placeholder="Your name" disabled>
        <input type="email" class="" placeholder="Email address">

I'm calling this from a Template file with the following code:

            <?php echo $this->getLayout()->createBlock('core/template')->setTemplate('page/template/newsletter.phtml')->toHtml(); ?>


texts:
In a previous question, I was trying to create a block which would show all products for that category - which now works. Yippee!

However, the problem now is - while I was able to create a 'simple list' by removing the formatting from the standard list.phtml, I still get the pagination etc with the tool bar.

If I hide or remove the toolbar, this still only shows the first 10 (or whatever is set in config) products. I don't want to change this globally, only in the block.

So the question is, how can I adjust my new simple-list.phtml to show all products by default?

(code is below)

<?php
/**
 * Show all products in a simple list - template
 */
?>

<?php
    $_productCollection=$this->getLoadedProductCollection();
    $_collectionSize = $_productCollection->count();
?>

<?php if ($_collectionSize && $tmpHtml = $this->getChildHtml('block_category_above_collection')): ?>

<?php echo $tmpHtml; ?>

<?php endif; ?>

<?php if(!$_collectionSize): ?>
    <?php if ($tmpHtml = $this->getChildHtml('block_category_above_empty_collection')): ?>

<?php echo $tmpHtml; ?>

    <?php else: ?>

<?php echo $this->__('There are no products matching the selection.') ?>

    <?php endif; ?>
<?php else: ?>

<?php
    $_helper = $this->helper('catalog/output');
    $theme = $this->helper('ultimo');
    $helpLabels = $this->helper('ultimo/labels');
    $helpTemplate = $this->helper('ultimo/template');
    $helpImg = $this->helper('infortis/image');

    //Hide the toolbar?
    $hideToolbar = false;
    if ($this->getHideToolbar())
    {
        $hideToolbar = true;
    }
?>

    <?php if (!$hideToolbar): ?>
        <?php echo $this->getToolbarHtml() ?>
    <?php endif; ?>
    <?php if($this->getMode()!='grid'): //List mode ?>

    <?php $_iterator = 0; ?>
    <ul class="products-list<?php if($listClasses) echo $listClasses; ?>" id="products-list">
    <?php foreach ($_productCollection as $_product): ?>
        <li class="item<?php if( ++$_iterator == sizeof($_productCollection) ): ?> last<?php endif; ?>">
            <?php //Product description ?>

                    <?php $_productNameStripped = $this->stripTags($_product->getName(), null, true); ?>

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped; ?>"><?php echo $_helper->productAttribute($_product, $_product->getName() , 'name'); ?>

    <?php endforeach; ?>

    <?php else: //Grid mode ?>

    <?php endif; //end: if grid mode ?>

    <?php if (!$hideToolbar): ?>

            <?php echo $this->getToolbarHtml() ?>

    <?php endif; ?>

<?php endif; ?>

<?php if ($_collectionSize && $tmpHtml = $this->getChildHtml('block_category_below_collection')): ?>

<?php echo $tmpHtml; ?>

<?php endif; ?>


texts: Magneto 2.3 SMTP configured but mails not send

texts:
after setting up SMTP extension ,when send test mail giving error "Unable to send mail:unknown error" and
in exception log gives bellow exception.

" main.CRITICAL: Unable to send mail: Unknown error
{"exception":"[object]
(Magento\Framework\Exception\MailException(code: 0): Unable to send
mail: Unknown error at
/var/www/magento/app/code/Magento/Email/Model/Transport.php:104,
Laminas\Mail\Transport\Exception\RuntimeException(code: 0): Unable
to send mail: Unknown error at
/var/www/magento/vendor/laminas/laminas-mail/src/Transport/Sendmail.php:306)"}
[] "

what would be the reason, and how could I get out of this.. Thank you.


texts:
How to move minicart to toplinks block.
I want to move cart icon to top beside sign in link.

By default Mini Cart display after header links panel wrapper class.

Thanks.


texts: Arabic Currency Name to be move from left to right

texts:
I need to move arabic currency name "QAR 149.00" from left to "149.00 QAR" in my Magento 1.9.2.4. Have tried several techniques but none working.

Urgent response is highly appreciated.


texts:
I run with a dedicated Debian server and I wish like to know what is the best method to clear my logs in my database?

Currently, I use the Magento cron every 5 minutes. It's work fine and when I check on my database in my cron_schedule table, the cron works every 5 minutes.

*/5 * * * * /bin/sh /path/to/magento/cron.sh

Now, I wish clear the following tables every five minutes :

dataflow_batch_export
dataflow_batch_import
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
log_visitor_online
report_viewed_product_index
report_compared_product_index
report_event

What is the best method for realize that?


texts: How can i upload SVG image on Magento 2.3.6?

texts:
Please help me.
Now i can't upload SVG image on Magento V-2.3.6. I tried with below code but still can't.
<type name="Magento\Cms\Model\Wysiwyg\Images\Storage">

<argument name="extensions" xsi:type="array">
<item name="allowed" xsi:type="array">
    <item name="jpg" xsi:type="string">image/jpg</item>
    <item name="jpeg" xsi:type="string">image/jpeg</item>
    <item name="png" xsi:type="string">image/png</item>
    <item name="gif" xsi:type="string">image/gif</item>
    <item name="svg" xsi:type="string">image/svg</item>
</item>
<item name="image_allowed" xsi:type="array">
    <item name="jpg" xsi:type="string">image/jpg</item>
    <item name="jpeg" xsi:type="string">image/jpeg</item>
    <item name="png" xsi:type="string">image/png</item>
    <item name="gif" xsi:type="string">image/gif</item>
    <item name="svg" xsi:type="string">image/svg</item>
</item>
<item name="media_allowed" xsi:type="array">
    <item name="flv" xsi:type="string">video/x-flv</item>
    <item name="swf" xsi:type="string">application/x-shockwave-flash</item>
    <item name="avi" xsi:type="string">video/x-msvideo</item>
    <item name="mov" xsi:type="string">video/x-sgi-movie</item>
    <item name="rm" xsi:type="string">application/vnd.rn-realmedia</item>
    <item name="wmv" xsi:type="string">video/x-ms-wmv</item>
</item>