texts: Where can I find official documentation of the internal functions and methods used by Magento's default/core modules?

texts:
Am I missing something or does Magento not provide any documentation about the core/default modules it uses?

Let's use an example: say I want to create a module which incorporates various core functions of Magento including:

Presenting a log in or registration form to the customer allowing them to log in
After logging in, displaying their complete order history including all items

Magento's DevDocs website roughly covers how to architect and set up a module using the folder structure and various XML files etc. but what it doesn't seem to provide is a full and complete documentation of the actual functions and methods used by each core module or how to use them to achieve even basic tasks like the examples I listed above.

There is a module reference but it's extremely basic and does not detail any code.

So... how are developers expected to know how to achieve anything? Are they simply expected to search the source code and "learn by example"? Does that mean developers need to first install the demo data in order to see how such actions are taken in PHTML files?

At the moment I basically rely on web searches and StackOverflow as a reference to achieve virtually everything in Magento. Using my example from above, I would search magento 2 log in customer programatically and would find an answer such as this one which provides the code needed to authenticate a customer:

$customer = $this->customerAccountManagement->authenticate($login['username'], $login['password']);
$this->session->setCustomerDataAsLoggedIn($customer);
$this->session->regenerateId();

Why is there not official documentation which describes in detail the process of authenticating a customer, logging in, etc.? And where is the documentation which tells us exactly what the setCustomerDataAsLoggedIn() and regenerateId() functions actually do? Or even a basic list of functions/methods available for each object?

Next, if I want to learn how to list all orders by a customer, I'd search for magento 2 list all customer orders, find a code snippet on this website, see which dependency/class I need to add to my module and which function will actually list a customer's orders.

Why is there not somewhere in Magento's official documentation which lists these kind of basic, essential, fundamental workflows which almost every developer will encounter at some point?

The only "technical" documentation I've been able to find is this site but there's no indication of where that came from; I assume it's been auto-generated from the Magento 2 source code and is not "official".

In my opinion this is a critical failing of Magento. When you have posts being made like How to create a module? because the official Magento documentation wasn't detailed enough, and the only answer links to a blog post by someone like Alan Storm instead of official Magento documentation, then surely that indicates a problem?

Why does Magento development need to be this way? Why is it like a giant puzzle which developers must solve either by delving through the source code or posting extremely specific questions on sites like this?


texts:
I am attempting to add a WYSIWYG editor to a field within a custom widget.  I'm actually able to get the WYSIWYG editor to appear as displayed in the screenshot below:

My problem is that the data from the WYSIWYG editor is not populating the hidden textarea field, so the field contents are blank. (If I click the "Show/Hide" editor so that it is rendering plain HTML and then click "Insert Widget", the field's contents are copied over as expected.)

Am I missing core functionality of the WYSIWYG editor that is preventing the translation from the editor to the textarea field or is there way that I can insert some JS when the WYSIWYG field is added to copy over the editor's contents when the element loses focus?

Here are the relevant portions of my widgets.xml (omitting opening/closing widget tag)

<brands_detailedslide type="city_brands/widget_detailedslide">
    <name>Detailed Slide</name>
    <description type="desc">Creates Markup for a Detailed Slide</description>
    <parameters>
        <slide_content>
            <label>Slide Content</label>
            <visible>1</visible>
            <required>1</required>
            <type>city_brands/widget_slide_wysiwyg</type>
        </slide_content>
    </parameters>
</brands_detailedslide>

Note that the type points to City_Brands_Block_Widget_Slide_Wysiwyg, which contains:

class City_Brands_Block_Widget_Slide_Wysiwyg extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element
{
    public function render(Varien_Data_Form_Element_Abstract $element)
    {

        $editor = new Varien_Data_Form_Element_Editor($element->getData());

        //Prevent foreach error that occurs without this
        $editor->getConfig()->setPlugins(array());

        $editor->setId($element->getId());
        $editor->setForm($element->getForm());
        $editor->setWysiwyg(true);
        $editor->setForceLoad(true);

        return parent::render($editor);
    }
}


texts: Programatically delete custom attribute options

texts:
I'm trying to delete all custom attribute options not contained within a specific options array as follows:

 /** @var \Magento\Catalog\Model\ResourceModel\Eav\Attribute $attribute */
        $attribute = $this->getAttribute($attributeCode);

        $sourceModel = $this->tableFactory->create();
        $sourceModel->setAttribute($attribute);

        $options = $sourceModel->getAllOptions();
        foreach ($options as $option) {
            if(!in_array($option, $usedOptions)) {
                $option->delete();
            }
        }

How would i achieve this? $option->delete() throws an error - Call to a member function delete() on array


texts:
Looking at the official Magento 2 dev docs on the subject of generating data for performance testing, the example image suggests that product images are generated in the process.

I ran the exact command (magento setup:perf:generate-fixtures /var/www/html/magento2/setup/performance-toolkit/profiles/ce/small.xml), but no product images are to be found in the backend. The rest seems to be working, though.

Did I forget something in the process, or is this feature not implemented (yet)?
Is there another way to generate product images like displayed in the dev docs (using CLI)?


texts: Paypal Express + New Customer + Onestep Checkout = no taxes applied on order

texts:
I'm having an issue on my Magento 1.7 that is related to this one (Paypal Express not including Tax with OneStepCheckout) but it's not the same. In that case, the total is incorrect in paypal, in my case, the totals are correct in paypal, but the new order in magento doesn't include any taxes. These are the steps to reproduce and the problems I have:

Non registered customer adds a product to the basket and goes to checkout (onestepcheckout)
Customer introduces all the data, including passwords (it's mandatory to register before purchasing)
Selects Paypal Express and proceeds with the payment.
In Paypal window, the totals are correct (product price + taxes)
Payment is OK and the customer returns to the website

Errors:

When the customer goes to his account, the order total doesn't include any taxes
The customer is assigned to the group 'Not logged in', even though it's registered during the checkout

Has anyone experienced the same issue?

Thanks


texts:
I was able to find this question that seems to be similar to my problem, however, my problem is different.

I'm migrating a site from Magento 1.4 to Magento 1.9.  To perform this migration I've tried doing an incremental update with magerun.  I've also tried to start with a fresh Magento 1.9 install and then transfer over the themes, plugins, and the database.  With both situations I'm getting an error:

a:5:{i:0;s:37:"Element with id "path" already exists";i:1;s:5595:"#0 /web/virtual-servers/xxxxxxxxxxxxxxx.net/www_home/lib/Varien/Data/Form/Element/Abstract.php(58): Varien_Data_Form->checkElementId('path')

I tried removing all of the old plugins and I'm still getting the same error.

What does this error mean?  There don't seem to be any duplicate categories or settings in the database.


texts:
I have a configurable product from which I am trying to get reviews

$myThemeName/catalog/product/view.phtml

/**
 * Product view template
 *
 * @see Mage_Catalog_Block_Product_View
 * @see Mage_Review_Block_Product_View
 */

$_product = $this->getProduct();

I need ratings in a group count of 5 star, 4 star, 3 star, 2 star and 1 star. like this

I have done the following, by going through this link (check @sinclairfr's post), which is giving me complete html of ratings related to the product.

<?php $zoo = new Mage_Rating_Block_Entity_Detailed(); ?>
<?php echo $zoo->toHtml(); ?>

and also this

$review = Mage::getModel('review/review');
$collection = $review->getProductCollection();
$collection
->addAttributeToSelect('*')
->getSelect()
->limit(5)
->addFieldToFilter('product_id', $_product->getId());
$review->appendSummary($collection);

zend_debug::dump($review);

By going through this link

still no use


texts: Magento 2 shipping methods showing exception UPS/USPS

texts: I am trying to access magento2 shipping methods like UPS/USPS but its throwing exception "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."


texts: How to enable/disable Custom Module in magento2

texts:
Hi am new to magento 2 and learning how to to create custom modules and i have added a option to enable disable from drop down and also added a config file but that seems to be not working. can anyone help me out.

am sharing my code:-

CONFIG.XML

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Store/etc/config.xsd">
 <default>
     <custom_module>
       <general>
           <enable>0</enable>
              <title>Custom Customer Attribute</title>
         </general>
     </custom_module>
 </default>
</config>

SYESTEM.XML

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Config/etc/system_file.xsd">
    <system>
    <tab id="mytab" translate="label" sortOrder="200">
        Eecom
    </tab>

        <class>separator-top</class>
        Custom Customer Attribute
        <tab>mytab</tab>
        <resource>Eecom_CustomCustomerAttribute::config_custom_module</resource>
        <group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
            General Configuration
            <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                Enable Module
                <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
            </field>
        </group>

</system>
</config>

Helper/Data.php

<?php
/**
 * Copyright © 2015 Eecom . All rights reserved.
 */
namespace Eecom\CustomCustomerAttribute\Helper;
class Data extends \Magento\Framework\App\Helper\AbstractHelper
{

    /**
     * @param \Magento\Framework\App\Helper\Context $context
     */
    public function __construct(\Magento\Framework\App\Helper\Context $context
    ) {
        parent::__construct($context);
    }

    public function isEnabled()
{
    return (boolean) $this->getConfig('eecom_customcustomerattribute/general/enable');
}
}


texts:
I am able to create a review but unable to create rating.
What exactly data should consider here please suggest me about rating options  $XXXXXXX & $YYYYYYY ?

ReferenceLink 1

Reference Link 2

<?php

use Magento\Framework\App\Bootstrap;
require __DIR__ . '/app/bootstrap.php';
$bootstrap = Bootstrap::create(BP, $_SERVER);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

ini_set('display_errors', 1);
echo "HELLO STACK EXCHANGE";

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$_review = $objectManager->get("Magento\Review\Model\Review")
    ->setEntityPkValue(2)//product Id
    ->setStatusId(\Magento\Review\Model\Review::STATUS_PENDING)// approved
    ->setTitle('STACK EXCHANGE')
    ->setDetail('STACK EXCHANGE')
    ->setEntityId(1)
    ->setStoreId(1)
    ->setStores(1)
    ->setCustomerId(1)//get dynamically here
    ->setNickname('STACK EXCHANGE')
    ->save();

echo "review has been saved..";

$_rating = $objectManager->get("Magento\Review\Model\Rating")
    ->setRatingId($XXXXXXX)
    ->setReviewId($_review->getId())
    ->addOptionVote($YYYYYYY,2);
$_review->aggregate();

echo "Rating has been saved success !!!!!!!!!";

?>


texts: Address removed on checkout in guest checkout

texts:
I have this problem in magento 1.9 with checkout one page.

In the checkout process when I select the guest checkout, complete the billing form and click continue,and after I go out in a category of the e-commerce because i forgot to add an item in the cart, I come back in the checkout to finish the process I must write another time the billing informations because the fields are empty. Is possible to add the informations only one time?

I found this article:http://www.samitrimal.com.np/magento-address-removed-on-checkout-in-guest-checkout/
should be a solution but i don't know how to implement, please can you help me?

thanks

Alberto

Update

I post here what i added in the system following the guide:

1) I created a folder inside App/etc/modules/Fix_billing.xml

inside the xml file there is:

<config>
<modules>
 <Fix_billing>
   <active>true</active>
        <codePool>local</codePool>
   </Fix_billing>
 </modules></config>

2) Another Folder in App/code/local/Fix/billing/
and after inside other folders:

Block
controllers
etc
Helper
Model
sql

inside etc folder I added config.xml with the code of the guide and inside the controllers folder a file IndexController.php with the code of the guide.

After all this what's my mistake? sorry but i the first time I di this  chenges..

Thanks
Alberto

Okay I tried but doesn't work, in this link I have all the data I inserted..please can you check if it's okay?

http://we.tl/SrfTX1gGdm

thanks Alberto


texts: Is there a way to "clone" custom options from a product to other products? I need to clone a set of custom options from one product to a bunch of products.


texts: how to change color code of header and footer in m2

texts:
hi,
   i am new to magento would some one please help me to set this in a right way

i just have change the background color of header and footer of my magento store
in the base directory within the tag .page-header .panel.wrapper  path:"https://cartify.shop/pub/static/version1486689053/frontend/Magento/luma/en_US/css/styles-l.css" it has been saved correctly and showing in the coding but the frontend didn't show any changes at my home page


texts: How do I go direct to PayPal from the Cart Payment section Continue button instead of making the customer click the PayPal icon?

texts:
I have disabled other options for a payment and just left PayPal.

Users must click on the small PayPal logo to be redirected to PayPal's payment page, if they don't understand that they get frustrated because nothing happens when they click the Continue button.

How can I make Magento automatically redirect the users to the PayPal payment page when they click the Continue button, instead of clicking the PayPal logo?

What is the best/easy option for this or workaround? Otherwise I would just hardcode the continue button, but there is probably some data generated by PayPal attached to the logo and I do not exactly know how to attach it to the button.

Still looking for a solution

@Edit

Just for a reference: This problem was not what I thought. The users were re-directed to the PayPal when they clicked Continue button. It just took more seconds than I thought...


texts:
I have created custom module and through which i want to created trigger. below is installer code.

$installer = $this;
$installer->startSetup();
$installer->run("
delimiter |
CREATE TRIGGER `wishlist_item_delete_after` AFTER DELETE ON `wishlist_item` FOR EACH ROW
BEGIN
DECLARE vUser varchar(50);
SELECT USER() INTO vUser;
INSERT INTO `wishlist_itemtacking_log` (`wishlist_item_id`,`wishlist_id`,`product_id`,`store_id`,`added_at`,`description`,`qty`,`deleted_by`,`deleted_at`) VALUES
(OLD.wishlist_item_id,OLD.wishlist_id,OLD.product_id,OLD.store_id,OLD.added_at,OLD.description,OLD.qty,vUser,CURRENT_TIMESTAMP);
END
|
delimiter;
");
$installer->endSetup();

but when i try to reload page to run the installer script it gives me following error

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
  error in your SQL syntax; check the manual that corresponds to your
  MariaDB server version for the right syntax to use near 'delimiter |
  CREATE TRIGGER wishlist_item_delete_after AFTER DELETE ON `wishli'
  at line 1

Please help


texts:
As I familiarize myself with Magento's implementation of SASS, I recalled this bit from the Magento 2 wiki:

https://wiki.magento.com/display/MAGE2DOC/CSS+Preprocessing+in+Magento+2#CSSPreprocessinginMagento2-AdoptionofLESS

There is specifically one point that seems confusing:

  LESS implementation does not extend Magento 2 requirements with any
  external libraries, like node.js.

Why the difference between CSS preprocessors between versions? I understand that Magento 2 is a wholly new version, but it seems awkward that SASS would be chosen in 1.9 only to be abandoned in 2.0.


texts: difference between cart getItemsCount() and getSummaryCount()

texts:
I am displaying the total items present in the cart at header.
I am able to display the count of items.

But I am bit confused between two methods of cart

1. Mage::helper('checkout/cart')->getItemsCount()
2. Mage::helper('checkout/cart')->getSummaryCount();

For me 1st one returns 1 item in cart and 2nd one returns 6 items in cart, Which is correct one and what is the difference these two functions..

Thanks.


texts: Magento 1.9 - Simple code for enable Payment method for a Customer Group

texts:
I write because I wanted to see if it was possible to enable a type of payment method like the "check / money order" just for a specific group of customers.

My idea was to enable, from the backend, the "check / money order", then go to the file that showed on the checkout page and then hide it with an if in php.

My question was, in what page I can set the if?

Otherwise to show this type of payment only for a specific group of customers how could I do?

Thanks for any help


texts:
In magento 2, how to set default locale? I default in admin page below:

I cleared all cache by command: magento cache:flush. But, it until get locale is en_US. If the true is ja_JP.


texts:
On March 22nd, 2018 we went for a Sale on our Magento 2.1.5 live site deployed on an AWS server m4.4xlarge. On 12am sale started with 1500 online visitors and in the next 3 peak hours, there are some duplicate orders. The amount, items, billing/shipping everything is same even the quote_id (verified from database table sales_order) is same. Entity_id and increment_id is changed only.

We never face this same issue before Sale or after Sale, even for the next three days of sale there is no such duplicate issue.

Duplicate orders are only for guests with cash_on_delivery payment method.

I checked the loader issue but that is not the case since "Place Order" button gets disable and full-page loader appears as soon as you click the button for the first time. I'm not able to replicate the issue. Any help?


texts: Fix magento 1.9 installation error "Invalid backend name []"

texts: When we install Magento 1.9 it shows: There has been an error processing your request Invalid backend name. How do i fix this?


texts: Skip payment method step if only one payment method is active

texts:
I am looking for a way to hide/skip the payment method step if there is only one payment method active.

I haven't started work on the task because I am not entirely sure if it is achievable due to how the checkout process uses Javascript etc I am not sure how I could do a comparison check in order to skip the step.

For example,

Once the billing and shipping information has been set I'd like to show the Place order button rather than goto the payment method step since there will only be one method available.

At the moment I am thinking to use an Observer of some sort but I doubt this will work due the Javascript that loads each step.

Any ideas?


texts: 3rd party jQuery JS and custom JS together

texts:
I read many many stackechange threads and internet pages, and still do not get how to do such a simple task as using Javascript. I try my luck...

I use 3rd party jQuery Plugins (bxslider, modaal)
I have a app.js , that have to be loaded on each pages.

The result of what i have done, is that sometimes it works correctly, sometimes i have javascript errors "Jquery not defined" in modaal or bx, and following it, bx and modaal not defined in my app.

My require-config.js :

var config = {
    map: {
        '*': {
            "modaal": "js/vendor/modaal/dist/js/modaal",
            "bxslider": "js/vendor/bxslider-4/dist/jquery.bxslider",
            "app": "js/app",
        }
    },
    shim: {
        'modaal': {
            deps: ['jquery']
        },
        'bxslider': {
            deps: ['jquery'],
            exports: '$.fn.bxSlider'
        },
        'app': {
            deps: ['jquery', 'bxslider', 'modaal']
        }
    },
    deps: [
        "app"
    ]
};

My app.js is surrounded by:

require(['jquery', 'jquery/ui','bxslider','modaal'], function($){
...
});

What do i miss ?

The very cool thing is that it works 70% of the time. It's probably a loading time pb, so dependencies are not ok...

It's getting me crazy to pass so much time on a so much simple task.

edit: i tried many things about the "exports" param of bxslider...


texts: Should Magento css classes be kept when creating a new theme?

texts:
I read an article once that said when creating your own Magento theme that you should keep the default class/id names?

I heard it's best to keep these in place as some modules reference these classes/ids and stripping them out completely may cause issues.

Is this true?
I just want to know what is best practice.


texts: How to rename shipping address field label in magento2

texts:
I want to rename the shipping address field label as the First Name to Recipient First Name, Last Name as Recipient Last name and so on.

In Magento 2 I am not getting any clear document about this as I'm new to Magento plz guide me

Thanks in advance


texts: Magento 2 : How to solve a message "Recoverable Error: Object of class"?

texts:
I've created a simple helper override, with just a constructor method using a var dump.

When I try to access the contact page I see a message error like that below.

I didn't implement anything just a simple override, I have certain that the structure it's right, I just call the helper in the contact form.phtml, when I call other helpers it's working well. So I guess that it's an external issue with that module.

Message:

1 exception(s):
Exception #0 (Exception): Recoverable Error: Object of class Vendor\Override\Helper\Infortis\AddToLinks could not be converted to string in app/design/frontend/Infortis/ultimo/Magento_Contact/templates/form.phtml on line 10

How can I solve?

Thanks


texts:
Whem i am trying to fetch sql query in my magento's controller
it's display this error

SQLSTATE[HY000]: General error

HERE is my code

    $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
    $sql = "DELETE FROM marketplace_sellernotification WHERE seller_id =".$sellerId;
    $rows = $connection->fetchAll($sql);
    header('Location: ' . $_SERVER['HTTP_REFERER']);


texts: 2000 Simple products in a configurable product

texts:
I am trying to associate 2000 simple products with one configurable product.

The problem is Excel has a limitation on the length of a cell. I can not put all the SKUs of simple products in one cell.

I am using Magmi to import my products. Magento version is CE 1.7.0.2

Associating simples with using two seperate files is also not working since the second update overrides the first one!

Is there a way to handle that? Or do I need to change my logic? Instead of using that many simples should I do something else?

Thanks in advance.

Cheers


texts: How to use Admin created email template used in magento2

texts:
I have created custom module in my code with email_templates.xml
its working fine but i need created template in admin then how to use that email template in code.


texts: Whats happen with the magento2-samples repo on Github?

texts: I am confused. What happen with the Repo magento2-samples on Github?


texts:
I have been writing an extension to carry out a SOAP API request. This works locally fine, however when on the live server my observer isnt picked up and therefore not fired.

I have read up and thought it could be an issue with letter cases but i really can't spot it.

Below is my config.xml file:

<?xml version="1.0"?>
<config>
  <modules>
    <Webtise_ExperianCheck>
        <version>1.0.0</version>
    </Webtise_ExperianCheck>
  </modules>
<global>

    <blocks>
        <adminhtml>
            <rewrite>
                <customer_edit_tab_view_orders>Webtise_ExperianCheck_Block_Adminhtml_Customer_Edit_Tab_View_Orders</customer_edit_tab_view_orders>
                <customer_edit_tab_orders>Webtise_ExperianCheck_Block_Adminhtml_Customer_Edit_Tab_Orders</customer_edit_tab_orders>
                <sales_order_grid>Webtise_ExperianCheck_Block_Adminhtml_Sales_Order_Grid</sales_order_grid>
            </rewrite>
        </adminhtml>
    </blocks>

    <models>
        <experiancheck>
            <class>Webtise_ExperianCheck_Model</class>
        </experiancheck>
    </models>

    <events>
        <sales_order_place_after>
            <observers>
                <experiancheck>
                    <class>webtise_experiancheck/observer</class>
                    <type>singleton</type>
                    <method>sendExperian</method>
                </experiancheck>
            </observers>
        </sales_order_place_after>
    </events>

    <resources>
        <experian_setup>
            <setup>
                <module>Webtise_ExperianCheck</module>
                <class>Mage_Sales_Model_Mysql4_Setup</class>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </experian_setup>
        <experian_write>
            <connection>
                <use>core_write</use>
            </connection>
        </experian_write>
        <experian_read>
            <connection>
                <use>core_read</use>
            </connection>
        </experian_read>
    </resources>

    <template>
        <email>
            <experian_tpl module="Webtise_ExperianCheck">
                <label>Experian Check Result</label>
                <file>experian_result.html</file>
                <type>html</type>
            </experian_tpl>
        </email>
    </template>

</global>

<adminhtml>
    <layout>
        <updates>
            <experiancheck>
                <file>webtise/experian.xml</file>
            </experiancheck>
        </updates>
    </layout>
</adminhtml>

</config>

Any help would be appreciated. My Observer.php file is in the following directory:
app/code/local/Webtise/ExperianCheck/Model/Observer.php

config.xml:
app/code/local/Webtise/ExperianCheck/etc/config.xml

Local machine is Macbookpro. Server Linux.


texts: Magento 2 : Order Edit Error "No such entity with cartId = 458"

texts:
When I am going to edit order then getting an error like above.

  No such entity with cartId = 458.

I have 4 stores in my project.

Order edit works fine for 1 store but for another store it gives error
and in DB for 1 store it inserts 2 rows, for another 4 rows.

I am not getting anything.
Working on multi-site setup.


texts:
I have created, table (email_format) and getting form data and store to this table using model, This is my table values

  id      format

  Raj       text
  kumar     html

If customer change format for example Kumar change html to text format in form then, check kumar before format and update html to text.
 My Output is:

   id      format

  Raj       text
  kumar     text


texts:
When we tried to delete products from backend, we got this error:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'product_id ' in 'where clause'

We tried reindexing, still it didn't work for us.

Recently we didt installed extensions.

Exception.log

exception 'Mage_Core_Exception' with message 'Invalid block type: ' in app/Mage.php:595
Stack trace:
#0 app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', '')
#3 app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', '')
#4 app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 app/code/core/Mage/Catalog/Helper/Product/View.php(73): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 app/code/core/Mage/Catalog/Helper/Product/View.php(144): Mage_Catalog_Helper_Product_View->initProductLayout(Object(OrganicInternet_SimpleConfigurableProducts_Catalog_Model_Product), Object(Mage_Catalog_ProductController))
#9 app/code/core/Mage/Catalog/controllers/ProductController.php(132): Mage_Catalog_Helper_Product_View->prepareAndRender(38509, Object(Mage_Catalog_ProductController), Object(Varien_Object))
#10 app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#11 app/code/local/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#12 app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 index.php(89): Mage::run('', 'store')
#16 {main}


texts: Integrate Magento REST API (OAUTH1.0) with SAP PI

texts:
I am trying to integrate SAP PI system with MAGENTO for REST API service with OAUTH1.0.
I have consumer key, consumer secret, token key, token secret.
Using java code, I am able to create TIMESTAMP and unique NONCE values.
However, I am not aware, how to generate oauth_signature?

Can somebody please help me out here?

Here is what I need to put at HTTP Header level -

Authorization -

OAuth oauth_consumer_key="xxxxxxxxxxx",oauth_token="xxxxxxxxxxxxxxx",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1507730584",oauth_nonce="8NdIsk",oauth_signature="6g%2FEXBnicV%2FsDjxw933bg5Yo2QA%3D"

BR,
Rashmi


texts: Add a static block right under the main navigation, not wrapped in a widget, full width

texts:
I'm using Magento 2 with Luma theme, and I'm trying to add a block on the home page only, right under the main navigation, and I want to do it without any margin or padding, full width, basically not in a wrapper.
The problem is that if I create the block and then add it into a widget, the widget css class has a max-width and some padding, and I don't want to force that css class. There is a proper way to add that block to the page, not wrapped in that widget class?


texts: Magento 2 : How to add custom parameter in invoice template email

texts:
I want to add a custom parameter in the invoice template and display that template.
so please give me any solution on how to do that?


texts: clone quote with new quote id (duplicate invoiceID, paypal)

texts: Is it possible to generate a new quote object with the exact contents (and all other information) from an old quote object?  I'm getting a duplicate invoice id error from paypal and it seems that generating a new quote would resolve this issue (quoteID == invoiceID).


texts: Price on application - Magento 1.9.1 RWD theme?

texts:
Anyone using the rwd theme from 1.9.1 and have price on application (call for pricing) working?

I've followed this guide to no avail: http://www.webamondo.co.uk/blog/magento-1-9-poa/

Pulling my hair out trying to figure this out..

So basically, POA allows me to set items to "call for pricing" via an attribute... This worked in my previous build of magento 1.4 in which anything set with the attribute "call for pricing" hid the add to cart button, along with the price tag for the item, and instead displayed "call for pricing" in its place.

What's happening when I follow that guide is on the product grid display page, I get the following error under the first item "Fatal error: Call to a member function getSource() on a non-object in /**/app/code/core/Mage/Catalog/Model/Product.php on line 1385"

Here's the chunk of code for lines 1375 - 1387

/**
 * Get attribute text by its code
 *
 * @param $attributeCode Code of the attribute
 * @return string
 */
public function getAttributeText($attributeCode)
{
    return $this->getResource()
        ->getAttribute($attributeCode)
            ->getSource()
                ->getOptionText($this->getData($attributeCode));
}

Here's what it looks like on the frontend - imgur.com/zLB1uJc,FjUvgFi The first image is the error on my 1.9.1 build w/ RWD template.. The second is it working on my old 1.4 build.


texts: Translation: Multiple websites, multiple languages

texts:
I'm building a store for a client, and this is the first time I'm working with multiple websites AND multiple languages.

I'm a bit uncertain how to handle the translation aspect. My store structure is similiar to:

WEBSITE 1
   - English
   - German

Website 2
   - English
   - German

Of course with stores set up for each website as well, but in order to keep it simple, this is the basics.

Now, each website has set the correct locale, so they're using the same basic translation for the UI and common terms.

My questions are:

Firstly, where does Magento save product translations and the like? We don't want to have to translate products separately for english and german, for each website, as there will be quite a few down the line.

Secondly, do I need to do anything other than set locale, to make sure that product texts in german are translated in both Website 1->German and Website 2->German?
I can copy values when creating the product, but what happens when the product is edited? Are they also copied, dynamically?

This is a bit basic, but I'd like to be reasonably certain of the mechanics before we start adding hundreds of products to dozens of stores. :)

Regards


texts: Spambot registration on Magento 2 website

texts:
my magento 2.2.3 website is over run by spam bots. the registration of fake users are through the roof and i need to have these stopped immediately.

I have google recaptcha and email verification for every account opened but yet there are still lots of intrusion to my registration with lots of fake email registration...
 any suggestions on what to do?


texts: Magento 2 : subcategories in category menu

texts:
Iam using this extension for displaying left menu category sidebar https://github.com/Sebwite/magento2-category-sidebar. For main categories its working fine , i enabled flat category as well but its not showing sub categories .this function returns empty array        $childCategories = $this->getSubcategories($category);

   public function getChildCategoryView($category, $html = '', $level = 1)
{
    // Check if category has children
    if ( $category->hasChildren() )
    {

        $childCategories = $this->getSubcategories($category);

        if ( count($childCategories) > 0 )
        {

            $html .= '
';

            // Loop through children categories
            foreach ( $childCategories as $childCategory )
            {

                $html .= '
isActive($childCategory) ? ' active' : '') . '">';
                $html .= 'getCategoryUrl($childCategory) . '" title="' . $childCategory->getName() . '" class="' . ($this->isActive($childCategory) ? 'is-active' : '') . '">' . $childCategory->getName() . '';

                if ( $childCategory->hasChildren() )
                {
                    if ( $this->isActive($childCategory) )
                    {
                        $html .= '';
                    }
                    else
                    {
                        $html .= '';
                    }
                }

                if ( $childCategory->hasChildren() )
                {
                    $html .= $this->getChildCategoryView($childCategory, '', ($level + 1));
                }

                $html .= '
';
            }
            $html .= '
';
        }
    }

    return $html;
}

/**
 * Retrieve subcategories
 *
 * @param $category
 *
 * @return array
 */

      public function getSubcategories($category)
{
    if ( $this->categoryFlatConfig->isFlatEnabled() &&   $category->getUseFlatResource() )
    {
        return (array)$category->getChildrenNodes();
    }

    return $category->getChildren();
}

can anyone help me


texts:
I have uploaded my theme using SFTP, and extracted the .tar.gz into the magento install directory (/var/www/html/).

The Magento 1.9 docs state to run the following commands upon install within the Magento install directory:

  find . -type f -exec chmod 400 {} \;

  find . -type d -exec chmod 500 {} \;

  find var/ -type f -exec chmod 600 {} \;

  find media/ -type f -exec chmod 600 {} \;

  find var/ -type d -exec chmod 700 {} \;

  find media/ -type d -exec chmod 700 {} \;

  chmod 700 includes

  chmod 600 includes/config.php

But I still recieve a 404 error when trying to use the theme. Even if I set all files and directories to 775 permissions, and chown with www-data . I still get a 404 error when trying to use the "Theme Install" within the admin panel.

When I try and visit the frontend of my site, there are a few elements loaded from the theme, but 99% of the theme is missing (Home slider, navigation bar, stock logo).

I have uploaded everything correctly to my site, but still get a 404 error when trying to use anything. How can I solve this issue?


texts: Magento 2 di:compile command gives fatal error

texts:
I have taken reference of an old module (Bannerslider) created for Magento 2 Beta version and I am trying to convert it to Magento 2 stable compatible (Mycompany_Bannerslider).

When I enable the module and run the following command it doesn't give errors:

bin/magento setup:upgrade

But when I run bin/magento setup:di:compile command then it shows following error in the terminal:

Below is the model-collection file I am using:

namespace Mycompany\Bannerslider\Model\Resource\Banner;
class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
{
        public function __construct()
        {
                $this->_init('Mycompany\Bannerslider\Model\Banner', 'Mycompany\Bannerslider\Model\Resource\Banner');
        }
}


texts: Extending Magento REST Api with a custom module fails on route

texts:
Running Magento V1.9 with Rest API

I can extract data using the REST api, but I need to exctract a list of categories and might even have the ability to add a new category through the API.

I have tried creating an module inside local and community folders, but I have this response returned.

exception 'Mage_Api2_Exception' with message 'Request does not match any route.'

QUESTION: Could it be caused by an error in my folder structure?

Inside api2.xml i think, theres must be a match between the route section and my call the API.

CALL: magentohosturl/api/rest/restapi/categories

Route section from api2.xml

 <routes>
      <route_entity>
          <route>/restapi/categories/:cat_id</route>
          <action_type>entity</action_type>
      </route_entity>
      <route_collection>
           <route>/restapi/categories</route>
           <action_type>collection</action_type>
      </route_collection>
  </routes>

Question: Is there something I might have overlooked that effects the route?

Full api2.xml file

<?xml version="1.0"?>
<config>
<api2>
    <resource_groups>
        <catalog translate="title" module="RestApi_Categories">
            <title>Category Rest API extension</title>
            <sort_order>10</sort_order>
        </catalog>
    </resource_groups>
    <resources>
        <categories translate="title" module="RestApi_Categories">
            <group>category</group>
            <model>categories/api2_categories</model>
            <title>Categories retrieval</title>
            <sort_order>10</sort_order>
            <privileges>
                <admin>
                    <retrieve>1</retrieve>
              <!--  <create>1</create>
                    <update>1</update>
                    <delete>1</delete>  -->
                </admin>
            </privileges>
            <attributes translate="entity_id name parent_id child_id is_active level position" module="RestApi_Categories">
                <entity_id>Category ID</entity_id>
                <name>Name</name>
                <parent_id>Category Parent ID</parent_id>
                <child_id>Category Child List</child_id>
                <is_active>Active</is_active>
                <level>Level</level>
                <position>Position</position>
            </attributes>
            <routes>
                <route_entity>
                        <route>/restapi/categories/:cat_id</route>
                        <action_type>entity</action_type>
                    </route_entity>
                <route_collection>
                        <route>/restapi/categories</route>
                        <action_type>collection</action_type>
                </route_collection>
            </routes>
            <versions>1</versions>
        </categories>
    </resources>
</api2>
</config>

QUESTION: How do I check wether the file is loaded or not?

Filepath: \app\code\community\RestApi\Categories\etc

Followed this guide to enable developer debug mode.
http://www.blog.magepsycho.com/configuring-magento-for-development-debug-mode/

Routes from Api2 files is loaded here in function getRoutes($apiType):
\app\code\core\Mage\Api2\Model\Config.php

Exception log contains an error message if my api2.xml is manpulated to fail.

Errors message is also present in returned answer from Magento API, so I can confirm my api2.xml is loaded and validates, but the contained routes inside, must be wrong.

Since I've found the routes function I should be able to debug what happens.


texts: I want to work on magento 1.x for one of my client. But i am not finding any code base or downloadable link any where for magento 1.x. If any one know where to download and Installation guide its appreciable.


texts: Magento 2: Add multiple products to cart programmatically

texts:
Following is the event observer for adding multiple products into cart:

<?php

namespace Namespace\Module\Observer;

class ThirdPartyAdd implements \Magento\Framework\Event\ObserverInterface {

    public function __construct(
    \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Checkout\Model\Cart $cart, \Magento\Catalog\Model\Product $product, \Magento\Quote\Model\QuoteFactory $quote
    ) {
        $this->_storeManager = $storeManager;
        $this->_cart = $cart;
        $this->_product = $product;
        $this->quote = $quote;
    }

    public function execute(\Magento\Framework\Event\Observer $observer) {

        if (isset($_POST['submit']) && $_POST['submit'] == 'Submit') {
            for ($i = 0; $i < sizeof($_POST['prod_id']); $i++) {

                $qty = $_POST['prod_qty'][$i];

                $product = $this->_product->load($_POST['prod_id'][$i]);

                $product_type = $product->getTypeID();

                if($product_type == 'configurable') {
                    $simple_products = $product->getTypeInstance()->getUsedProducts($product); //get all simple products
                    $attributes = $product->getTypeInstance(true)->getConfigurableAttributesAsArray($product); //get all possible attributes

                    foreach ($simple_products as $simple_product) {
                        $super_attributes = array();
                        foreach ($attributes as $attribute) {
                            $text = $simple_product->getAttributeText('size');
                            //echo $text;
                            $t1 = 'Black';
                            $t2 = 'M';
                            foreach ($attribute['values'] as $value) {
                            $super_attributes[$attribute['attribute_id']] = $value['value_index'];
                                if ($value['label'] == $t1) {
                                    $super_attributes[$attribute['attribute_id']] = $value['value_index'];
                                }
                                if ($value['label'] == $t2) {
                                    $super_attributes[$attribute['attribute_id']] = $value['value_index'];
                                }
                            }
                        }
                    }
                    $this->_cart->addProduct($product, array(
                        'qty' => $_POST['prod_qty'][$i],
                        'super_attribute' => $super_attributes
                    ));
                    $this->_cart->save();
                }
            }
        }
    }

}

When above code is executed and cart is empty only one product is added to cart with summation of quantity for all the product.

For eg if I add:
Prod 1 - 2 quantity
Prod 2 - 1 quantity

Cart will contain prod 1 with 3 quantity.

This only happens if cart is empty unless cart is empty code will work as expected.

Please let me know what I am missing here.


texts: how to call phtml file of another folder inside phtml file of another folder in magento 2

texts: I have a.phtml file in one folder in my theme folder and b.phtml in another folder now i want to call inside one phtml file to another b.phtml file


texts: Magento 2 create custom block and phtml in Magento_Customer module

texts:
I want to create a new custom Block and Block phtml file same as the Customer Index Block for use to the customer, when customer login the customer just click on the left navigation link and access the phtml file.

I have added the custom link already in the below XML file:

app\design\frontend\Vendor\Theme\Magento_Customer\layout/customer_account.xml

<block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-account-myinformation-link">
    <arguments>
        <argument name="label" xsi:type="string" translate="true">my information</argument>
        <argument name="path" xsi:type="string">customer/account/myinformation</argument>
    </arguments>
</block>

After clicking on this link, I want to call Block to get customer data like email, name mobile, address etc.

Please help me if anyone has created the Custom Block and Custom phtml file in the Magento_Customer module.


texts:
I am learning to make sense of magento and i am stuck.I have different stores and i am creating a controller but it seem it is not working and giving 404.
Following is my code
config.xml under /app/code/local/Ammardotcom/Helloworld/etc

    <?xml version="1.0" encoding="UTF-8"?>
<config>
    <frontend>
        <routers>
            <helloworld>
                    <use>standard</use>
                <args>
                    <module>Ammardotcom_Helloworld</module>
                    <frontName>helloworld</frontName>
                </args>
            </helloworld>
        </routers>
    </frontend>
</config>

and under app/etc/modules/ Ammardotcom_Helloworld.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <modules>
        <Ammardotcome_Helloworld>
                <active>true</active>
                <codePool>local</codePool>
        </Ammardotcome_Helloworld>
    </modules>
</config>

while my file is called IndexController.php and it has following code under /app/code/local/Ammardotcom/Helloworld/controllers/

class Ammardotcome_Helloworld_IndexController
extends Mage_Core_Controller_Front_Action{
        public function indexAction() {
        echo 'Hello Index!';
    }
}

The module shows in backend but isn't loading, i am following @Alan tut


texts: Add email variable to all transactional emails

texts:
Is there any way to add one email variable to all transactional emails?

My idea is to create a custom variable, put some code in it and display it in all transactional emails.


texts:
I am currently using Magento 2.2.2 and all is fine with JS bundling and minifying off.

However, when I enable js bundling I get a JavaScript error. I think this is related to a require.js config file. This error only appears when bundling.

When inspecting the compiled js file I notice there is an empty js build component. Where is this built from and what steps should I go about resolving this?

If I remove the empty js build manually from the compiled js file, there are no problems.


texts: Magento 2: Desktop and Mobile Themes switched after flushing the cache

texts:
I'm using two themes for the Magento 2: Desktop Theme and Mobile Theme. But, I am facing a strange issue. After flushing the cache, If I refresh the site on my desktop, The Desktop version loads correctly. Then, If I open my Mobile and refresh the site, It also loads desktop version! (Not Mobile version).

Same thing happens for opposite process -  If I flush the cache, And refresh my site on my mobile first, It loads Mobile version correctly. But When I go to desktop PC, and refresh my site again, It loads Mobile version of my site !.


texts: Unable to send emails. Could not acquire lock for cron job: sales_send_order_invoice_emails

texts:
Unable to send any kind emails (order, invoice, tracking). I get confirmation that it was sent, but nothing received. Same with "Contact us" from frontend.
cron.log:
main.WARNING: Could not acquire lock for cron job: sales_send_order_emails
main.WARNING: Could not acquire lock for cron job: sales_send_order_shipment_emails
main.WARNING: Could not acquire lock for cron job: sales_send_order_invoice_emails
main.WARNING: Could not acquire lock for cron job: outdated_authentication_failures_cleanup
main.WARNING: Could not acquire lock for cron job: bulk_cleanup
Permissions are correct (i think):

Magento 2.3.5-p2, PHP 7.2
Problem persisted after upgrade to Magento 2.4 and PHP 7.3 and 7.4
Couldn't find much online about "Could not acquire lock for cron job".
Any help will do.


texts: Magento add a you tube video with thumbnail images and auto play it inside the image frame

texts: I need to add a You Tube video with thumbnail images in product details page. Also when click that video that should load in the image frame.


texts: Magento 2: How to increase category description wysiwyg input field height and width in the edit category page backend?

texts: Currently the category description wysiwyg input field width and height in the backend is too narrow, i need to drag the bottom corner to make it bigger,i want to make the height and width is increased when the user first load the description, how can i achieve this?


texts: What is the distinction between defining a customer attribute as "system" versus not "user defined"?

texts:
General Context

When adding custom attributes to EAV-storage data types such as customers and customer_addresses, two seemingly redundant configuration values are allowed to be passed in:

// File: InstallData.php

public function install(...) {
    /** @var Magento\Eav\Setup\EavSetup */
    $eavSetup = $this->eavSetupFactory->create(...);

    $eavSetup->addAttribute(
        Magento\Customer\Model\Indexer\Address\AttributeProvider::ENTITY,
        'my_custom_attr',
        [
            'system'       => true,
            'user_defined' => false
        ]
    );
}

Other questions have addressed the question of what exactly a user_defined custom attribute means: the attribute is considered a "system" attribute (note the ambiguous terminology here), and as such it will not appear on the admin as removable because it is considered essential to the operation of Magento.

Specific Context

However, when omitting the system and user_defined configuration values altogether, I found that the attributes I defined defaulted to 'system' => true and 'user_defined' => false. This behavior seems to be due to the following two lines of code in PropertyMapper.php files:

// File: Magento/Customer/Model/ResourceModel/Setup/PropertyMapper.php
// Line: 27
'is_system' => $this->_getValue($input, 'system', 1),

// ...

// File: Magento/Eav/Model/Entity/Setup/PropertyMapper.php
// Line: 35
'is_user_defined' => $this->_getValue($input, 'user_defined', 0),

Based on the location of the two aforementioned files, I would predict that is_system relates specifically to customer attributes, and is_user_defined relates to attributes of any entity type.

When I later attempted to set and save those attributes via a repository, as such:

/** @var \Magento\Customer\Api\Data\AddressInterface */
$address = $this->addressRepository->getById(...);
$address->setCustomAttribute('my_custom_attr', 'my_custom_value');
$this->addressRepository->save($address);

...I found that my custom attribute was not even exposed by the engine, due to the following lines of code:

// File: Magento/Customer/Model/Metadata/AddressMetadata.php
// Lines: 121-143
public function getCustomAttributesMetadata($dataObjectClassName = AddressMetadataInterface::DATA_INTERFACE_NAME)
{
    ...
    foreach ($this->getAllAttributesMetadata() as $attributeMetadata) {
        ...
        if (!$isDataObjectMethod && !$attributeMetadata->isSystem()) {
            $customAttributes[] = $attributeMetadata;
        }
    }
}

(The link to the Magento source is here.)

I had to set 'system' => false in my InstallData.php script in order for the custom attribute to be accessible via the program, yet I left user_defined untouched.

Question

What is the difference between these two configuration values from a human perspective? How do they affect each other, if at all?


texts: Multiple country-specific stores on the same domain: Show country selection first?

texts:
I am currently working on a shop that serves two countries: UK and Germany. The shop has the same inventory and content for both countries, only the proudct prices are different.

I have learned that I have to create two different Websites in Magento in order to be able to show different prices for the same product. I have done that and now I have a different URL for each country: example.com/uk and example.com/de.

Now when a customer goes to example.com, they should be presented with a country selection, e.g. "Please select your country: UK or Germany".

What is the suggested solution here? I have tried creating a third "Country Selection" website that is the default website and that has this "Country Selection" CMS page as its CMS Home Page, but that feels really hacky and also the content is then also available at example.com/some-product...


texts: How to create a form on the frontend of a magento store

texts:
Synopsis

I Would like to create a form on the frontend of a magento store, I was considering using Zend_Form but before I do I was hoping someone could point me into the right direction using Varien_Form_Data.

The form is a simple contact form which will send an e-mail, this e-mail address is configured within the admin.

I would like the following:

Ability to create A form /block
Ability to validate this form using PHP (not JavaScript)

I do not want to add fields to the existing contact form, I want to build my own.


texts:
Magento 2 different languages for website

I did exactly everything according what the guy who posted the answer said.

Basically i set the default store to English then i created a new store view and here i set the language to dutch. Somehow everything is still in English.

Any idea how this comes?


texts: Bundle Product: Add the same bundle item twice?

texts:
I have to create a simple "configurator" that should work like this:

The customer selects their base material
The customer selects their packaging material
The customer may enter a custom message to be printed on the product

Step 1 and 2 are very easy to do with a bundle product. I have created a simple product for each base and packaging material options and added these to the bundle product as a bundle item. So far so good.

For step 3, it is important to know that there is only a limited selection of characters available, where each character has a different price. For simplicity, let's assume that there are only two characters available:

Character "A", with a price of 0.10$
Character "B", with a price of 0.20$

I have also created a simple product for each character and added it as a bundle item to the bundle product. The problem with this solution is that each character can only be selected once. If the customer wanted his message to be "ABBA" they would be out of luck, as each character/bundle product option can only be selected once:

Is there a solution that allows to specify a quantity for bundle item option? So that the customer could select for example:

2 x "Character A"
3 x "Character B"


texts:
I am relatively new using magento, and I'm having issues removing/editing the left and right columns.  I have the columns enabled, and trying to remove the pictures/links that are defaulted in those sections.  My widgets that are enabled for my columns are not overwriting that script.

Yesterday I was making headway with editing this, with the app>design>default>default>design>frontend>template files.  Now those files disappeared but were not deleted. I copied the files from another skin and began working on those, but there seems to be some missing as there are not as many as there were.


texts: Magento 2 How set db information in encrypted form

texts:
Is there any way to set the database information in the app/etc/env.php in encrypted form

For examples

  array (
          'indexer' =>
          array (
            'host' => 'localhost',
            'dbname' => 'dbname',
            'username' => 'encryptedUserName',
            'password' => 'encryptedUserpassword',
            'active' => '1',
            'persistent' => NULL,
          ),
          'default' =>
          array (
            'host' => 'localhost',
             'dbname' => 'dbname',
            'username' => 'encryptedUserName',
            'password' => 'encryptedUserpassword',
            'active' => '1',
          ),
        ),

Thank You!

Abbas


texts: Varnish w/ Turpentine Logging Out of Admin

texts:
In general everything works fine using Varnish enable w/ Turpentine extension. All of the standard areas of the admin section work as expected.

The issue comes when I navigate to an extension in the admin that does not use the standard /index.php/admin. Navigating to these extension I get logged out of the admin section.

We use a number of extensions that use these sort of urls. All have the same issue. It goes away when disabling Varnish or add the Varnish bypass cookie.

I have updated the URL Black list setting in Magento to reflect these urls. But the issue persists.

cron\.php
helpdeskadmin
mstcore
pointofsale
advancedinventory
massstockupdate

The issue is also intermittent. Many times, after fiddling with the settings, these extensions are again accessible, but given a day or so, the issue returns.

Other relevant info:

Hosted at https://magemojo.com/
Using nginx
php 5.6 fpm
Magento 1.9.1.0 with all security updates


texts:
I'm modifying getCountryHtmlSelect() through a custom class that extends another core class that extends Mage_Checkout_Block_Onepage_Abstract.  Here's the class with the customized code:

local/Mycompany/Checkout/Block/Onepage/Billing.php:

class Mycompany_Checkout_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Billing{

    // customizing from Mage_Checkout_Block_Onepage_Abstract
    public function getCountryHtmlSelect($type){
        [INSERT CUSTOM CODE]
    }

}

For your reference, here is class Mage_Checkout_Block_Onepage_Billing:

core/Mage/Checkout/Block/Onepage/Billing.php:

class Mage_Checkout_Block_Onepage_Billing extends Mage_Checkout_Block_Onepage_Abstract{
...
}

For completeness sake, here's Mage_Checkout_Block_Onepage_Abstract:

core/Mage/Checkout/Block/Onepage/Abstract.php:

abstract class Mage_Checkout_Block_Onepage_Abstract extends Mage_Core_Block_Template{

    public function getCountryHtmlSelect($type)
    {
       [CORE CODE]
    }
}

Unfortunately, Magento isn't picking up the customized version of getCountryHtmlSelect(); it's still using getCountryHtmlSelect() in class Mage_Checkout_Block_Onepage_Abstract.

Here's my config.xml:

app/code/local/Mycompany/Checkout/etc/config.xml:

<?xml version="1.0" ?>
<config>
    <modules>
        <Mycompany_Checkout>
            <version>0.0.1</version>
        </Mycompany_Checkout>
    </modules>
    <global>
        <blocks>
            <checkout>
                <rewrite>
                    <onepage>Mycompany_Checkout_Block_Onepage</onepage>
<onepage_shipping>Mycompany_Checkout_Block_Onepage_Shipping</onepage_shipping>
                </rewrite>
            </checkout>
        </blocks>
    </global>
    <frontend>
        <routers>
            <checkout>
                <args>
                    <modules>
                        <Mycompany_Checkout before="Mage_Checkout">Mycompany_Checkout</Mycompany_Checkout>
                    </modules>
                </args>
            </checkout>
        </routers>
    </frontend>
</config>

Questions:

What do I need to do to get Magento to use getCountryHtmlSelect() in the custom class?
Rather than approaching the problem by inserting getCountryHtmlSelect() in the custom class, is it better to do this:

local/Mycompany/Checkout/Block/Onepage/Abstract.php:

abstract class Mage_Checkout_Block_Onepage_Abstract extends Mage_Checkout_Block_Onepage_Abstract{

    public function getCountryHtmlSelect($type)
    {
        [INSERT CUSTOM CODE]
    }
}


texts:
I have made a custom module and within that module I want to add my own css file.

So far I have made all the required phtml files and the necessary layout.xml file. Testing the module I can see that I can call all the relevant files so I am confident my layout.xml is working. My issue is that when I try and add css to my modules files I only get the same HTML code as when I don't try to call the css. I.e. the head is not added

I have read this magento tutorial and this other tutorial as well as several others and I can't see what I am doing wrong

I shall use signup as my example:

in the signup.phtml i have

<form>HTML & PHP to create form</form>

but nothing else. To get the head for my form page I try to call page/html/head.phtml and add an action node to call my css

<layout>
<default>
    <reference name="root">
        <block type="core/template" name="page_head" output="toHtml" template="page/html/head.phtml" />
        <action method="addCss"><stylesheet>css/normalize.css</stylesheet></action>
    </reference>
</default>
<user_register_form>
        <block type="core/template" name="prefcentre_regform" output="toHtml" template="ps/prefcentre/signup.phtml" />
</user_register_form>
<layout>

(Please not this is my most recent attempt to link my page with css, I have made several other attempts but it seems pointless to add all attempts)

It is my understanding from reading the tutorials that Magento will load the default handle and apply to all the pages in this .xml file. so why is this not being loaded? I am also wondering if my css is in the right folder, I currently have it in frontend/base/default/css but I have also tried placing it in frontend/default/modulename/css. I am not sure how Magento loads the stylesheet i.e which function it uses so I have not been able to take a look to try and work it out and I have not found that explanation in any of the tutorials

SUMMARY

how do I set up the .xml file to add css to the pages in my module?
were do I need to locate my css for magento to find them?
which class is used to load action method="addCss"? (I have looked in various Mage/Core/Block folders)
is there an alternative way to troubleshoot an xml problem other than simple trail and error? (for example I use Zend_Debug::dump($var) very useful when editing the php side of things)


texts: Magento Add to cart button not showing for not logged visitors

texts:
Hello I'm new with the magento.

I'm working with the 1.9.2.4 version and when I'm not logged the button add to cart doesn't appear.

I tried to look in

app/design/frontend/your-theme-package/theme-variant/catalog/product/view/addtocart.phtml

but there's nothing like

(Mage::getSingleton('customer/session')->isLoggedIn()):


texts: How to trigger without session access invalidate cart version

texts:
On backend action (e.g. saving cart rule) I'd like to invalidate customer/section/load cartVersion to force Magento to recalculate totals on frontend on cart page for those who has that rule applied to his shopping cart.

Any ideas how?


texts:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://www.example.com/index.php/api/v2_soap/index?wsdl=1'

I have faced this kind of error when integrating the click and drop,
any solution for that.


texts: Magento1 customers force to change the password

texts:
When customer logged in the account they need to reset the password for the first time.
if customers are updated the password then next time it self redirect to homepage.


texts: Why shipping methods not updated on changing of checkout fields?

texts:
In the past when I fill one of the checkout fields then shipping method section under the checkout page refreshed and then updated like this:

But now shipping method not updated by calling ajax (or knockoutjs I don't know) anymore and I should refresh the page to update the shipping method section (It's based on the country field in checkout)


texts: How to fixture a product with attribute options in EcomDev PHPUnit?

texts:
I want to write a fixture for some products. The attribute my_attribute is of type eav/entity_attribute_source_table. The Options are not created by install scripts, so they are not in the test database.

How can I get EcomDev to create the needed options for my_attribute? I don't want to set a fixture on eav_attribute_option* tables because that would delete the options of all other attributes.

eav:
  catalog_product:
    - entity_id: 1
      sku: 359
      name: Product 1
      my_attribute: Option 1 #This option is to be generated
      type_id: simple
      price: 55
      visibility: 4
      status: 1
      website_ids:
        - base


texts: Configurable Product showing numerous times?

texts: The configurable products is showing as many times as It is having the number variations like for example If a product has 3-4 variations Then the same product is showing 3-4 time in products page


texts: How to include a custom attribute in the product details page?

texts:
So I've looked around for this information, and the vast majority of information I can find, is how to add a custom tab with custom attribute information, which is NOT what I want.

What I'm looking to do, is add a custom attribute that contains different text per product, just below the "in stock" message in my theme.
I'm fairly certain I need to edit:

app > design > frontend > theme > subtheme > Magento_Catalog > templates > product > view > product_info_main.phtml

The attributes codename is: "stockmessage", how do I include the value of that attribute in each products detailed view page ?

Thanks


texts: I have deployed Magento in heroku all is fine until i encounter this error

texts: SQLSTATE[HY000] [2002] Connection refused  for the database server host name 127.0.0.1.


texts: M2 | Is there any observer we can call with customer token generation API?

texts:
I want to perform custom operation by getting customer information when a customer token is generated using API.

rest/V1/integration/customer/token

Is there a way in magento I can get customer data when a token is returned as result of above API?
Or we can do this by any plugin?


texts: Removing start to be viewed in product page and spammed email for seo

texts:
I need help in an issue,

When I right click on "inspect element" on my home page which is a magento site, I see the codings as below which includes johndoe@doamin.com. But I can not remove it and whenever I use a seo optimization tool, it says "your plain text has emails that are not hidden. it could cause spam". For seo purpose I want to remove it.
The images are:

http://i.imgur.com/3H52nqZ.png

http://i.imgur.com/4w2nKoj.png


texts: bulk apply (or csv import) fixed product tax

texts:
I have a csv file with more than 400 items to import.

All the attributes are imported fine except for the fixed product tax (that is the same for all products).

I tried to manually create one on a product and to export it, but nothing appears in the generated csv.

Is there a way to add it in the csv, or to manually trigger it on all products?


texts: SOAP API adding payment method braintree

texts:
I'm trying to add braintree payment using soap api v2, but when I call shoppingCartOrder function receive the next error "There was an error capturing the transaction. (Transaction deckined: Cannot determine payment method.)

I have not problems using the same code but checkmo as payment method

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:api="http://127.0.0.1/Integrics/Enswitch/API"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
       <api:shoppingCartPaymentMethod soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
           <sessionId>$token</sessionId>
           <quoteId>$quoteId</quoteId>
           <method>
               <method>braintree</method>
               <cc_cid>123</cc_cid>
               <cc_number>4111111111111111</cc_number>
               <cc_type>VI</cc_type>
               <cc_exp_year>2020</cc_exp_year>
               <cc_exp_month>12</cc_exp_month>
           </method>
       </api:shoppingCartPaymentMethod>
   </soapenv:Body>
</soapenv:Envelope>


texts: Magento 2.2 - Need same images for different products

texts:
I need to make a configurable product with 4 Products ( A, B, C, D) of different colors. All the products have 4 photos but 3 of the photos are exactly the same in every product. They have exactly the same file name and data. So i need all the products to use the same file and not duplicate (as i have less storage on my server and there are a lot of products like this).

My images go under media/catalog/product/i/p/filename1.jpg. Rather than using the existing file, Magento makes a copy of this file as filename1_1.jpg.

Ive tried to import the products using csv file but its failing on creating a Configurable Product so I will have to do it manually.

Is there any way i can use already existing photos on different products.


texts: Magento2 - How to show both billing and shipping address in user registration form

texts: I want to show both the billing address and shipping address form in a user-registration page and save the data .


texts: how to enable bluefoot cms pagebuilder for category and product section in magento 2

texts:
Magento default provide bluefoot cms enable option for CMS block & CMS page.

Need to enable bluefootcms editor in category and product level.


texts: admin url show the page is not working in magento 2

texts:
My front is working fine and  admin url:admin_rillmark redirect to the following url

http://127.0.0.1/test11/admin_rillmark/admin/auth/login/key/9a93d07026bee02246470be7e230d6edc0bd5f8bb0b20b749794ae272c7c9c8a/

Gives the error page is not working.


texts: Reserved keyword in controller action - Magento 2

texts:
I am working on an admin grid concept. I found one github source code and analyzed that one.

While I found the URL is different from the declaration in the UI component layout.

<item name="url" xsi:type="string">*/*/new</item>

*/* is mean current frontname and action path, but I could not find New.php in controller path but instead NewAction.php file is present.

So I am confused. How is this automatically mapping to NewAction.php like factory method in Model?

can anyone explain this?


texts:
I'm currently developing an extension that modifies the fields of the checkout page in Magento2. I followed this tutorial: http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_customize.html but cannot get it to work the way I want.

What I want to do is:

Remove some fields (for example the region, and the second line of the street address)
Add custom fields, for example VAT-number, comment field
Change the order of some fields
Create validation for the custom fields

What I did so far:

Created extension (with sequence Magento_Checkout)
Added frontend/layout/checkout_index_index.xml

The extension itself is working properly. When I copy the fields from shipping-address-fieldset and I modify the description for telephone, I see it works. My new description is shown at the checkout page. But when I try to add a new field, or remove a field nothing happens.

Does anyone have experience with this? Please point me in the right direction.

Thanks


texts: Magento2 Get Customer Custom session Data in Javascript file

texts:
I am trying to get the custom session data of Customer in a javascript file. As I am passing 'Magento_Customer/js/customer-data' as dependency in order to retrieve the data.

define(
[
    ......
    'Magento_Customer/js/customer-data'
    .....
],
function (Component,customerData) {
    'use strict';

    return Component.extend({
        defaults: {
            template: 'Mymodule_Company/myTemplate'
        },
        initialize : function(){
           this._super(customerData.getData());
           console.log(customerData.getCustomerInfo());
        }
    });
}
);

I want to get a custom variable just like i set up in my php file :

$this->customerSession->setMyCustomValue("my custom variable");


texts:
I have a custom module. Inside _prepareForm I have also field editor.

$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('add_variables' => false, 'add_widgets' => true,'files_browser_window_url'=>$this->getUrl().'admin/cms_wysiwyg_images/index/'));
$fieldset->addField('my_field_name','editor',array(
            'label' => Mage::helper('mymodule')->__('Some text'),
            'name' =>  'my_field_name',
            'config'    => $wysiwygConfig,
            'required'=>true,
            'style'=>'width:400px;height:300px;'
));

I can insert widget inside editor and when I press Save, it is still proper recognized. But when I call that field value inside template

 $myobject->getData('my_field_name')

it will show

{{widget type="cms/widget_block" template="cms/widget/static_block/default.phtml" block_id="1"}}

instead of actual widget content.

How does Magento parse data if widget is inside, how can I show this widget once it was inserted inside editor?


texts: Magento 2.1.5+ Composer Install Fails To Generate All Files

texts:
I have a project running on Magento 2.1.4, I have the bare minimum needed stored in a Git Repo, which I can clone and run composer install & php bin/magento setup:upgrade and all works fine; it generates all the files needed to run Magento 2. - I know this definitely works, it is how my live site has been deployed, and it is how I have been doing it since Magento 2.1.0.

Now I have gone to upgrade Magento from 2.1.4 to 2.1.7 (Latest version at time of writing). To do this all I am doing is changing my composer.json file from "magento/product-community-edition": “2.1.4” to "magento/product-community-edition": “2.1.7” and then running composer update & php bin/magento setup:upgrade.

Doing the above on my Magento 2 site that is already up and running works fine. My problem arises when I take a fresh copy from my repo, change the composer.json file and run composer update & php bin/magento setup:upgrade.

composer update works fine, but when I try running php bin/magento setup:upgrade I get the following error:

PHP Warning: require(/***/***/***/***/***/bin/../app/bootstrap.php): failed to open stream: No such file or directory in /***/***/***/***/***/bin/magento on line 14

I can see that the bootstrap.php file is missing from the app folder, along with many other files and folders.

I have tried upgrading to 2.1.5 & 2.1.6 as well, but the same thing happens. This does not happen when installing 2.1.4, all files and folders are generated correctly.

I have cleared my composer cache incase anything was wrong with it, but this has made no difference. I have also searched Google, Magento Forums and Stack  Overflow for answers but cannot seem to find anything.


texts: How to reset the products grid filter don't loading in the admin panel?

texts:
My backend keeps freezing and can't do anything with it. I think it is due to the filter that was put last week on the products page to show 1000 products in the grid.

I tried to open it in an incognito window but it didn't work.
How could I fix it with no access to this page?


texts:
app\code\Zero\Storelocator\Rewrite\Amasty\Storelocator\Location.php
    public function getFrontendData(): array
    {

        $storeHours = $this->getDataByKey('attributes');

        $result = [
            'id' => (int)$this->getDataByKey('id'),
            'lat' => $this->getDataByKey('lat'),
            'lng' => $this->getDataByKey('lng'),
            'zip' => $this->getDataByKey('zip'),
            'address'=>$this->getDataByKey('address'),
            'state'=>$this->_storelocHelper->getRegionDataByName($this->getDataByKey('state')),
            'popup_html' => $this->getDataByKey('popup_html'),
            'phone'=>$this->getDataByKey('phone'),
            'distance'=>round($this->getDataByKey('distance'),1),
            'name' =>$this->getDataByKey('name'),
            'city' =>$this->getDataByKey('city'),
            'url_key' =>$this->getDataByKey('url_key')
             'store_hours_weekdays' => $storeHours['store_hours'] ['option_title']['0'],
             'store_hours_weekend_days' => $storeHours['store_hours'] ['option_title']['1']
        ];

        if ($this->getDataByKey('marker_url')) {
            $result['marker_url'] = $this->getDataByKey('marker_url');
        }

        return $result;
    }

How to solve the report.CRITICAL: Notice: Undefined index: store_hours in /app/app/code/Zero/Storelocator/Rewrite/Amasty/Storelocator/Location.php


texts: In Magento2 how to add custom template at admin order grid information tab

texts:
sales_index_view.xml

                Vdc_Invoice::order/comments/custom.phtml


texts: Magento 2.4.1 Error: A non-numeric value encountered in Price.php

texts:
What could cause this error in system.log:
main.CRITICAL: Warning: A non-numeric value encountered in /public_html/vendor/magento/module-catalog-search/Model/Layer/Filter/Price.php on line 194 [] []


texts: Get list of products on current category page in custom block magento 2.3

texts:
I want to get the list of products currently visible on category page in a custom block.
I tried using

<?xml version="1.0"?>
<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\ListProduct" name="mycustomblock" template="MyModule_Schema::product/customlist.phtml" before="-" />
        </referenceContainer>
    </body>
</page>

But when I use this the sorting on category page does not work.

There are no logs except on system.log

You cannot define a correlation name 'review_summary' more than once [] []

I have also tried using this block using blockManager and also tried extending the block. Sorting does not work whenever I use this.

Is there any other way to get products without using that block?


texts: Best way to upgrade from Magento ver. 1.9.1.0 to ver. 1.9.2.4?

texts:
I am not ready to upgrade my live production store to Magento 2.1.0 yet. Would you think it would be a good idea to upgrade from my current version 1.9.1.0 to the latest pre-2.x version (1.9.2.4) and why?
What is the best way to do this upgrade? I have a software installation program in cPanel called SOFTACULOUS (and they sent me a link saying an upgrade is available)....I assume it would also be possible to do a "one-click" kind of an upgrade by using Magento Connect? But I read somewhere that "By default the Connect Manager is used to upgrade 3rd party extensions and not core magento" - how do I do this then? Download some kind of a patch and simply upload those files using FTP?

Any suggestions are greatly appreciated!


texts:
My Website is broken due to JS & CSS loading issue. It's not loading ob both front and back end. Dashboard is not clickable except Dashboard link.

I am totally naive person for Magento, not sure what is cracking the website.

I see some style sheets are loading with comma(,) separated in the header. But not sure why it is loading like that and how to stop it.

My Website is

www.hemdip.com

Can anyone point me towards any help ? I tried various tricks available on internet but for no use.


texts:
I need to alter the Blog url in the "The Checkout | Blog | Login/Register" block that is referenced in the

theme/template/page/html/header.phtml

I have looked everywhere and cannot find it. All I need to do is change the http to https for the blog link which was a customisation put in by my ex-developer

In the /header.phtml, this is part of the code that calls it, but I can't find where I can edit either the topContainer or topMenu. I iave looked in most/layout .xml's as well and cannot find anything there.

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

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

IT is driving me mental!


texts: Magento 1.9.4.2 reset password not working

texts:
I updated my website from 1.8.1.0 to 1.9.4.2

When a customer tries to reset their password the following error occurs:

Invalid method Mage_Customer_Model_Customer::changeResetPasswordLinkCustomerId(Array ( [0] => 357371f4c2ad1a03dd768e865dc63b1a ) )

Any tips on how to fix this?


texts:
I want to export records in CSV files.

All data are Separated with ,

I want it be Separated by ;


texts: Will start using cron jobs after two years result in problems?

texts: I would like to start using the magento cronjob to send out review reminders automatically. Cron jobs have never run before (since its installation two years ago) on this installation if I'm correct. I wonder what will happen. Can this result in problems?


texts: Why am I having wrong prices in a cart page

texts:
I have assigned 23% tax to all products and catalog prices includes tax.
The prices are displayed correctly on the product pages.
But in the cart I see that both unit prices (excl. tax and incl. tax) for an item are the same and both appear to include tax.
Subtotal prices for an item are the same as well.
"Grand Total Excl. Tax" is a sum of the prices and includes tax.
Tax row is calculated correctly.
"Grand Total Incl. Tax" is greater than expected as if the tax was added twice!
What do I do wrong?
My Settings:
Tax Calculation Method Based On: Total

Catalog Prices: Including Tax

Display Product Prices In Catalog: Including Tax

Display Prices: Including and Excluding Tax

Display Subtotal: Including Tax

Include Tax In Grand Total: Yes

Magento version CE 1.9.5


texts: Magento2: How to set limit display product in block

texts:
I have block "product on sale".

{{block class="MGS\Mpanel\Block\Products\Saleoff" mgs_panel_title="" mgs_panel_note="" limit="40" ratio="4" category_ids="" use_slider="0" loadmore="0" template="products/saleoff.phtml" perrow="4"}}

only that it displays all products from the store that are on sale. I would like to limit and display only  eg. 100 products on sale.


texts: Clear leverage browser caching of analytics.js, conversion.js

texts: How to clear Leverage browser caching.Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.


texts: Magento 2 Shipping method available per customer

texts:
normally on my checkout page there are 2 shipping method like this

but sometimes when using login specific users, the shipping method just showed one
just like this

the situation on image number 2 just happen on 2 users from total 216 users, so which is wrong whether my code or my data?
and how to fix it?


texts: Magento 1.7 Help with pulling values from array

texts:
I am trying to get some values from an array. my code below i need to get a comma separated values the values from the sku KEY, i am just not sure how to do it.

Example output I need: sku,sku,sku

$orderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
$order = Mage::getSingleton('sales/order')->loadByIncrementId($orderId);

$orderItems = array();
foreach($order->getItemsCollection() as $item)
{
    //$product = Mage::getModel('catalog/product')->load($item->getProductId());
    $row=array();
    $row['sku'] = $item->getProduct()->getData('model');
    $orderItems[]=$row;
}
echo print_r($orderItems);


texts:
I need to add some information off product in my summary checkout. Specifically, size attribute.

how to get attributes of product in my cart and show in summary checkout ?
thanks community!


texts:
Install Magento 2.1.0 in local server and need to upgrade 2.1.5

If anyone knows, please help me How to run one command by one?


texts:
I have the following plugin:

<?php
namespace Company\Module\Plugin;

class DisableLoginCheckout
{
    /**
     * @var \Magento\Customer\Model\Session
     */
    protected $customerSession;

    /**
     * @var \Magento\Customer\Model\Group
     */
    protected $customerGroupCollection;

    /**
     * @var \Magento\Framework\Controller\Result\RedirectFactory
     */
    protected $redirectFactory;

    /**
     * @var \Magento\Framework\App\Response\RedirectInterface
     */
    protected $redirectInterface;

    /**
     * @var \Magento\Framework\Message\ManagerInterface
     */
    protected $messageManager;

    /**
     * @var \Psr\Log\LoggerInterface
     */
    protected $logger;

    public function __construct(
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Customer\Model\Group $customerGroupCollection,
        \Magento\Framework\Controller\Result\RedirectFactory $redirectFactory,
        \Magento\Framework\App\Response\RedirectInterface $redirectInterface,
        \Magento\Framework\Message\ManagerInterface $messageManager,
        \Psr\Log\LoggerInterface $logger
    ) {
        $this->_customerSession = $customerSession;
        $this->_customerGroupCollection = $customerGroupCollection;
        $this->resultRedirectFactory = $redirectFactory;
        $this->redirect = $redirectInterface;
        $this->messageManager = $messageManager;
        $this->_logger = $logger;
    }

    public function beforeDispatch(
        \Magento\Checkout\Controller\Onepage $subject,
        \Magento\Framework\App\RequestInterface $request
    ){
        if ($this->getCustomerGroup() == 'Disabilitato') {

            $lastCustomerId = $this->_customerSession->getCustomerId();
            $this->_customerSession->logout()->setBeforeAuthUrl($this->redirect->getRefererUrl())
                ->setLastCustomerId($lastCustomerId);

            //$this->messageManager->addNoticeMessage(__('Your account has not been enabled yet'));

            /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */
            $resultRedirect = $this->resultRedirectFactory->create();
            $resultRedirect->setPath('accuontdisabled', ['_secure' => true]);
            $result = $resultRedirect;

            return $result;
        }
    }

    public function getCustomerGroup()
    {
            $currentGroupId = $this->_customerSession->getCustomer()->getGroupId();
            $collection = $this->_customerGroupCollection->load($currentGroupId);

            return  $collection->getCustomerGroupCode();
    }

}

when I try to login with authentication-popup i've got this error

  Fatal error: Uncaught TypeError: Argument 2 passed to
  Magento\Store\App\Action\Plugin\StoreCheck::beforeDispatch() must
  implement interface Magento\Framework\App\RequestInterface, instance
  of Magento\Store\App\Response\Redirect given

Any help?

EDIT

Company/Module/etc/frontend/di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Controller\Onepage">
        <plugin name="MyPlugin" type="Company\Module\Plugin\DisableLoginCheckout" />
    </type>
</config>

EDIT 2

before plugin cannot be used in this way, after plugin solves.


texts: Magento 2 How to get first level parent category of current Category?

texts:
I want to get the first level parent category of the current category. I have a code but it gets only the parent of the current category:

    protected $_registry;

    public function __construct(
        \Magento\Framework\Registry $registry,
        \Magento\Framework\View\Element\Template\Context $context
    ) {
        $this->_registry = $registry;
        parent::__construct($context);
    }

    public function getCurrentCategory()
    {
        return $this->_registry->registry('current_category');
    }

    public function getParentCategory()
    {
        if($this->getCurrentCategory()):
            if($this->getCurrentCategory()->getParentCategory()):
                  $this->getCurrentCategory()->getParentCategory()->getId();
            endif;
        endif;
    }


texts:
Is it possible to overwrite sharing.phtml view by external module?

My point is to add a new social button. I want to publish a module in marketplace, so I don't want to modify any local file. I read about adding files to /app/design/frontend and configuring file overwrite in XML config. Is it possible to do this?


texts: Magento 1.7 - Mass Short Description Change Through MySQL?

texts:
I have a problem with a large quantity of my products on my catalog list having the same short description. About 11 thousand items, this will take forever to change individually. I did some research and it seems that I can change these through a php script or through MySQL syntax. However, there is no identifying attributes for these specific 11 thousand items to separate them from the other few thousand items. They are however in their own Category. Can I do a database query and select all items in a specific product category and than replace the short description with something like this

(I found this code in a previous post with a  similar problem)

UPDATE catalog_product_entity_text SET value = REPLACE(value, 'Will_replace_this_text_to_blank', '')

That being said, could someone lay out some step by steps to help a newbie out.


texts: How to change position of social login button?

texts:
I have installed an extension providing social login with Magento 1.9 on the create account page.

....

It's working well. But I want to change its position. So how I can change it?

...........

It's structure is as below:

Layout :->    frontend/layout/mini_orangae_openid.xml

Template :-> frontend/template/mini_orange


texts: Problem with the URL when changing store while in Subcategory

texts:
First off, Lets clarify :
-Using Magento ver. 2.1.1
-Got a Porto theme
-Only one extension other then the one for the theme: M2E
-Installation on Google cloud
We just got into magento, fidle with it a while and now we have something presentable. Except for one thing that really bug us.
See, I used the store view for the translation, didn't want and find the CMS file. Everything is good form static page to categories, but when we go to a subcategory and change 'store', the link add-up.

Let's say I got
www.domain.com/fr/category-fr/sub-fr
And switch "store", it will give me the following:
www.domain.com/en/category-fr/category-en/sub-en
Which leave me with a 404 error of course.
*I'll add that the categories and subcategories have different url-key from one store to a other so that the URL is in french in French store and in English in English store. This seem to be the problem but the client want that...

Anyone got a clue? Don't really know what could I say about which setting I got. got 'yes' for putting store code and thing. Their's surely something I'm missing right?


texts:
when trying to edit a product in admin I suddenly got this error:

  PHP Fatal Error: Class 'Varien_Data_Form_Element_Datetime' not found
  in /home/public_html/lib/Varien/Data/Form/Abstract.php on line 146

I tried to google it but was unable to find a resolution.


texts: jquery is not define flexslider in magento 2.2.0

texts:
jquery.flexslider-min.js:5 Uncaught ReferenceError: jQuery is not defined
    at jquery.flexslider-min.js:5
(anonymous) @ jquery.flexslider-min.js:5
17:11:53.194 (index):917 Uncaught TypeError: $(...).flexslider is not a function
    at HTMLDocument.<anonymous> ((index):917)
    at fire (jquery.js:3232)
    at Object.fireWith [as resolveWith] (jquery.js:3362)
    at ready (jquery.js:3582)

  app/code/Vendor/Modulename/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
            flexsliderjs: 'Vendor_Modulename/js/jquery.flexslider-min'
        }
    }
};


texts: Magento2 theme settings not applied to websites

texts:
I have a fresh installation of Magento2 (2.1.6) for three stores on different domains, followed the installation guide from start to finish. Apart from the Web Setup Wizard not showing up in the admin menu (seems to be a known bug noone cares about), it seems I have a much worse problem:
In theme configuration, only global settings take effect. All settings concerning the individual stores or store views can be modified but are disregarded when rendering the frontend.
I tested this out by globally setting the Blank theme and Luma for a store view. All caches are disabled, I'm in developer mode, but the site still shows Blank. The same happens with meta tags or page content.
I'm new to Magento, but right at home with PHP and large scale applications, so honestly I don't know what to do anymore.
Since the issues on Github seem to be mostly ignored, I desperately hope someone can help me with this on SE.


texts: No results or zero hits with search on magento 2.3.4 using elasticsearch 6.5.0 and php-elasticsearch client 6.5.1 or 6.1.0

texts:
Elastic Search 6.5 on Magento 2.3.4 giving no results
Hi, I have configured elasticsearch 6.5 and tried elasticsearch PHP client versions 6.7.1, 6.5.1, and 6.1.0. I am able to configure successfully. But search results return nothing.

Simple Curl queries on elasticsearch give results.

Please see below.

magento@magento:~$ curl -u elastic_magento -X GET "https://3.23.16.244/magento2_product_1_v10/_search?q=name:tomato&pretty"
Enter host password for user 'elastic_magento':
{
"took" : 14,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 0.87138504,
"hits" : [
{
"_index" : "magento2_product_1_v10",
"_type" : "document",
"_id" : "52",
"_score" : 0.87138504,
"_source" : {
"store_id" : "1",
"sku" : "SLB-01-1008",
"status" : "1",
"status_value" : "Enabled",
"visibility" : "4",
"tax_class_id" : "2",
"tax_class_id_value" : "Taxable Goods",
"messure" : "5434",
"weightattribute" : "5437",
"weight_for_db_small" : "5456",
"name" : "Tomato",
"url_key" : "tomato",
"shipping_product_location" : [
"5",
"6"
],
"category_ids" : [
2,
7
],
"position_category_2" : "10000",
"name_category_2" : "Dailybox+",
"position_category_7" : "0",
"name_category_7" : "Vegetables",
"price_0_1" : "23.000000",
"price_1_1" : "23.000000",
"price_2_1" : "23.000000",
"price_3_1" : "23.000000"
}
}
]
}
}

I constructed the Magento query which I captured using pcap is not giving any hits, total hits 0

curl -X GET http://localhost:9200/magento2_product_1/document/_search -H 'Content-Type: application/json' -d '{"from":0,"size":"10000","stored_fields":["_id","_score"],"sort":[{"_score":{"order":"desc"}}],"query":{"bool":{"must":[{"match":{"_search":{"query":"tomato","boost":2}}},{"match":{"sku":{"query":"tomato","boost":2}}},{"match":{"color_value":{"query":"tomato","boost":2}}},{"match":{"description":{"query":"tomato","boost":2}}},{"match":{"manufacturer_value":{"query":"tomato","boost":2}}},{"match":{"name":{"query":"tomato","boost":6}}},{"match":{"shipping_product_location_value":{"query":"tomato","boost":2}}},{"match":{"short_description":{"query":"tomato","boost":2}}},{"match":{"sku":{"query":"tomato","boost":7}}},{"match":{"status_value":{"query":"tomato","boost":2}}},{"match":{"tax_class_id_value":{"query":"tomato","boost":2}}},{"match":{"url_key":{"query":"tomato","boost":2}}},{"terms":{"visibility":["3","4"]}}]}},"aggregations":{"price_bucket":{"extended_stats":{"field":"price_0_1"}},"category_bucket":{"terms":{"field":"category_ids","size":500}},"entity_bucket":{"terms":{"field":"entity_id","size":500}},"messure_bucket":{"terms":{"field":"messure","size":500}},"weightattribute_bucket":{"terms":{"field":"weightattribute","size":500}}}}'

Results

{"took":8,"timed_out":false,"_shards":{"total":5,"successful":5,"skipped":0,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]},"aggregations":{"weightattribute_bucket":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"entity_bucket":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"price_bucket":{"count":0,"min":null,"max":null,"avg":null,"sum":null,"sum_of_squares":null,"variance":null,"std_deviation":null,"std_deviation_bounds":{"upper":null,"lower":null}},"messure_bucket":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]},"category_bucket":{"doc_count_error_upper_bound":0,"sum_other_doc_count":0,"buckets":[]}}}.

Can anyone suggest what is the issue here? I am new to Magento and elasticsearch.