texts:
i want to change the custom options price programmatically. below is code that i want to Change.

var opConfig = new Product.Options({"38":{"86":{"price":152,"oldPrice":152,"priceValue":"152.0000","type":"fixed","excludeTax":152,"includeTax":152},"87":{"price":255,"oldPrice":255,"priceValue":"255.0000","type":"fixed","excludeTax":255,"includeTax":255},"88":{"price":655,"oldPrice":655,"priceValue":"655.0000","type":"fixed","excludeTax":655,"includeTax":655},"89":{"price":755,"oldPrice":755,"priceValue":"755.0000","type":"fixed","excludeTax":755,"includeTax":755},"90":{"price":955,"oldPrice":955,"priceValue":"955.0000","type":"fixed","excludeTax":955,"includeTax":955},"91":{"price":1200,"oldPrice":1200,"priceValue":"1200.0000","type":"fixed","excludeTax":1200,"includeTax":1200}}});

i want to change the price in this array how can i do that which file i need to rewrite to change price please help


texts: how to achieve this 2 columns page layout?

texts:
I try to get a hang of how to design a custom homepage design. I tried the samples I found here Creating a custom homepage template in Magento2 and have build a basic custom layout as pointed out. Resulting in a white home-page?

Now what I would like to achieve is a layout which looks like this:

The header can stay as it is on the Luma page.
Than I want two equal columns. In which per example can be (in the left one) text from the cms editor and in the left one a block or widget or also text from the cms editor.
Than a block showing 4 or 5 latest products
And the footer as on the luma page.

Now I have:

app/design/frontend//mytheme/Magento_Theme/Page_layout/custom_home.xml
app/design/frontend//mytheme/Magento_Theme
app/design/frontend//mytheme/Magento_Theme/layouts.xml

So how to achieve this? :)

this is my custom_theme structure:


texts: How to check the latest patch version applied to magento?

texts:
I just applied the security patch
PATCH_SUPEE-5344_CE_1.8.0.0_v1-2015-02-10-08-10-38.sh

Since I have no SSH access to the web server, the provider did the work for me.
How can I check by myself if everything went alright?

I'm on Magento CE 1.9.1.0


texts: Magento 2.2: How to add a custom attribute in to Order?

texts:
I have created a custom attribute of type customer_address and I would like to have the API to return me the value as an attribute when I call the API to receive an order.

Attribute:

private function upgradeExternalKeyAddressCustomer($customerSetup)
{
    $attributesInfo = [
        'mod_external_key'  => [
            'label' => __('External Key'),
            'type' => 'varchar',
            'input' => 'text',
            'position' => 200,
            'visible' => 1,
            'required' => 0,
            'system' => 0,
        ],
    ];

    foreach ($attributesInfo as $attributeCode => $attributeParams) {
        $customerSetup->addAttribute('customer_address', $attributeCode, $attributeParams);
    }

    foreach ($attributesInfo as $attributeCode => $attributeParams) {

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', $attributeCode);
        $attribute->setData(
            'used_in_forms',
            ['adminhtml_customer_address', 'customer_address_edit', 'customer_register_address']
        );
        $attribute->save();
    }
}

How to do this?


texts:
I have noticed that Permissions set in /skin folder allow anyone to access example.com/skin and view all files included in it.

Is it a good practice to allow skin folder to be visible in magento? or, should I Forbid access to everyone who tries accessing it?


texts: Magento2 - Open shopping cart page via api

texts:
I have an application in java that creates a shopping cart adding products via api and at the end opens the store website for the customer to login and finalise the order.
Is it possible to open the checkout page with the customer already logged in using the token created in java or the email and password? Does anyone have an idea on how to implement this?


texts: How can i change new products as a new product slider.


texts:
See what is happening:

It is a slider so it should actually be just size of a image and not one after another.

Here is my code of home content:

Home Page

{{block type=\\\’core/template\\\’ template=\\\’pagayo/home.phtml\\\’}} {{block type="cms/block" block_id="pt001-home-slider1"}}

{{block type=\\\’core/template\\\’ template=\\\’pagayo/home.phtml\\\’}} {{block type="cms/block" block_id="pt001-home-slider2"}}

{{block type=\\\’core/template\\\’ template=\\\’pagayo/home.phtml\\\’}} {{block type="cms/block" block_id="pt001-home-slider3"}}

Here is Design code:

{{block type="cms/block" block_id="pt001-home-slider1"}}
<reference name=\\\"content\\\">
<block type=\\\"catalog/product_list\\\" name=\\\"featured\\\" template=\\\"catalog/product/list.phtml\\\">
<action method=\\\"setCategoryId\\\"><category_id>pt001-home-slider1</category_id></action>
<action method=\\\"setColumnCount\\\"><count>5</count></action>
</block>
</reference>
{{block type="cms/block" block_id="pt001-home-slider2"}}
<reference name=\\\"content\\\">
<block type=\\\"catalog/product_list\\\" name=\\\"featured\\\" template=\\\"catalog/product/list.phtml\\\">
<action method=\\\"setCategoryId\\\"><category_id>pt001-home-slider2</category_id></action>
<action method=\\\"setColumnCount\\\"><count>5</count></action>
</block>
</reference>
{{block type="cms/block" block_id="pt001-home-slider3"}}
<reference name=\\\"content\\\">
<block type=\\\"catalog/product_list\\\" name=\\\"featured\\\" template=\\\"catalog/product/list.phtml\\\">
<action method=\\\"setCategoryId\\\"><category_id>pt001-home-slider3</category_id></action>
<action method=\\\"setColumnCount\\\"><count>5</count></action>
</block>
</reference>

What am i doing wrong?


texts: magento 2 programmatically create Excel file with multiple sheets

texts:
In my custom module I am able to save some data into an excel (xls) file by using magento Excel class:
$convert = new \Magento\Framework\Convert\Excel(new \ArrayIterator($lines));
$convert->setDataHeader($headers);
$convert->write($stream, $sheetName);

(see https://mage2.pro/t/topic/823 for further reference)
However, I'm not able to add more than one sheet in my xls file. Is there a way to create the xls with multiple sheets?
Thanks


texts: Magento2: Particular Customer to restrict Multiple Website access

texts:
I have created 3 website "A1", "A2", "A3" and all opening website from subfolder URL wise. for example main website url as http://example.com/ then when customer select "A1" website open url as http://example.com/A1/ etc.

Now My question is : Is it possible I will provide customer to access login for "A1" and "A3" website but not access "A2" website. similarly other customer come and we restrict to access "A1" & "A2" website but not "A3" website to login.

How to restrict customer to login by multiple website wise but not all website login.


texts: Magento Configurable Product Disable Dropdown if Out of Stocks

texts:
There is 2 attribute on my configurable product (Size and Color)

I want to disable option on dropdown (Size or Color) if there is a out of stock product.It should be seen as gray and disable.

How can I do?

Magento ver. 1.9.2.1


texts: Enable PayPal Guest Checkout option is missing

texts:
i'm currently testing around in our shop paying via PayPal Plus in sandbox mode.
Paying via paypal is working so far with the sandbox accounts, now i want to activate "Enable PayPal Guest Checkout" but the option is simply missing.
version: Magento 2.4 Community
Default Country: Germany (configuration->general)
Merchant Location: Germany (Sales->Payment Methods->Merchant Location)
In the Paypal business account(PayPal Plus is Added): PayPal Account Optional is enabled
Thanks in advance


texts: Is there any plugin available for automatic detect customer current Geo location in Magento2.3.2 ?


texts: Magento 2 - How can i move the category page title to the top of the catalog nav block on left?

texts:
I need to add the page title on the top of sidebar navigation block,
i tired with the following but still it renders below the layered navigation.

<move element="page.main.title" destination="sidebar.main" before="-" />


texts:
I have a category that is showing on the frontend of my website, but that I can't find anywhere on my backend, not even in specific store views. How is this possible? I want to turn the category off.

I already tried reindexing and emptying my cache.


texts: Magento2 Site is quick but checkout takes over 1m to submit

texts:
I've been working on a Magento2 site for a while now. and the entire site is quick, responsive, and working well in production mode.
We work with Redis, and all caching on.

But when I place an order, this process takes over 1minute in load time. I even had to set the apache time-outs higher to not trigger a 503 error.

Is this a familiar issue. We don't have extensions running.
Running on stable 2.1 and only did several design and layout modifications. Also on the normal theme, it's slow.


texts: How to find all category with the help of attribute for menu purpose in magento?

texts:
I need  category list with the help of attribute for creating custom menu visible in all pages.

I have created a drop-down category attribute. I would like to display all the categories for one on the values in the drop-down. Actually I want to display all the values but separately, that way I can create four columns of category listings.

I can display the attribute on the category page but i need to be able to echo the list on all the pages.

I have one parent category id

and attribute detail :

Attribute code:

attribute value

]2

i want category list as per attribute id. Means which category product have attribute 0-3 Months,  will list


texts: Setting up bundles with grouped product options

texts:
I have bundle products that need importing into Magento from another e-commerce store. The products are customisable gift bags, an example product might look like:

Gift Bag 1
includes

item 1

item 2

Choose either

Item 3

Item 4

Item 5 + 6

Item 7

Custom option 1 e.g how the bag is tied

Custom option 2

I was experimenting with the built in Magento bundles but what I need doesn't seem to be possible as only simple products can be choices in the bundle. i.e the "Item 5 + 6" choice wouldn't be possible.

The price of the product needs to be the combination of products chosen, plus any custom options.

Is this format possible using default Magento? If not, are there any extensions that allow this kind of functionality?


texts: Can i change the scope location from global to website for ebay_price attribute

texts:
I have to change the scope of ebay price to website from global but there is not any option to change.

Suggest me it's urgent work.


texts: Unassigning a source on a product programmatically in Magento 2's MSI

texts:
In the admin for a product, you can assign and unassign sources for a product (as seen below).

How to programmatically unassign a source from a product?


texts:
Config.xml

    <?xml version="1.0"?>
<config>
  <modules>
    <Manoj_Csv>
      <version>0.1.0</version>
    </Manoj_Csv>
  </modules>
  <global>
   <adminhtml>
        <events>
            <adminhtml_widget_container_html_before>
                <observers>
                    <manoj_csv>
                        <class>csv/observer</class>
                        <method>adminhtmlWidgetContainerHtmlBefore</method>
                    </manoj_csv>
                </observers>
            </adminhtml_widget_container_html_before>
        </events>
    </adminhtml>
  </global>
</config>

observer.php

<?php

Class Manoj_Csv_Model_Observer
{
    public function adminhtmlWidgetContainerHtmlBefore($event)
    {
        $block = $event->getBlock();
        $message = Mage::helper('sales')->__('Are you want to Download...?');

        if ($block instanceof Mage_Adminhtml_Block_Sales_Order_View) {
            $block->addButton('do_something_crazy', array(
                'label'     => Mage::helper('Sales')->__('Download...'),
                'onclick'   => "confirmSetLocation('{$message}','{$block->getUrl('*/')}')", // < missed comma
                'class'     => 'go'
            ));
        }
    }
}


texts: How I can migrate Magento 1.9.2 modules to Magento 2?

texts:
Is there any helpful links or guide to migrating Magento 1.9.2 modules/extensions to the new version (i.e. 2.x)?

Any automated solution or instructions set would be helpful.

Would be helpful to make compatibility with Magento 2.0.


texts: Magento 2 - Passing Values From Product Page to Cart

texts:
I have created 5 Custom Input Fields (not Attributes) in the Product View Page.
The Customer can write his Values inside if he want to modify the Product Values.
I want to pass them to Cart, and later to Checkout. At the End I want to view the Values in the Order.
How can I achive this?


texts: Redirection between storeviews; or displaying wrong language

texts:
We have a Dutch (.nl) webshop with also an international storeview (.com), we also have a .be storeview.

If an user requests webshop.com/product1 the user will be redirected to shop.nl with a "server:nginx status:302" redirect.

Settings are as following;

Add Store Code to Urls: no
Auto-redirect to Base URL: yes (302)
Storeviews; default NL
sort order of all storeviews = 0.
Base (unsecure & secure) urls are all set to the proper domain

view: nl -> https://webshop.nl
view: en -> https://webshop.com
view: be -> https://webshop.be

If I turn Auto-redirect to Base URL to "NO" and request webshop.com/product1 , it shows product1 on webshop.com/product1, however with the Dutch (NL) storeview & therefore the Dutch language. I would like to show the "EN" storeview (so the product in English language) on .com without adding a storeview parameter.

We don't have this problem in the Dutch storeview. If requested webshop.nl/product1 it will serve webshop.nl/product1 without any redirects.

nginx geoip_country_code is configured as well, however this should work properly.

which is mapped like this;
`

map $geoip_country_code $runcode {
AL en;
AD en;
AT en;
BY en;
BE be;
BA en;
etc ......

NL nl;
}

`
If I go to domain.com/robots.txt it does not get redirected to .nl. Also when I remove this configuration the same problem occurs.
Thereby I'm browsing from Sweden (which is SE en)


texts: Is adding "$isShellDisabled = true; " in "cron.php" recommended?

texts:
All cron jobs were scheduled but not executed.

Googled it lot but no help. I have checked this too.

Then found this link

As it described I have added this line $isShellDisabled = true; and cron start executing.

$disabledFuncs = explode(',', ini_get('disable_functions'));
$isShellDisabled = is_array($disabledFuncs) ? in_array('shell_exec', $disabledFuncs) : true;
$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;
$isShellDisabled = true; //newly added line

Question

Is it OK to add this line?

I am running site in "ventraip" hosting provider.


texts: Magento 2.3.1 not loading correct javascript files (tinymce)

texts:
I've upgraded from Magento 2.2.6 with Theme Ves Fresh 2.
I have tried to clean all caches delete static folder and restart Varnish, but had no luck so far.

The errors include:

GET https://shop.xxxxs.de/static/adminhtml/Magento/backend/en_US/tinymce.js net::ERR_ABORTED 404 (Not Found)

http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.js:166)
    at HTMLScriptElement.onScriptError

GET https://shop.xyxxyx.de/static/adminhtml/Magento/backend/en_US/themes/modern/theme.js net::ERR_ABORTED 404 (Not Found) ```

 Uncaught TypeError: b is not a constructor
    at m (tinymce.min.js:13)
    at Object.q [as init] (tinymce.min.js:13)
    at p.<anonymous> (tinymce.min.js:13)
    at Array.<anonymous> (tinymce.min.js:4)
    at b (tinymce.min.js:2)
    at r (tinymce.min.js:4)
    at tinymce.min.js:4
    at HTMLScriptElement.h (tinymce.min.js:4)


texts:
I have installed Magento 1.9 on domain say abc.com and created a new website having URL xyz.abc.com from admin

System -> Manage Stores

Now what I have done is created a new sub domain xyz.abc.com and pointed to original magento installation.

Whenever I visit to xyz.abc.com it works fine. But the links that are generated on that page have a query string parameter SID like abc.com?SID=sdfskjdf45ssdf/somepage.

Now I want replace abc.com?SID=sdfskjdf45ssdf/somepage with xyz.abc.com/somepage.


texts:
this code is to display a pop up  once per day. But I'm having trouble making it responsive, and it seems that it shows once a lifetime...

Also if I put it in 3 different pages, and it only shows up in one of them...

CSS:

 Visit our new website: Example.com.

Javascipt:

if(localStorage.last){
    if( (localStorage.last - Date.now() ) / (1000*60*60*24) >= 1){ //Date.now() is in milliseconds, so convert it all to days, and if it's more than 1 day, show the div

            $(document).ready(function() {
              var id = '#dialog';
              var maskHeight = $(document).height();
              var maskWidth = $(window).width();
              $('#mask').css({'width':maskWidth,'height':maskHeight});
              $('#mask').fadeIn(500);
              $('#mask').fadeTo("slow",0.9);
                    var winH = $(window).height();
              var winW = $(window).width();
                    $(id).css('top',  winH/2-$(id).height()/2);
              $(id).css('left', winW/2-$(id).width()/2);
                 $(id).fadeIn(2000);
                 $('.window .close').click(function (e) {
              e.preventDefault();
              $('#mask').hide();
              $('.window').hide();
                 });
                 $('#mask').click(function () {
              $(this).hide();
              $('.window').hide();
             });

            });

        localStorage.last = Date.now(); //Reset your timer
 }
}
else{
localStorage.last = Date.now();
    $(document).ready(function() {
              var id = '#dialog';
              var maskHeight = $(document).height();
              var maskWidth = $(window).width();
              $('#mask').css({'width':maskWidth,'height':maskHeight});
              $('#mask').fadeIn(500);
              $('#mask').fadeTo("slow",0.9);
                    var winH = $(window).height();
              var winW = $(window).width();
                    $(id).css('top',  winH/2-$(id).height()/2);
              $(id).css('left', winW/2-$(id).width()/2);
                 $(id).fadeIn(2000);
                 $('.window .close').click(function (e) {
              e.preventDefault();
              $('#mask').hide();
              $('.window').hide();
                 });
                 $('#mask').click(function () {
              $(this).hide();
              $('.window').hide();
             });

            });

}
</script>


texts: Having some type of cron issue which is giving loads of the same report

texts:
It's very generic and I'm not really sure how to go about debugging this one. I probably get about 50 reports per day and it's all the same thing.

a:3:{i:0;s:0:"";i:1;s:1210:"#0 /var/www/new/releases/20170801161140/app/code/core/Mage/Core/Model/App.php(848): Mage_Core_Model_App->throwStoreException()
#1 /var/www/new/releases/20170801161140/app/Mage.php(353): Mage_Core_Model_App->getStore(NULL)
#2 /var/www/new/releases/20170801161140/app/code/core/Mage/Cron/Model/Observer.php(281): Mage::getStoreConfig('system/cron/sch...')
#3 /var/www/new/releases/20170801161140/app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#4 /var/www/new/releases/20170801161140/app/code/core/Mage/Core/Model/App.php(1358): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#5 /var/www/new/releases/20170801161140/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#6 /var/www/new/releases/20170801161140/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#7 /var/www/new/releases/20170801161140/cron.php(78): Mage::dispatchEvent('default')
#8 {main}";s:11:"script_name";s:58:"/var/www/new/releases/20170801161140/index.php";}

Usually if i saw anything that was a third party module or in the community or local folder I would look at that to be the suspected issue.

*******updated*********

root@vm-prod-web1:/var/www/new/current/var/report# cat 1085673477531
a:3:{i:0;s:0:"";i:1;s:1526:"#0 /var/www/new/releases/20170801205835/app/code/core/Mage/Core/Model/App.php(848): Mage_Core_Model_App->throwStoreException()
#1 /var/www/new/releases/20170801205835/app/Mage.php(353): Mage_Core_Model_App->getStore(NULL)
#2 /var/www/new/releases/20170801205835/app/code/community/Aoe/Scheduler/Helper/Data.php(281): Mage::getStoreConfig('system/cron/err...')
#3 /var/www/new/releases/20170801205835/app/code/community/Aoe/Scheduler/Model/Schedule.php(260): Aoe_Scheduler_Helper_Data->sendErrorMail(Object(Aoe_Scheduler_Model_Schedule), 'exception 'Mage...')
#4 /var/www/new/releases/20170801205835/app/code/community/Aoe/Scheduler/Model/Schedule.php(605): Aoe_Scheduler_Model_Schedule->runNow(true)
#5 /var/www/new/releases/20170801205835/app/code/community/Aoe/Scheduler/Model/Observer.php(39): Aoe_Scheduler_Model_Schedule->process()
#6 /var/www/new/releases/20170801205835/app/code/core/Mage/Core/Model/App.php(1358): Aoe_Scheduler_Model_Observer->dispatch(Object(Varien_Event_Observer))
#7 /var/www/new/releases/20170801205835/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Aoe_Scheduler_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#8 /var/www/new/releases/20170801205835/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#9 /var/www/new/releases/20170801205835/cron.php(78): Mage::dispatchEvent('default')
#10 {main}";s:11:"script_name";s:58:"/var/www/new/releases/20170801205835/index.php";}


texts: How to check email id is exist or not before registration in magento

texts: I am new to magento.I want to check the user provide email is already exist or not on custom registration page. I tried this with java script (apply in same file)but it shows html content in response text.


texts: How to show configurable product stock status in magento?

texts:
I want to show the stock status of child product when the configurable option is selected in the frontend.

For example product C1 has S1 ( 1 qty ) and S2 (10 qty ) children. "Only X left Threshold" is set to 5. So when user selects S1 option, it has to show the message "only 1 left", if S2 option is selected then no need to show message as its qty is more than the threshold set.


texts: Magento 2 Add to cart api Item price set zero in Quote Item table

texts:
I am trying to add product to cart with Magento 2 default API.

POST : http://{{magento2}}/rest/V1/carts/mine/items

Request : {
    "cartItem": {
        "sku": "p2",
        "qty": 1,
        "price": 100,
        "quote_id": 7227
    }
}

but when i first time add product to cart using API than it set product price 0 in Quote Item table. After second time add product to cart using same API than it working fine.

I have try with Fresh Magento 2 but facing same issue.


texts: how to assign a specific word according to number in admin grid

texts:
I want to add the wording according to a number in the admin grid column.

protected function _prepareColumns()
{
$this->addColumn(
        'return_type',
        array(
            'header' => Mage::helper('requestreturn')->__('Return Type'),
            'index'  => 'return_type',
        )
    );
}

Here i am getting numbers i want to check the number in if and add the text to the column.

if(type="1"){
    $type = "New";
}elseif(type="2"){
    $type = "Old";
}

How can i do it?


texts:
I am trying to create a simnple Hello World Module in Magento 1.9 but i keep getting 404 error.

Please what am i doing wrong?

Below is my code :

config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Practice_ControllerTest>
            <version>0.0.1</version>
        </Practice_ControllerTest>
    </modules>

    <frontend>
        <routers>
            <test_controller>
                <use>Standard</use>
                <args>
                    <module>Practice_ControllerTest</module>
                    <frontName>requestflowtest</frontName>
                </args>
            </test_controller>
        </routers>
    </frontend>

</config>

IndexController.php

<?php

class Practice_ControllerTest_IndexController extends Mage_Core_Controller_Front_Action {
    public function indexAction(){
        echo '
Hello World
';
    }

}

I cant seem to figure out what i am doing wrong.

Thanks


texts:
I have this structure

in POSTMAN i send

api2.xml i have this code

<?xml version="1.0"?>
<config>
<api2>
    <resource_groups>
        <custom_restapi translate="title" module="Custom_Restapi">
            <title>Custom Rest API</title>
            <sort_order>10</sort_order>
        </custom_restapi>
    </resource_groups>
    <resources>
        <custom_restapi translate="title" module="Custom_Restapi">
            <group>custom_restapi</group>
            <model>custom_restapi/api2_restapi</model>
            <title>Testing My Rest API</title>
            <sort_order>10</sort_order>
            <privileges>
                <admin>
                    <create>1</create>
                </admin>
            </privileges>
            <attributes  translate="" module="Custom_Restapi">
                <firstname>First Name</firstname>
                <lastname>Last Name</lastname>
                <email>Email</email>
                <password>Password</password>
            </attributes>
            <routes>
                <route_entity>
                    <route>/customer/create</route>
                    <action_type>entity</action_type>
                </route_entity>
                <route_collection>
                    <route>/customer/create</route>
                    <action_type>collection</action_type>
                </route_collection>
            </routes>
            <versions>1</versions>
        </custom_restapi>
    </resources>
</api2>

how do i get access? What do I need to do?


texts: Positioning in anchored categories with subcategories

texts:
I have a category structure like below, where I have products onnly in LC1 and LC2.
All of the categories are anchored, so you can see all of producsts in LCs in any of the higher categories.

Top Cat
-- Sub Cat
   -- Lowest Cat 1 (LC1)
   -- Lowest Cat 2 (LC2)
etc...

I'm having a problem where product positions assigned in the LCs are not working as they are assigned in Top Cat and Sub Cat. The position values only hold when you are in categories that are not anchoring any subcategories.

This is apparently how product positions work, according to discussions from a while back (here and here). Some proposed solutions include

Assigning the products in LCs to their parent categories with same positions values
Unchecking "Use Config Settings" of the anchoring parent categories and selecting Best Value (which is the position value). This poster seemed like he had only a 2-tier category structure.

(1) is not an option for us. I tried (2), but it doesn't work. I don't know if it's because we have a deeper category tree. I have seem Marius's post that seems relevant, but I'd like to know if there is an option that will allow my product positions values to be displayed according to the position values, discarding how many or how deep subcategories are anchored?

I use Magento EE 1.12.


texts: Magento2 : How to remove email validation from customer account registration page

texts:
I want to remove this email validation and user can add mobile number in this field .
How to apply this in my custom module..

Please help me...


texts: what is difference between catalog_product_super_link and catalog_product_relation table?

texts: I have created a configurable product with 2 simple products and child products and parent product relations are added in two different tables(catalog_product_super_link and catalog_product_relation table ).Anybody can get clear what uses of two tables ?


texts:
I'm trying to caltulate the total wight of products in cart and here is my code:

//If we have no weight, try to calculate this
$weight = 0;
if ($quote->getShippingAddress()->getWeight() == null ||
    $quote->getShippingAddress()->getWeight() == 0 ||
    $quote->getShippingAddress()->getWeight() == '') {

    foreach ($quote->getAllItems() as $item) {
        $itemWeight = $item->getWeight();
        if ($itemWeight != null) {
            $weight += $itemWeight;
        }
    }
}

Now the problem is I have free/bonus products in the cart and this free product has weight. The above code just add the weight of the free product as well. I want to know is there a way I can exclude the weight of the free product in my cart. Or how can I filter the free/bonus products on magento using the Singleton.


texts: how to display the "advanced search" on the front page

texts:
How do I show the "advanced search" on the front page.
I want to open the website showing the advanced search options.

thanks


texts: Magento : Show same product as separate in cart

texts:
I have products with different custom options. When a same product with same custom options is added to cart twice, it appears in the cart as 2 X qty
Please refer the image

I want to display it as separate product. Please refer the below image.

How can I do it. Please help.


texts: Full e-Commerce solution with multiuser and multistore Magento setup

texts:
I would like to know that, is a structure possible with Magento Community Edition like below;

We'll setup a magento store (main store - main site) with all of our products that can be sold on any sub-store.
We'll setup some sub-stores (with multi-store functionality) on different domains
We'll assign one or more users they responsible to admin these stores (admins can only manage their sub-store/site)
We'll assign some of our products to these sub-stores (based on sub-store admins' decisions)
Admins can edit products(prices-campaigns-images etc)/pages/posts on their sub-stores (own site)

I mean, we would like to construct an e-commerce system to allow our customers let them create their own internet site with their domain and sell our products within these site, we'll provide our host and product database and help them to construct site and store.
Is it possible with magento? Thanks


texts: Update price on product page with JS component and add to cart

texts:
I update the product price (.price-box) on the product page via some custom JS component. When putting the product into cart it still has the old value from before the update.

How can I put the product into cart with the new price without actually saving the product with the new price but keeping it in cart and checkout?


texts: I am getting â‚¹ in invoice page instead Rs symbol. How to fix this issue in magento 1.9.1? Please help me with this


texts: How to show image field in frontend phtml file

texts:
i have done this:
but it is not showing banner image:
step1.

/app/code/local/Company/ModName/Block/Adminhtml/ModName/Edit/Tab/Form.php

$fieldset->addField('banner_image', 'file', array(
          'label'     => Mage::helper('pictos')->__('Banner Image'),
          'required'  => false,
          'name'      => 'banner_image',
));

step2.

if(isset($_FILES['banner_image']['name']) and (file_exists($_FILES['banner_image']['tmp_name']))) {
  try {
    $uploader = new Varien_File_Uploader('banner_image');
    $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
    $uploader->setAllowRenameFiles(false);

    // setAllowRenameFiles(true) -> move your file in a folder the magento way
    // setAllowRenameFiles(true) -> move your file directly in the $path folder
    $uploader->setFilesDispersion(false);

    $path = Mage::getBaseDir('media') . DS .blog. DS ;

    $uploader->save($path, $_FILES['banner_image']['name']);

    $data['banner_image'] = $_FILES['banner_image']['name'];
  }catch(Exception $e) {

  }
}
else {

    if(isset($data['banner_image']['delete']) && $data['banner_image']['delete'] == 1)
        $data['image_main'] = '';
    else
        unset($data['banner_image']);
}

step three:

$installer->startSetup();
$installer->getConnection()->addColumn(
    $installer->getTable('blog/post'),
    'banner_image',
    'VARCHAR(255) NULL'
);
$installer->endSetup();

in frontend i call banner image like this:

if($this->getpost()->getBannerImage()){?>

<?php $imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'/blog/'.$this->getpost()->getBannerImage();?>
            <img src="<?php echo $imageUrl;?>" alt="<?php echo $this->getpost()->getBannerImage();?>">

but no result


texts: "Add New Set" button in "Manage Attribute Sets" is not visible...

texts:
Hope someone can help with this... For some reason the "Add New Set" buton is not visible in the "Manage Attribute Sets".

I have tried everything... gone through all settings... nothing seems to be wrong... Desperate as I was, I even made a complete reinstall on a clean site (and DB)... Same issue...

The "default" set is empty, and there are no unassigned attributes in the list... I think it's weird... (see attached images)

Anyone have an idea of what(if) I'm doing(something) wrong? Everything else seem to be working ok!

(thanks in advance)

Mike


texts: How to get placeholder image url Magento2?

texts: How to get the placeholder image URL on my template file of product listing page?


texts: Git clone on already existing Magento installation

texts:
I am developing an e-shop with Magento 2.1.x. I am using git as version control and the .gitignore file shipped with the installation of Magento 2.
Now, a colleague of mine, will join the project to help developing some parts of it.

I thought that the best practice would be to install a local copy of Magento on its computer and then make a git clone to download the custom parts. Is that the correct flow? I do like this I get a lot of untracked files..


texts: What is the replacement of getOrderUrl() in Toolbar.php?

texts:
In Magento 1.x versions we have the function called getOrderUrl() in Toolbar.php whereas in Magento 2, I couldn't found the same function.

My question here is, How can I get the same function? So that I can add few more sort options in toolbar area.

In Magento 1.x versions,
<option value="<?php echo $this->getOrderUrl('price', 'asc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected=”selected”<?php endif; ?>>Price : Low To High</option>. Here getOrderUrl will be generated in value attribute.

I want to generate the getOrderUrl in Magento 2.

It would be appreciated someone provide solution.


texts:
I'm currently working through my first Magento 2 website and I'm having some trouble understanding how to create custom page templates.

I've read the answer provided here but still have some questions.

Do I need to structure the template in xml? Or can I use html and save the file as a .phtml? Where do I declare which template belongs to which page? In the the layouts.xml?


texts: how to remove special price label and display regular price and special price in same line in magento

texts:
I have a requirement to remove special price label and display special price and regular price on the same line in in feature slider in Magento home page if its possible from admin side then say first because I am not  Magento developer,

thanks.

like below image


texts: Can any of u tell me where will be the html content for return address that is displayed in transactional email variable - return_address.


texts: Magento 2.4.0 Upgrade Reordered Shipping & Billing Address Fields

texts: After upgrading to Magento 2.4.0 from 2.3.5, the Shipping and Billing Address fields in both the frontend and the backend are reordered. The new order is FName, LName, Company, St Address, County, State, City, Zip, Phone. Is this now the default?


texts: Need only product and category data in data migration

texts:
I am doing Magento data migration from 1.9.2.4 to 2.3.1. I need only and only product, category and attribute data. I am using new and different theme in 2.3.1, Ultimo.

I don't want any cutomer, sales etc., data.

Please assist with any changes required in config.xml or map.xml files. OR if you have any scripts, pls share with me.

Many thanks in advance.


texts: How to show image in custom grid in magento 2 backend?

texts:
I am trying to display image on custom grid in back-end. I have tried some example but anything is not working yet.

Grid.php (Contact/Modules/Block/Adminhtml/Contact is the location)

$this->addColumn(
        'photo',
        [
            'header' => __('photo'),
            'index' => 'photo',
            'class' =>'photo',
            'renderer'  => '\Contact\Modules\Block\Adminhtml\Inquiry\Grid\Renderer\Photo',
        ]
    );

Photo.php

<?php
namespace Contact\Modules\Block\Adminhtml\Inquiry\Grid\Renderer;

use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer;
use Magento\Framework\Object;
use Magento\Store\Model\StoreManagerInterface;

class Photo extends AbstractRenderer
{
   private $_storeManager;
   /**
    * @param \Magento\Backend\Block\Context $context
    * @param array $data
    */
   public function __construct(\Magento\Backend\Block\Context $context,
StoreManagerInterface $storemanager, array $data = [])
   {
       $this->_storeManager = $storemanager;
       parent::__construct($context, $data);
       $this->_authorization = $context->getAuthorization();
   }
   /**
    * Renders grid column
    *
    * @param Object $row
    * @return  string
    */
   public function render(Object $row)
   {
       $mediaDirectory = $this->_storeManager->getStore()->getBaseUrl(
           \Magento\Framework\UrlInterface::URL_TYPE_MEDIA
       );
       $imageUrl = $mediaDirectory.'/Contact/Modules'.$this->_getValue($row);
       return '<img src="'.$imageUrl.'" width="50"/>';
   }
}

reference link for this example https://firebearstudio.com/blog/magento-2-image-rendering.html
Now it is showing

 Invalid block type: \Contact\Modules\Block\Adminhtml\Inquiry\Grid\Renderer\Photo
Exception #1 (ReflectionException): Class Contact\Modules\Block\Adminhtml\Inquiry\Grid\Renderer\Photo does not exist

Is there anything i need to add to display image in grid view ?


texts: The Google search result of my Magento site is showing logo link in the title

texts:
When I search for my store smartoffice.com.ng on google search, I see the images/logo.png appear as the suffix of the title in some search results. What could possibly be the cause? I have tried removing the link from webmaster tools but it is still there.

Example:
https://www.smartoffice.com.ng/stationery/calculators/graphic-calculators


texts: unable to remove patch from composer.json

texts: I have to update extension https://i.imgur.com/SgHq8YK.png but it has an error, Can I remove it manually? I think it cant be good practice. how can I safe remove it? dockergento composer remove iwd/ordermanager didn't work.


texts:
I'm trying to use Bootstrap 4 in my theme for Magento 2.
So i have created a requirejs-config.js (in my theme dir) with the next items :

var config = {
    paths: {
        "popper": "js/popper.min",
        "jquery.bootstrap": "js/bootstrap.min"
    },
    shim: {
        'jquery.bootstrap': {
            'deps':['jquery' , 'popper']
        }
    }
};

And i want to use Bootstrap for my Carousel now like this :

<script type="text/javascript">
    requirejs(['jquery' , 'popper' , 'jquery.bootstrap'], function ($ , Popper , jQueryBootstrap) {
        $('#DesignitCarousel').carousel();
    });
</script>

I do use popper 1.12.3 from the dist/umd directory and its loaded great.
But i still get this error :

  bootstrap.min.js:6 Uncaught Error: Bootstrap dropdown require
  Popper.js (https://popper.js.org)
      at bootstrap.min.js:6
      at bootstrap.min.js:6
      at bootstrap.min.js:6

Anyone any idea why my dependencies OR my requirejs in my phtml fille is not working ?


texts:
I need to send the customer informations through a POST to another endpoint after registering him/her.

I tried to create a module based in this SMS module (customer_register_success not triggered after successful registration), but (I'm not used to make modules) it doesn't generates any log file.

app/etc/modules/Hypercube_Postregister.xml

<?xml version="1.0"?>
<config>
  <modules>
      <Hypercube_Postregister>
          <active>true</active>
          <codePool>local</codePool>
          <version>0.0.1</version>
      </Hypercube_Postregister>
  </modules>
</config>

app/code/local/Hypercube/Postregister/etc/config.xml

<config>
  <modules>
      <Hypercube_Postregister>
          <version>0.0.1</version>
      </Hypercube_Postregister>
  </modules>
  <global>
      <events>
          <customer_register_success>
              <observers>
                  <Hypercube_Postregister_customer_register_success>
                      <type>singleton</type>
                      <class>Hypercube_Postregister_Model</class>
                      <method>customerRegisterSuccess</method>
                  </Hypercube_Postregister_customer_register_success>
              </observers>
          </customer_register_success>
      </events>
  </global>
</config>

app/code/local/Hypercube/Postregister/Model/Observer.php

<?php
class Ucs_GlobalPostregister_Model_Observer {
  public function customerRegisterSuccess(Varien_Event_Observer $observer) {
    $event = $observer->getEvent();
    $customer = $event->getCustomer();
    $email = $customer->getEmail();
    Mage::log('Hello World!', null, 'mylogfile.log', true);
  }
}
?>

What am I missing?


texts: Refreshing Cache from admin showing Fatal error: Call to a member function asArray() on boolean

texts:
Refreshing cache from back end

  Fatal error: Call to a member function asArray() on boolean in
  /home/bulkpowd/public_html/app/code/core/Mage/Core/Model/Layout/Update.php
  on line 420

When I open this file below code is written:

public function getFileLayoutUpdatesXml($area, $package, $theme, $storeId = null)
    {
        if (null === $storeId) {
            $storeId = Mage::app()->getStore()->getId();
        }
        /* @var $design Mage_Core_Model_Design_Package */
        $design = Mage::getSingleton('core/design_package');
        $layoutXml = null;
        $elementClass = $this->getElementClass();
        $updatesRoot = Mage::app()->getConfig()->getNode($area.'/layout/updates');
        Mage::dispatchEvent('core_layout_update_updates_get_after', array('updates' => $updatesRoot));
        $updates = $updatesRoot->asArray();   // line no. 420 this line produce error

This error is happened not every time but occurs sometimes, but I don't know the exact case when it comes.

How can I resolve it?


texts: Magento sort by special price (disounted product) on product list page dropdown (toolbar.phtml)

texts:
I want to extend sort by drop down for special price or discounted product from toolbar.phtml

    <fieldset class="sort-by">
      <?php echo $this->__('Sort by') ?>
        <select onchange="setLocation(this.value)">
          <option value="<?php echo $this->getOrderUrl('price', 'asc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>> Price - Low to High </option>
          <option value="<?php echo $this->getOrderUrl('price', 'desc') ?>"<?php if($this->isOrderCurrent('price') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>> Price - High to Low </option>
          <option value="<?php echo $this->getOrderUrl('name', 'asc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'asc'): ?> selected="selected"<?php endif; ?>> Name - A to Z </option>
          <option value="<?php echo $this->getOrderUrl('name', 'desc') ?>"<?php if($this->isOrderCurrent('name') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>> Name - Z to A </option>
         <option value="<?php echo $this->getOrderUrl('update_at', 'desc') ?>"<?php if($this->isOrderCurrent('update_at') && $this->getCurrentDirection() == 'desc'): ?> selected="selected"<?php endif; ?>>Newest First</option>
        </select>
  </fieldset>

How I can add one more option for discount so products will sort by special price ASC?


texts: How to get Magento 2 Customizable Options with GraphQL

texts:
How to get Magento 2 Customizable Options with REST API - similar to this, but how to get same result with GraphQL in Magento 2?
This Magento 2 documentation doesn't tell anything about getting products options - https://devdocs.magento.com/guides/v2.4/graphql/queries/products.html
I also meet up with some examples here: https://github.com/magento/architecture/blob/master/design-documents/graph-ql/coverage/catalog/configurable-options-selection.md
But i don't understand how this selection works and this example above doesn't work for 2.4 version. There are a lot of fields in above queries that doesn't even exist and after few changes that i try to do - shows nothing special.
So, how to properly get product options based on just product sku ?
I'm using Magento version - 2.4


texts: “Missing required argument $options” After migration from magento 1.9.2.4 to 2.1.6

texts:
I am having the exact same problem as this issue- "Missing required argument $options" After migration from magento 1.9.2.4 to 2.1.3

The solution talks about modifying this file- var/www/html/vendor/magento/module-customer/Model/Config.php

That file is not there for me. I have looked and looked but can not find that file to try that solution. Does anyone know a workaround? or the location of that file? Did it move from 2.1.3 to 2.1.6?


texts: Magento2 : Fire body loader with text/x-magento-init

texts: i have a custom block on my page, that calls javascript via text/x-magento-init and performs some operations so loader should be displayed untill that script will finish its operations. How can i fire body loader with that block load?


texts:
I want to add dynamically new products in the cart during the checkout process, but I've no clear the differences between the Quote and the Cart.

In my catalog pages I'm adding contents directly to the cart with:

$cart = Mage::getSingleton('checkout/cart');
$cart->init();
$cart->addProduct($product, $params);
$cart->save();

whereas in the checkout process I am using:

$quote = $this->getOnepage()->getQuote();
$product = Mage::getModel('catalog/product')->load(
    $params = array(
        'product' => 113,
        'qty' => 1
    );
$quoteItem = Mage::getModel('sales/quote_item')->setProduct($product)->setQty(1);
$quoteItem->setStoreId(Mage::app()->getStore()->getId());
$quote->addItem($quoteItem);
$quote->save();

Not sure why I am doing like that :) Does it make sense to also add the products in the cart in that last step?

Can someone throw some light on this?


texts: Google Analytics E-Commerce doesn't work with Magento 1.9.3.2

texts:
If I add the GA tracking code in the Google API section, I receive an error message in Google Analytics. The message says that the "e-commerce data are not sent". How can I solve this issue?

I also try to install the free extension https://www.magentocommerce.com/magento-connect/google-analytics-enhanced-ecommerce-1.html but if this extension is activated, the search box in my front-end doesn't work.


texts: /rest/V1/products filtering by price and special price

texts:
I am using the Rest API to query for products. When I set the order by to "price" it orders everything properly while also taking into account currently active special prices.

My issue is that when I try filtering by "price" it ignores special price. I was thinking I could add another filter group for special price but then it takes into account all specials even if they are no longer active.

Is there any way to filter by price while also taking into account current special prices?

Here is my search url:

/rest/V1/products?searchCriteria[filterGroups][0][filters][0][field]=price&searchCriteria[filterGroups][0][filters][0][value]=0.25&searchCriteria[filterGroups][0][filters][0][condition_type]=gteq&searchCriteria[filterGroups][1][filters][0][field]=price&searchCriteria[filterGroups][1][filters][0][value]=0.88&searchCriteria[filterGroups][1][filters][0][condition_type]=lteq&searchCriteria[sortOrders][0][field]=price&searchCriteria[sortOrders][0][direction]=ASC&searchCriteria[pageSize]=10&searchCriteria[currentPage]=1


texts: Error in Upgrade Magento CE version from 2.2.3 to 2.3.0 with composer?

texts:
I have tried using below command but getting errors when update

Command 1:

  composer require magento/product-community-edition 2.3.0 --no-update

Command 2:

  composer update

Output:

 Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/product-community-edition 2.3.0 -> satisfiable by magento/product-community-edition[2.3.0].
    - magento/product-community-edition 2.3.0 requires elasticsearch/elasticsearch ~2.0|~5.1 -> satisfiable by elasticsearch/elasticsearch[2.0.x-dev, v2.0.0, v2.0.0-beta1, v2.0.0-beta2, v2.0.0-beta3, v2.0.0-beta4, v2.0.0-beta5, v2.0.1, v2.0.2, v2.0.3, v2.1.0, v2.1.1, v2.1.2, v2.1.3, v2.1.4, v2.1.5, v2.2.0, v2.2.1, v2.2.2, v2.2.3, v2.3.0, v2.3.1, v2.3.2, v2.4.0, v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.2.0, v5.3.0, v5.3.1, v5.3.2, v5.4.0, v5.5.0] but these conflict with your requirements or minimum-stability.

if anyone has an idea help me..!!!


texts: Product page count and record count issue on listing page

texts:
Unable to change the record on listing page it shows static number for all listing page as shown in the image

It display 10000 for all listing page using $this->_productCollection()->getSize() though the count greater than 10000


texts: custom attribute display frontend error in Magento 2.1

texts:
i have created custom attribute for ex. color in magento 2.1 but i can't able to display it in product view page frontend. so please guide me how to achieve this in the new version.

getAttributeText('color') this works in Magento 2.0.1 to Magento 2.0.7 but not working in Magento 2.1.


texts: No ajax call made in production mode, no HITs in varnish

texts:
Please correct me if I'm wrong: According to the explanations on the web, magento should be loading pages using AJAXs and some of those calls should be cached by the varnish.

I successfully configured varnish. When in developer mode, pages are loaded by AJAX calls, some of which are HITs as expected. However, when I switch to production mode, no ajax calls made, whole page is loaded as a single html, thus I am not getting any HITs.

What am I doing wrong? Please help me fix this issue.

Developer mode:

Production mode:


texts: Magento 2 : Update quantity of cart item in observer

texts:
I am observing controller_action_postdispatch_checkout_cart_add, in some cases if customer adds a product we have to reset to quantity 1

$productId= $this->_request->getParam('product');
        $productAdded = $this->_productRepository->getById($productId);
$item= $quote->getItemByProduct($productAdded);
            $item_id= $item->getItemId();

            $params[$item_id]['qty'] = 1;
            $params = array(
                'product' => $productId,
                'qty'     => 1,
            );
            echo $item_id;
            $quote->updateItem($item_id,$params);

But updateItem expects 3 parameters

public function updateItem($itemId, $buyRequest, $params = null)

What would be $buyRequest in my case

or there is another way to update quantity in cart


texts: Help! Magento won't stop sending me new order emails

texts:
I didn't recently upgrade or change any of my settings in Magento, but as soon as my first order of the day came in today, Magento keeps sending me the same New Order email to my inbox. How do I stop it? I'm receiving hundreds every minute.

I really hope the customer isn't receiving them as well.


texts:
i analyzed my website on Gmetrix.com for for optimization and the result was this:

  The following external resources have small response bodies. Inlining
  the response in HTML can reduce blocking of page rendering:

http://mysite.com/ should inline the following small resources:
http://mysite.com/media/css/38f74ae13bf9722265996c2842cba8a5.css

inside of CSS file:

*{background:none!important;text-align:right!important}html{margin:0!important;padding:0!important}body{background:#fff!important;font-size:9pt!important;padding:0!important;margin:10px!important}a{color:#2976c9!important}th,td{color:#2f2f2f!important;border-color:#ccc!important}.header-container,.nav-container,.footer-container,.pager,.toolbar,.actions,.buttons-set{display:none!important}.page-print .data-table .cart-tax-total{background-position:0 -54px}.page-print .data-table .cart-tax-info{display:block!important}.pv-top-outline .product-top-wrapper{box-shadow:none}.pv-top-outline .product-top-wrapper2{box-shadow:none}

  Inline small CSS

  Inlining small external CSS files can save the overhead of fetching
  these small files. A good alternative to inline CSS is to combine the
  external CSS files.

how to solve it?


texts:
We recently got a weird bug, and I'm wondering if anyone has encountered it.

When Magento generates the WSDL (v2) it started adding an extra whitespace before the  declaration.

This seems to pretty much break the internet :) .

I've grep'ed the entire code base and there are no whitespaces before XML decelerations anywhere.

Also, to add a topping, no errors are generated anywhere...

Thank you


texts: Imported backed up database and now frontend categories appear to be empty

texts:
Steps to Reporoduce:

Flat products/categories enabled.
Products/Categories: Enabled and visible on frontend
DB Backup

mysqldump --routines=true --single-transaction -h 'replica-db-fake-host.rds.amazon.com' -u'master' -p'password' --databases magento wordpress > 'production_backup.sql

DB Import

mysql -h 'new-host' -u admin -p'password' -f < production_backup.sql

Update Magento URL
Reindex all: Tried once with magerun index:reindex:all and again with Magento's shell/indexer.php

At this point, the DB is restored and indexer has been executed, yet on the frontend, I cannot see my products. Instead, I see "THERE ARE NO PRODUCTS MATCHING THE SELECTION"

I see that flat tables exist have manually deleted them. When I run the indexer again, all of the tables are built and I see products within each of them. However, reindex_full.lock still exists though I never was thrown an index error.

Am I missing routines or triggers? How would I find them if so?

Additionally I have disabled flat categories/products, reindexed, and the products still do not appear.


texts: addAtributeToFilter with custom attribute

texts:
This one work but is there a better way than this one or it's good

   ->addAttributeToFilter('promo', array('notnull'=>true))


texts: Magento 2 Product import error :Value for 'status' attribute contains incorrect value, see acceptable values on settings specified for Admin in row

texts:
I am trying to import a csv of products having almost 6000 products. All the fields are validating correctly the only issue is with product_online i.e status attribute.

If keep the product_online attribute value as blank from all the products, CSV is validated correctly. But when trying to put 1 or 0 value for enabled, disabled statuses it throws following error

Can please some one guide me on what value needs to be used for enabled disabled statuses of products in magento 2?

Thanks in advance


texts: Append new category to existing category list via Magento Dataprofile Import

texts:
I have a situation where i need to create a new Category ( say Promotional ) and add around 1000+ product to it.

I tried it by creating a csv file as below format.

"sku","category_ids"
"C028367835486","3513"

But instead of appending new category, it has replaced existing category.

Is their a way were i can append category to existing category list?

Thank You


texts: Change page template when viewing certain category page

texts:
How can I change the page template when viewing a certain category page?

So instead of the certain category page using page/1column.phtml, I'm trying to make it use a custom one, page\blah.phtml, and all other categories should still use page/1column.phtml.

I'm also wondering where I should put the following code, as I've tried putting it in a template file with no luck, I'm guessing it needs to go in a controller or a block PHP file, but I'm not sure which one.

$root = $this->getLayout()->getBlock('root');
$template = 'page/blah.phtml';
$root->setTemplate($template);


texts: This order no longer exists for all sales orders > 1 month

texts:
i just realized that i cannot open any SO which is created more than 1 month ago,
i'm getting error

  This order no longer exists

:

respective records exist in tables sales_order and sales_order_grid, order status is not deleted or cancelled, but completed...
i'm totally lost, it's looks like system "archiving" all SO's older than one month, but afaik there is no function like this.
will appreciate any help, thank!


texts:
Product category page is not working.

My Magento v2.0 Got the error below.

use Magento\Framework\EntityManager\MetadataPool

How can I solve the issue. ?


texts: How do we use RMA module of Magento? Is there any book or manual to get hang of Magento?


texts: how change shipping methods radio into dropdown magento2

texts:
In Magento 2 I am trying to change shipping methods as the dropdown in the cart which I always brought shipping methods in the cart so I change the radio to dropdown so it showing error like:

  Uncaught Error: Unable to process binding "foreach: function (){return
     $parent.getRatesForGroup($data) }"
  Message: Unable to process binding "if: function (){return (available) }"
  Message: Unable to process binding "options: function (){return $parents[1].selectShippingMethod }"
  Message: Cannot write a value to a     ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.
      at     dependentObservable (knockout.js:1785)
      at    applyToObject (knockout.js:4089)
      at    optionForArrayItem (knockout.js:4116)
      at    ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:5222)
      at    evaluateImmediate (knockout.js:1737)
      at    Object.ko.computed.ko.dependentObservable (knockout.js:1946)
      at mapNodeAndRefreshWhenChanged (knockout.js:5221)
      at Object.ko.utils.setDomNodeChildrenFromArrayMapping (knockout.js:5334)
      at update (knockout.js:4155)
      at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3004)

My code is: which input type radio I changed like below in shipping_rates.html.

<select data-bind="optionsText: $parents[1].selectShippingMethod, options: $parents[1].selectedShippingMethod, attr: {value: carrier_code + '_' + method_code, id: 's_method_' + method_code}"></select>

So please do the needful.


texts: While trying to trap the Event for Product Detail page in Magento facing issue

texts:
I am using magento 1.9.1.0 in that i want to trap the event observer
  for product detail page .So for that we had created a custom observer
  and it is working properly for target_path url present in
  core_url_rewrite like (1.e
  catalog/product/view/id/1241641/category/352/store/2) but when i am
  using request path for the same (i.e
  /women/accessories/handbags/bag.html) then we are getting "The page
  you requested was not found".

My custom Module details are given below

Observer.php

class Gamer_CustomProduct_Model_Observer {

    public function getProductView(Varien_Event_Observer $observer) {

            echo "In getProductView";
            exit;

            }

}

Config.xml

<config>
    <modules>
        <Gamer_CustomProduct>
            <version>0.1.0</version>
        </Gamer_CustomProduct>
    </modules>
    <global>
        <models>
            <customproduct>
                <class>Gamer_CustomProduct_Model</class>
            </customproduct>
        </models>
        <events>
            <catalog_controller_product_init_before>
                <observers>
                    <catalog_controller_product_init_before_handler>
                        <type>model</type>
                        <class>customproduct/observer</class> <!-- observers class alias -->
                        <method>getProductView</method>
                    </catalog_controller_product_init_before_handler>
                </observers>
            </catalog_controller_product_init_before>
        </events>

    </global>
</config>


texts:
I'm trying to override how products are displayed adding some stuff.
I've already done with the listing page: Created new file on

app/code/vendor/module/Block/Product/ListProduct.php

di.xml telling to use my file and it works. Just copied the method getProductDetailsHtml and modified as I wanted.

But with the single product view, I don't know what I have to override, I'm searching on

Magento\Catalog\Block\Product

But I can't figure out what magento uses for display a single product. How you guys know? what methodology I need to use to figure out these things?
For example: "I need to know what magento is doing on this page". It's a nightmare for me browsing on the magento core directories.


texts: Trying to not index catalog search result page

texts:
I'm trying to have the search result page not indexed.

/public/vendor/vaimo/theme-***/Magento_CatalogSearch/layout/catalogsearch_result_index.xml I have this:

<?xml version="1.0"?><page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
    <meta name="robots" content="NOINDEX,NOFOLLOW"/>
</head>
<body>
    <!-- Move Items -->
    <move element="breadcrumbs" destination="main.content" before="-"/>
    <move element="ajax.message.placeholder" destination="main.content" before="-"/>
    <move element="messages" destination="main.content" before="-"/>
</body>

But it still gets indexed.


texts: How to override .phtml files in Magento 2 Tax module?

texts:
I want to override a .phtml file in following location, please guide me how to do that.

vendor\magento\module-tax\view\base\templates\pricing\adjustment.phtml

Thanks


texts:
I need to create some reports using information such as order, clients and carts.
I could not find a way to get for a list of all abandoned carts using collections.
I couldn't understand quote tables relations either.
Anyone can help ?
Thanks !!!
Please do not send links to buy abandoned cart extensions. I really need to make different reports on my own.


texts: Magento 2 | get custom attribute of product

texts:
I installed custom product attributes via this:

<?php

namespace UO\CheckCartSpecialProducts\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,
            'onbaseurl',
            [
                'type' => 'text',
                'backend' => '',
                'frontend' => '',
                'label' => 'Online-Nutzung Basis-URL',
                'input' => 'text',
                'class' => '',
                'source' => '',
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' => true,
                'required' => false,
                'user_defined' => true,
                'default' => '',
                'searchable' => false,
                'filterable' => false,
                'comparable' => false,
                'visible_on_front' => false,
                'used_in_product_listing' => false,
                'unique' => false,
                'apply_to' => ''
            ]
        );

        $eavSetup->addAttribute(
            \Magento\Catalog\Model\Product::ENTITY,
            'onsupportmail',
            [
                'type' => 'text',
                'backend' => '',
                'frontend' => '',
                'label' => 'Online-Nutzung Support-Email',
                'input' => 'text',
                'class' => '',
                'source' => '',
                'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
                'visible' => true,
                'required' => false,
                'user_defined' => true,
                'default' => '',
                'searchable' => false,
                'filterable' => false,
                'comparable' => false,
                'visible_on_front' => false,
                'used_in_product_listing' => false,
                'unique' => false,
                'apply_to' => ''
            ]
        );

    }
}
?>

Now I need to want to get them in my code.

  $product->getCustomAttribute('onbaseurl')->value()

doesn't work.

It says

  getCustomAttribute('onbaseurl')

is null

Thanks for any help!


texts:
Why  all my magento category pages are blank?

Server error is:

  [Mon Jul 18 12:46:53.156565 2016] [proxy_fcgi:error] [pid 5460:tid
  140651731453696] [client xx.xx.xx.xxx:58403] AH01071: Got error 'PHP
  message: PHP Fatal error:  Class 'Mage_Catalog_Block_Category_View'
  not found in
  /opt/bitnami/apps/magento/htdocs/app/code/local/Mage/Catalog/Block/Category/View.php
  on line 3\n'


texts: Billing address not being saved to quote

texts:
I have a problem with Onepage checkout not saving customer billing address to the quote.

When I add a new address then refresh the page the address is removed. If I var_dump the current checkout/session I get a completely different address from the one I just entered.

Also, if I try to resubmit the same address from the same billing address form I get an error in the console

Uncaught TypeError: Cannot read property 'collectSummaryDataForm' of undefined

Which is this line:

checkout.collectSummaryDataForm('billing');

Has anyone had issues with customer billing address not being saved to quote could offer some insight on how to resolve please?


texts: How to add/ change meta tags specific to the Contacts page?

texts: I have a shopping store (www.goorganics.us) in Magento using the "Magento ver. 1.7.0.2". Please guide me how to update the Title and other Meta Tags (for SEO) of my Contacts page?


texts: Save button on product page does not work in Magento 2.1.6

texts:
New products and even existing products that are opened to be modified could not be saved in Magento 2.1.6. There is not JS error thrown, the Save button just does nothing. No request goes out on the network either.

Re-indexed, re-cached, re-deployed contents, without errors. The only thing I've done is that I've upgraded from Magento 2.1.2 to 2.1.6.

What could be the problem? Ideas to figure it out?


texts: Displaying same categories and products on all website

texts:
I want to create multiple Magento website on same domain for different countries, something like:

www.domain.com/us for the U.S.
www.domain.com/uk for the U.K.
www.domain.com/de for Germany

etc.

Products are going to be same on all websites, the things that will differ are Language, product description & currency. How can I display same products & categories across all websites? I tried creating multiple sites & kept the default category as default, but neither products, nor categories are appearing on any website other than the Main website.


texts: How to validate current admin password programmatically magento 1.9

texts:
I want to validate the admin current password programmatically.
I enter a current password in textbox. Script should check this is valid current password or not.

I used below code

$user = Mage::getModel('adminhtml/user');

$result = $user->_validateCurrentPassword($user_id,$currentpwd);

Guys, can anybody help me please asap

Thanks


texts: Magento PWA Studio Performance Optimization Tips

texts:
i try to search for similar topics online but not found any good one to cover magento side optimizations and configs and the server side ones ..

as per magento side :
- Need to confirm that FPC need to be disabled and if any other caching is not needed .
- in my case i notice that running magento in developer mode and production mode have similar performance , production should provide better speed , right ?

as per a production website running PWA Studio , any tips to improve the performance to best possible ?


texts: 404 error while updating Product inventory by rest API Magento 2.3.1

texts:
I am trying to integrate Magento 2.3.1 with Linnworks,
All the api calls are working fine expect the CatalogInventory.

When we try to update the product inventory using rest

PUT https://sitename.com/rest/default/V1/products/:productSku/stockItems/:itemId

its showing 404: Not Found

Anyone please help me on this..

Thanks in Advance..


texts: How to save date in database from frontend?

texts:
I want to add birthdate from frontend form using datepicker

phtml code:

    *<?php echo $this->__('Date of birth');?>

        <input type="text" class="input-text required-entry" title="Birthday" id="birthday" name="birthday" value="" style="  float: left;margin-right: 7px;max-width: 150px;">
        <img  title="Select Date" id="date" class="v-middle" alt="" src="<?php echo $this->getSkinUrl("images/calendar.gif");?> "/>

save data

    $data = $this->getRequest()->getPost();
    $post_data = $this->_filterDates($post_data, array('birthdate', 'expiry_date'));
    $student = Mage::getModel('school/student');
    $student->setData($data);
    $student->save();

in $data i m getting date like this 05/7/2015 but in database this date is not saved. it saved default value. how can i save date from frontend?


texts: WYSIWYG editor inserting " instead of correct " in 2.3.0 when we use any anchor tags

texts:
I am facing an issue with Magento 2.3.0+ WYSIWYG editor inserting " instead of correct " and also when we write like Orders and Returns after saving it is displaying Orders and Returns
Could any one please help me out?


texts: Magento 2.2.4 How to override the styles for the Checkout Module?

texts:
How to create specific style files that override the styles for the Magento Checkout Module?

I took a look at vendor/magento/module-checkout/view/frontend/web and vendor/magento/module-checkout/view/frontend/ but there are not style files there that I can copy to app/design/frontend/XXX/XXX/Magento_Checkout/...

How to achieve this in a consistent way?

I tried to add the styling rule here: app/design/frontend/XXX/XXX/web/css/source/_theme.less and it worked, but I still do not know if this is the appropriate Magento way to do it, since it is something that has an impact on the checkout.


texts: "Product with specified super products SKU not found in rows:..." when reimporting just exported products to empty database

texts:
I exported all my single and configurable products to .csv and emptied my database of all products afterwards. I am now trying to reimport those same products using the just created .csv file. Unfortunately, I am getting the message:

Product with specified super products SKU not found in rows:...

followed by the list of skus, and followed by another message below:

Orphan rows that will be skipped due default row errors in rows

and then another list of skus. What does this mean, considering I have JUST created that same .csv from the currently working and functioning Magento? I also tried to completely empty the database from products and making only one configurable product with one associated simple product, with the same result (the error message Product with specified super products SKU not found in rows)  What can I do to mend this?


texts:
Please help me with the solution.
I am using nginx server.Conf is as follows

    upstream fastcgi_backend {
  server  unix:/var/run/php/php7.2-fpm.sock;
}

server {
  listen 80;
  server_name myshop.com www.myshop.com;
  set $MAGE_ROOT /home/ubuntu/myshop;
  include /home/ubuntu/myshop/nginx.conf.sample;
}


texts: Magento 2 : Display dropdown attribute with its label in product listing page

texts:
How to display dropdown type product attribute in product listing page and I also want to display that label name?

How to display that drop-down attributes? I created in admin. But, it's not displayed on listing page. But, it's proper display in product view page.


texts:
Looking to export invoices from magento and import them into QuickBooks. It doesn't matter which version of QB but please reference Magento 1.9 solutions, if possible.

Has anyone built a module for this?
Are there extensions available?


texts:
MageReport.com reported today that they released a new check concerning a recently discovered backdoor in the module Webgility.

While their tool is very helpful in scanning the site and asserting whether our site is vulnerable or not, they do not provide steps for fixing the issue.

Does anyone know what the vulnerability is and what immediate steps can be taken besides for disabling the module?
To the best of my knowledge, Webgility has not released an updated module.

UPDATE

So, it turns out that as per Willem de Groot's post - webgility was made aware of the flaw and are apparently not taking it seriously.

The fix according to Willem is to restrict access to the webgility directory to recognized IP addresses.


texts:
In my store some products' images are not showing. I have set base image , thumbnail correctly.
Also I deleted cache, but it did not work for me. So I changed media folder permission to 777 but no luck.
Below is my store front end and back end screenshot.
any idea why this is happening.


texts: Remove default fields from Product Collection

texts:
I have a product collection object (Mage_Catalog_Model_Resource_Product_Collection).  I am adding various attributes to the select via addAttributeToSelect().

How do I remove the default attributes e.g entity_id, created_at etc, from the collection?

I have tried removeAttributeToSelect(), but i believe this only removes attributes that have been added by addAttributetoSelect().


texts: How to add javascript event to action button from product grid in backend

texts:
I am trying to open a new window on custom action link from product grid in admin panel.

I created vendor/magento/module-catalog/view/adminhtml/ui_component/product_listing.xml into custom module with code.

<actionsColumn name="actions" class="Namespace\Modulename\Ui\Component\Listing\Columns\ProductActions">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="indexField" xsi:type="string">entity_id</item>
                    <item name="sortOrder" xsi:type="number">200</item>
                </item>
            </argument>
        </actionsColumn>

In Namespace/Modulename/Ui/Component/Listing/Columns/ProductActions.php i have added custom action button Test.

public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            $storeId = $this->context->getFilterParam('store_id');

            foreach ($dataSource['data']['items'] as &$item) {
                $item[$this->getData('name')]['edit'] = [
                    'href' => $this->urlBuilder->getUrl(
                        'catalog/product/edit',
                        ['id' => $item['entity_id'], 'store' => $storeId]
                    ),
                    'label' => __('Edit'),
                    'hidden' => false,
                ];
                $item[$this->getData('name')]['test'] = [
                    'href' => 'javascript:void(0)',
                    'label' => __('Test'),
                    'hidden' => false,
                ];
            }
        }

        return $dataSource;
    }

Now i need to call JS function on click of this action button and then open a new window. I tried adding onclick and data-mage-init attribute there but it doesnot work.

Any solution?


texts:
How to use source model reuse in custom module custom field Email Sender in Magento 2.3.1

Magento\Config\Model\Config\Source\Email\Identity

Our custom module custom field like this
 $fieldset->addField(
        'email_sender',
        'select',
        ['name' => 'email_sender', 'label' => __('Email Sender'), 'title' => __('Email Sender'), 'required' => true]
    );


texts:
how can I add a custom block to the footer. I want to add a new block with new links next to the existing block with the contact links etc and show them beside the default block of the Luma template.

Thanks.


texts:
Hello I am creating a module and I make a ajax call which from product list its return the template.

How can I do that?

For example I call to action http:example.com/frontname/action/?id=x&search=hello

And I want it return the block compiled. Is possible to make it?

Graphic example

On the ajax the php must generate the list products and return the html. The problem is I do not know how to load the bloack.


texts: Is admin url stored in any table associated with order?

texts: I'm wondering if custom admin url is stored in any table associate with orders in database?


texts: Unrecognized HTTP request to remote js library from my site

texts:
My site has a HTTP request being made to get this remote js library - https://r1-t.trackedlink.net/_dmpt.min.js and I do not know why? Can anyone help me with what this is?
Thanks in advance and have a great day.


texts: After server move several images not working

texts:
Since a recent move of server from staging to a live environment several images do not seem to work. i tried deleting entire image cache and such but no result.

See this product for example. just 1 image not working, while in the back-end it is visible. reuploading solves it, but i cannot ask to reupload 30% of all images.


texts: Magento 2 admin page not found using nginx

texts:
I had install magento 2 project in Ubuntu 14.04 using nginx.

After run magento setup:static-content:deploy command I can access landing page but all url on page redirect to 404 eror page.

Is there some nginx setup issue?

server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

root /var/www/magento/magento2/pub;
index index.html index.htm index.php;

# Make site accessible from http://localhost/
server_name localhost;

location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    try_files $uri $uri/ =404;
    # Uncomment to enable naxsi on this location
    # include /etc/nginx/naxsi.rules
}

location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

    # With php5-cgi alone:
#   fastcgi_pass 127.0.0.1:9000;
    # With php5-fpm:
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param MAGE_MODE "developer";
    fastcgi_index index.php;
    include fastcgi_params;
}
}


texts:
In Magento 2.3.1 everything I put a product in Wishlist I get this error in console of all browsers:

GET https://mystore.com/el/customer/section/load/?sections=customer%2Ccompare-products%2Clast-ordered-items%2Cdirectory-data%2Ccaptcha%2Creview%2Cwishlist%2Cinstant-purchase%2Cmultiplewishlist%2Cpersistent%2Crecently_viewed_product%2Crecently_compared_product%2Cproduct_data_storage%2Cpaypal-billing-agreement%2Cmessages&force_new_section_timestamp=false&_=1561827509049 500 error jQuery.js:10254

I can't figure out why. If I remove the product everything is fine.
No errors in logs.
Syntax of the file is using Ajax to call Magento controller seems fine. But controller returns 500 error.

Does anyone please advice where to look?


texts: MS Word to PDF in Magento 2 for uploaded word file

texts: I need to convert word to pdf in magento 2.


texts:
A stylesheet doesn't load good after the merge and minifies CSS and js.
Every CSS are explored! Used static-content deploy but not works.


texts: How to add a form in CMS->Static blocks and send the mail in magento?

texts:
I had created a new menu using catalog->Manage Categories->Add subcategory->quick service.
In CMS->Static Blocks I have created the form but it is not working properly.The PHP code is not working.Please can anyone help me in creating the form in static blocks and send the mail.

My form

   <form action="" id="quickservice" method="post">

                 *<?php echo $this->__('Service Type') ?>

                            <select name="servicetype" class="input-text required-entry validate-select" style="width: 150px;" />
                                    <option value=""><?php echo $this->__('--Please Select--')?></option>
                                    <option value="Lab"><?php echo $this->__('Lab')?></option>
                                    <option value="Hospital"><?php echo $this->__('Hospital')?></option>
                                    <option value="Food"><?php echo $this->__('Food')?></option>
                                    <option value="Gym"><?php echo $this->__('Gym')?></option>
                                    <option value="Physio"><?php echo $this->__('Physio')?></option>
                                    <option value="Nurse"><?php echo $this->__('Nurse')?></option>
                            </select>

 </form>


texts: Magento Sort Categories Alphabetically using SQL Query

texts:
The below sql query isn't working for some reason, has anyone got any ideas what is wrong?

SET @i=0;
SET @j=0;
DROP TABLE IF EXISTS AAA_NEW_POSITION;
CREATE TABLE AAA_NEW_POSITION
        SELECT e.entity_id AS 'entity_id',
                  vn.value AS 'name',
                  e.position AS 'old_position', @i:=@i+1 AS 'new_position'
                FROM
                        catalog_category_entity e
                        LEFT JOIN catalog_category_entity_varchar vn
                                ON e.entity_id = vn.entity_id AND
                                vn.attribute_id = 71
                ORDER BY vn.value;

ALTER TABLE AAA_NEW_POSITION ORDER BY name;
UPDATE AAA_NEW_POSITION SET new_position= @j:=@j+1 ORDER BY name;

UPDATE
                catalog_category_entity e
                LEFT JOIN AAA_NEW_POSITION np
                    ON e.entity_id = np.entity_id
        SET
                e.position = np.new_position;

DROP TABLE IF EXISTS AAA_NEW_POSITION;

I get the following error

#1146 - Table 'printtes1_j5wj.catalog_category_entity' doesn't exist

Any ideas? the actual table name is: wprt_catalog_category_entity_varchar


texts: How to add external url link in Magento Admin menu

texts:
I am working on a module where i created some menu in Magento admin using adminhtml.xml

Now i want to link one of the menu to an external url and set target="blank". But i not sure how to do it in adminhtml.xml. Here is my code.

<?xml version="1.0"?>
<config>
    <menu>
        <system>
            <children>
                <convert translate="title">
                    <children>
                        <importmagmi translate="title" module="importexport">
                            <title>MagMi Importer</title>
                            <action><url helper="https://externalurl.com /></action>
                            <sort_order>100</sort_order>
                        </importmagmi>
                    </children>
                </convert>
            </children>
        </system>
    </menu>
</config>

When i am checking its adding current domain name before external url.
ex: http://mydomainname.com/https://externalurl.com

I am wondering how to set only external URL?


texts: Magento sales_flat_quote table too large but all records show they are less then 30 days old

texts:
I am trying to reduce the size of the sales_flat_quote table in Magento 1.9.x. The table is 20 GB in size and has 1.8 million records in it. I tried to run the query
DELETE FROM sales_flat_quote WHERE updated_at < DATE_SUB(Now(),INTERVAL 60 DAY)
BUT, it only deleted 9 records. I changed the interval days to just 1 day and yet it only shows a few thousand records (about 3387) that will get deleted.
I tried to run the query with created_at date and that query also shows just a few thousand records that will get deleted (about 3404).
What can I do to delete the old unwanted records. I have no idea how 1.8 million records can have a created date and updated date of less then 1 day.
Any suggestions will be of great help because the online store is extremly slow - thanks to 20 GB table size for sales_flat_quote table.


texts: Merging two product collections by common elements (Inner join of two product collections (or two categories))

texts:
I'm attempting to filter a product collection by two different category_ids.  The solution i've come up involves generating two seperate product collections each filtered from the original by one category_id then merging them together.  How does one merge product collections in this way?  Let's take a look:

function categoryProductFilter($collection, $categoryIds){
        $collection->joinField('category_id',
            'catalog/category_product',
            'category_id',
            'product_id=entity_id',
            null,
            'left'
        );
        $categoryCollectionTwo = $collection->addAttributeToFilter(array(array('attribute' => 'category_id', 'finset' => 773)));
        $categoryCollectionOne = $collection->addAttributeToFilter(array(array('attribute' => 'category_id','finset' => 1550)));
        $collection=merge($categoryCollectionOne,$categoryCollectionTwo);
}
function merg($one,$two){??}

Is there an easier way to filter a product collection by two categories simultaneously?  I've only managed to achieve mono-category filtering.

For reference:

$collection->addCategoryFilter(Mage::getModel('catalog/category')->load($categoryId), true);

Appears to filter the collection correctly as well as using some of the above methodology.  It's almost absurd that the above cannot be used twice on the same collection to achieve appropriate filtering.


texts: how to disable Auto login on registration in magento2?

texts:
How can we disable auto login of customer on registration in magento 2?

On creating new account, customer is created with auto login. How can we disable auto login, so that customer can only register later he can login with details to login?

like that option available by default? Or that can be done pro grammatically?


texts: Display 2 rows: shipping tax and products tax in order totals section for orders, invoices, credit memos

texts:
Instead of :

Tax: £30

I would like to display in the backend for orders/credit memos/invoices:

Shipping tax: £2
Product Tax: £28

Is this possible?

Thanks!


texts: Magento 2 - Cannot edit or update SKU Value

texts:
When I try to update SKU from the admin catalog page in Magento 2. It throws error "Validation failed" and in exception log, it shows the following error.

main.CRITICAL: Validation Failed {"exception":"[object] (Magento\\Framework\\Validation\\ValidationException(code: 0): Validation Failed at <--Root folder->/magento/module-inventory/Model/SourceItem/Command/Handler/SourceItemsSaveHandler.php:71)"}


texts: Magento Multistore categories giving error

texts:
This is my second store with second root category on my single magento installation.

WEBSITE: main website (Code: base)
MAIN WEBSITE STORE: (Root Category: Default Category)
DEFAULT STORE VIEW: (Code: default)
WEBSITE: Business Website (Code: business)
MAIN WEBSITE STORE: (Root Category: Business Store)
DEFAULT STORE VIEW: (Code: business_store_view)

Everything is fine except when I click on the category in mega menu, it gives the following error:

  Warning: Uncaught exception 'Exception' with message 'Warning: require_once(app/code/core/Mage/Catalog/controllers/CategoryController.php) [function.require-once]: failed to open stream: No such file or directory in app/code/local/Smartwave/Ajaxcatalog/controllers/Catalog/CategoryController.php on line 9' in app/code/core/Mage/Core/functions.php:245
  Stack trace:
  #0 app/code/local/Smartwave/Ajaxcatalog/controllers/Catalog/CategoryController.php(9): mageCoreErrorHandler(2, 'require_once(ap...', '/home/content/8...', 9, Array)
  #1 app/code/local/Smartwave/Ajaxcatalog/controllers/Catalog/CategoryController.php(9): require_once()
  #2 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(323): include('/home/content/8...')
  #3 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(293): Mage_C in app/code/core/Mage/Core/functions.php on line 245

  Fatal error: main() [function.require]: Failed opening required 'app/code/core/Mage/Catalog/controllers/CategoryController.php' (include_path='app/code/local:app/code/community:app/code/core:lib:.:/usr/local/php5_3/lib/php') in app/code/local/Smartwave/Ajaxcatalog/controllers/Catalog/CategoryController.php on line 9


texts: how can i upload the navigation menu for the header and edit the menu layout


texts: How to login in Magento website using REST API

texts:
I am writing a REST API in Magento to login into the website with REST API. I have called the API to login the user through the web browser its logged In. After that, In the next tab on the browser when I typed my website it says "user is not logged In".

Please let me know how to keep the session when a user logged In through REST API.


texts: how to active/deactive a module for each store by admin in magento 2.2

texts:
I want to give ability to admin to active or deactive a module for each store.

at previous magento version this option was exist under store -> configuration -> advanced -> advanced menue and we could enable or disable a module per store , but from magento 2.2 this option has been removed and no longer avalable.

according this link for this purpose we have to do some setting manually in our module .

I want to make setting in my module that admin can see the list of stores and by selecting them to enable or disable a module . for example admin wants to enable module be active for store A and B , and deactive for store C .

the list of stores should be dynamic and reads from database and shouldn't be hard code.

I don't have any idea how can I do it .Someone can help me figure out how I can do it ? If you could please point this out, I would be really grateful .


texts:
I have created an advanced data profile with the below actions xml. It takes a csv of order ids and my adapter marks the orders as complete. When run through the admin panel, this works fine. However, I am wanting to automate the procedure (as the csv will be updated on a semi-regular basis) so have followed the instructions on Magento Export/Import from the command line (see below for my code).
When I run this code from the command line I am getting the output "Order status update complete. BatchID: nn", however the orders that I am specifying are not being updated. When I put var_dumps and dies into my adapter nothing happens. When I do var_dumps into the below code I can see that it has loaded the correct profile, and that the actions xml is being read correctly.
How do I get the below code to run my adapter when it is run from the command line?
Actions XML
<action type="dataflow/convert_adapter_io" method="load">
    <var name="type">file</var>
    <var name="path">var/import</var>
    <var name="filename"><![CDATA[filename.csv]]></var>
    <var name="format"><![CDATA[csv]]></var>
</action>
<action type="dataflow/convert_parser_csv" method="parse">
    <var name="delimiter"><![CDATA[,]]></var>
    <var name="enclose"><![CDATA["]]></var>
    <var name="fieldnames">true</var>
    <var name="store"><![CDATA[0]]></var>
    <var name="number_of_records">1</var>
    <var name="decimal_separator"><![CDATA[.]]></var>
    <var name="adapter">mynamespace_mymodule/convert_adapter_store</var>
    <var name="method">saveRow</var>
</action>

Run Profile Code
<?php
//THIS SCRIPT JUST INITIALS THE PROFILE TO BE RUN VIA MAGENTO ADMIN "RUN PROFILE IN POPUP".
//Its the same thing as click just via this file that you can run via cron

// SYSTEM - IMPORT/EXPORT - ADVANCED PROFILES <-- you need to go into your magento admin and grab the exact profile ID
$profileId = 9;

require_once 'public_html/app/Mage.php';
umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);

$profile = Mage::getModel('dataflow/profile');
$userModel = Mage::getModel('admin/user');
$userModel->setUserId(0);
Mage::getSingleton('admin/session')->setUser($userModel);
$profile->load($profileId);
if (!$profile->getId()) {
    Mage::getSingleton('adminhtml/session')->addError('ERROR: Incorrect profile id');
}

Mage::register('current_convert_profile', $profile);
$profile->run();
$batchModel = Mage::getSingleton('dataflow/batch');
echo "ORDER STATUS UPDATE COMPLETE. BATCHID: " . $batchModel->getId();


texts: How to display custom attribute name after login into site in magento?

texts:
I want to display custom attribute name after welcome message when login in to site. I have added custom attribute in "full_name" in customer account so i need to display this full name after welcome message in header after login in to site.

My Header.php file is

class Mage_Page_Block_Html_Header extends Mage_Core_Block_Template
{
    public function _construct()
    {
        $this->setTemplate('page/html/header.phtml');
    }

    public function getIsHomePage()
    {
        return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));
    }

    public function setLogo($logo_src, $logo_alt)
    {
        $this->setLogoSrc($logo_src);
        $this->setLogoAlt($logo_alt);
        return $this;
    }

    public function getLogoSrc()
    {
        if (empty($this->_data['logo_src'])) {
            $this->_data['logo_src'] = Mage::getStoreConfig('design/header/logo_src');
        }
        return $this->getSkinUrl($this->_data['logo_src']);
    }

    public function getLogoSrcSmall()
    {
        if (empty($this->_data['logo_src_small'])) {
            $this->_data['logo_src_small'] = Mage::getStoreConfig('design/header/logo_src_small');
        }
        return $this->getSkinUrl($this->_data['logo_src_small']);
    }

    public function getLogoAlt()
    {
        if (empty($this->_data['logo_alt'])) {
            $this->_data['logo_alt'] = Mage::getStoreConfig('design/header/logo_alt');
        }
        return $this->_data['logo_alt'];
    }

    public function getWelcome()
    {
        if (empty($this->_data['welcome'])) {
            if (Mage::isInstalled() && Mage::getSingleton('customer/session')->isLoggedIn()) {
                $this->_data['welcome'] = $this->__('Welcome, %s!', $this->escapeHtml(Mage::getSingleton('customer/session')->getCustomer()->getName()));
            } else {
                $this->_data['welcome'] = Mage::getStoreConfig('design/header/welcome');
            }
        }

        return $this->_data['welcome'];
    }
}

Anybody knows answer please share. I am new in Magento.


texts:
I try to override the Customer model. I created code/Tc/Name/etc/di.xml,  code/Tc/Name/Model/Customer/Customer.php .

In di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Magento\Customer\Model\Customer" type="Tc\Name\Model\Customer\Customer" />
</config>

In Customer.php

<?php

namespace Tc\Name\Model\Customer;

class Customer extends \Magento\Customer\Model\Customer
{

   public function getName()
    {
        $name = '';

        if ($this->_config->getAttribute('customer', 'prefix')->getIsVisible() && $this->getPrefix()) {
            $name .= $this->getPrefix() . ' ';
        }
        $name .= ' ' . $this->getLastname();

        if ($this->_config->getAttribute('customer', 'middlename')->getIsVisible() && $this->getMiddlename()) {
            $name .= ' ' . $this->getMiddlename();
        }
        $name .= $this->getFirstname();
        if ($this->_config->getAttribute('customer', 'suffix')->getIsVisible() && $this->getSuffix()) {
            $name .= ' ' . $this->getSuffix();
        }
        return $name;
    }
}

Nothing changed after setup:upgrade and setup:static-content:deploy. I tried to add a code to dump log in getName() but also nothing logged.


texts: How to override the Catalog Widget PHTML file into custom module?

texts:
I need to override the widget template file /vendor/magento/module-catalog/view/frontend/templates/product/widget/new/content/new_grid.phtml but in xml file the phtml file was not mentioned at any where except on /etc folder.
<parameter name="template" xsi:type="select" required="true" visible="true">
    Template
    <options>
        <option name="default" value="product/widget/new/content/new_grid.phtml" selected="true">
            New Products Grid Template
        </option>
    </options>
</parameter>

How can I override the vendor-widget-phtml file new_grid.phtml to my custom module.


texts: Magento 2.3.5 Layered Navigation options missing

texts:
My Layered Navigation lately shows a strange behavior but I am not sure what causes this and when exactly that happened.
Not all attributes (options) are shown in the sidebar of the category pages on how they should (and did).
Let's say my category has 5 pages with 12 products shown by default at every page and the Layered Navigation should show all the options for all 60 products.
Instead, on page one, it shows just 13 of it, one page two only 7 and so on.
If I set the number of products to show a higher number of products (for example 36), it also shows more options.
It does not seem to be a theming issue, when I switch to Luma Theme the behavior stays the same.
Could such behavior be caused by the catalog (products) or categories and the descriptions made with the page builder?
Does anyone know anything about this issue? Thanks in advance!