texts: Remove items from menu SM Mega menu plugin

texts:
Can someone please let me know how to remove the about us and contact links in my main menu, this is my store vapersmoke.co.nz

I'm using the SM Mega Menu plugin and using the SM Jare theme from MagenTech, I've searched all over the admin panel and internet for info on this, but with no luck! Would it be coded in one of the css file?

Your help will be much appreciated

Peter


texts: Magento 2: What is the `component_paths` property in `magento/magento2-base`

texts:
In Magento 2, the magento/magento2-base package has the following component_paths section in its composer.json file.

"extra": {
    "component_paths": {
        "trentrichardson/jquery-timepicker-addon": "lib/web/jquery/jquery-ui-timepicker-addon.js",
        "colinmollenhour/cache-backend-redis": "lib/internal/Cm/Cache/Backend/Redis.php",
        "colinmollenhour/credis": "lib/internal/Credis",
        "components/jquery": [
            "lib/web/jquery.js",
            "lib/web/jquery/jquery.min.js",
            "lib/web/jquery/jquery-migrate.js"
        ],
        "blueimp/jquery-file-upload": "lib/web/jquery/fileUploader",
        "components/jqueryui": "lib/web/jquery/jquery-ui.js",
        "twbs/bootstrap": "lib/web/jquery/jquery.tabs.js",
        "tinymce/tinymce": "lib/web/tiny_mce"
    },

What is this used for?  It doesn't appear to be a part of stock composer, and a quick text search though Magento's source didn't reveal any obvious uses.


texts: How to Update/Override Core form Validation in magento 2?

texts:
I want to override or update core validation for magento frontend form like as checkout page form address field validation change.

need to change the core validation


texts: Error at admin on clicking 'ship' at some orders using USPS?

texts:
I am using magento 1.6, i am using USPS for shipping when i anybody create order and at admin panel when i click ship for the order it throws error :

   Invalid method Mage_Usa_Model_Shipping_Carrier_Usps::isGirthAllowed(Array
  (
   [0] => FR
  )
  )

Does anybody come across this and solved this problem.


texts:
How can I add a slide control in the frontend using the Magento UI library or any other way?

I am not talking about an image slider I talking about a control slider
Something like: boostrap slide


texts:
@EDIT: it finally worked. I just needed to clear Magento's cache. In case you need to do so, go to /var/cache and delete everything there, and then start again.

I installed Magento 2 with WAMP server on Windows 10. I installed it with sample data, and I can properly access the example page on http: //localhost/magento. But when I try to access the backend with the admin url, I get the message "Cannot access the page" from the browser (no matter which).
On installing, th url for admin was set to https: //localhost/magento/admin_abcd1234

As it didn't work, I thought of enabling ssl_module on wamp, but it didn't work and Apache stopped working. So I unenabled it again.

After that, I went to phpMyAdmin, magento databse, core_config_data table, and changed web/secure/use_in_adminhtml value to 0. I also tried NULL. I still could not access the admin page. I have read several posts in forums and still cannot figure out what is happening. I checked mod_rewrite in Apache too, but I didn't see any effect. I am a bit new in using servers, PHP and MySQL.

If I access http: //localhost/magento/admin_abcd1234 the browser changes to https: //localhost/magento/admin_abcd1234 after few seconds.


texts: List.phtml load external file with php does not work (missing helpers)

texts:
Inside our list view I want to load an external php file.
The file is displayed, but when loading the php code, the page break down.

When I place the php code inside the catalog/product/list.php it does work.
Loading it inside the external file, it breaks down.

I guess I am missing some helpers.
How can I fix this problem?

Line inside list.phtml:

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

Local.xml file:

<catalog_category_layered>
<reference name="product_list">

        <block type="core/template" name="beknopte_specificaties_new" as="beknopte_specificaties_new" template="catalog/product/list/beknoptespecs_new.phtml"/>
</reference>
</catalog_category_layered>

External php file:

<?php
    $_helper = $this->helper('catalog/output');
    $_product = $this->getProduct();
    $theme = $this->helper('ultimo');
?>

<?php $yourCatIds = array(27,233,234,235);
$productCats = $_product->getAvailableInCategories();

if (count(array_intersect($yourCatIds,$productCats))) {

    if($_product->getData('i_display_diagonal_944_1')) :
    echo '
' . $_product->getResource()->getAttribute('i_display_diagonal_944_1')->getFrontendLabel() . '';
    echo '' . $_product->getAttributeText('i_display_diagonal_944_1') . '
';
    endif;

}
?>


texts: JS errors in checkout and the page can't stop loading

texts: On a fresh installation M 2.2.2, checkout page can't load some JS files, and the page cannot stopping loading, I tried to insert them manually but no success !


texts:
I am looking for an observer event that is triggered when any re-index starts.

I want to create an observer that sends out an email whenever an index has been initiated for re-indexing.


texts: How to solve Incompatibility and ambiguous issue during data migration from Magento 1.9.3.2 to Magento 2.1.5

texts:
I am trying to migrate data from Magento 1.9.3.2 to Magento 2.1.5

I am using Data Migration Tool by Magento => http://devdocs.magento.com/guides/v2.1/migration/migration-tool.html

When I start migrating using command: bin/magento migrate:data [-r|--reset] {}, I receive the following error:

2017-04-09 19:45:16][INFO][mode: data][stage: integrity check]
[step: Data Integrity Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:16][INFO][mode: data][stage: integrity check]
[step: EAV Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:16][ERROR]: Incompatibility in data. Source document:
eav_attribute. Field: frontend_input. Error: Attribute with attribute_id=222
cannot contain empty field value
[2017-04-09 19:45:16][ERROR]: Incompatibility in data. Source document:
eav_attribute. Field: frontend_input. Error: Attribute with attribute_id=223
cannot contain empty field value
[2017-04-09 19:45:16][ERROR]: Incompatibility in data. Source document:
eav_attribute. Field: frontend_input. Error: Attribute with attribute_id=224
cannot contain empty field value
[2017-04-09 19:45:16][ERROR]: Incompatibility in data. Source document:
eav_attribute. Field: frontend_input. Error: Attribute with attribute_id=225
cannot contain empty field value
[2017-04-09 19:45:16][INFO][mode: data][stage: integrity check][step:
Customer Attributes Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:16][INFO][mode: data][stage: integrity check][step: Map
Step]: started
45% [============>---------------] Remaining Time: 4 secs
[2017-04-09 19:45:19][ERROR]: Document has ambiguous configuration:
sales_flat_quote_item
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step: Url
Rewrite Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step: Log
Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step:
Ratings Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step:
ConfigurablePrices step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step:
OrderGrids Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step: Tier
Price Step]: started
100% [============================] Remaining Time: 1 sec
[2017-04-09 19:45:19][INFO][mode: data][stage: integrity check][step:
SalesIncrement Step]: started
100% [============================] Remaining Time: 1 sec

[Migration\Exception]
Integrity Check failed
migrate:data [-r|--reset] config

I tried a lot but unable to find a proper solution. Please someone help to solve this error. Which xml file do I need to edit and what do I need to write exactly to solve this issue? Please seeking help from expert. Thanks in advance.


texts: Where is set the main/primary color value in Luma theme

texts:
I'm trying to find out which is the file that sets the main blue color in Luma theme.

There is a blue defind @color-blue1: #1979c3; in lib/web/css/source/lib/variables/_colors.less

Where Luma gets it from ?


texts:
I Installed Magento 2.2.0-dev through git clone.

I tried installing sample data by using Magento's method of cloning repositories http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data-before-clone.html#sample-clone

The sample data is installed and I can see everything in admin.

On front end, pages are blank.
When I go to a category page I can see product filters but I cannot see any of products - content is blank.

When I run bin/magento setup:upgrade it seems to upgrade everything just fine but then at end it says

Please re-run Magento compile command. Use command "setup:di:compile"
Start import:
Nothing to import

I checked in list of modules and Module 'Magento_SampleData': is in list

What could I be missing?

UPDATE:

I set the store to development mode and then the items show.
Only in production mode does it not show the items.
Is sample data only meant to work in development mode?


texts: How do I create a configurable product with associated products?

texts:
The following code does create a configurable product, however, when I open the product in the backend, the following message appears:

when I create the configurable product and open it in the backend, I get this message: Select Configurable Attributes Only attributes with scope "Global", input type "Dropdown" and Use To Create Configurable Product "Yes" are available.

Material
Size
Cotton
Color
Colour Group

I selected size and color, and clicked continue, however, there are no associated products. All of the other product data is there.

//Mage Product
$mpr = Mage::getModel('catalog/product');
$mpr
    ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE)
    ->setTaxClassId(5)
    ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
    ->setStatus(Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
    ->setWebsiteIds(array(1))
    ->setAttributeSetId(4) // You can determine this another way if you need to.
    ->setSku("C12345")
    ->setName("C12345")
    ->setQty(25)
    ->setShortDescription('short description')
    ->setDescription('description')
    ->setPrice(1)
    ->setStockData(array(
        'use_config_manage_stock' => 1,
        'is_in_stock' => 1,
        'is_salable' => 1,
    ));

    $productData = array(
         '7039604' =>
            array('0' => array('attribute_id' => '85', 'label' => 'ROYAL','value_index' => '28563', 'is_percent' => 0, 'pricing_value' => '')
                 ,'1' => array('attribute_id' => '192', 'label' => '14', 'value_index' => '28728', 'is_percent' => 0, 'pricing_value' => '')
            )
    );
    $attributeData = array(
        '0' => array(
            'id' => NULL
            ,'label' => 'Color'
            ,'position' => NULL
            ,'values' => array(
                '0' => array('value_index' => 28563, 'label' => 'ROYAL', 'is_percent' => 0, 'pricing_value' => '0', 'attribute_id' => '85')
            )
            ,'attribute_id' => 85
            ,'attribute_code' => 'color'
            ,'frontend_label' => 'Color'
            ,'html_id' => 'config_super_product__attribute_0')
        ,'1' => array(
            'id' => NULL
            ,'label' => 'Rivers Size'
            ,'position' => NULL
            ,'values' => array(
                '0' => array('value_index' => 28728, 'label' => '14', 'is_percent' => 0, 'pricing_value' => '0', 'attribute_id' => '192')
            )
            ,'attribute_id' => 192
            ,'attribute_code' => 'rivers_size'
            ,'frontend_label' => 'Rivers Size'
            ,'html_id' => 'config_super_product__attribute_1')
    );
$mpr->setConfigurableProductsData($productData);
$mpr->setConfigurableAttributesData($attributeData);
$mpr->setCanSaveConfigurableAttributes(true);
$mpr->save();


texts: Magento 2.1 - display attribute group name

texts:
How can I display the group names above the attributes. I found the solution for Magento 1 but not for Magento 2.

Group 1
att 1
att 2
att 3

Group 2
att 4
.
,
I am using Porto theme on magento 2.1.


texts: Remove invalid html characters while fetching CMS pages by id

texts:
Using below code i'm getting cms page contents by page_id

$content = Mage::getModel('cms/page')->load(6)->getContent();

print_r($content);

it's fetching value from database, so i'm getting invalid special characters like /r/n added and all </ is replaced with <\/

Is there any magento way to remove this invalid characters ?


texts: Merge Account dashboard with Account information

texts:
How can I move my Account Dashboard information to Account Information (merge them together)
I want to show:

Contact Information
Default Billing Address
Default Shipping Address
Account Information

In same page instead of 2 page (account dashboard and account information)


texts:
How can I make an image of a product the base image ? I tought setting the position would be enough but that's not true.

I create my products via the REST api , this works fine.

The images are uploaded correct.

But I don't know how to tag an image as the base image. When I have multiple images it is always the last images that is tagged as base automaticly, I don't want that. How could I set that in my array?

$product = [
    "sku" => str_replace(' ', '-', $data['name']),
    "name" => $data['name'],
    "type_id" => 'configurable',
    "price" => 0,
    'attribute_set_id' => 9, // default
    "extension_attributes" => [],
    "custom_attributes" => [],
    'media_gallery_entries' => $this->getMediaGalleryEntries($data)
];

function getMediaGalleryEntries($data)
{
    $image = 'path/to/my/image';

    $entries[] = [
        'position' => $iterator,
        'media_type' => 'image',
        'disabled' => false,
        'label' => '',
        'types' => ['image', 'small_image', 'thumbnail'],
        'content' => [
            'type' => 'image/jpeg',
            'name' => pathinfo($image,PATHINFO_FILENAME).'.'.pathinfo($image, PATHINFO_EXTENSION),
            'base64_encoded_data' => base64_encode(file_get_contents($image)),
        ]
    ];

    return $entries;
}


texts: Advanced pricing rule not working for specific user group in magento2.3

texts: Advanced price rule not working with specific user group. I have created new user group "Salon" and created advanced price rule discount for specific product with respect to specific user group "Salon" then price rule not working. But when i select "ALL Groups" then it is working fine.


texts: Which module I can disable in Magento 2?

texts:
I am working on a website in Magento 2, but many of the modules are not of my use because my target customers would be from INDIA for now.

Also, I only want to sell simple, virtual and downloadable products. I don't want configurable, bundled and grouped products.

I don't want payment methods like Authorizenet, Braintree, and PayPal, shipping methods like DHL, UPS and USPS.

So, my question is how can I remove these modules from my Magento project without harming the other functionality of Magento 2?

I have already tried https://www.integer-net.com/why-and-how-to-disable-magento-2-core-modules-improve-performance/ but it broke Magento's functionality.

Please suggest, which modules can be removed from Magento 2 safely and how to make it work without breaking default functionality of store?

Is there any automated tool to check the list of modules which will not affect on other modules functionality?

I don't have any plan to upgrade my store using the command line. I would prefer replacing my store modules directly in future (if needed).


texts: Magento keeps going to install after migration

texts:
I have recently made a duplicate copy of a customers Magento installation and put it into a subdirectory of the root.  I did a dump of the database and imported it into a new database.  I changed the local.xml file to reflect the new database.  Now my issue comes when I try to view the site under the new subdirectory to keeps invoking the install as if the local.xml file is missing.  It is clearly there in the app/etc folder within the cloned site, but still the install keeps starting.  Any ideas?  Below I have pasted the connection info in the local.xml file, just in case I miss typed something.

        <default_setup>
            <connection>
                <host><![CDATA[localhost]]></host>
                <username><![CDATA[stevenst_newUser]]></username>
                <password><![CDATA[bmalldo]]></password>
                <dbname><![CDATA[stevenst_storeupgrade]]></dbname>
                <active>1</active>
            </connection>
        </default_setup>


texts: Is there a way to get all values currently in the registry

texts:
i've been using Mage::registry('current_category'); but i only found about that from a template done by someone else, so i am wondering if there is an easy way to get a list of all the registry keys/values currently being used in magento

while i'm not fussed if a link is provided with a list of magento ones i would like to get a list of any registry keys/values used in 3rd party modules


texts: Magento 2: What is diffrence between _isAllowed & _isAllowedAction?

texts:
We have below methods. It generally used for User Role wise Module Permission, as per set.

In Controller: _isAllowed
In Block: _isAllowedAction

At which stage & when this method is called & what's difference between both Method?


texts: Order was generated without adding shipping amount

texts:
Recently I faced an very random issue about generating order without adding shipping cost. My client reported me that customer was able to complete the order without paying for shipping amount.

After reporting this issue, First of all I revised all of the error/debug log files [ system, exception, authorizedCIM, usps ] for further information about this issue but I didn't found any informative details from this files. Then after I checked the database entries of affected order and found  that shipping method entry already available in quote table. But for some reason sales_quote data doesn't converted to sales_order data.

This means shipping rates was already assigned when customer was placing order but after place order shipping data doesn't inserted to order table. Please find below screen shot of affected order database entries for your ref.

Sales Table

Admin Order View Page

Please help me to find out the issue or share solution if some one fixed this before.


texts:
i'm trying to add a new customer address using Magento 2 but after fill the form and submit not save nothing.

I have seen that 2 requests throw 302

Request URL:http://localhost/magento/customer/address/formPost/
Request Method:POST
Status Code:302 Found
Remote Address:[::1]:80
Referrer Policy:no-referrer-when-downgrade

and

Request URL:http://localhost/magento/customer/address/
Request Method:GET
Status Code:302 Found
Remote Address:[::1]:80
Referrer Policy:no-referrer-when-downgrade

any idea?


texts: Update default address in customer_save_after observer

texts:
I am trying to update a customer's default billing address when they update their main account information.

My observer function looks like this and for the time being I am hard coding in the prefix update to be Dr:

public function customerSave($observer)
{
        $customer           = $observer->getCustomer();
        $customerAddress    = Mage::getModel('customer/address');

        if ($customer->getDefaultBilling()){
             $defaultBillingId = $customer->getDefaultBilling();
             $customerAddress->load($defaultBillingId);
        }
        $customerAddress->setPrefix('Dr')->save();

        Mage::app()->getResponse()->setRedirect(Mage::getUrl('checkout/onepage'))->sendResponse();
        exit;
}

UPDATE:
If I remove the redirect it works. So why does this affect it as the observer is customer_save_after which means complete action after the data has been saved

Could someone point out where I am going wrong


texts: Magento 2:How to add custom validation in Address book form?

texts: Hello i want to add custom validation in address book of customer Account dashboard, when the customer is sign in they have one tab address information in that when we add new address that open form i want to add validation for postcode and telephone number which are accept only number please help me how can i do that.


texts: How does the Magento database structure connect review summaries to review details?

texts:
How can I relate a product review title, detail & nickname to a review with a score of 100? Looking at the tables, I can find this information between:

review_detail:

This has the information for the review_id, title, detail, & nickname.

However, it doesn't have information regarding the score of the review. I can find scores under the following table:

review_entity_summary:

This has the values for the product ID (entity_pk_value) and the rating_summary

Unfortunately it doesn't seem to have a column for review_id.

How can I relate these two directly within the database structure?


texts:
Script below add new eav attribute to product model. But who can explain me what mean everyone option in third paramater from function addAttribute() and where it using or give some links where i can read something about it.

<?php
namespace Vendor\Namespace\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
private $eavSetupFactory;

public function __construct(EavSetupFactory $eavSetupFactory)
{
    $this->eavSetupFactory = $eavSetupFactory;
}

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    $eavSetup->addAttribute(
        \Magento\Catalog\Model\Product::ENTITY,
        'sample_attribute',
        [
            'type' => 'int',
            'backend' => '',
            'frontend' => '',
            'label' => 'Sample Atrribute',
            'input' => '',
            'class' => '',
            'source' => '',
            'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
            'visible' => true,
            'required' => true,
            'user_defined' => false,
            'default' => '',
            'searchable' => false,
            'filterable' => false,
            'comparable' => false,
            'visible_on_front' => false,
            'used_in_product_listing' => true,
            'unique' => false,
            'apply_to' => ''
        ]
    );
}
}


texts: Display Billing Company in Sales Order Grid

texts:
I'm trying to add Billing Company and Shipping Company to the Sales Order Grid (Magento CE 1.9.0.1) but everything I have tried appears to have no effect - I don't even see the new column with empty data and there's nothing in the log to suggest what's wrong either. Wondered if someone might be able to help?

I'm duplicating this file:
/app/code/core/Mage/Adminhtml/Block/Sales/order/Grid.php as /app/code/local/Mage/Adminhtml/Block/Sales/order/Grid.php and then modifying as follows;

(_prepareCollection and _prepareColumns stripped back to simply show the new code)

protected function _prepareCollection()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass());

    //New line
    $collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id' ,array('company'=> 'company' ));
    $collection->addFieldToFilter('sales_flat_order_address.address_type', array('eq' => 'billing'));

    $this->setCollection($collection);
    return parent::_prepareCollection();
}

protected function _prepareColumns()
{

    [...]

    $this->addColumn('company', array(
        'header' => Mage::helper('sales')->__('Billing Company'),
        'index' => 'company',
    ));

    [...]
}


texts: Magento 2.3 How to add customer login function for my existing Observer?

texts:
Following are the code show  Premium or Non-Premium along with product name using observer,

<?php
namespace Gta\CustomerMsgPdp\Observer\Product;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class Data implements ObserverInterface
    {
        /**
         * Below is the method that will fire whenever the event runs!
         *
         * @param Observer $observer
         */
        public function execute(Observer $observer)
        {
            $product = $observer->getProduct();
            $originalName = $product->getName();
            $price = $product->getPrice();

            if($price >= '50')
            {
                $modifiedName = $originalName . ' - Premium Products';
            }
            elseif($price <= '50')
            {
                $modifiedName = $originalName . ' - Non Premium Products';
            }

            // $modifiedName = $originalName . ' - Modified by Magento 2 Events and Observers';
            $product->setName($modifiedName);
        }
    }

I want to add another observer to check if customer logged-in or not if customer logged-in then only show wheater it is premium or non-premium products.


texts: Magento 2 - Backend custom module 404 error

texts:
I'm trying to create my custom module in the back-end, I followed a lot of tutorials, but I continue to get 404 error when I try to access to my controller. The only thing that work fine is the menu option, but when I go to http:/admin_host/macrocategorie/config/ I get Page not found 404

I have already tried to run this command:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clean
php bin/magento cache:flush

But nothing change.

I have used below code :

Vendor\Module\registration.php

<?php      \Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Vendor_Module',
__DIR__    );

Vendor\Module\etc\module.xml

<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Vendor_Module" setup_version="2.0.0"/></config>

Vendor\Module\etc\adminhtml\routes.xml

<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="admin">
    <route id="macrocategorie" frontName="macrocategorie">
        <module name="Vendor_Module" before="Magento_Backend"/>
    </route>
</router></config>

Vendor\Module\etc\adminhtml\menu.xml

<?xml version="1.0"?><config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
<menu>
    <add
            id="Vendor_Module::macrocategorie"
            title="Macrocategorie"
            module="Vendor_Module"
            sortOrder="100"
            parent="Magento_Backend::stores"
            resource="Vendor_Module::macrocategorie"
    />
    <add
            id="Vendor_Module::config"
            title="Configura Macrocategorie"
            module="Vendor_Module"
            sortOrder="105"
            parent="Vendor_Module::macrocategorie"
            action="macrocategorie/config/"
            resource="Vendor_Module::index"
    />
</menu></config>

Vendor\Module\Controller\Adminhtml\Config\Index.php

<?php namespace Vendor\Module\Controller\Adminhtml\Config; use Magento\Backend\App\Action\Context; use Magento\Framework\App\ResponseInterface; use Magento\Framework\View\Result\PageFactory; class Index extends \Magento\Backend\App\Action {

protected $resultPageFactory;

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

/**
 * Dispatch request
 *
 * @return \Magento\Framework\Controller\ResultInterface|ResponseInterface
 * @throws \Magento\Framework\Exception\NotFoundException
 */
public function execute()
{
    die("Controller backend");
    $resultPage = $this->resultPageFactory->create();

    return $resultPage;
} }

Thank's for the support


texts: Magento Business Intelligence service errors

texts:
Every day we are seeing the following error appear at the top of the Magento admin interface:

The message states: Failed to synchronize data to the Magento Business Intelligence service. [Retry Synchronization]
If we click on the "Retry Synchronization" link the message goes away and does not return until the following day. Presumably the nightly cron process for the Business Intelligence service is having some issues.
The following errors are being logged in var/log/debug.log which relate to the analytics service:
[2020-09-09 11:00:04] main.ERROR: Cron Job analytics_subscribe has an error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`db_name`.`oauth_token`, CONSTRAINT `OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_consumer` (`entity_id`) ON DELETE CASCADE), query was: INSERT INTO `oauth_token` (`consumer_id`, `type`, `token`, `secret`, `verifier`, `callback_url`, `user_type`) VALUES (?, ?, ?, ?, ?, ?, ?). Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":63438848,"emalloc_start":60951528} [] []

We are running Magento 2.3.5-p1.
How can we troubleshoot this to identify the cause of the problem? We want to use the Magento Business Intelligence service (don't want to disable it).


texts: Admin - Customers - Manage Customers - Edit - Goes To Blank Page

texts:
When I am in Admin and go to Customers and then to Manage Customers it produces a list of the customers, but if I try and edit any of them, either by clicking on the customer or clicking on Edit next to a customer it just takes me to a blank page.

I've looked at every answer I could find and tried the solution, but nothing fixes it.

I edited my public_html/php.ini file and increased the memory_limit from 128m to 512m. I edited my .htaccess file and added this line: suPHP_ConfigPath /home/CUSTOMERID/public_html (changing the CUSTOMERID, to my Hosting CustomerId.

I tried a suggestion went into

app/code/core/Mage/Adminhtml/Block/Widget/grid.php and changed:

public function getRowUrl($item)
{
    $res = parent::getRowUrl($item);
    return ($res ? $res : '#');
}

}

to

public function getRowUrl($item)
{
return $this->getUrl(’*/*/edit’, array(’id’ => $item->getId()));
}

Which totally crashed my ADMIN until I reinstalled the original Grid.php file.

I looked in index.php file for this line to see about error reporting: ini_set('display_errors',1);

and found that this was already in:

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
}

#ini_set('display_errors', 1);

I looked in error_log and didn't find any errors concerning Admin.


texts: How to override class Virtual Type class

texts:
I saw this, but it don't work for me.

How to override Virtual Type class in Magento 2

<virtualType name="categoryFilterList" type="Magento\Catalog\Model\Layer\FilterList">
    <arguments>
        <argument name="filterableAttributes" xsi:type="object">Magento\Catalog\Model\Layer\Category\FilterableAttributeList</argument>
    </arguments>
</virtualType>
<virtualType name="searchFilterList" type="Magento\Catalog\Model\Layer\FilterList">
    <arguments>
        <argument name="filterableAttributes" xsi:type="object">Magento\Catalog\Model\Layer\Search\FilterableAttributeList</argument>
    </arguments>
</virtualType>

How to override Magento\Catalog\Model\Layer\FilterList ?

Plugin is creating successfully, but I'm unable to extend from parent class, as I need it's protected methods.

When I use preference - I'm facing with another issue. Magento is trying to create object from interface, which is impossible. As I understand it happen because it doesn't see

<arguments>
    <argument name="filterableAttributes" xsi:type="object">Magento\Catalog\Model\Layer\Search\FilterableAttributeList</argument>
</arguments>

The only way which is working for me - is overlapping config and setting sequence:

Copy config from above to my module and replace type to my own.


texts:
I want to override the register.phtml in Magento_Customer module. But the setTemplate method fails to override the original register.phtml because the register.phtml was overridden in Magento_CustomerCustomAttributes

<referenceBlock name="customer_form_register">
            <action method="setTemplate">
                <argument name="template" xsi:type="string">VendorName_ModuleName::form/register.phtml</argument>
            </action>
        </referenceBlock>

In this case, how can I replace the template, or how can I insert a set of radio button into that template? since my intention is to add radio button to the template. Thanks in advance.


texts: Magento : Is It Possible to Call Model From Another Extension

texts:
I want to create custom module, but I need to acquire variable from another module.

I've looked into their code and this variable is result of many different functions in different Models, which I would like to avoid including in my module.

Is it possible to request variable from specific line in Model from  different module?

Edit:
For example:

I am only interested in getting the value (from a Model within a module) of: $rates[$customMethod->getId()]['time'],
where $rates and $customMethod are not easily traceable (with my Magento knowledge), so I am wondering if there is an easier way of achieving this without copying all of the Models being used by the module.


texts: Magento 2: Product/Customer Attribute with Dropdown Not Taking it's Given Value

texts:
I'm creating product attribute Color with Dropdown. Red, Blue, Green, etc. from Admin.

When i try to set it's value programatically, then i can't use "Red", "Blue", "Green"

It will store paticular ID for that 10,11,12. So i need to use that.

How can i set from Admin, so it only uses it Value, Not Number.

Example:

If i have Lable has options A, B, C.

So in database it stores as Id. So for A -> 10, B -> 20, C-> 30.

When we going to save this by custom we need to use 10 which in annoying. How to use A for this?


texts: bootstrap into luma extended theme - magento2

texts:
I created theme that extend luma. I have integrated bootstrap into magento using this link  after that product detail page and page header alignment are not nice. Due to commonalities between these two framework - bootstrap css and luma/adaptive css there's quite a bit of collusion happening, causing confusion and odd behavior.

Bootstrap is responsive web design, Luma use adaptive web design.

is this good way to integrate bootstrap into luma extended theme?

I'm looking expert suggestions to what are the things I need to concern If I integrate bootstrap into luma extended theme.


texts: Magento 2 returns 404 after switching language on product pages

texts:
magento 2 one store click on product page giving
www.abc.com/product1.html after switch on next language

it showing like this

catalog/product/view/id/15/s/tablets

if have any idea please tell me


texts: Add extra row to total but only for one product

texts:
I want to add one extra row on the total of Shopping cart and checkout pages but only for one product when that product will be in the shopping cart.

My requirement is to add the fixed shipping price for only one product that will be plus with other shipping if that product is in the cart.

Any help will be appreciated!!

Thanks.


texts: What is table attribute in Magento database?

texts:
I have an extension and on the backend it gives me an option of adding percentage based surcharge on subtotal. For one of the field it says:

  Please enter an sales_flat_quote_address attribute code which will be
  taken as base for the cost calculation.

Now as far as I know, sales_flat_quote_address is the name of a table in Magento database which holders user information.How do I get this table's attribute code?

I have mailed the extension developers but there is no response :(


texts: How to fetch Product options label on Add To Cart button click?

texts:
I am trying to get the configurable product selected options value, option titles on clicking the Add to cart button.
From the post content, I get the option_id but : How we can fetch the and Option Titles.
For eg :  (See Screenshot for reference )

)

I have ten text fields and two select fields : So on submit I need can get the values entered by the user but I am not able to fetch the titles of the text fields or the titles of the selected options.

Note : I have used "bss dependtent custom option" extension for creating the options.
Thanks!


texts: SOAP-ERROR: Parsing WSDL: Couldn't load from

texts:
I am receiving the following error when trying to connect to SOAP api - the location of the test file is http://www.fontrubidesign.com/juniper/hello.php and the error I am getting is below:

    XML Parsing Error: not well-formed
Location: http://www.fontrubidesign.com/juniper/hello.php
Line Number 1, Column 7:

object(SoapFault)#2 (9) {
------^

The code I am using to test the connection is:

try {
$client = new SoapClient('http://www.fontrubidesign.com/juniper/index.php/api/soap/?wsdl', array('trace' => 1, 'connection_timeout' => 120,'compression'=> SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,'trace'=>true,'exceptions'=>true));

$session = $client->login(array(
        'username' => 'user',
        'apiKey' => 'password')
);

}
catch (Exception $e) {
    var_dump($e);
}
header('Content-type: application/xml');
echo $client->__getLastResponse();
echo $client->__getLastRequest();


texts: Price display different after selecting attribute

texts: I have a problem, in first the price displays as x,xxx.xx then when i select an attribute it changes to x.xxx,xx. Can anybody help me figure it out ?


texts: How to get the Grand Total with shipping charge and tax at onepage checkout in Magento 1.9?

texts:
In onepage checkout, I am trying to get Grand Total but it  is not updated based on shipping charges, taxes applied instead it is only showing product cost.

After selecting the shipping method and reloading the page is updating grand total correctly but I wanted to update grand total in the step payment information.

Can anybody please help me with this?


texts: how can we implement service contracts in magento 2 in controller?

texts: please answer with simple example of customer detail in which we can access customer detail save() data Delete() getbyid() update() requirements. all functions in controller using searchcriteriabuilder and repo


texts: Overriding core blocks with backend logic for specific theme

texts:
Im having trouble of understading not the override itself but how to override from theme with backend logic. so here is my question do i have to override Blocks in app/code or can do it from app/design . I am asking this because i would like to have this overrides only for one theme.

For example i would like to show Working hours in footer (only for one theme) do i have to make a module and enable it or can i do it in theme itself so when the user picks that theme it gets overriden and shown in Footer Block? Or did i understood this wrong.

EDIT I have done it from the module as i need some backend logic. As i didnt know if that could be done from theme itself


texts:
Lets say I want to check what shipping methods are available (before customer sees the shipping methods) and want to enable one if certain conditions exist.

What event would I be observing
What method calls do I need:

To see what shipping methods are enabled
To enable a given shipping method


texts: Magento2 Micro Website - Adding Value from Variable in Store URL

texts:
I want to achieve a Feature on Magento2.
I want to add a {URL Key} in Store URL, This URL key can be picked from a separate store info table.
I have approx 400 store info and want a separate URL for each store that opens my main website.
Ex: Main website URL - www.example.com
400 Stores URL will be  -
www.example.com/store-a
www.example.com/store-b
www.example.com/store-c
So On....
All the above URL open my main website www.example.com
store-a, store-b, store-c - these values are listed on my different store info DB table
I don't want to use multiple-stores feature of Magento as creating 400 store view ruin my main website.


texts: Not able to get proper parent category for specific child category

texts:
I have "ABC" as a parent category and "XYZ" as a child category. While opening the "XYZ" child category, on that page breadcrumb is appeared as below
Home > XYZ (child category) > ABC (parent category)
instead of
Home > ABC (parent category) > XYZ (child category)
I have used below code to get category breadcrumbs:
if ($category->getParentCategories())
{
    foreach ($category->getParentCategories() as $parent) {
        $breadcrumbs[] = [
            'label' => $parent->getName()
        ];
    }
}


texts: Magento2 custom module downloaded by composer at two places

texts:
I have hosted my custom module on bitbucket, and using satis proxy between comopser and bitbucket.
The problem is, when i use the command composer require vendor/module, it downloads the module at two different places,
one under the vendors\ directory and another under the app\code directory, My composer.json file for the module is like this

{
  "name": "vendor/module",
  "description": "A Magento 2 module that creates a new page",
  "type": "magento2-module",
  "version": "1.0.1",
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "extra":{
      "map":[
        [
          "*",
          "Vendor/Module"
        ]
      ]
    },
  "require": {
    "php": "~5.5.0|~5.6.0|~7.0.0"
  },
  "autoload": {
    "files": [ "registration.php" ],
    "psr-4": {
      "Vendor\\Module\\": ""
    }
  }
}


texts: Moved Magento Installation, rm'd the parent folder and recreated it, after MV back blank site

texts:
We are having a file structure like the following:

 - public_html
 - - otherVersion/
 - - Magento File Structure
 - - Magento Files

After I did the movement with $ mv public_html/otherVersion .

I did the remove with rm -rf public_html/*. And after a movement back with $ mv otherVersion public_html/ the Magento Installation in otherVersion/ is nonfunctional.

I looked for broken symlinks, only a few in otherVersion/pub/static/backend/..., but I deleted those and hoped for a new generation of them, but it didnt worked.

php bin/magento doesn't work as well. A chmod-reset didn't helped here, too.

The logs don't contain anything.

We are using Magento 2.0.6.

What did I wrong, or how can I fix this?

Meanwhile, I got an step forward. I dumped the autoload with php composer.phardump-autoload, and I so I got this message:

InvalidArgumentException: Constant name is expected. in /home/user/public_html/importantFolder/vendor/magento/framework/Data/Argument/Interpreter/Constant.php:23 Stack trace: #0 /home/user/public_html/importantFolder/vendor/magento/framework/App/Arguments/ArgumentInterpreter.php(35): Magento\Framework\Data\Argument\Interpreter\Constant->evaluate(Array) #1 /home/user/public_html/importantFolder/vendor/magento/framework/Data/Argument/Interpreter/Composite.php(61): Magento\Framework\App\Arguments\ArgumentInterpreter->evaluate(Array) #2 /home/user/public_html/importantFolder/vendor/magento/framework/ObjectManager/Config/Mapper/Dom.php(101): Magento\Framework\Data\Argument\Interpreter\Composite->evaluate(Array) #3 /home/user/public_html/importantFolder/vendor/magento/framework/Config/Reader/Filesystem.php(168): Magento\Framework\ObjectManager\Config\Mapper\Dom->convert(Object(DOMDocument)) #4 /home/user/public_html/importantFolder/vendor/magento/framework/Config/Reader/Filesystem.php(127): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator)) #5 /home/user/public_html/importantFolder/vendor/magento/framework/App/ObjectManagerFactory.php(269): Magento\Framework\Config\Reader\Filesystem->read('primary') #6 /home/user/public_html/importantFolder/vendor/magento/framework/App/ObjectManagerFactory.php(137): Magento\Framework\App\ObjectManagerFactory->_loadPrimaryConfig(Object(Magento\Framework\App\Filesystem\DirectoryList), Object(Magento\Framework\Filesystem\DriverPool), Object(Magento\Framework\ObjectManager\Config\Mapper\Dom), 'developer') #7 /home/user/public_html/importantFolder/vendor/magento/framework/App/Bootstrap.php(385): Magento\Framework\App\ObjectManagerFactory->create(Array) #8 /home/user/public_html/importantFolder/vendor/magento/framework/App/Bootstrap.php(232): Magento\Framework\App\Bootstrap->initObjectManager() #9 /home/user/public_html/importantFolder/index.php(38): Magento\Framework\App\Bootstrap->createApplication('Magento\\Framewo...') #10 {main} Next Magento\Framework\Exception\State\InitException: Constant name is expected. in /home/user/public_html/importantFolder/vendor/magento/framework/App/ObjectManagerFactory.php:271 Stack trace: #0 /home/user/public_html/importantFolder/vendor/magento/framework/App/ObjectManagerFactory.php(137): Magento\Framework\App\ObjectManagerFactory->_loadPrimaryConfig(Object(Magento\Framework\App\Filesystem\DirectoryList), Object(Magento\Framework\Filesystem\DriverPool), Object(Magento\Framework\ObjectManager\Config\Mapper\Dom), 'developer') #1 /home/user/public_html/importantFolder/vendor/magento/framework/App/Bootstrap.php(385): Magento\Framework\App\ObjectManagerFactory->create(Array) #2 /home/user/public_html/importantFolder/vendor/magento/framework/App/Bootstrap.php(232): Magento\Framework\App\Bootstrap->initObjectManager() #3 /home/user/public_html/importantFolder/index.php(38): Magento\Framework\App\Bootstrap->createApplication('Magento\\Framewo...') #4 {main}


texts: How to get load related products of simple product using ajax

texts:
I have a configurable product and on selection of its simple product I need its respective related products loaded via ajax. Any help will be highly appreciated.

This is how I call my ajax:

<script type="text/javascript">
require(["jquery"],function($) {
    $(document).ready(function() {
        var customurl = "<?php echo $this->getUrl().'custom/custom/index'?>";
        $.ajax({
            url: customurl,
            type: 'POST',
            dataType: 'json',
            data: {
                customdata1: 'test1',
                customdata2: 'test2',
            },
        complete: function(response) {

        },
            error: function (xhr, status, errorThrown) {
                console.log('Error happens. Try again.');
            }
        });
    });
});

And my controller file execute method looks something like this:

public function execute()
{
    $resultRedirect = $this->pageFactory->create();
        $blockInstance = $resultRedirect->getLayout()->getBlock('catalog.product.related');
        $message['html'] = $blockInstance->toHtml();

        /** Json Responce */
        $this->getResponse()->representJson(
            $this->jsonData->jsonEncode($message)
        );
}

However I am not able to fetch the products using ajax and also I need to know how I go about with specific simple product.


texts: Design advice, do I need multiple stores, or a plugin to keep retail/wholesale separate?

texts:
Client wants to keep retail customers/guests from purchasing (or even seeing) wholesale items.  Also wants wholesale users to not be able to buy retail items, so there should never be a case where retail items and wholesale items are in the same order.  Wholesale items will exist on a page that requires login, and they have unique skus from the retail items.

Would best practice be:

1) Create a wholesale category, and a plugin that removes non-wholesale items form the cart when a wholesale group member logs in (and hide the retail order button for wholesale users)?

2) Create a wholesale store in a subdirectory, and limit only the wholesale group to have access.  Would this prevent retail/wholesale items from being added to the same cart?

3) ...?

1 feels wrong, but I started on 2 and I'm realizing I have no idea how to share the menu and such between the views, or even setup the product page.  While 1 seems like a hack, at least it's a hack I think I can do.  Any and all advice is very welcome and much appreciated.


texts: Debug isValid method that uses interfaces

texts:
I have installed a custom module that uses an Api/Validator/LocationProductValidatorInterface.php to compare two objects ($location, $product).
This is the method which always returns false for me and I would like to go a little bit deeper and debug this to find the error because I expect it to return true.
public function isValid(LocationInterface $location, ProductInterface $product): bool;
Both LocationInterface and ProductInterface have getters and setters in place, but I don't know how to debug what's behind this.
Can you give me some tips maybe?


texts: Magento Notification not rendering properly

texts:
We have used magento's default notification system to show messages in the front end. It was rendering properly. But suddenly it started to print the messages as plain string. Earlier we used to show the html tags along with the messages. But now it just shows a plaint text. When it checked the HTML of the message
it is showing as follows.

Image uploaded successfully TEST


texts: How to calculate the package price even if the item being out of stock?

texts: When one of my package bundled product is out of stock the value of the package is 0, but I need it to calculate the correct value and show it, even if the bundle products are out of stock, the type of the package price is fixed . Anyone have any tips on how to make it calculate the price even products being out of stock?


texts: Magento 2 : Need to display log in custom file

texts:
I want to write custom log in third party module, how can I achieve this by using Magento default classes and log functions.

I tried many solutions but no luck on third party module. I need to write own file in log directory.

Please help me if anyone know how to achieve this?


texts: Returning and calling multiple functions JS

texts:
This is a follow-up to my previous post Adding JS to the checkout, which was answered nicely here.
It works fine, but now I have a problem that I want to add and call multiple JS functions, so I tried:
define([
  'jquery',
], function($){

    var hello = function()
    {
        alert('Bonjour Amir');

    }
    var print = function()
    {
        console.log('asdfgh');
    }
    return hello && print;
});

And in the template I call it like:
<script type="text/javascript">
    require(['jquery', 'checkoutjs'], function($, hello, print) {
        hello();
        print();
    });
</script>

But I get an error:
Uncaught TypeError: print is not a function

However, hello function is the one that does not execute.

I am very unfamiliar with this structure, and with JS in general.


texts: invalid form key. please refresh the page. magento 2

texts:
Getting the error...

  invalid form key. please refresh the page

when creating a new user. Even after following these steps.

I set in file php.ini variable max_input_vars increase it to 10000 through.
Than cleared var/cache.

Still the customer is not able to create a new account or post the form.
Does anyone know how to solve it ? Thanks in advance.


texts: Magento 2 index management system error message

texts:
I installed magento 2.1.9 on my shared hosting account. A system error message appears within the admin panel that states: "One or more indexers are invalid. Make sure your Magento cron job is running."

Below is a screenshot of the cron jobs I have:

Any idea if anything is wrong with my cron job? And how can I fix this issue within cPanel's cron job, without having to mess with command line?

An Update:
Today my hosting provider informed me that I cannot be given SSH login details, since I'm on shared hosting environment. What is the way to update the indexer manually on a shared hosting environment, without SSH access?


texts: Magento 2 onepage checkout validation issue

texts: I'm using IWD onepage checkout module. Everything working fine. I also integrated porto magento 2 theme with it. When I try to checkout I get state as required field even though if I selected it. I ran all required magento 2 commands.


texts: Add Products through Custom module in magento2

texts:
I'm trying to add number of products to cart at a time using custom module

here is my module code

  app/code/Multiple/Addtocart/Controller/Index/Cartadd.php

<?php
    namespace Multiple\Addtocart\Controller\Index;
    use Magento\Framework\Controller\ResultFactory;
    use Magento\Framework\App\Action\Action;
    use Magento\Framework\App\Action\Context;
    use Magento\Framework\View\Result\PageFactory;
    use Magento\Checkout\Model\Cart as CustomerCart;
class Cartadd extends \Magento\Framework\App\Action\Action
{
    protected $resultPageFactory;
    protected $checkoutSession;
    protected $formKey;
    protected $request;
    protected $cart;

  public function __construct(
    Context $context,
    \Magento\Framework\Data\Form\FormKey $formKey,
    \Magento\Checkout\Model\Session $checkoutSession,
     CustomerCart $cart,
    PageFactory $resultPageFactory,
    array $data = [])
    {
        $this->formKey = $formKey;
        $this->resultPageFactory = $resultPageFactory;
         $this->checkoutSession = $checkoutSession;
        $this->cart = $cart;
        parent::__construct($context);
    }

  public function execute()
  {
    $pid=array();
    $pid=$_POST['data'];
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    for($i=0;$i<count($pid);$i++){
        $product_id=$pid[$i]['id'];
        $product_qty=$pid[$i]['qty'];
        $_product = $objectManager->create('Magento\Catalog\Model\Product')->load($product_id);
        echo $_product->getName()."<br>";
        $params = array(
                    'form_key' => $this->formKey->getFormKey(),
                    'product' =>$product_id, //product Id
                    'qty'   =>$product_qty //quantity of product
                    );

                  //$_product = $this->product->load($tradeProductId);
                  //$this->cart->truncate();
                  $this->cart->addProduct($_product, $params);
                  $this->cart->save();
                  $this->messageManager->addSuccess(__('Item has been successfully added to cart.'));
    }

  }
}

  app/code/Multiple/Addtocart/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="add_prodct_addtocart_after">
        <observer name="Multiple_Addtocart" instance="Multiple\Addtocart\Observer\CustomPrice" />
    </event>
</config>

  app/code/Multiple/Addtocart/Observer/CustomPrice.php

<?php
    namespace Multiple\Addtocart\Observer;
    use Magento\Framework\Event\ObserverInterface;
    use Magento\Framework\App\RequestInterface;
    use Psr\Log\LoggerInterface;
    class CustomPrice implements ObserverInterface
    {

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
            $writer = new \Zend\Log\Writer\Stream(BP.'/var/log/multiproduct.log');
            $logger = new \Zend\Log\Logger();
            $logger->addWriter($writer);
}
}


texts:
I have an issue where I need to have strict tiered pricing.

Right now you can order based on tier like...

Order 250 and above pay 1.77

Order 500 and above pay 1.64

Order 1000 and above pay 1.54

but what i need is more like...

Order 250 pay 1.77

Order 500 pay 1.64

Order 1000 pay 1.54

And you cant order any increments in between.

I have a ton of products like this so I am hoping not to have to convert them to configurable products (if thats possible) to make this work. If you know a working extension for 1.9.2.4 that would work too. Could possibly pay but only if necessary.

Thanks for any and all help!


texts: How can I remove a footer from specific cms page?

texts:
Can I remove footer from a cms page ? and I added that page using admin panel .

default.xml  file

<?xml version="1.0"?>
<!--
/**
 * Copyright © Infortis. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

    <body>

        <!-- <move name="breadcrumbs" destination="mycustom.div" before="-" /> -->
        <referenceBlock name="customer-account-navigation-downloadable-products-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-newsletter-subscriptions-link" remove="true"/>
        <referenceBlock name="customer-account-navigation-billing-agreements-link" remove="true"/>

        <move element="customer-account-navigation-orders-link" destination="customer_account_navigation" before="customer-account-navigation-address-link"/>
        <move element="customer-account-navigation-wish-list-link" destination="customer_account_navigation" after="customer-account-navigation-address-link"/>
        <move element="customer-account-navigation-my-credit-cards-link" destination="customer_account_navigation" after="customer-account-navigation-product-reviews-link"/>

        <referenceBlock name="base-footer-container">

            <!-- Static blocks -->
            <block class="Magento\Cms\Block\Block" name="block_footer_links_sec">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_links_sec</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_social_section">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_social_section</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_brands_banner">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_brands_banner</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_end_liner">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_end_liner</argument>
                </arguments>
            </block>
            <block class="Magento\Cms\Block\Block" name="block_footer_candidio_sec">
                <arguments>
                    <argument name="block_id" xsi:type="string">block_footer_candidio_sec</argument>
                </arguments>
            </block>
        </referenceBlock>

    </body>

</page>


texts: Add and edit words to Magento 2 language dictionary

texts:
In Magento2 - I have installed language pack from MagePlaza. Most of the words got translated, I need to edit the untranslated words. I edit in this file

app/i18n/mageplaza/da_DK.csv

and deployed static, cleaned and flush cache, but nothing changed.

What should I do to edit/add translation?


texts: Whitelisted domains in env.php M2.3.6 does not work

texts:
I whitelisted three domains in env.php but when adding a link with a downloadable product still get the error message

Link URL's domain is not in list of downloadable_domains in env.php

Is the entry not effected immediately?
Any help appreciated.
Thanks
Tristan


texts: How to add an html block on all admin pages

texts:
To add an html section on all pages of admin panel using a separate module i have created a sepetate layout
customercare.xml

<?xml version="1.0"?>
<layout version="0.1.0">
 <reference name="footer">
    <block type="adminhtml/template" template="customercare/quickbox.phtml" name="footer_quick_box" as="footer_quick_box" />
</reference>
</layout>

I have added few texts in "customercare/quickbox.phtml" but its not showing on the any of the pages.

Extension config.xml file is

<?xml version="1.0"?>
<config>
    <modules>
        <My_Customercare>
            <version>0.1.5</version>
        </My_Customercare>
    </modules>
    <global>
        <helpers>
            <customercare>
                <class>My_Customercare_Helper</class>
            </customercare>
        </helpers>
        <blocks>
            <customercare>
                <class>My_Customercare_Block</class>
            </customercare>
        </blocks>
    </global>
    <adminhtml>
        <layout>
            <updates>
                <customercare>
                    <file>customercare.xml</file>
                </customercare>
            </updates>
        </layout>
    </adminhtml>
</config>


texts:
i'm still new in magento 2 and i want to edit layout of bundle product page of magento 2, so i extend xml file of magento 2 from module-bundle. i create folder Magento_Bundle/layout/catalog_product_view_type_bundle.xml on my custom Theme and then put this code inside

<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="bundle.options.container" destination="content" after="product.info.main"/>
        <move element="product.info.media" destination="content" before="-"/>
        <move element="product.info.overview" destination="bundle.options.container" before="-"/>
    </body>
</page>

i've already flush the cache but nothing change. Is it my xml code wrong ? or maybe something else ?


texts: remove side bars & how to set page layout to About Us page in magento?

texts: How to remove side bars(about us page) & how to set page layout like 1column,2column-left to about us page?


texts: I want to set my custom theme programatically for default scope. So far, I have just found out that setting it only in core_config_data is not enough. Has anyone tried to do it that way?


texts: How to use Datatable js library in magento 2?

texts:
what's the best way to use the datatable js library in my template file ?
I tried like this but it doesn't work :

layout file:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd">
    <head>
          <css src="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" src_type="url"/>
          <script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js" src_type="url"/>
     </head>
    <body>
        <referenceContainer name="content">
            <block
                template="Fmj_Portefeuill::portefeuille.phtml"
                class="Fmj\Portefeuill\Block\portefeuille"
                name="FMJ_portefeuill"/>
        </referenceContainer>
    </body>
</page>

template file :

<table id="portefeuilleTable"> ... </table>
<script>
    require([
        'jquery'
    ], function($){
        $(function(){
                $('#portefeuilleTable').DataTable();
            });
        });

</script>


texts: Home Page getting error when try add product in cart Magento 2

texts:
I have created my custom theme in magento and designed default.xml as per  my requirement, everything is working fine but getting error when trying add product in cart from home page, also minicart not updated .
Please take a look on attached screen-shot


texts: Display custom drop down in registration page using Magento2.1

texts:
I tried this code but it's not working

  app\code\Customer\Attribute\Setup\Installdata.php

    $customerSetup->addAttribute(Customer::ENTITY, 'customer_type', [

        'type'          => 'int',
        'label'         => 'Corporation Or Proproetorship',
        'input'         => 'select',
        'source'        => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
        'required'      => false,
        'visible'       => true,
        'system'        => false,
        'position'      => 210,
        'system' => false,
        'option'         => ['values' => ['Corporation', 'Proproetorship']],
    ]);

    $attribute = $customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'customer_type')
    ->addData(['used_in_forms' => [
            'adminhtml_customer',
            'adminhtml_checkout',
            'customer_account_create',
            'customer_account_edit'
]]);

    $attribute->save();

and

  app\code\Custommodule\Wholesale\view\frontend\templates\form\wholesale.phtml

     <?php /* @escapeNotVerified */ echo __('Corporation Or Proprietorship') ?>

     <select id="customer_type" name="customer_type" title="<?php echo $block->escapeHtml(__('Corporation or Proproetorship')) ?>" class="validate-select">
            <option disabled selected value> -- select an option -- </option>
              <option value="0">Corporation</option>
              <option value="1">Proprietorship</option>
            </select>


texts: How to show price for out of stock bundled products?

texts:
when bundled products are out of stock(the individual items) the price on the frontend shows:0.00 in Magento 2.3.4

I poked around in: vendor/magento/module-bundle/Pricing/Price/FinalPrice.php

public function getAmount()

  public function getAmount()
{
    if (!$this->minimalPrice) {
        $price = parent::getValue();
        if ($this->product->getPriceType() == Price::PRICE_TYPE_FIXED) {
            $this->loadProductCustomOptions();
            /** @var \Magento\Catalog\Pricing\Price\CustomOptionPrice $customOptionPrice */
            $customOptionPrice = $this->priceInfo->getPrice(CustomOptionPrice::PRICE_CODE);
            $price += $customOptionPrice->getCustomOptionRange(true);
        }
        $this->minimalPrice = $this->calculator->getAmount($price, $this->product);
    }
    return $this->minimalPrice;
}

$price returns 0.

Anyone has an idea how to get the regular price to show on frontend instead of 0 for out of bundled products with out of stock items?

Thanks!


texts: Problem with installing extension via composer

texts:
I want to install the extension via the composer. But when I try to type the password I get this problem:

Warning from repo.magento.com: You haven't provided your Magento authentication keys. For instructions, visit https://devdocs.magento.com/guides/v2.3/install-gde/prereq/connect-auth.html
Authentication required (repo.magento.com):
  Username: 6df1d39ccaf9e6bc5a59e7b0e2f63be6
  Password:

I can't type or paste the password.
What is the problem?


texts:
I am facing below error while I am trying to insert a product through Magento Admin Panel.

2017-02-27T15:49:25+00:00 ERR (3): Warning: include(Mage/Productslider/Model/Source/Feature.php): failed to open stream: No such file or directory  in /home/prod/public_html/lib/Varien/Autoload.php on line 93
2017-02-27T15:49:25+00:00 ERR (3): Warning: include(Mage/Productslider/Model/Source/Feature.php): failed to open stream: No such file or directory  in /home/prod/public_html/lib/Varien/Autoload.php on line 93
2017-02-27T15:49:25+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Productslider/Model/Source/Feature.php' for inclusion (include_path='/home/prod/public_html/app/code/local:/home/prod/public_html/app/code/community:/home/prod/public_html/app/code/core:/home/prod/public_html/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home/prod/public_html/lib/Varien/Autoload.php on line 93

I refreshed cache. I tried to find out Mage_Productslider.xml  in app/etc/modules/. But there is no such file.

How can I remove the error ?

Screenshot of app/code/community and app/code/local


texts: Google analytics not recording conversion data in Magento 2.3.2

texts:
We have recently updated to Magento 2.3.2 and google analytics module stopped working. I can see the empty array OrdersTrackingCode in generated google analytics code on frontend.

Thanks in advance.


texts:
crated data patch but it stucks on setup:upgrade

Running data recurring...

my code is

<?php

declare(strict_types=1);

namespace DevAll\ExtensionSettingConfig\Setup\Patch\Data;

use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Exception\StateException;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Api\AttributeRepositoryInterface;
use Magento\Catalog\Model\ProductRepositoryIn;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFactory;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\App\Area;
use Magento\Framework\App\State;
class RemoveLGManufacturer implements DataPatchInterface
{
    private $eavSetupFactory;

    private $attributeRepository;

    private $_productRepositoryInterface;

    private $collectionFactory;

    private $state;

    private  $productCollectionFactory;

    private $productRepository;

    private $searchCriteriaBuilder;
    public function __construct(
        State $state,
        CollectionFactory $collectionFactory,
        SearchCriteriaBuilder $searchCriteriaBuilder,
        AttributeRepositoryInterface $attributeRepository,
        ProductRepositoryInterface $productRepositoryInterface,
        array $data = []
    ) {
        $state->setAreaCode('frontend') ;
        $this->searchCriteriaBuilder = $searchCriteriaBuilder;
        $this->_productRepositoryInterface = $productRepositoryInterface;
        $this->attributeRepository = $attributeRepository;
        $this->collectionFactory = $collectionFactory;
    }

    /**
     * @inheritDoc
     */
    public static function getDependencies()
    {
        return [];
    }

    /**
     * @inheritDoc
     */
    public function getAliases()
    {
        return [];
    }
    public function apply()
    {
          //$searchCriteria = $this->searchCriteriaBuilder->addFilter('manufacturer','LG')->create();

        $productcollection = $this->collectionFactory->create()->addAttributeToSelect('manufacturer','LG')->load();
        foreach ($productcollection as $product) {
            try {
                $this->_productRepositoryInterface->delete($product);
            } catch (StateException $e) {
            }
        }

    }

}

what can be the cause of problem ? how to fix it ?


texts: Is there something mad going on with Magento critical vulnerability scanner

texts:
I upgraded my site to Magento2.3 a few hours back, but I am getting emails every few minutes from other peoples servers telling me to install SUPEE-5344 which I thought was years old, is there some hack just come into force on some old accounts?

I have examined the email headers to confirm they are coming from a wide array of servers - but they are going to be my security scanner login address (I use a totally separate one for admin on my Magento install)


texts:
I am trying to upload an SVG logo for my Magento website, but it is not allowing me to upload an SVG file. It says that it is an unsupported file. Any idea how to resolve this?

Based on internet searches, it looks like Magento has disabled SVG support for security reasons. Is there any way I can re-enable it?

Thanks a lot


texts: magento 2 create xml file of orders and send them via email programmatically

texts: In Magento2 how can I create XML files for orders and send them via email programmatically. Please suggest.


texts: How to get billing address from sales/order_grid_collection?

texts:
I have sales/order_grid_collection

where I'm getting the desired attributes on my grid, but the last one attribute I need is the billing street of the order, how can I get that programmatically?

Here is my code:

public function _prepareCollection()
{
    $collection = Mage::getResourceModel('sales/order_grid_collection')->addAttributeToSelect('*');

    $this->setCollection($collection);
    parent::_prepareCollection();
}

protected function _prepareColumns()
{
    $this->addColumn('real_order_id', array(
        'header' => $this->_getHelper()->__('#'),
        'width' => '80px',
        'type'  => 'text',
        'index' => 'increment_id'
    ));
    $this->addColumn('created_at', array(
        'header' => $this->_getHelper()->__('Date'),
        'index' => 'created_at',
        'type' => 'datetime',
        'width' => '100px'
    ));
    $this->addColumn('billing_name', array(
        'header' => $this->_getHelper()->__('Customer'),
        'index' => 'billing_name'
    ));
    // THIS IS THE ATTRIBUTE I NEED TO SHOW:
    $this->addColumn('billing_street', array(
        'header' => $this->_getHelper()->__('Address'),
        'index' => 'billing_street'
    ));
    //--------------------------------------------------
    $this->addColumn('status', array(
        'header' => $this->_getHelper()->__('Status'),
        'index' => 'status',
        'type'  => 'options',
        'width' => '70px',
        'options' => Mage::getSingleton('sales/order_config')->getStatuses()
    ));

    return parent::_prepareColumns();
}

Thanks in advance.


texts: Mageto2 error Uncaught Error: You cannot apply bindings multiple times to the same element

texts:
I am getting following erro
knockout.js:3277 Uncaught Error: You cannot apply bindings multiple times to the same element.

Below is the code
var instance = new viewModel(initialData);
                        if(typeof(document.getElementById("menueditor")) !='underfined' && document.getElementById("menueditor")[0]){
                            ko.cleanNode(document.getElementById("menueditor")[0]);
                            ko.cleanNode(document.getElementById("menueditor"));
                            //ko.utils.domData.clear(document.getElementById("menueditor"));
                        }
                        var koNode = document.getElementById('menueditor');
                        var hasDataBinding = !!ko.dataFor(koNode);
                        console.log('has data binding', hasDataBinding);
                        if (!hasDataBinding) { ko.applyBindings(instance, koNode);}


texts: Magento 2 Compile Generation Does Not Exist

texts:
I'm using Magento 2 CE Version 2.1.0

  C:\wamp\www\magento2>C:\wamp\bin\php\php5.6.19\php.exe bin/magento
  setup:di:compile

Compilation was started.
%message% 0/7 [>---------------------------]   0% 1 sec 48.0 MiB%message% 0/7 [>---------------------------]   0% 1 sec 48.0 MiBProxies code generation... 0/7 [>---------------------------]   0% 1 sec 48.0 MiB
Proxies code generation... 1/7 [====>-----------------------]  14% 1 sec 50.8 MiB
Repositories code generation... 1/7 [====>-----------------------]  14% 1 sec 50.8 MiB

  [RuntimeException]
  Source class "\Custom\Module\Model\ResourceModel\Posts\PostsInterface" for "Custom\Module\Model\ResourceModel\Posts\PostsRepository" generation does not exist.

setup:di:compile

I'm trying to create Custom Admin CRUD.


texts:
1.Why is there an update tag inside checkout_item_price_renderers.xml with the same file name?

<update handle="checkout_item_price_renderers"/>

2.The update tag will look for the file with the name that is specified inside handle property and will merge the current xml file with the one indicated by update tag? Is that correct?


texts: Get product baseimage without product object

texts:
How can i get the product base-image without loading the whole product object ? I have product-id,sku.[I know we can get product base image from product object]

Is there any best method or trick available for that ?

Any help will be appreciated.

Thank you


texts: Magento 1.9.3.6 - Disable cache for a specific module

texts:
could someone explain to me how to disable the cache of a specific module?

I have this code in cms static block:

{{block type="filterproducts/featured_home_list" name="featured_list" product_count="8" column_count="4" aspect_ratio="1" image_width="189" image_height="189" template="filterproducts/grid.phtml"}}

the featured products do not rotate when refresh the page but if I disable modules cache all works fine.

I tried to add this code in my local xml file

 <layout>
    <default>
     <reference name="featured_list">
        <action method="setCacheLifetime" />
    </reference>
</default>
</layout>

OR

 <block type="filterproducts/featured_home_list" name="featured_list">
        <action method="setCacheLifetime"><s>null</s></action>
        </block>

but no luck.


texts: Php Readiness check failed due to different version of php

texts:
I just updated php to PHP 7.1.12-3+ubuntu17.10.1+deb.sury.org+1 (cli) (built: Dec 14 2017 15:40:13) ( NTS )and when i try to readiness check for magento2, i am getting error that PHP Version Check Your PHP version is 7.1.11-0ubuntu0.17.10.1. The required PHP version is ~5.6.5|7.0.2|7.0.4|~7.0.6. Hide detail

I got that it allows on these versions
    http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html

I have tried different solutions given
    http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-ubuntu.html

sudo apt-get -y update
sudo add-apt-repository ppa:ondrej/php
sudo apt-get -y update
sudo apt-get install -y php7.0 libapache2-mod-php7.0 php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-zip php7.0-bcmath php7.0-iconv php7.0-soap

I have no idea, how to install 2 version of php or if i remove php7 and install php5 then whether any new issue will come. please help me to resolve the issue..I am using Ubuntu 17.10 & Magento 2.1


texts: How to setup free shipping multiple store view

texts:
I have 2 store view Suisse (ch) and France (fr) :
free shipping par store view 20 in fr and 30 in ch
I have found a extention fro flate rate : Magento 2 Multiple Shipping Flat Rates extension
there's any extension for free shipping
It's magento version 2.3.5-p1 (oppen source)


texts:
I created a custom css file in Vendor/theme/web/css and added css/custom.css to my default_head_blocks.xml file. Im in developer mode but I still ran static content deploy -f. I cleaned/flushed cache. My custom css still does not show up in the head.

What else is there to check for?


texts: What does it really mean to "extend" a style?

texts:
If the purpose of _extend.less in a custom theme is to "extend" a style, what does this really mean? Should it be used in the following cases:

Change the value of an existing attribute of an existing style
Add a new attribute to an existing style that already has other attributes defined
Add a new attribute to an existing style that does not have any attributes defined (these do exist in the blank theme)
Remove an attribute from an existing style (you just want the inherited value)
Add a new style


texts:
When I print particular order invoice from sales=>order menu at that time i get error like Call to a member function getParentItem() on a non-object in app\code\core\Mage\Sales\Model\Order\Pdf\Invoice.php on line 145.

Any idea to resolve it ?


texts:
We have a live Magento 2.19 site. Recently we've duplicated the website as a development site, upgraded it to 2.4.1 and added a new customised theme and added various new modules. We are about to go live, but the live website has about a thousand new orders since we duplicated it.
How can we migrate the orders and invoices from 2.1.9 to 2.4.1?
Just for info: I have tried copying all the orders and customers tables across via MySQL but I ran into a serialize error when clicking to view order details. I've looked at Aitoc order import/export module but it failed to install on the 2.19 site and their tech support was non-existant. I've looked at ulmod's import/export module but it does not maintain the exported order numbers.


texts: How create order form in front and send email?

texts:
I want to create order form in frontend and send email.
I am beginner with Magento and I have no idea how can I do.

Which Magento extension can I use or can create customize?

Please anyone help me.


texts:
How can I disable advanced search feature in Magento?

Even you remove the links from frontend using layouts, if someone who knows Magento URL's accesses /catalogsearch/advanced will get the Advanced Search page.

I discovered some visitors are accessing catalogsearch/advanced/ directly. Why they are doing this? I found that using Advanced Search feature can provide to your competition, very easy and fast, information about how many products you have enabled from each brand/category/in total.

For example in Advanced Search just search for price between 0 and 1000000 and you will get for sure all products as number. Search for all manufacturers and you will get the number of all products in your store too. In my opinion this should be protected. In this case Advanced Search feature should be used but with precaution.

Back to main question how to Enable/Disable Advanced Search for the issue I mentioned above. First I was thinking to rewrite a rule for /catalogsearch/avanced link. The redirect page could have a pretty nice banner.

Thank you.


texts: Create Module For Send Order Notification on WhatsApp in Magento 2.3.2

texts:
I Want To Create Module For Sending Place Order Message On WhatsApp..

  Or Also Any Free Extension Available For This I Tried WhatsApp Order
  Notification But Its Paid I Want To Free Extension Or Create a
  Extension


texts: How do I change 'name' product attribute to storeview?

texts:
I have a multi-store set up (Magento Community Edition) and want to translate one of the stores to French.

I've exported the product data and had it translated but before I tried importing I thought I'd check the product settings. It seems I need to change the scope of the relevant attributes (name, description, short description for example) to "Store View" before I import.

This works fine for description and short description but I can't change the name attribute and get the message:

  The attribute code 'name' is reserved by system. Please try another attribute code

How do I change this so I can use the translated product names?

Any other quick tips on product data importing from folks who have done it before?


texts: call observer for contact us page data save

texts:
I have used below code to save contact us page data.but it's not working.

<events>
<controller_action_postdispatch_contacts_index_post>
<observers>
    <freedom_customercontact_controller_action_postdispatch_contacts_index_post>
        <class>freedom_customercontact/observer</class>
        <method>controllerActionPostdispatchContactsIndexPost</method>
    </freedom_customercontact_controller_action_postdispatch_contacts_index_post>
</observers>

Observer code

 <?php

class Freedom_Customercontact_Model_Observer
{
    public function controllerActionPostdispatchContactsIndexPost()
    {
        exit('Hi');
        $data = $observer->getData();
    $post = $data['controller_action']->getRequest()->getPost();
    }
}

can anyone tell me why this not working please.


texts: Block on Adminhtml dissappear after upgrade to Magento 1.9

texts:
This is my code:

on app/design/adminhtml/default/default/layout/infocurci/fidelity.xml

<adminhtml_sales_order_view>
    <reference name="order_info">
        <block type="infocurci_fidelity/adminhtml_riepilogocliente" name="infocurci_fidelity_riepilogocliente" template="infocurci/fidelity/riepilogocliente.phtml" />
    </reference>
</adminhtml_sales_order_view>

on Magento 1.5, it works fine.
After upgrade to Magento 1.9, my block is not show yet.
If I try:

<adminhtml_sales_order_view>
    <reference name="content">
        <block type="infocurci_fidelity/adminhtml_riepilogocliente" name="infocurci_fidelity_riepilogocliente" template="infocurci/fidelity/riepilogocliente.phtml" />
    </reference>
</adminhtml_sales_order_view>

it works fine, it appears on the end of page. But I want this code at the end of "order_info" block..


texts: Sales orders not showing for new Admin user in magento2

texts:
I have created new User here

System -> Permission

Assigned User Role as Administrator

But when logged in with the new user which i created now, I can't see the orders for the newly created admin user.

Under Sales -> Orders

Did re-index and cache flush.

What is the problem here? Can anyone look into this and update me, please.

Some of the links referred and suggested to disable Asynchronus reindex,

Disable Asynchronous indexing under Store > Configuration > Advance > Developer > Grid Settings

That also didn't solve for me.

My Magento version is 2.2.6.

I am getting one console error like below.

  data-storage.js:270 Uncaught TypeError: Cannot read property 'items' of null
at UiClass.onRequestComplete


texts:
I am trying to override Magento\Catalog\Block\Widget\Link with Anshu\Custom\Block\Catalog\Widget\Link but it is not working.
Anshu/Custom/etc/di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Catalog\Block\Widget\Link" type="Anshu\Custom\Block\Catalog\Widget\Link" />
</config>

Anshu/Custom/Block/Catalog/Widget/Link.php

<?php

namespace Anshu\Custom\Block\Catalog\Widget;

class Link extends \Magento\Catalog\Block\Widget\Link
{

    public function getHref()
    {
        exit('test');
    }

}

Anshu/Custom/etc/module.xml

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

Anshu/Custom/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Anshu_Custom',
    __DIR__
);

It would be helpful, if any one can explain me what I am doing wrong here.


texts: Apply discount to only 1 item in the cart via Shopping Cart Price Rules

texts:
The situation is simple – I want to offer 25% discount on one product in the cart. So if you order 5 of Product A and 3 of Product B, you should receive 25% off either one of Product A or one of Product B but not both (so not more than 1 total).

Here are the current settings:

Apply = Percent of product price discount
Discount Amount = 25
Maximum Qty Discount is Applied To = 1
Discount Qty Step (Buy X) = 0

This currently gives the user 25% off of one Product A and one Product B. That is, the "Maximum Qty Discount is Applied To" seems to refer to cart line items, rather than total quantity.

I have looked at using the action conditions, but nothing seems to address this issue. Am I missing something? Or is an extension required for this functionality? Thanks in advance.


texts: Broken image links from Wysiwyg's shortcodes on category and product pages not translating on Magento website

texts:
Broken Links from wysiwyg on frontend of Magento store.

The URL's on broken pages are like below:

Admin -

Frontend -

My Urls created from Wysiwyg seem to be fine within admin and are only broken on category and product pages where the shortcodes seem to fail. however they still seem to be working on CMS Pages.

I have looked at the template files and am wondering if they need changing since recent SUPEE 6822 update (however I updated months ago and it didn't seem to be a problem then initially). As other questions have been solved by processing html content like below in the case of a cms page:

    $html_content = $content_from_db['content'];$html_content =          Mage::helper('cms')->getPageTemplateProcessor()->filter($html_content); echo $html_content;`

Also have considered that the permissions introduced in SUPEE 6822 may be effecting parts of the pages ability to translate shortcodes like in this issue with static blocks however I feel the category and product pages should have permission as default:

https://community.magento.com/t5/Technical-Issues/Static-block-shortcodes-not-working-1-9-2-2/td-p/20096


texts: How to render product name in UI component admin grid based off product id in a custom table in Magento 2

texts:
I'm completely new; I don't even have a thought process on how to accomplish this. Do I join collections? Do I join tables? When/how/where? How do I render this in a UI component grid listing?

Currently I have a custom table, which has a product_id column in it. Now I need to find a way to join that id value to something and render the product name according to the id in an existing custom admin grid. Currently I am only able to render the product id value which is in my custom table.

If someone could walk me through this with a detailed response, which I could learn from.


texts: ReflectionException Error during Upgrade to Magento 2.2.3

texts:
Am getting this Error while Compiling during upgrade from 2.1.10 to 2.2.3.

[ReflectionException]
  Class \Magestore\GiftVoucher\Api\GiftVoucherProduct\GiftvoucherProductRepos
  itoryInterface does not exist

I checked, Every folder is there i.e. Magestore, GiftVoucher, Api, GiftVoucherProduct is there. Inside 'GiftVoucherProduct' there is a file named 'GiftvoucherProductRepositoryInterface.php'

Please anyone resolve this error.

I have done few fixes which are mentioned on net, but nothing worked out.

Regards,


texts:
After being able to update magento to 2.3 (which was a pain by itself) I managed to get to the part where the database needs to be updated. Which is in current state when I try to run the command bin/magento setup:upgrade:

Cache cleared successfully
File system cleanup:
/var/www/html/generated/code/Composer
/var/www/html/generated/code/MSP
/var/www/html/generated/code/Magento
/var/www/html/generated/code/Symfony
Updating modules:
Schema creation/updates:
Cannot process definition to array for type enum

I can't however manage to find where this enum thing comes from. I also can't find any errors containing where this enum thing comes from...

anyone knows where this error comes from and how I can debug this? I know this can't lead to a specific page, but where do I need to focus on and how can I find out how I can solve this massive blockage of the site :D


texts:
I have added a text attribute for adding a pdf files name. Then created an installation tab display a button for
"Installation PDF" which the button should have an href pointing to the media folder with the file name listed
in the database from the attribute.We can then just upload the pdf's into the /media folder and reference them that way.
 I have created the Tab and attribute. Then given the code like this to display the button in frontend.

if($_data['label'] == 'installation'): ?>

<a href="<?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']); ?>" onclick="<?php echo $_helper->productAttribute($_product, $_data['value'], $_data['code']); ?>"  target="_blank"><input type="submit" name="InstallationPDF"  value="Installation PDF" />

<?php endif;    ?>

But in Front end it shows like this.

where should i change? Any help are appreciable.


texts:
I've installed an extension to Magento that switches customers groups, the cron that it runs is giving me the following error:

TRIGGER: shutdown function Last error:

Array ( [type] => 4 [message] => syntax error, unexpected '[' [file] => /var/www/vhosts/xxxxxxxxx.com/httpdocs/app/code/local/Plugincompany/Groupswitch/Model/Mysql4/Rule/Collection.php [line] => 32 )
    if(!$ids) return $this;
    if(!is_array($ids)) $ids = array($ids);
    return $this->addFieldToFilter('rule_id', ['in' => $ids]);

Line 32 is the last line above. It's running PHP 5.6.

Anyone got any ideas how to solve the issue?

Thanks.


texts: How to call one block function to another block in same module

texts:
First Block:
app\code\Zero\Storelocator\Block\view\Attributes.php

function name : getLocationAttributes()

Second Block:
app\code\Zero\Storelocator\Block\Customerreview.php

How to get the first block function values ?


texts: Magento 1.9.X: Add customer comment to order using observer

texts:
How can I add customer comment from checkout page using observer?

Customer comment is introduced from the block with a text area. When I create new order I need to add a comment to this order using sales_order_place_before event. How can I do this?


texts: Subscription For Physical Prouducts Without Set Time Period

texts:
We have a number of books that are printed at irregular intervals. Someone come subscribe and choose which previous volumes to receive. Then they are sent each volume as it is printed. We are using Authorize.net and Paypal.

I am very confused on what type of product I should be creating. The initial subscription can have a zero price, but I do need to capture CC details at Authorize so that I can charge for future purposes.

Any advice?


texts: How to recognize which form is calling the saveAction?

texts:
I currently have two forms, each on a different page, and each with a different model (Each model links to its own table in the database), in the same adminhtml module. My structure is as follows:

The AppapiController.php has the saveAction, which is being called from these two forms.

My question is two fold:

1) Is this the right way of doing things? Or am I supposed make a different module or controller for each form?

2) If this is the right way of doing things, how can I know which form is calling the saveAction, so that I known which model to save into the database?


texts: Upgrade Magento vendor module(dependency|library) to a newer version

texts:
Magento uses multiple "external" dependencies|libraries for example one of them is dotmailer-magento2-extension. This specific module is at version 3.1.1 as it can be seen here vendor/dotmailer/dotmailer-magento2-extension/composer.json

Is there any way to upgrade such a dependency module|library to a newer version? For example to update dotmailer module to 3.1.2.

I'm not looking to update the dotmailer module in particular but for a general way to update magento dependencies like libraries or modules.


texts: Can't access website and Admin after Magento upgrade

texts:
I am running Magento in subfolder

www.mysite.com/magento

I just updated Magento to 2.2.3 using ssh,  everything was successful but now I am unable to access the website, or the Magento admin, I am having "Page not found" error from my root website "www.mysite.com"


texts: sales_flat_order returning strange results from sql query

texts:
If I do Select * from sales_flat_order I get over 23000 rows returned

If I do Select * from sales_flat_order where customer_id ='1' I get 74 rows returned

If I do Select * from sales_flat_order where customer_id <>'1' I get 5487 rows returned

Why doesn't the total of queries 2 and 3 match that of query 1?


texts: Setting Up a Buy X Product, Get Y Product Free

texts: I would like to set up a "Buy X Product, Get Y Product Free" rule on Magento. Can anyone show me how to do this?


texts: Which method is suitable for showing errors in custom module admin grid magento 2

texts:
I need to show syntax errors and unexpected exceptions in my custom module admin grid. Which method is suitable for this in Magento 2.

EDIT

Instead of save into exception.log file, I need to save to db, and show in admin grid.


texts: How To learn Magento 2 ?and where i can find real resources that truly help me understand modules development?

texts:
I have been learning Magento 2 for over a month now from free and paid resources and still need a lot to learn to build real modules that solve real problems for the company I am working in, could you point me to resources that make me learn how to understand core modules code so I can build modules like them,

I tried to learn from tutorials and courses free and paid but didn't reach the point that I can understand some of the code of core modules to build feature-rich Magento modules like what I can find on Magento marketplace website because most of the courses and tutorials don't fully explain the code
 and pls don't tell me to learn from u.magento, its courses are very expensive

Thanks in advance for any answer


texts: Google Indexed Pages with currency USD, not with default currency set GBP?

texts:
For my website: https://www.blazesunglasses.com/ , I have set default currency GBP but Google is indexing & caching pages with USD prices.

I want to index site with GBP currency set.

Is there any solution for this?


texts: Import category programmaically in magento2

texts:
I want to import a category programmatically in magento2 using CSV file, CSV contains only one column like Category Name >> Women, Men
So How to create it ?
Please explain me if anybody knows.

Thanks.


texts: Add "Tax amount" to totals in "New order" email template

texts:
I am trying to improve the look of "New Order" email template. I managed to get as far as adding the price of each item including and excluding tax.

Now, I want to add the "Tax Amount" to the totals section, how can I implement this? Please see the below image:

I know the totals are being rendered from /http/app/design/frontend/themevendor/theme/template/sales/order/totals.phtml in a foreach loop.:

<?php foreach ($this->getTotals() as $_code => $_total): ?>
    <?php if ($_total->getBlockName()): ?>
        <?php echo $this->getChildHtml($_total->getBlockName(), false); ?>
    <?php else:?>
    <tr class="<?php echo $_code?>">
        <td colspan="6" <?php echo $this->getLabelProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php else:?>
            <?php echo $this->escapeHtml($_total->getLabel());?>
            <?php endif?>

        <td <?php echo $this->getValueProperties()?>>
            <?php if ($_total->getStrong()):?>
            <?php echo $this->formatValue($_total) ?>
            <?php else:?>
            <?php echo $this->formatValue($_total) ?>
            <?php endif?>

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

I am sure that I need to add the field in the /http/app/code/core/Mage/Sales/Block/Order/Totals.php file but having some difficult time trying.