texts: Magento 1.7 - code that sets HTML headers (Category redirecting to Homepage) - (frontend=deleted header)

texts:
Which class / module handles HTTP headers for Magento (PHP side)?
I have a strange issue that on one particular ISP (Internet Service Provider) only when a customer accesses the website (category page for instance) they get redirected to the homepage.
After a few month's investigation and requesting customers to give me details - including ISP I have narrowed it down to this - a local ISP.
Using this theory, I have received access to this ISP sim to test - and I confirmed I get this exact same behavior the very first time I tried the sim".  I cannot explain why yet, but there is something different happening ONLY with this ISP!
Comparing request headers with a working ISP internet I cannot see much difference, the only missing request header is :
            {
              "name": "Cache-Control",
              "value": "max-age=0"
            }

A working connection gives a 200 OK response, the non-working internet gives 302 Found with these response headers before redirecting (from category/page to homepage):
            {
              "name": "Set-Cookie",
              "value": "frontend=THE_SESSION_ID; expires=Thu, 21-Jan-2021 10:49:20 GMT; Max-Age=86400; path=/; domain=mydomain.com; httponly"
            },
            {
              "name": "Set-Cookie",
              "value": "**frontend=deleted;** expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/; domain=mydomain.com; httponly"
            },

Notice the Set-Cookie values, in particular frontend=deleted
This then redirects to the homepage.

Is there a particular section of code manipulating headers/routing where I can inspect why this is happening, in particular trying to see if Magento sets the 'frontend=deleted' header?

Not sure why it is having httponly in header - the requests are all supposed to be https://

Other than that, lacking the knowledge of headers and how ISPs can potentially set request headers beforehand... what can I investigate further?


texts:
I have a payment method block. I saw that I can add custom HTML after the label in one page payment using the getMethodLabelAfterHtml method.

I want to be able to pass a HTML string to the setMethodLabelAfterHtml of my payment method.

<checkout_onepage_paymentmethod>
    <remove name="right"/>
    <remove name="left"/>

    <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml">
        <block type="core/template" name="payment.method.cashondelivery">
            <action method="setMethodLabelAfterHtml">
                <block type="core/template" name="payment.method.cashondelivery.picto" output="toHtml" template="checkout/onepage/payment/cashondelivery.phtml" />
            </action>
        </block>
    </block>
</checkout_onepage_paymentmethod>

I am unable to get the toHTML version of my template cashondelivery.phtml and pass it to the setMethodLabelAfterHtml action all only using the xml layout files.


texts: magento2: how to use config function in xml

texts:
I want to use config function in XML file to render the phtml file same as below that we use in magento 1.x.x

<reference name="root">
    <action method="setTemplate" ifconfig="mymodule/general/enabled"><template>page/1column.phtml</template></action>
</reference>

How can I do it on magento2.

I have created my config function in helper and want to use these function to render the phtml, based on configuration setting.


texts: Email template customization in Magento 2

texts:
I would like to customise template of new order email. I found below codes in template

    {{trans "Thank you for your order from %store_name." store_name=$store.getFrontendName()}}
    {{trans "We are committed to provide enhance your online shopping experience. Once your package ships we will send you a tracking number."}}
    {{trans 'You can check the status of your order by logging into your account.' account_url=$this.getUrl($store,'customer/account/',[_nosid:1]) |raw}}

I would like make bold %store_name. How can I do that ?

I would like to customize footer
{{template config_path="design/email/footer_template"}} also. Where is the location of the footer ?


texts: How to add product size in Magento 2.3 order confirmation email?

texts: I am trying to edit the confirmation email which the client is receiving upon making a new order. So far I've managed to style it up but I am not able to add collumn which can display the product size number which has been picked. Could someone please tell me how can I add this product attribute in the email. I have tried to follow this Get product attritube in order confirmation email but I am not able to display the size still. Thanks


texts: Magento 2.3 - Required parameter 'theme_dir' was not passed after applying custom 'Blank' theme

texts:
I'm having an issue when applying a custom 'Blank' child theme. I'm running a fresh install of 2.3 on LAMP. I followed the Magento docs with respect to theme.xml and registration.php etc, but after I apply the theme in the  admin panel I'm getting this error on the frontend

  Exception #0 (InvalidArgumentException): Required parameter 'theme_dir' was not passed

If I try reverting back to the 'blank' theme again in the admin panel, I'm unable to and get this error

  Something went wrong while saving this configuration: Required parameter 'theme_dir' was not passed

I'm using a fresh mysql database, so it can't be an old theme in the table issue??

Anyone come across this?

<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::THEME,
    'frontend/webmagento/customtheme',
    __DIR__
);

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
    <title>Custom Theme</title>
    <parent>Magento/blank</parent>
</theme>


texts: How to remove sale prices from items that have no catalog price rules or special prices.

texts: I am trying to remove a sale price from 4 products in magento. There has been no catalog price rules or special prices added for these products yet they are appearing on the website as sale items. What could be the cause of this and how can i remove the sale price for these items?


texts: No Payment Methods when Authorize.net is enabled

texts:
I have being trying to use Authorize.net as a payment method for magento 1.9 site. The checkout page works great if I have paypal enabled. As soon as I change to Authroize.net the checkout page shows the No Payment Methods error.

With Paypal I can see the payment method at the checkout page, with Authorize.net the message No Payment Methods shows.

I have verified:

Clearing the chache
Globally enabled Authorize.net
Modules enabled on System->Configuration->Advance
Currency in Authorize.net is setup the same as the store currency
Followed the instructions from http://docs.magento.com/m1/ce/user_guide/payment/authorize-net-setup.html

UPDATE: I have found that we are using RicoNeitzel/PaymentFilter!!!

Any help on this matter will be greatly appreciated.


texts: Magento 2 quality patches MDVA-28656 is not available in Magento 2.4.1

texts:
I'm using Magento 2.4.1, when I order a virtual product then create a pending invoice it will make the order status become closed instead of processing. To prevent this error I must apply Magento quality patches MDVA-28656. The problem is MDVA-28656 patch available at Magento quality-patches v1.0.4, while Magento 2.4.1 requires this Magento quality-patches with minimum version 1.0.8.

this documentation states the MDVA-28656 available at v1.0.4 https://devdocs.magento.com/quality-patches/release-notes.html


texts: Canada Tax Rule Set up - Magento CE 1.9.0.1

texts:
I have followed instructions (http://www.magentocommerce.com/knowledge-base/entry/ce18-and-ee113-tax-config-ca) to create Canada GST, HST (ON, NB, NF, & NS), then tried to create tax rules.

Whenever creating GST (HST) rule, or BC-PST rule, I received the following error even though definitely there is NO tax rule exists.

"Rules () already exist for the specified Tax Rate, Customer Tax Class and Product Tax Class combinations"

I really appreciate if anyone can help.


texts:
I want to add "Buy on Amazon" button on my product page. I was successful in adding it with this code: <a href="<?php echo $this->getProduct()->getamazonurl(); ?>">

I created an attribute amazonurl & added it to the required attributes set. Now I can enter the link of my product in that field. Problem is I'm not selling all the products that are listed on my website, so I want this button to appear only if there is a value (URL) entered in attribute's field. How do I do it? Because currently it's appearing regardless of the value entered.


texts:
Iam using Magento 2.3.5-p2. I add custom field in the cart and checkout page which is successfully showing there.
In app\code\Company\Module\etc\di.xml
<preference for="Magento\Quote\Api\Data\AddressInterface" type="Company\Module\Api\Quote\Data\AddressInterface"/>

In app\code\Company\Module\Api\Quote\Data\AddressInterface.php
<?php
namespace Company\Module\Api\Quote\Data;

use Magento\Quote\Api\Data\AddressInterface as MagentoDataAddressInterface;

interface AddressInterface extends MagentoDataAddressInterface
{
    const KEY_SUBDISTRICT = 'subdistrict_id';

    public function getSubdistrictId();

    public function setSubdistrictId($subdistrictId);
}

But while getting shipping estimate, it was error
Uncaught Error: Cannot instantiate interface Company\Module\Api\Quote\Data\AddressInterface in C:\wamp64\www\magento2-2\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php:50

I already

Delete /generated/code
Delete /static/frontend
php bin\magento cache:clean


texts: admin login programmatically in controller not working

texts:
I am using below code to admin login programmatically in magento root folder file name rootfolder/adminlogin.php

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

// supply username
$user = Mage::getModel('admin/user')->loadByUsername('adminusername');

if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
  Mage::getSingleton('adminhtml/url')->renewSecretUrls();
}

$session = Mage::getSingleton('admin/session');
$session->setIsFirstVisit(true);
$session->setUser($user);
$session->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
Mage::dispatchEvent('admin_session_user_login_success',array('user'=>$user));

if ($session->isLoggedIn()) {
  echo("logged in");
}

THIS SAME CODE PUT IN MY MODULE FRONTEND CONTROLLER BUT NOT LOGIN IN ADMIN BY THIS CODE,WHY THIS ABOVE CODE NOT WORK IN CONTROLLER ?
PLEASE ADVICE DEVELOPERS ,I NEED TO PUT THIS CODE IN CONTROLLER IN MY MODULE

My approach:

First when I call loginpost controller action and it goes to if condition so it means admin session logged in but then I open admin section it display admin login page.
Below My custom controller which I have written code in controller.

app/code/Module1/Test1/controller/Logincontroller.php

<?php
class Module1_Test1_LoginController extends Mage_Core_Controller_Front_Action {

    public function indexAction()
    {
       $this->loadLayout();
       $this->renderLayout();
    }
    public function LoginpostAction()
    {
       Mage::getSingleton('core/session', array('name' => 'adminhtml'));

    // supply username
    $user = Mage::getModel('admin/user')->loadByUsername('adminusername');

    if (Mage::getSingleton('adminhtml/url')->useSecretKey()) {
      Mage::getSingleton('adminhtml/url')->renewSecretUrls();
    }

    $session = Mage::getSingleton('admin/session');
    $session->setIsFirstVisit(true);
    $session->setUser($user);
    $session->setAcl(Mage::getResourceModel('admin/acl')->loadAcl());
    Mage::dispatchEvent('admin_session_user_login_success',array('user'=>$user));

    if ($session->isLoggedIn()) {
      echo("logged in");
    }
    }

}
?>


texts: How to generate Fedex test shipping label required for enabling production key?

texts:
I want to send them test shipping label for getting production key enabled from them. I don't know how to generate test shipping label in magento as I can't see any option to generate that. Please can anybody tell me how to get test shipping label and send them.

P.S : I am using Magento 1.9.2.4.

Thank you.


texts: Retrieving product attributes in Magento 2

texts:
I'm interested in getting frontend input strings. I understand that there are better ways other than checking for the "frontend_input" key, but I'm wanting a proof of concept. Here's my code:

$attributesForUpload = [];
$collection = $this->_filter->getCollection($this->_collectionFactory->create());
foreach ($collection->getItems() as $product) {
   $productId = $product->getId();
   $attributes = $product->getAttributes();
   foreach ($attributes as $attribute) {
       $data = $attribute->getData();
       if (isset($data['frontend_input'])) {
           if ($data['frontend_input'] === 'text' || $data['frontend_input'] === 'textarea') {
               $attributeCode = $data['attribute_code'];
               var_dump($attributeCode);
               $translatableValue = $product->getData($attributeCode);
               var_dump($translatableValue);
               $attributesForUpload[$productId][$attributeCode] = $translatableValue;
           }
       }
   }
}

Among others, product name, description, and short description are all null. Only the SKU is being returned. I'm wondering why this is since I specifically save them in the UI; I'm sure I'm missing something simple.


texts: Backup gets started twice Magento 1.8.1.0

texts:
After using Magento for some time I came across some strange behavior: If I make a database backup (system / tools / backup) under some conditions the backup will be started twice:

If I type in the backup name and hit the enter key on the keyboard I get 2 backups in the var/backups folder (also listed on the backup site in the backend). If I use the mouse and click the OK button I get only one backup.

I watched this now for some time and it seems as if this is repeatable. Since the backup needs some time this is a little bit uncomfortable especially because the shop is offline for this time.

Has anyone seen this behavior too and does somebody know the reason or a solution to prevent this ?

Thanks


texts: How to get window.checkoutConfig data via REST API?

texts: I am building a custom frontend for Magento 2 Checkout. Sometimes the checkout uses window.checkoutConfigin the built-in frontend. My frontend uses the REST API provided by Magento 2, but how can I access data that is normally set on window.checkoutConfig? Am I missing some endpoint?


texts: Category attribute not saving with RepoInterface

texts:
Im trying to update existing Categories.
They have a Custom Design (Theme) because of the general theme we are using and I forgot to add that to the creation code.

So I setup a simple script to retrieve and edit and save the existing Categories.

I thought the "right" way is saving the Category object through the RepoInterface, but when I do that the Category doesn't get updated. Only when I call the (I thought deprecated) method "save" on the Object itself it actually saves.

Some sample code:

$collection = $this->categoryCollection->create();
$collection->addAttributeToSelect('*');

foreach ($collection as $key => $cat) {
    if ($cat->getId() == 1 || $cat->getId() == 2) // Skip Cats: Root and Default
        continue;

    try {
        $cat->setStoreId(0);
        $cat->setData('custom_design', 4);
        $cat->setData('page_layout', 'cat_page');
 /*WHY*/$cat->save(); // Only when I add this it actually saves...
        $this->categoryRepoInterface->save($cat);
    } catch (Exception $e) {
        echo 'something went wrong...';
    }
}


texts: magento 2.3.4 admin logo alt text value not changing , is the log_alt valid name?

texts:
default.xml line below.
<argument name="logo_image_src" xsi:type="string">images/my-logo.svg</argument>

<argument name="logo_alt" xsi:type="string">My Admin  Panel</argument>

Logo gets updated fine, but alt value is default "Magento Admin Panel"


texts: Magento 2 : which tables is used for Related Products, Up-Sells, and Cross-Sells?

texts:
I'm trying to get which table saves the Related Products for items and order-items?
Is there any way to know how many items sold by these property.
I try to check this table sales_order_item but I don't find anything?


texts: sending out a mass email to all customers

texts:
i am in the process of transfering all my customers over form my old site to my new magento site, i have been told that everythign will transfer but the passwords. So i want to send out a mass email to all my customers asking them to follow a link and rest their passwords.

How can i do this as i dont want to have to go into everyone customer profile and send them one that way as i have over 2000 customers??

Thank you


texts: Magento 2 migration issue || Integrity Check failed

texts: I am facing this issue while migrating from Magento1.9.2.2 to Magento2.3.0. I am doing this in my localhost.


texts: How can i overwrite the summary block in magento2

texts:
I am trying to override the checkout - summary block. I want add custom text after product name. I am not able to find way it is calling and fetching data.

I know it Knockout JS but i am not able to understand it in more detail. Can any tell me what is best way to customize the checkout.


texts:
I would like to display a spinner icon when the user clicks the HTML form submit button and want to hide it when the data is posted to the destination URL. But, In my case, It's not working. Below is the code which I used for this function:

function PostData(){

var validation=false;
jQuery("#training_submit").prop('disabled', true);

jQuery('#error_traff').hide();
jQuery('#error_epost').hide();
jQuery('#error_fname').hide();
jQuery('#error_lname').hide();
jQuery('#error_skola').hide();
jQuery('#error_grade').hide();
jQuery('#error_municipality').hide();

var traff= jQuery("#training_traff").val().trim();
var email= jQuery("#training_epost").val().trim();
var firstname=jQuery("#training_fname").val().trim();
var lastname= jQuery("#training_lname").val().trim();
var phone= jQuery("#training_phone").val().trim();
var school= jQuery("#training_skola").val().trim();
var municipality = jQuery("#training_municipality").val().trim();
var grade= jQuery("#training_grade").val().trim();
var other= jQuery("#training_other").val().trim();

if(traff =="")
{
 jQuery('#error_traff').show();
 jQuery("#training_traff").focus();

}else if(email =="")
{
 jQuery('#error_epost').show();
 jQuery("#training_epost").focus();

}else if(firstname =="")
{
jQuery('#error_fname').show();
jQuery("#training_fname").focus();

}else if(lastname =="")
{
jQuery('#error_lname').show();
jQuery("#training_lname").focus();

}else if(school =="")
{
jQuery('#error_skola').show();
jQuery("#training_skola").focus();

}else if(municipality =="")
{
jQuery('#error_municipality').show();
jQuery("#training_municipality").focus();
}else if(grade =="")
{
jQuery('#error_grade').show();
jQuery("#training_grade").focus();
}
else{
    jQuery('#loading').show();
    validation=true;
}

if(validation==true)
{
var user = {
            person_eMail: email,
            person_firstName:firstname,
            person_lastName: lastname,
            company_name: school,
            company_municipality:municipality,
            person_schoolYear: grade,
            person_position: "",
            project_name: "",
            Place: "",
            DeliveryLocation: "",
            person_phone: phone,
            Title: "",
            ReqDelivery: "",
            MeetingName: traff,
            OtherInfo: other,
            PreSchool: false,
            Elementary_Fk6: false,
            FK9: false,
            HighSchool_Other: false,
        Peephole: false,
            FormName:"Pedagogträffsintresse",
            RegisterDate: ""

        };

        jQuery.ajax({
   type: "POST",
   data: user,
   url: 'https://example.com/xxxx/xxx/',
   dataType: 'text',
   async: false,
   headers: {'Authorization': 'xxxxx'},
   success: function (result) {
            clearData();
jQuery('#loading').hide();
            jQuery('#training_success').show();
     console.log(result);
            },
            error: function(error) {
                console.log(error);
        $("#training_submit").prop('disabled', false);
            }
         });
}else
{
    jQuery("#training_submit").prop('disabled', false);
}
}

Please look into the code and help me to resolve this issue.

Thanks.


texts: get the product instance from catalog_product_attribute_update_after event

texts:
I'm listening to the catalog_product_attribute_update_after event and I want to get the product that is being updated.

I tried the following ($obs is the observer instance):

    Mage::log("getProduct " . !is_null($obs->getProduct()));
    Mage::log("getEvent " . !is_null($obs->getEvent()->getProduct()));
    Mage::log("getItem " . !is_null($obs->getItem()));
    Mage::log("registry " . !is_null(Mage::registry('product')->getData()));

But checking the logs show me that they all return null!

So how am I suppose to know which product is being updated inside the catalog_product_attribute_update_after observer?

Thanks!


texts: Magento not able to add multiple items in single wishlist EE 1.14

texts:
I'm not able to add multiple items in a single wishlist, if I add a new item on same wishlist, it is replaced by previous item.

I'm using Magento EE 1.14.0.1 , Please help me to solve this issue, to my knowledge this appears to be a bug?


texts: Magento 2 - Default Refund Shipping charge to be 0 on Credit Memo

texts:
I don't want to refund the shipping charge on issuing a refund.

How to i set it to 0 by default.


texts: What extensions can I buy for sending extra order emails and automate tracking

texts:
I'm looking for an extension or combination of extensions that upon successful purchase sends an email to the warehouse manager who stocks the product,  an email to the website admin, and also to the customer as a receipt of what they bought.

Additonally, I've heard there are ways to automate tracking through certain extensions as well though I haven't the faintest clue where to find this.

Any advice would be greatly appreciate.  Thanks
Wil


texts: Magento 2 - Can I have to create API, Interface & Resource Model for relational table

texts:
I am creating a module which have three tables let's say for example

table1
--------
id int(13) PRIMARY_KEY
title varchar(50)

table2
--------
id int(13) PRIMARY_KEY
title varchar(255)

table3 `relational_table`
--------
table1_id int(13) (foreign key of table1)
table2_id int(13) (foreign key of table2)

For table1 and table2 I have defined everything like Interface, API, Resource Model.

So my main concern is
Should I have to create PRIMARY_KEY for table3 ?
Should I have to create Resource Model, Interface, API for table3

If YES then how many things needed? and NO then how crud operation will be perform for maintaining relation?

I have referenced magento core module module-tax for tax_rate to tax_rule they have five tables and maintaining all relation.


texts: Magento extension not showing up in back-end

texts:
What is wrong?

Recently I tried out an extension on my test environment of magento 1.9.2 It was a succesful installation with magento connect.

The extension worked perfectly.

so I tried it out on my real environment but the extension / module doesn't work and won't show up in my modules tab ( system - configuration - advanced ). so I can't enable or disable it.

the files have been places in the right folder ( app - code - community ) So far I tried

reinstalling the extension
logging in and out
flushing the cache
re-indexing the website
But sadly it did not seem to work on my real environment.

What extension?

this is about the "Catalog Search Refinement FREE" extension.

The extension has no panel since all this extension does is change the way magento searches for products.

I am new to magento, so I might not know much and I've read a lot but I can't find what I'm doing wrong.


texts: Why are the deleted products are alosy displayed under the new arrivals in magento site

texts: I have deleted some products from the site using admin panel ,but still those products appear under the new arrivals and best sellers(In the homepage).How to fix this issue?


texts: Not able to login to admin panel after updating curl

texts:
I am not able to login to my website admin panel,I have checked all the possible solutions available on Google,tried to reset the admin password,cleared the cache,done the changes in varien.php as well secure/unsecure url.

I have received one alert message in Magento in PAYMENT METHODS in Configuration-

Your current version of cURL php5 module is 7.29.0, which can prevent services that require TLS v1.2 from working correctly. It is recommended to update your cURL php5 module to version 7.34.0 or higher.
I received this message above for cURL upgradtion from magento,same I asked to my hosting provider to upgrade it on server,from then after the upgradation I am not able to login to my admin panel.Is there any thing that I missed to make changes.Or this is not the possible case for not login.
Curl version is now upgraded to 7.36.0
Please help.


texts:
The search bar is not working. When we input the sku # or any details it is not able to find it.
Example, searched 17024 which is marked as an item however it does not come up.


texts:
I am using b2b marketplace extension in my website. I need to split orders based on vendor id. I got one split order module https://github.com/magestat/magento2-split-order , which is splitting orders based on product attribute. But it is not caluculating shipping , totals , subtotals correctly. If it is a single product from a vendor then everything is working fine. If customer added 5 products to cart and 3 of them belongs to one vendor and 2 of them belongs to another vendor then total amount caluculation is showing wrong. Can anybody help me on this?

i just tested with product weight attribute even though grand total is displaying one last item only


texts: How can I find out why I cannot add any product to the cart?

texts:
We are suddenly experiencing a problem on our site where we cannot add any product on our website to the cart.  This just started happening within the past 48 hours, but nothing has changed.
The odd part, is that no error is generated, no log is generated, It simply hands after clicking add to cart, and it just spins. No response after that (we've let it sit for 1hr, to no avail).

We've tried clearing out the /pub/static, /var/cache sessions cache di page_cache view_preprocessed, and the problem persists.  No errors show up and I cannot seem to find a rhyme or reason as to the cause.

Is there some way to turn on debugging after I click a button (but nothing else happens) ?


texts:
When I get the product collection with :

$collection = Mage::getModel('catalog/product')->getCollection();

I get the group_price key but it's empty.

 Array
 (
    [entity_id] => 1
    [entity_type_id] => 4
    [attribute_set_id] => 2
    [type_id] => simple
    [sku] => 00000
    ......
    [group_price] => Array
        (
        )

    ......
)

And if I load the product I can get the group_price data with :

$product = Mage::getModel('catalog/product')->load($product_id);
$group_price = $product->getData('group_price');

I tried different query with joinField() or joinTable() with table 'catalog_product_entity_group_price' but without success.

How to join group_price data to the collection with a join query ?

I would like to avoid iterating the collection to load each product and get the group_price.


texts: getOrder() doesn't return Mage_Sales_Model_Order when debugging

texts:
I try to var_dump($order) but it gives me :

object(Varien_Object)#290 (7) { ["_data":protected]=> array(0) { } ["_hasDataChanges":protected]=> bool(false) ["_origData":protected]=> NULL ["_idFieldName":protected]=> NULL ["_isDeleted":protected]=> bool(false) ["_oldFieldsMap":protected]=> array(0) { } ["_syncFieldsMap":protected]=> array(0) { } }

My class PaketId_Shipping_Block_Adminhtml_Sales_Order_Shipment_View_Shipping extends Mage_Core_Block_Template {

protected $order;

public function getOrder() {
    if (is_null($this->order)) {
        if (Mage::registry('current_order')) {
            $order = Mage::registry('current_order');
        }
        elseif (Mage::registry('order')) {
            $order = Mage::registry('order');
        }
        else {
            $order = new Varien_Object();
        }
        $this->order = $order;
    }
    return $this->order;
}

My phtml file :

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

Test custom block

<?php $order = $this->getOrder()?>
<?php var_dump($order);?>
<?php $shippings = Mage::getModel('paketid_shipping/result')->getCollection()->addOrderFilter($order) ?>
<?php echo "
";?>
<?php var_dump($shippings);?>
<?php echo "
" ;?>

My variable $order in phtml file somehow doesn't call the $order in block file, or I have been misunderstanding about this? Because, when i try to var_dump($order) in other phtml, it returns object(Mage_Sales_Model_Order)#276...


texts:
The Magento server I am working on was set up by another person to use database storage.

Without knowing this, I have been running an image import script which has failed now with the error

  PHP Fatal error:  Uncaught exception
  'Mage_Eav_Model_Entity_Attribute_Exception' with message
  'SQLSTATE[HY000]: General error: 1114 The table 'core_file_storage' is
  full'

What are my options if I cannot synchronize to file system storage?

Is it safe to truncate core_file_storage? Does it contain anything other than images/media?


texts: Quote Items are showing only if flush cache - Magento 2

texts:
I am trying to get cart quote items by the following code:

File: app/code/Essence/Fcf/view/frontend/templates/packages.phtml

I called this file in my cms page by following code:

{{block class="Magento\Framework\View\Element\Template" template="Essence_Fcf::packages.phtml" cacheable="false"}}

packages.phtml

$cart = $objectManager->get('\Magento\Checkout\Model\Cart');
$objectManager =  \Magento\Framework\App\ObjectManager::getInstance();
$items = $cart->getQuote()->getAllItems();
foreach($items as $item) {
    echo 'ID: '.$item->getProductId().'
';
    echo 'Name: '.$item->getName().'
';
    echo 'Sku: '.$item->getSku().'
';
    echo 'Quantity: '.$item->getQty().'
';
    echo 'Price: '.$item->getPrice().'
';
    echo "
";
}
echo $cart->getQuote()->getItemsCount();
echo $cart->getQuote()->getItemsQty();

I am getting this value only if I flush cache after add to cart. I want this value without flushing cache direclty. How it is possible?


texts: Remove Billing Agreements/Recurring Profiles (beta) Magento 1.7

texts:
In my Admin Panel under Customers --> Manage Customers --> click on a customer:

I want to remove "Billing Agreements and Recurring Profiles(beta)

app/code/local/Sean/CustomerNavigationLinks/etc/config.xml

<?xml version="1.0" ?>
<config>
    <modules>
        <Sean_CustomerNavigationLinks>
            <version>0.0.1</version>
        </Sean_CustomerNavigationLinks>
    </modules>
    <frontend>
        <layout>
            <updates>
                <customernavigationlinks>
                    <file>sean_customernavigationlinks.xml</file>
                </customernavigationlinks>
            </updates>
        </layout>
    </frontend>
    <global>
        <blocks>
            <customer>
                <rewrite>
                    <account_navigation>Sean_CustomerNavigationLinks_Block_Account_Navigation</account_navigation>
                </rewrite>
            </customer>
        </blocks>
        <helpers>
            <customernavigationlinks>
                <class>Sean_CustomerNavigationLinks_Helper</class>
            </customernavigationlinks>
        </helpers>
    </global>
</config>

app/code/Sean/CustomerNavigationLinks/Helper/Data.php :

<?php
class Sean_CustomerNavigationLinks_Helper_Data extends Mage_Core_Helper_Abstract
{

}

app/code/Sean/CustomerNavigationLinks/Block/Account :

<?php
class Sean_CustomerNavigationLinks_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation
{
    public function removeLinkByName($name)
    {
        unset($this->_links[$name]);
        return $this;
    }
}

app/design/frontend/base/default/layout/sean_customernavigationlinks.xml

<?xml version="1.0" ?>
<layout>
    <customer_account>
        <reference name="customer_account_navigation">
            <action method="removeLinkByName">
                <name>billing_agreements</name>
            </action>
            <action method="removeLinkByName">
                <name>recurring_profiles</name>
            </action>
        </reference>
    </customer_account>
</layout>

app/etc/modules/Sean_CustomerNavigationLinks.xml

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

The tabs are still there I'm not sure if I'm missing anything.


texts: addFieldToFilter `OR` condition for customer relationship in Magento 2

texts:
I have a custom module to store customer relationship, with database structure like this:

|entity_id|first_customer|second_customer|

entity_id => the relationship id
first_customer => customer id
second_customer => customer id

if the customer has a relationship with another customer, each of their customer id will fill first_customer and second_customer, i want to check if the relationship already exist for given 2 customer id, for example

+---------+--------------+---------------+
|entity_id|first_customer|second_customer|
+---------+--------------+---------------+
|    1    |      1       |     35        |
|    2    |      3       |      1        |
|    2    |      4       |      2        |
|    2    |      2       |      6        |
+---------+--------------+---------------+

public function validate($customerIdA,$customerIdB){
  $friend = $this->friendFactory->create()->getCollection()
             ->addFieldToFilter(????)->getFirstItem();
  if(!empty($friend->getId())) return true;
  else return false;
}

//the order of the parameter is not gonna be the order of the filter
$this->validate(1,35); //true
$this->validate(35,1); //true
$this->validate(1,2); //false
$this->validate(1,3); //true
$this->validate(4,2); //true


texts:
Does anyone know how to fix this?

My web store broke after installing a new theme, but the error persists after changing the theme back to default.

This is the error displayed when visiting the site:

Notice: Undefined index: catalog.topnav  in /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php on line 460

#0 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(460): mageCoreErrorHandler(8, 'Undefined index...', '/home/havhokere...', 460, Array)
#1 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('page/html_topme...', 'catalog.topnav')
#2 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('page/html_topme...', 'catalog.topnav')
#3 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#4 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#5 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#7 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#8 /home/havhokeren/public_html/magento/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#9 /home/havhokeren/public_html/magento/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#11 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#12 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#13 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /home/havhokeren/public_html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#15 /home/havhokeren/public_html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#16 /home/havhokeren/public_html/magento/index.php(89): Mage::run('', 'store')
#17 {main}

Site: www.havhokeren.dk/magento Magento version 1.9.1.1
Any help is greatly appreciated.


texts: Magento 2: How to only apply css in catalog product page in grid view but not the list view

texts:
If i change the css in the grid view, but and the css will also apply to the list view, which is i don't want it.

How can i solve that?

Thank you.


texts: I am using magento v2.2.6. I am getting notification regarding the new patch release by magento for authorize.net payment method. But i am not using authorize.net payment method in my magento setup. Is still I need to apply that patch or I can skip it?


texts: how to compile single LESS file in magento2

texts: I am working on magento2 theming part. Here we have some predefined and my custom LESS file. Whenever we compile LESS file, it generates two css file -- styles-l.css, styles-m.css . But we do not know from which LESS file, my css is going to styles-l.css and styles-m.css. Is there any way to find out this issue? I want to see from which file (line number too) my code is coming ? Is there any way to solve these issues ? Any help is  really appreciated. Currently i am doing deploy static data. It compiles all LESS files. I want to compile single LESS file.


texts: How to load collection only with specific attributes?

texts:
I try to load collection with specific attributes this way:

    $collection = $this->productCollectionFactory->create();
    $collection->addAttributeToSelect('entity_id')->addAttributeToSelect('name');

It adds to _selectAttributes field with these two attributes, but when I try to load items - nothing changed, all items have all fields... So, it's same as addAttributeToSelect('*')

What should i do to resolve this issue?


texts: Just like price rules, I want to apply a 'rule' but more as comment/notification that applies to certain products if they are added to the shoppingcart.


texts: How to add city (not state!) in magento?

texts:
How can I add cities in city field in address form of magento in checkout?

I want add city not state, want load it auto same as state

State load drop-down after select country, now want city drop-down after select state


texts: How can display category in block or page and add custom css for this block.


texts: Add custom attribute to sales_quote_address

texts:
I would like to add a custom attribute to the Sales_Quote_Address model in Magento. I searched on Google for a few hours now, and I can't find a way of doing so. Is it possible? Or do I have to set the attribute on the Sales_Order itself and grab it from there afterwards?

Thank you


texts: Add popup link of different module in Grid with Order ID

texts:
I have override Grid.php of Order Grid, I want to add popup to link another module. I need to pass order ID to controller using url of popup link.
please check below code

class Mycompany_Module_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
{
    public $url;

     protected function _prepareColumns()
    {
        $test=Mage::getModel('sales/order')->getCollection();
            $array = array();
            foreach ($test as $_index=>$_item){
            $array[] = $_item->getId();
            }
            $OrderId=array_reverse($array);
            foreach($OrderId as $key=>$OrderIdValue){
            $this->url= $this->getUrl('*/module/index/', array('order_id' => $OrderIdValue)); // url generated correctly here
            $this->addColumn('upload',
                array(
                    'header'    => Mage::helper('core')->__('Pop up'),
                    'width'     => '50px',
                    'type'      => 'action',
                    'getter'     => 'getId',
                    'actions'   => array(
                        array(
                            'caption' => Mage::helper('sales')->__('Pop up'),
                            'onclick' =>"return myPop('".$this->url."')"   // generates only one url like /module/index/order_id/1
                        )
                    ),
                    'filter'    => false,
                    'sortable'  => false,
                    'index'     => 'stores',
                    'is_system' => true,
            ));

    } // for each ends here

 return parent::_prepareColumns();
    }

}

I'm not able to iterate order_id  here 'onclick' =>"return myPop('".$this->url."')"


texts: How to add zone number and street number in magento 2.3.1 checkout page after shipping address


texts: Magento Setting up EcomDev error : Cannot find local.xml.phpunit file in app/etc directory

texts:
I have a Magento project and I am trying to implement unit testing in it.

For this I am using EcomDev.

I am following this Tutorial and did the prerequisites:

  install composer;
  create a composer.json file for installing PHPUnit and EcomDev module;
  setup PHPUnit by creating the phpunit.xml configuration file;
  create the bootstrap file for PHPUnit;

So, since I used composer for installing EcomDev (not modman).

And in the EcomDev official github repo, we have to run the following commands as mentioned:

php ecomdev-phpunit.php -a magento-config --db-name magento_test --base-url http://local.fresh.com/

And I get the following error:

  Cannot find local.xml.phpunit file in app/etc directory⏎

What should I be doing in this case, as I can't find any information about adding local.xml.phpunit manually.

PS : I am using Magento 1.9


texts:
I have made all the admin settings based on previous post from magento stack exchange. I have created a custom module to send emails and I want to schedule the email based on cron job. I want to know what is missing. If I run manually the cron job runs successfully and email is sent out. How do I make cron job run in the background so email gets sent out in a scheduled time everyday.

My Admin config settings:

My custom code crontab.xml is as below:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="Daily_report" instance="Module\Modulename\Cron\sendEmail" method="execute">
            <schedule>*/1 * * * *</schedule>
        </job>
    </group>
</config>

Here is the crontab set-up:

*/1 * * * * www-data php /var/www/html/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/html/magento2/var/log/magento.cron.log
*/1 * * * * www-data php /var/www/html/magento2/update/cron.php >> /var/www/html/magento2/var/log/update.cron.log
*/1 * * * * www-data php /var/www/html/magento2/bin/magento setup:cron:run >> /var/www/html/magento2/var/log/setup.cron.log

UPDATE:

I've updated crontab -e as below:

*/1 * * * * /usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/magento2/var/log/magento.cron.log
*/1 * * * * /usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log
*/1 * * * * /usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log

I can see in /var/log/syslog that the cron is running. Below are the details:

Nov 25 12:52:01  CRON[30803]: (ubuntu) CMD (/usr/bin/php /var/www/magento2/bin/magento setup:cron:run >> /var/www/magento2/var/log/setup.cron.log)
Nov 25 12:52:01  CRON[30800]: (CRON) info (No MTA installed, discarding output)
Nov 25 12:52:01 CRON[30804]: (ubuntu) CMD (/usr/bin/php /var/www/magento2/update/cron.php >> /var/www/magento2/var/log/update.cron.log)
Nov 25 12:52:01 CRON[30805]: (ubuntu) CMD (/usr/bin/php /var/www/magento2/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /var/www/mage$
Nov 25 12:52:01  CRON[30801]: (CRON) info (No MTA installed, discarding output)
Nov 25 12:52:02  CRON[30802]: (CRON) info (No MTA installed, discarding output)

However, none of the cron jobs ran. There is nothing in magento log files.

Could you please help me out? I have hosted my test server in AWS Ubuntu server.


texts: How to Eliminate render-blocking JavaScript and CSS in above-the-fold content

texts:
Google insights is showing eliminate render bloking javascripts and css in above the fold content, i have used all way of doing this but haven't got the right solutions. my magento version is 1.9,  please help me in which file should i make changes to get the thigns done and improve my pages speed

http://example.com/media/js/59f4eef32de9bea01d990b46e1d46611.js
http://example.com/skin/frontend/default/sm_lovefashion/js/jquery-1.7.2.min.js


texts: How we can update Payment Method with transaction details programattically for an Order in Magento 2.1

texts:
Im trying to create an order in Magento 2 programmatically and able to do with "checkmo" method. But I need to update the payment method with paypal and its transaction details. I have the trans details which processed the payment via Paypal API.

If anyone can help me, it would be great. Thankyou.


texts: Send a Magento order to third-party API when placed

texts:
I'm looking on an example of where I should place for Magento orders to be sent to a third-party API.  I have all documentation and all proper code that I've tested.  I just don't know where these API calls fit in.

How and where will it get triggered? Should it be a custom module? Event observer?


texts: How do I create a new URL with a list of existing products

texts:
I would like to set-up a new URL for my x% off beauty promotion. Currently, my beauty related products are housed under a combination of sub categories, so I'm trying to bring them all together under one link for this promotion. Eg- Beauty products are under categories Sun care, Skin care, hair care. How can I combine these existing categories/sub-categories into one and create a link for that? (I want to retain them as individual categories on the navigation, but want to combine it with this promotion)

I tried going into :
catalog > Categories > manage categories > add sub-category.

But after this step, I need to manually select each product I want as a part of this sub-cat. This is not feasible as there are heaps of products.

Please let me know how you'd do this. Thanks for your help.


texts:
Is there a way to edit image alt-tags in Magento2 by looking at all the images on the site in one place? Instead of going into each content block or page?

Thanks


texts:
How to get configurable option value of added product in wishlist in magento2.

$collection = $this->_wishlistCollectionFactory->create()
                    ->addCustomerIdFilter($customerId);

            $wishlistData = [];

            foreach ($collection as $_item) {
            $product = $this->_productRepository->getById($_item->getProductId());
            echo "<pre>";print_r($product->getAttributeText('size'));
            }exit;


texts: how to change "SHOP NOW" caption in banner slider?

texts:
i use "manage banners" in the "plazathemes". it has a "url" option and i get shop now caption for the link automatically.

how can I rename Shop Now caption ?


texts:
Does Magento 1.8.0.0 CE already include the Google eCommerce tracking code?

If not, how would one implement the Google eCommerce tracking code specifically for Magento?


texts: Magento 2 Upload a PDF to specific Customer

texts: I need to upload PDF files to specific customers. Later the customer can download the document in his account in a new tab. How can implement the document upload to a specific customer account?


texts:
I have a problem when I create a new custom API module, my module is below:

Content of : CalculatorInterface.php

<?php

namespace Tohq\Webapi\Api;

interface CalculatorInterface
{
    public function cal($num1, $num2);
}

Content of: Calculator.php

<?php

namespace Tohq\Webapi\Model;
use Tohq\Webapi\Api\CalculatorInterface;

class Calculator implements CalculatorInterface
{
    /**
     * Returns total of two numbers
     *
     * @api
     * @param int $num1
     * @param int $num2
     * @return int $result
     */
    public function cal($num1, $num2)
    {
        // TODO: Implement cal() method.
        $result =  $num1 + $num2;
        return $result;
    }
}

Content of webapi.xml

<?xml version="1.0"?>
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
    <route url="/V1/webapi/cal/:num1/:num2" method="GET">
        <service class="Tohq\Webapi\Api\CalculatorInterface" method="cal"/>
        <resources>
            <resource ref="anonymous"/>
        </resources>
    </route>
</routes>

Content of : di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <preference for="Tohq\Webapi\Api\CalculatorInterface" type="Tohq\Webapi\Model\Calculator" />
</config>

============== My issue below ==============
When I call Rest api : magento2.dev/rest/V1/webapi/cal/3/5
I got this issue:

  This XML file does not appear to have any style information
  associated with it. The document tree is shown below.

      Class does not exist
      -1

      0 D:\xampp\htdocs\srcDebug\lib\internal\Magento\Framework\Webapi\ServiceInputProcessor.php(148):
  ReflectionClass->__construct('') 1
  D:\xampp\htdocs\srcDebug\lib\internal\Magento\Framework\Webapi\ServiceInputProcessor.php(322):
  Magento\Framework\Webapi\ServiceInputProcessor->_createFromArray(NULL,
  '3') 2
  D:\xampp\htdocs\srcDebug\lib\internal\Magento\Framework\Webapi\ServiceInputProcessor.php(119):
  Magento\Framework\Webapi\ServiceInputProcessor->convertValue('3',
  NULL) 3
  D:\xampp\htdocs\srcDebug\app\code\Magento\Webapi\Controller\Rest\InputParamsResolver.php(101):
  Magento\Framework\Webapi\ServiceInputProcessor->process('Tohq\Webapi\Api...',
  'cal', Array) 4
  D:\xampp\htdocs\srcDebug\app\code\Magento\Webapi\Controller\Rest.php(299):
  Magento\Webapi\Controller\Rest\InputParamsResolver->resolve() 5
  D:\xampp\htdocs\srcDebug\app\code\Magento\Webapi\Controller\Rest.php(216):
  Magento\Webapi\Controller\Rest->processApiRequest() 6
  D:\xampp\htdocs\srcDebug\var\generation\Magento\Webapi\Controller\Rest\Interceptor.php(37):
  Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
  7 D:\xampp\htdocs\srcDebug\lib\internal\Magento\Framework\App\Http.php(135):
  Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
  8 D:\xampp\htdocs\srcDebug\lib\internal\Magento\Framework\App\Bootstrap.php(258):
  Magento\Framework\App\Http->launch()
  9
  D:\xampp\htdocs\srcDebug\index.php(39):
  Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
  10 {main}

Anybody can see my issue and how to fix it?


texts: This page isn’t working redirected you too many times error in magento

texts:
I am facing below error on site, This error only comes in admin end, In front-end site is working fine. After admin login, this error is coming please tell me how to debug this issue.

`This page isn’t working mysite.com redirected you too many times Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS`.


texts: order confirmation email not send in magento 2

texts:
I Installed magento 2 on my vps server
and  configured store email like this

but order confitmation email will not send to the customers
what should I do , should I setup cron as some link recomended to do this
or should I configure my server like this link
what is the problem?


texts: How we add custom text in front page in magento 1.9 via custom module

texts:
I am new to magento , I have created a simple custom module and access that module via browser and its working fine .Now my question is , i have to display some custom text in frontend\base\default\template\page/html/breadcrumbs.phtml file via my previously created
custom module.Can you please suggest , how we achieve this in magento 1.9.


texts: How to source css from Magento_Theme /web instead of theme root /web?

texts:
I am trying to include a CSS from a jQuery library that I have within Magento_Theme/web/js/libs/ folder, however, I am struggling to source a CSS file from within here?

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="Magento_Theme/web/js/libs/slick/styles.min.css" />
    </head>
</page>

How can I do this? I can only seem to source css from within the root/web folder within my theme if I was to use:

<css src="css/styles.min.css" />


texts: Magento 2 Argument of preference constructor is also a preference, error

texts:
I'm overriding class Magento\Customer\Model\CustomerRegistry with my own preference. Then I create a preference for Magento\Customer\Api\CustomerRepositoryInterface, which has an argument in the constructor of type CustomerRegistry.

This is part of my di.xml:

<preference for="Magento\Customer\Model\CustomerRegistry"
                type="Tmo\Customer\Model\CustomerRegistryPreference" />
<preference for="Magento\Customer\Api\CustomerRepositoryInterface"
            type="Tmo\Customer\Model\ResourceModel\CustomerRepositoryPreference" />

Besides, Interceptor class created by Magento2 Dependency Injection is there with the proper argument of type CustomerRegistryPreference, however I'm getting the next error:

Recoverable Error:
Argument 3 passed to Tmo\Customer\Model\ResourceModel\CustomerRepositoryPreference\Interceptor::__construct()
must be an instance of Magento\Customer\Model\CustomerRegistry,
instance of Tmo\Customer\Model\CustomerRegistryPreference given,
called in /src/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 181 and
defined in /src/var/generation/Tmo/Customer/Model/ResourceModel/CustomerRepositoryPreference/Interceptor.php on line 12

I was expecting from Magento the correct dependency injection but I got that error.
Even if I delete the preference for Magento\Customer\Api\CustomerRepositoryInterface, I get the same error but in the core class:

Recoverable Error:
Argument 3 passed to Magento\Customer\Model\ResourceModel\CustomerRepository\Interceptor::__construct()
must be an instance of Magento\Customer\Model\CustomerRegistry,
instance of Tmo\Customer\Model\CustomerRegistryPreference given,
called in /src/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php on line 164 and
defined in /src/var/generation/Magento/Customer/Model/ResourceModel/CustomerRepository/Interceptor.php on line 12

If I modify the class CustomerRepositoryPreference in the constructor changing the argument CustomerRegistry for CustomerRegistryPreference, the problem is solved, but in the second example when the preference was gone, I shouldn't modify the core class.

So my question is if there is a way to fix this error without touching the argument in the constructor???


texts: Data Migration Tool with splitted database

texts:
I would like to migrate data from my Magento 1 website to the new Magento 2 one.
In the Magento 2 instance, I've splitted the database for performance reasons (https://devdocs.magento.com/guides/v2.4/config-guide/multi-master/multi-master.html), so I've got more than one destination databases.
Is it possible to use Data Migration Tool with a destination splitted database?


texts:
I am trying to login and I'm getting Error log record number: 813600142036
Does anyone know what this means?

Thank you in advance!


texts:
Currently running Magento 1.9.3.7 and would like to update to Magento 2

Do I have to start from scratch with Magento 2? Also, how do I use the setup wizard to install?


texts: Magento 2 Certified Associate Developer Exam Reading Material

texts:
Recently Magento announces  Magento 2 Certified Associate Developer Exam exam for Magento2 version.

After reading in this page https://u.magento.com/magento-2-certified-associate-developer-exam#.WqlJQ-bhVNA

I have some question about the exam.

What is the passing score for this exam?

which study materials can be useful for preparation for this exam?

and last, except Free study Guide any other study material available for this exam.

Are there any passing criteria for EE edition just like we have in M1 Developer Plus Exam ?

What is retake policy for this exam ?

How many free retake available?


texts: Allow Dynamic Media URL in Products and Categories setting gone?

texts: I am running Magento 2.4.2 and I am not seeing to option to enable "Allow Dynamic Media URL in Products and Categories" under Store -> Configuration -> Catalog -> Storefront. How can I get media urls to work for category pages?


texts: Magento2 paypal payflow pro $0.0 authorization charge issue

texts:
I am facing an issue with Paypal payflow pro payment method in Magento2.2.5. Actually when i place order and check transaction in paypal manager account, it shows me 2 transaction entries, one for authorization and one for sales, i have checked in admin settings, Payment Action already set to Sale. please find attached screenshot for your reference

Can anyone help me out how to prevent authorization request to be sent to paypal and only send Sale request?


texts:
I'll start off with saying that I am new to Magento. After installing Magento I only receive 404's. There is no styling either. I can't access the admin panel or anything, I just see "whoops, our bad...". I have been looking around for answers but nothing has worked.

So far I have tried:

php bin/magento setup:static-content:deploy
php bin/magento cache:clean
php bin/magento cache:flush

Changing a few things in my .htaccess (RewriteBase)

I'm not sure what could be the issue now. Any help would be greatly appreciated! If any other information I will edit it in.

Extra info:

Host: Webfaction
Server: Apache 2.4.6
Php: 5.6.31
OS: CentOS (7 I believe)

Thank you  in advance!

update: I am unable to leave comments because you need 50 rep to leave a comment? Sadly I am unable to recompile due to our allotted memory through the host. Is it possible that uninstalling and reinstalling magento could solve the issue?

update 2: I was able to do both solutions and neither worked sadly.


texts:
I've a big doubt with Observers in Magento. I can't understand this events in Magento.

    <events>
         <sales_model_service_quote_submit_after>
            <observers>
                <onepagecheckout>
                    <type>model</type>
                    <class>onepagecheckout/observer</class>
                    <method>removeHistoryComment</method>
                </onepagecheckout>
            </observers>
        </sales_model_service_quote_submit_after>
        <sales_model_service_quote_submit_before>
            <observers>
                <onepagecheckout>
                    <type>model</type>
                    <class>onepagecheckout/observer</class>
                    <method>addHistoryComment</method>
                </onepagecheckout>
            </observers>
        </sales_model_service_quote_submit_before>

        <controller_action_layout_render_before_checkout_cart_index>
            <observers>
                <onepagecheckout>
                    <class>onepagecheckout/observer</class>
                    <method>setEmptyCartTemplate</method>
                </onepagecheckout>
            </observers>
        </controller_action_layout_render_before_checkout_cart_index>

    </events>


texts: Magento2 How to make Thumbnail zoom on click on product page?


texts: How can I add an attribute to all products? Now i am adding this attribute to all sets. Is there a way it can be done faster?


texts: Configuring multi store backend magento 2

texts:
So this is the problem I'm having.

1) I created the website, store and store view.

2) In the index.php file I have put the following code:

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'test';
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';
$bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $params);
$app = $bootstrap->createApplication('Magento\Framework\App\Http');
$bootstrap->run($app);

Question: do I add the store code to the domain name (e.g. test.exampledomain.com) or just add the store code like above?

3) In my htaccess file under the section

## enable rewrites
Options +FollowSymLinks
RewriteEngine on

I've put the following code:

SetEnvIf Host .*http://localhost/magento2.* MAGE_RUN_CODE=test
SetEnvIf Host .*http://localhost/magento2.* MAGE_RUN_TYPE=website

4) I've tried this with domain names on a live site and on a dev localhost but can't seem too get the second store/site to show up I keep getting a 500 error. Is there something else I need to add or change?

like Vhost?

Can some explain what I'm doing wrong, I have gone through endless blogs and tutorials and still can get it to work.

In magento 1, you simply make the changes to the index.php file and the stores work with the set domains.


texts: Is there any extension(payment gateways, indian market) available to make the Payment in the website itself like in attached screen shot?


texts:
we are using magento 1.8.ce

The most products in our store are configurable products with associated simple products.

Now we going to sell Beanies from a brand (in different sizes)
Eacht size is a simple product associated with the configurable product.

Besides the beanies we also have matching scarves (the are simple products, one-size)

What i would like to see is when the beanie is shown, the customer has directly the option to buy the matching scarf too ...

And preferably the other way to ... when a customer buys a scarf he has the option to buy a matching beanie (with size selector too ...)

How can i do this?


texts: Multi warehouses shipping rate calculation with UPS

texts:
We have two different warehouses for e.g. once is in CA and other is in VA.

We need to ship product based on state which provides low rate. We prepare list like NY should be served by VA. We also wants UPS to calculate shipping rates based on near by warehouse.
Am I able to achieve this by default feature in Magento?
If not, is there any code sample/trick you can suggest to achieve it?
Do you suggest to use any extension? if yes, which will be best? I checked with some inventory management tools with multi warehouse but none of supports shipping rate calculation via UPS based on state selection for shipping.


texts: Override the frontname for a existing Magento module

texts:
I recently started working on Magento for one of my projects and stuck at something, which i see a very common use case. I tried looking at different blog post but couldn't find any which can hint towards that.

My question is, I want to able to override the existing frontName for a module in magento. e.g.

If current user dashboard URL is

  http://example.com/customer/account/

I want to change it to.

  http://example.com/user/account/

Also I will probably add more method in my controller to add few other functionalities. For which I found following post very useful.

https://stackoverflow.com/questions/15212753/getting-2-modules-to-use-same-frontname-in-magento

Can i refer this also any suggestion on how to change frontName?


texts: Magento 2: Change quote currency code before place order with Observer

texts:
I am trying to change the quote currency before placing any order.

I have used below event for that.

  Vendor\Module\etc\frontend\events.xml

<event name="sales_model_service_quote_submit_before">
    <observer name="change_currency_before_place_order" instance="Vendor\Module\Observer\BeforePlaceOrder" />
</event>

  Vendor\Module\Observer\BeforePlaceOrder.php

<?php

namespace Vendor\Module\Observer;
use Magento\Framework\Event\Observer;
use Magento\Framework\Event\ObserverInterface;
class BeforePlaceOrder implements ObserverInterface
{

 protected $_checkoutSession;
 private $logger;
/**
 * @var \Magento\Catalog\Model\Session
 */
 protected $catalogSession;

public function __construct(
    \Magento\Checkout\Model\Session $checkoutSession,
    \Magento\Catalog\Model\Session $catalogSession,
    \Psr\Log\LoggerInterface $logger
)
{
    $this->_checkoutSession = $checkoutSession;
    $this->catalogSession = $catalogSession;
    $this->logger = $logger;
}

public function execute(\Magento\Framework\Event\Observer $observer)
{
   $quote = $observer->getEvent()->getQuote();
   $this->logger->info('inside place order observer');
   //$this->storeManager->getStore()->setCurrentCurrencyCode('EUR');
   $quote->setQuoteCurrencyCode("EUR");
   $quote->collectTotals();
  }
}

The above event is not firing for me, Is there any other way to implement this functionality?

Note: The accepted answer working well but once the invoice is created, its changing to default currency again.

Can anyone advise me please why that event is not firing even after placing globally?.


texts: Hide gift card block in checkout basing on cart content

texts:
I have to hide the "apply your gift card" block in the checkout/payment page. This should be hidden when the cart contains a gift card yet.
I found the HTML of this section, but I can't find where to set my conditions to display/hide the block.
I'm on Magento 2.


texts: Magento 2 Load/Set Custom Customer Attribute

texts:
I've create a customer attribute, when the attribute is set I can change its value etc, however when the attribute is not set it doesn't show up therefore I can not set it. Is there a way to do this?

I am currently loading the\Magento\Customer\Api\CustomerRepositoryInterface and loading the customer by its ID.


texts:
I have been working on my own custom theme based from the default RWD theme in 1.9.2. However, the filter block is weirdly moving top of page and outside the body. (see fig1)

FIGURE 1

However, this only occurs on the main products page, not on any sub category pages. (see figure 2)

Why is this happening and how do I fix it? I haven't touched the default code for filters from rwd theme.

Edit: Still trying to figure this out and analysing the code:

the div "col-left sidebar col-left-first" has broken outside the body in the culpable category, whereas in all other categories it resides in col-wrapper div


texts: Magento 2 - extending validation/rules.js in custom module

texts: Is there any way to extend validation/rules.js in custom module (not theme) with a new validation rule without overriding the original rules.js?


texts: I want to add my custom entity for export Magento 2

texts:
I want to export my custom entity from the admin like products, customers, etc... I have already created the code for the import for my custom entity and it is working fine. But now I want to add the same entity for the export my data. Please see attached image that how I want the functionality.

There is a simple database table with three fields. The table name is 'manufacturer_manufacturer' and fields name are following.
There is no any primary key.

manufacturer
model
product_ids

So I want just export above data from my table only.

I want to add the option in dropdown like 'manufacturer'.If admin selects that value and export then all the data should be exported in the CSV format.


texts: How to get last ordered product details in Magento 2.2?

texts:
am extending the onepage/success block and able to get the order id from it but what I want is last ordered information like Product URL, product ID, Product image and so, I did a search about this but I couldn't find any apt ans for this, any reference even would be helpful.
I need all these info at success page.

  namespace Mobiweb\Ordershare\Block;

  class Ordershare extends \Magento\Checkout\Block\Onepage\Success {
    public function getOrder() {
        return $this->_checkoutSession->getLastRealOrder();
    }
  }

in phtml
am getting last order id.
I want that last ordered product details by that id.


texts: Disable a product in catalog_product_save_before event

texts:
I'm trying to disable a product inside the catalog_product_save_before event.

I have tried this, but it doesn't seem to work:

$product->setStatus(Mage_Catalog_Model_Product_Status::STATUS_DISABLED);
//$product->save();

I've also tried this, but I'm thinking this won't work because the product hasn't been added to the database yet.

$storeId = 0;
Mage::getModel('catalog/product_status')->updateProductStatus($product->getId(), $storeId, Mage_Catalog_Model_Product_Status::STATUS_DISABLED);

How can I disable the product?


texts: Enabling order status "Complete" in overview without Shipment

texts:
A customer doesn't want to use the shipping forms (it takes too much time). If there is no shipment for an order it will not go to complete. I tried to solve this by setting the state "Processing" to the status "Complete" so the order would go complete as soon as the invoice is created. Worked so far, until I found out that PayPal autogenerates the invoice.
My idea was to let him set the state to "Complete" manually (And autogenerate all invoices) but this doesn't work if there is no shipment created.
How could I let him select the "Complete" status manually without shipment? Do you have any other solutions?

Edit: Another idea: Is there a possibility to create the shipments from the overview screen? Like ticking all orders and selecting "Ship" in the dropdown menu on the top right? This would solve the problem as well.


texts:
i want to customized the Invoice PDF layout like in the image
this is just a example of print invoice pdf & changes i want


texts: Disable (product data items) tabs in Product page

texts:
I want to disable tabs in product pages, i mean not display product data items (description, more information,Ratings) as tabs.

So I override

web/css/source/sections.less

And remove tabs and accordion mixins

Then I override

Magento_Catalog/templates/product/view/details.phtml

And i remove tabs like this

<?php if ($detailedInfoGroup = $block->getGroupSortedChildNames('detailed_info', 'getChildHtml')):?>

    <?php $layout = $block->getLayout(); ?>

        <?php foreach ($detailedInfoGroup as $name):?>
            <?php
                $html = $layout->renderElement($name);
                if (!trim($html)) {
                    continue;
                }
                $alias = $layout->getElementAlias($name);
                $label = $block->getChildData($alias, 'title');
            ?>
            <div class="data item title" id="tab-label-<?= /* @escapeNotVerified */ $alias ?>">
                <span href="#<?= /* @escapeNotVerified */ $alias ?>"
                   id="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title">

                    <?= /* @escapeNotVerified */ $label ?>

            <div class="data item content" aria-labelledby="tab-label-<?= /* @escapeNotVerified */ $alias ?>-title" id="<?= /* @escapeNotVerified */ $alias ?>" data-role="content">
                <?= /* @escapeNotVerified */ $html ?>

        <?php endforeach;?>

But the problem is that Reviews not displayed because Reviews loaded with javascript when you open reviews tab.

And if i remove tabs functionality that breaks this.

I think i have to overide

Magento_Rewiew/web/js/process-reviews.js

That part i think

function processReviews(url, fromPages) {
    $.ajax({
        url: url,
        cache: true,
        dataType: 'html',
        showLoader: false,
        loaderContext: $('.product.data.items')
    }).done(function (data) {
        $('#product-review-container').html(data).trigger('contentUpdated');
        $('[data-role="product-review"] .pages a').each(function (index, element) {
            $(element).click(function (event) { //eslint-disable-line max-nested-callbacks
                processReviews($(element).attr('href'), true);
                event.preventDefault();
            });
        });
    }).complete(function () {
        if (fromPages == true) { //eslint-disable-line eqeqeq
            $('html, body').animate({
                scrollTop: $('#reviews').offset().top - 50
            }, 300);
        }
    });
}

I will like to make it load the reviews when the user scroll to rewiews height
like lazyload.

Please give me a direction on how to do that.

Thank you


texts: How to get Aggregations in ProductCollection

texts:
I'm customizing graphql with query Product().  Instead of using searchCriteria to build searchRequest, i customed query graphql and used productCollection to build searchRequest.
I see, the productCollection has subjectType is Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection.
In class Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection, i want to get property $queryResponse. However, this property has scope Private. And ElasticSuite also dosen't support any methods to return its value @@. Now, i can not get data of $queryResponse.
Please, give me solution to resolve it.


texts:
If I enable Admin routing compatibility mode for extensions Magento states that security of the admin would be weaken.

http://prntscr.com/8z9rqx

Please could someone explain exactly how it would be weaken? I have an instance where I have 20+ extensions which need this enabled to trying to figure out exactly what the security risks are


texts: How get all subcategories of specific category?

texts:
I have a file left.phtml for a vertical menu. I want to get all subcategories of specific category ID3. I have this code.

<?php if (!Mage::registry('current_category')) return ?>
<?php
$categoryId = 3;
$category = Mage::getModel('catalog/category')->load($categoryId);
$_categories = $category->getChildrenCategories();
?>
<?php $_count = is_array($_categories)?count($_categories):$_categories->count(); ?>
<?php if($_count): ?>

<?php echo $this->__('Каталог') ?>

                <?php foreach ($_categories as $_category): ?>
                    <?php if($_category->getIsActive()): ?>

                        <a href="<?php echo $this->getCategoryUrl($_category) ?>"<?php if ($this->isCategoryActive($_category)): ?> class="current"<?php endif; ?>>
                            <?php echo $this->escapeHtml($_category->getName()) ?>

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

<?php endif; ?>

Example:

Category ID 3 (level 0)
  Category (level 1)
    Subcategory (level 2)
      Subcategory (level 3)
    Subcategory
      Subcategory (level 3)
    Subcategory
      Subcategory (level 3)
  Category (level 1)
    Subcategory
    Subcategory
    Subcategory
  Category (level 1)
    Subcategory
    Subcategory
    Subcategory


texts:
I'm using ajax in Magento 2 admin. But it not working.

My controller:

class CustomAjax extends \Magento\Backend\App\Action{

protected $resultJsonFactory;

public function __construct(
    \Magento\Backend\App\Action\Context $context,
    \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory

)
{
    parent::__construct($context);
    $this->resultFactory = $resultJsonFactory;
}

public function execute()
{
    $resultJson = $this->resultJsonFactory->create();

    return $resultJson->setData([
        'messages' => 'Successfully. Params: ',
        'error' => false
    ]);
}
public function indexAction(){
    return $this->resultJsonFactory->create()->setData(['a' => 'b']);
}}

If I use url of jQuery ajax without isAjax=true it say 302 found error in response.
If I use isAjax=true for url ajax it say invalid form key....
When I add form_key: "form key value" in data:{} of ajax it say 404 Forbidden.

Please help me, thank so much!

--- update

My url in this case is
http://localhost/magento/admin/mymodule/customAjax/index/key/417a3857c3ee5d1ec2c2c474ce5ce0a217779619d313b12e0d668b950ac80d9d/?isAjax=true

and this is ajax:

jQuery.ajax({
    type:"POST",
    url: ajaxUrl,
    data:{
        form_key: formKey
    },
    beforeSend : function(data){

    },
    success : function(data){

    }
});

formKey in this case is u5XSzd7EmRKQM7kN

But it say 404 Forbidden error.


texts: Magento 2: How to display 'attribute data' to product page?

texts:
I made an attribute using

  Store->attribute->product

and its text type and its name is

  add_text_area

It's showing on the admin side and I can upload an image using WYSIWYG. And it's showing like this  In this add_text_area there is image uploaded . Now I want to show it on my product description page. I'm using this line to do that

<?php echo $_product->getAddTextArea()?>

into my details.phtml file but nothing is appearing ? what should I have to post images on page now ?

detail.phtml file code is

<?php
// @codingStandardsIgnoreFile
?>
<?php
    $theme = $this->helper('Infortis\Base\Helper\Data');

    $showTabs = $theme->getCfg('product_page/tabs'); //$block->getData('show_tabs');
    //$mode = $theme->getCfg('product_page/tabs_mode');
    //$threshold = intval($theme->getCfg('product_page/tabs_threshold'));
    //$initCollapsed = $theme->getCfg('product_page/tabs_collapsed');
    //$reviewsInCollateral = $theme->getCfg('product_page/collateral_reviews');

    $containerClasses = '';
    $tabsClasses = '';
    if ($showTabs)
    {
        $containerClasses .= ' collateral-tabs';
        $tabsClasses .= ' ' . $theme->getCfg('product_page/tabs_style');
        // $tabsStyle = $theme->getCfg('product_page/tabs_style');
        // switch ($tabsStyle)
        // {
        //     case 'style-luma':
        //         $tabsClasses .= ' style-luma';
        //         break;
        //     case 'style1':
        //         $tabsClasses .= ' style1';
        //         break;
        //     case 'style1-small':
        //         $tabsClasses .= ' style1 style1-small';
        //         break;
        // }
    }
    else
    {
        $containerClasses .= ' collateral-stacked';
    }

?>
<?php if ($detailedInfoGroup = $block->getGroupChildNames('detailed_info', 'getChildHtml')):?>

    <div class="product info detailed box-collateral<?php echo $containerClasses; ?>">
         <?php $layout = $block->getLayout(); ?>
        <div class="product data items<?php echo $tabsClasses; ?>" <?php if ($showTabs): ?>data-mage-init='{"tabs":{"openedState":"active"}}'<?php endif; ?>>
            <?php foreach ($detailedInfoGroup as $name):?>
                <?php
                    $html = $layout->renderElement($name);
                    if (!trim($html)) {
                        continue;
                    }
                    $alias = $layout->getElementAlias($name);
                    $label = $block->getChildData($alias, 'title');
                ?>
                <div class="data item title"
                     aria-labeledby="tab-label-<?php /* @escapeNotVerified */ echo $alias;?>-title"
                     data-role="collapsible" id="tab-label-<?php /* @escapeNotVerified */ echo $alias;?>">
                    <a class="data switch"
                       tabindex="-1"
                       data-toggle="switch"
                       href="#<?php /* @escapeNotVerified */ echo $alias; ?>"
                       id="tab-label-<?php /* @escapeNotVerified */ echo $alias;?>-title">
                        <?php /* @escapeNotVerified */ echo $label; ?>

                <div class="data item content" id="<?php /* @escapeNotVerified */ echo $alias; ?>" data-role="content">
                    <?php /* @escapeNotVerified */ echo $html; ?>

            <?php endforeach;?>

<?php endif; ?>

<button type="button" id="review_id">Write Review</button>


texts: search suggestions and recommendation diffrence

texts: Whats the difference between search suggestion and search recommendation in Magento. If the Ajax request in search bar is search suggestion, then what is search recommendation. whats the purpose of 'Enable Search Recommendations' in Admin panel. Can we disable search suggestions (Ajax request).


texts: Find product without images and Product images without lable

texts:
After lots of try finally I manage to import bulk of products in magento.

Now How I can do get SKU of product if:

products without images.

OR

Images without lable.

Thanks in advance


texts:
I want to have a block (contains a image and some text, nothing overly fancy) appear on the top of the products in a category page when it is on desktop, then on mobile I want it to be on the bottom of the products in the category page. I have figured out that how to put the block on the top with this XML:

<referenceContainer name="category.product.list.additional">
   <block class="Magento\Cms\Block\Block" name="cat_arista">
       <arguments>
            <argument name="block_id" xsi:type="string">cat_arista</argument>
       </arguments>
   </block>
</referenceContainer>

But how would I adjust this to show up on the bottom for mobile? I was thinking another layout update call, but I'm not sure if that will lead to it showing up twice. I am using Magento 2, and the pearl theme.

Edit:

I don't know what container would be the bottom the of the product list. I am using this list from github, but I'm not sure which one to use.

I also don't think that I can do any css magic because it still will show up in both places?

New edit:
The container for the bottom of the product list is  content.bottom . I'll post my css magic as an answer if I figure it out!


texts:
Modifying an existing, functioning module, so assume the prerequisite setup code is fine. Adding to /app/code/local/Company/MyModule/etc/config.xml within <frontend/>:

        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>Company_MyModule</module>
                    <frontName>mymodule</frontName>
                </args>
            </mymodule>
       </routers>

Created /app/code/local/Company/MyModule/controllers/IndexControlller.php:

<?php
    class Company_MyModule_IndexController extends Mage_Core_Controller_Front_Action {
        public function IndexAction() {
            die('hello, world');
        }
    }

Going to the expected address (www.company.com/mymodule) returns a 404 response.


texts: 403 Permission Denied after modifying permissions

texts:
Hoping someone can help me.  I run version 1.8.1 of Magento Community on a VPS running Debian 7.4, PHP 5.4.4 and MySQL 5.3.35.  I have used this page as my reference to know what permissions I should be setting.  http://www.magentocommerce.com/knowledge-base/entry/install-privs-after

I created 2 scripts on my VPS, one to set permissions to allow extensions and other changes and one to set them to the recommended as per the above link.  The scripts are below.  The one to secure my installation works great.  The issue is the unsecure one is not working right.  It was working last week, but for some reason, something has changed and it no longer does.

When I run the unsecure script, I get 403 Permission Denied errors on ALL pages which I don't understand.  Can anyone help me with where I am going wrong?  The above link said 600/700 for the permissions which I tried originally, and then swapped to 677/777.  I also added chown -R www-data . just in case, but that didn't do anything either.

SECURE

#!/bin/bash

clear

echo "Setting File Permissions."

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

echo "Setting Directory Permissions."

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

echo "Setting /var File Permissions."

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

echo "Setting /media File Permissions."

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

echo "Setting /var Directory Permissions."

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

echo "Setting /media Directory Permissions."

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

echo "CHOWNing files and folders to www-data"

chown -R www-data .

echo "Operation Complete."

UNSECURE

#!/bin/bash

clear

echo "Setting File Permissions."

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

echo "Setting Directory Permissions."

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

echo "Operation Complete."


texts: DHL is not working with production API url

texts:
I'm stuck on this issue with DHL on Magento 1.7.1 :

Symptoms:

If I use the test DHL API url I got the a correct response from DHL (https://xmlpitest-ea.dhl.com/XMLShippingServlet)
if I use the production DHL API url (https://xmlpi-ea.dhl.com/XMLShippingServlet) the XML request is correctly created by Magento but I got no XML response from DHL.

Details:

DHL response is empty
an exception is trigger by and cached in Zend_Http_Response(579) and then caught in Mage_Usa_Model_Shipping_Carrier_Dhl_International(849):
Error parsing body - doesn't seem to be a chunked message

I contacted DHL but they say everything is correct on their side.

Any one is experiencing same problem ? what I should check ?

Thanks you in advance


texts: How to show category page on home page in Magento 2

texts: This is driving me mad.I do not know which is best format & how to show all category in home page.


texts: Magento 2 layered navigation with checkbox with multi select

texts:
I would like to implement layered navigation with checkbox instead of links in my Magento 2 project.

What would be the best way to achieve this?


texts: Get cms page in template file does'nt work after edit cms page Magento 1.9

texts:
I have loaded a cms page in a template file. But after an edit to the cms page, I get an white page instead of this cms page.
I am using the following line to get the cms page.

echo $this->helper('cms')->getBlockTemplateProcessor()->filter(Mage::getModel('cms/page')->load($this->getPrivacyCmsPageIdentifier())->getContent());


texts: Getting No such entity with cartId = {quoteId} on Guest Checkout issue

texts:
I saw several posts about this issue, with getting the following error message: No such entity with cartId = {quoteId} but none of them worked for me :( Or I didn't find exactly what is the cause of this issue.
I did my own research as well on this and I found out the following:

this happens with guests

it happens 1,2 or 3 times in a day on our production environment

this is shown once a payment method is  selected

it makes a post request to
{base_url}/rest/default/V1/guest-carts/{maskID}/payment-information
and returns 404 as a status code

I believe the error is thrown from: \Magento\Checkout\Model\GuestPaymentInformationManagement::savePaymentInformation. This is the content of that method
public function savePaymentInformation(
    $cartId,
    $email,
    \Magento\Quote\Api\Data\PaymentInterface $paymentMethod,
    \Magento\Quote\Api\Data\AddressInterface $billingAddress = null
) {
    $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
    /** @var Quote $quote */
    $quote = $this->cartRepository->getActive($quoteIdMask->getQuoteId());

    if ($billingAddress) {
        $billingAddress->setEmail($email);
        $quote->removeAddress($quote->getBillingAddress()->getId());
        $quote->setBillingAddress($billingAddress);
        $quote->setDataChanges(true);
    } else {
        $quote->getBillingAddress()->setEmail($email);
    }
    $this->limitShippingCarrier($quote);

    $this->paymentMethodManagement->set($cartId, $paymentMethod);
    return true;
}

More exactly from this line:
$quote = $this->cartRepository->getActive($quoteIdMask->getQuoteId()); . If I replace manually the $quoteIdMask->getQuoteId() with a random number. I am able to reproduce the issue somehow.

Once this error message is displayed in the checkout a pending order is registered. Please note that I'm getting a valid quoteId or cartId. I'm NOT getting a null value or zero(0). I believe those issues are different from mine.

Do you have any idea how to approach this ? What are your thoughts ? Have you encounter this issue in the past ?
Thanks in advance for any ideas or possible solutions


texts: Subcategory Descriptions not always showing for every subcategory

texts:
I've got one of these situations which now is taking me already 2 days but I cannot get my head wrapped around it.
I just cannot find out why on two different subcategory pages, on one the description is shown, and on the other one, no matter what I do, it will not whow.

Here it works: https://www.persempretoys.nl/seo/kidkraft-poppenhuis all the way down on the page is the standard description for this category.
But here it doesn't: https://www.persempretoys.nl/seo/kidkraft-keuken
And these categories are built up in the exact same way.

So in the app/design/frontend/{package}/{theme}/template/catalog/category/view.phtml there is this section which invokes the description:

<?php if($_description=$this->getCurrentCategory()->getDescription()): ?>
        <div class="category-description std">
            <?php echo $_helper->categoryAttribute($_category, $_description, 'description') ?>
        </div>
    <?php endif; ?>

It is a Magento 1.7.0.2 shop, but I cannot get this one solved quickly.
Any ideas from you ? Or anymore people who have encountered this ?

Edit: Background info added


texts: How to categorize the products in their respective category?

texts:
I want products like apple, orange etc in fruits category and fish in fresh fish category. How can i group them accordingly ? For example:

Fruits -> apple, orange.

Fresh Fish-> Bangude (Medium) fish, Kolathuru.

Please help. Thank You.


texts: SOAP error: Parsing WSDL: Couldn't load from "" failed to load external entity

texts:
We are developing an android app for a magento site. We have to pass SOAP API from magento to android to get session id.

We created SOAP web user and roles in magento admin panel by following this link:

https://www.yireo.com/tutorials/magebridge/administration/596-step-by-step-create-a-magento-api-user

When we try to connect from android to magento, we are getting error. This is the link we are using:

http://videomergerapp.com/index.php/api/v2_soap/


texts: Magento 2 how to use sales_quote_save_after Event?

texts:
I would like to call an observer called 'salesQuoteSaveAfter' in magento 2 but it is not working could you please guide me or suggest me  whether i did mistake.

File Paths:

1) app/code/Ewall/CustomPrice/Observer/SalesQuoteSaveAfterCustom.php

namespace Ewall\CustomPrice\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\App\RequestInterface;

class SalesQuoteSaveAfterCustom
{
    protected $checkoutSession;

        public function __construct(\Magento\Checkout\Model\Session $checkoutSession)
        {
        $this->checkoutSession = $checkoutSession;
        }
    public function invoke($observer)
    {
        $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/test.log');
        $logger = new \Zend\Log\Logger();
        $logger->addWriter($writer);
        $logger->info('invoke function is calling');

        $quote = $observer->getEvent()->getQuote();

        /* @var $quote \Magento\Quote\Model\Quote */

        if($quote->getIsCheckoutCart())
        {
        $this->checkoutSession->getQuoteId($quote->getId());
        }
     }
}

2 ) app/code/Ewall/CustomPrice/etc/frontend/events.xml

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

could you please help me. thanks


texts: May I see an example of a properly formatted Magento CSV with grouped products?

texts: I would like to review it to take the same approach on a DB that Im scrubbing.  We are moving a large amount of old html table data to a DB. I've already exported a base file for the headers. I'm looking for one that has grouped products so I can review the correct fields and expectations.


texts: Migration of customers and orders from magento to magento 2

texts:
What things to be kept in mind while the migration of customers and orders from an old store in Magento1 to a store in Magento 2.0.

And is there any filter from which I can filter the history of last 4 years and keep and drop the rest??


texts: Magento 2 installation to use Extensions

texts:
i know is a bit boring ...

How I have to install magento 2 that I can simple use the Extension Manager?

If I try to use the Extension Manager I get these errors:

Check Updater Application Availability
Check Cron Scripts
Check Component Dependency
PHP Settings Check
PHP Extensions Check

Funny is if i check : For additional assistance, see updater application help > devdocs.magento give me : Set up the updater (obsolete).

What I did to install:
Git clone -> Composer install etc.
Write permissions two user situation : the magento user is part of www-data and www-data is the owner of apache2, also.

Thanks to everyone who can give me a hand.


texts: Magento 2 child theme: CSS files not included

texts:
I want to add some CSS files. So I created a child theme.

In Backend the theme is activated.

theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
   <title>Customtheme</title>
   <parent>Smartwave/porto</parent>
</theme>

Magento_Theme/layout/default_head_blocks.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <head>
        <css src="css/styles.css" />
        <css src="css/paymentfont.min.css" />
    </head>
</page>

CSS files

web/css/styles.css
web/css/paymentfont.min.css

I cleared the cache, deployed the static data and also reindexed.
The static files were created but not included.

Any ideas?


texts: add store points to the customer account in magento

texts:
customer will order product from site.

if they got damaged product, they will return the product.

if some customers reject the product , we want to add store points for the customer account.

so using the store points customers can buy other products.

how to do this in magento.

or is we have to use some extensions for this.

please guide me about this.

thanks in advance.


texts:
Inside file app/code/core/Mage/Sales/etc/config.xml, there is:

<sales>
    <class>Mage_Sales_Model</class>
    <resourceModel>sales_resource</resourceModel>
</sales>
<sales_entity>
    <class>Mage_Sales_Model_Entity</class>
    <entities>
        <quote>

sales_quote

        </quote>
        ...
    </entities>
</sales_entity>
<sales_resource>
    <class>Mage_Sales_Model_Resource</class>
    <entities>
        <quote>

sales_quote

        </quote>
        ...
    </entities>
</sales_resource>

What do these <entities> tags represent exactly? How to interpret them? I see they contain all the table names, but how does the tables declared under <sales> relate to the ones under <sales_resource>? Why does <sales> have a <resourceModel> element and <sales_entity> does not?

I would like to query shipping data related to orders, possibly joined with some other product and customer data. I am trying to figure out how to get the proper resource model object for sales_flat_shipment, then join it with sales_flat_order_item for example.


texts: Magento 2 - How to get attribute options array for inserting the data using rest api

texts:
I have json array for attribute options which is showing below:

"options":[
 {
  "label":"string",
  "value":"string",
  "sort_order":0,
  "is_default":true,
  "store_labels":[
   {
    "store_id":0,
    "label":"string"
   }
  ]
 }
],

So I need that types of data by the magento 2 collection for particular attribute id or code.

I need to add/edit attribute options data using rest api in magento 2

Please provide me collection, thanks in advance.


texts: Cron.php file script not woking in Magento 2.1.6

texts:
I had created cron.php file  in my project and added the script.This is the code inside the file and setup cron job once per 5 minutes successfully even I got mail notifications too.

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento indexer:reindex

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cron:run

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/update/cron.php

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento setup:cron:run

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cache:clean

/usr/local/bin/php /usr/local/php56/bin/php-cli /home/username/public_html/bin/magento cache:flush

Whenever the cron file is running there should be a change in cron_shedule table,unfortunately I found that there is no change in the table.But when I run the command through ssh (magento cron:run) values are generated in table and showing status as pending .


texts:
I want to add a product grid in Dynamic Rows using Modal what I have done so far is

I have added this button using Adding Modal in Ui Component

add added a  Product Grid in Modal

But I am not getting selected products on form submitting

I think there is an issue with data-form-part when I submit product I get selected id with form

please let me know hat will be data-form-part if the input of htmlContent in dynamic Rows


texts: how to set default value for fields in admin panel

texts:
I have created tabs, sections, groups and fields successfully in magento admin panel.
Now I want to create default values for my fields of type text or text area.
I have given proper values in my module config.xml file but I could not succeed. please help me on this.