texts: Magento failing silently, block not being called

texts:
I have been working on a module, and last time I checked it displayed as expected. I have now gone to work on other modules and now I have come back to this module it has stopped working and I don't understand why (the Magento header/footer and sidebars are being displayed, but not the content area). Obviously I have changed something somewhere, but I cannot work out where.

I have errors switched on and there are no error showing up in var/log or var/report. Cache is switched off and I don't think any of the xml files within this module was changed.

Due to my module not being displayed I will guess its a misconfigured xml file, but i've looked (and looked) but cant see the problem.

This is an issues I often come across and was wondering if anyone can offer any advice on what steps I should take to solve the issue? is there a a tried and tested method of steps to take to resolve such an issue or is it just look and get very frustrated?

So far I have:

echoed directly from the the Action (text was displayed)

echoed directly from the the Block (nothing was displayed)

compared files since my last upload to git and there are no differences between the code.

My code is as follows (just incase there is an issue i haven't spotted)

app/design/frontend/base/default/layout/ps_prefs/prefs.xml

<layout>
<prefs_index_signup>
    <reference name="content">
        <block type="prefs/signup" name="prefs_new" template="ps/prefs/new.phtml" />
    </reference>
</prefs_index_signup>
</layout>

app/code/local/Ps/Prefs/Block/Signup.php

class Ps_Prefs_Block_Signup
extends Mage_Core_Block_Template
{
public $key;
public $locale;

public function _construct()
{
    $this->setKey();
    $this->getLocale();
}

app/code/local/Ps/Prefs/etc/config.xml

<global>
    <models>
        <prefs>
            <class>Ps_Prefs_Model</class>
            <resourceModel>prefs_resource</resourceModel>
        </prefs>

        <prefs_resource>
            ....resources.....
        </prefs_resource>
    </models>
        <blocks>
        <prefs>
            <class>Ps_Prefs_Block</class>
        </prefs>
    </blocks>
</global>
<frontend>
    <layout>
        <updates>
            <prefs>
                <file>ps_prefs/prefs.xml</file>
            </prefs>
        </updates>
    </layout>
    <routers>
        <prefs>
            <use>standard</use>
            <args>
                <module>Ps_Prefs</module>
                <frontName>prefs</frontName>
            </args>
        </prefs>
    </routers>
</frontend>
</config>

app/code/local/Ps/Prefs/controllers/IndexController

 class Ps_Prefs_IndexController
    extends Mage_Core_Controller_Front_Action
{
public function signupAction()
{
    $this->loadLayout()->renderLayout();
}

===

EDIT

===

I have broken the layout.xml and still have no errors, so I can see that is not being called, but as you will see from my above code it configured in the config.xml

I have also checked every page in this module and all have the same issue.

Using this line var_dump(Mage::getSingleton('core/layout')->getUpdate()->getHandles()); I can see prefs_index_signup handle is being called


texts:
How can I set a default value in a magento admin dropdown?

Here's my system.xml

<related_items_to_display translate="label" module="ddg">
                            <label>Items To Display</label>
                            <frontend_type>select</frontend_type>
                            <source_model>automation/adminhtml_source_dynamic_gridview</source_model>
                            <sort_order>30</sort_order>
                            <show_in_website>1</show_in_website>
                            <show_in_default>1</show_in_default>
                            <show_in_store>0</show_in_store>
                        </related_items_to_display>

And I've got my source model here:

public function toOptionArray()
{
    return array(
        array('value' => '2', 'label' => '2'),
        array('value' => '4', 'label' => '4'),
        array('value' => '6', 'label' => '6'),
        array('value' => '8', 'label' => '8'),
    );

}

Is there a way to set default value to 8? Without changing the order of this array?


texts: MFTF stand alone - Could not retrieve API token from Magento Instance (302 Found) error

texts:
I installed MFTF stand alone and have a magento instance. Just following the getting started document before I write tests of my own. When generated/run the test it gives error -  Could not retrieve API token from Magento Instance (302 Found).

Any help is really appreciated

In ModuleResolver.php line 444:

Could not retrieve API token from Magento Instance (302 Found)

generate:tests [-c|--config CONFIG] [-f|--force] [-i|--time TIME] [-t|--tests TESTS] [-d|--debug] [-r|--remove] [--] [...]


texts:
I have some difficulties to convert some phtml codes into php (note: simple conversion with online tools html to php does not work therefore please do not answer if it is to refer online tool).
Below is the phtml code that I would like to add in .php file:

<?php
$_product = Mage::getModel('catalog/product')
                ->setStoreId($_item->getOrder()->getStoreId())
                ->load($_item->getProductId());
?>

<img src="<?php echo Mage::helper('catalog/image')
                         ->init($_product, 'image')
                         ->constrainOnly(TRUE)
                         ->keepAspectRatio(TRUE)
                         ->keepFrame(FALSE)
                         ->resize(100,100); ?>"
alt="<?php echo $_item->getName() ?>" />

When I converted to php I added those lines as below the code is not working:

         $order  = $this->getOrder();
            $item   = $this->getItem();
            $pdf    = $this->getPdf();
            $page   = $this->getPage();
            $lines  = array();
    echo "<?php $_product = Mage::getModel('catalog/product')->setStoreId($_item->getOrder()->getStoreId())->load($_item->getProductId()); ?>";

            // draw Product name
            $lines[0] = array(array(
   echo "
<img src=\"<?php echo Mage::helper('catalog/image')->init($_product, 'image')->constrainOnly(TRUE)->keepAspectRatio(TRUE)->keepFrame(FALSE)->resize(100,100); ?>\" alt=\"<?php echo $_item->getName() ?>\" />
";
                'text' => Mage::helper('core/string')->str_split($item->getName(), 50, true, true),
                'feed' => 35,
            ));

Therefore can you tell me what should I modify to make it work?


texts: Magento/Apache internal redirects hang the server

texts:
I've asked a similar question on StackOverflow, but to no avail. Here is the issue I've been facing for the last few weeks:

Once in a while our Apache server hangs, to bring everything back up I'm forced to run service apache2 restart. Each time the server hangs I review Apache logs and I see the same thing:

[error] [client 66.249.75.233] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

This entry is repeated sometimes 10, 20, 30+ times all within 5-10 seconds of each other just before the server goes down and seems to randomly pop in throughout the day. I am almost certain this is what is causing Apache to hang. Now, the IP is from one of Googles Bots and I've tried literally everything I can think of to remedy the internal redirect without any luck :(

Here is what I've tried:

Used the default .htaccess files from a stock Magento EE 1.13
installation. The log entries still show up in the log.
Tried running tail -f on error.log and rewrite.log with
RewriteLogLevel 4 side-by-side to try and see if I can catch the internal redirect in the rewrite log. Nothing. I can see the new entries in the error.log, but there is absolutely nothing in the rewrite.log
Tried enabling LogLevel debug and grepping for the 66.249.75.233
IP. Nothing.
Tried setting LimitInternalRecursion 3 in
<VirtualHost>...</VirtualHost>. Again, the entry is logged saying Request exceeded the limit of 10 internal redirects...
Tried different .htaccess configurations such as:
RewriteCond %{ENV:REDIRECT_STATUS} 100
RewriteRule .* - [L]
Or setting: RewriteBase /. Still can't get rid of the error.
Even tried blocking the IP in Apache and in the server firewall. The entry still shows up WTF!!!

We are running a single domain website so I've combined all of Magentos .htaccess files into one (99% stock Magento .htaccess) and the only mod_rewrite directives are:

# Magento root directory
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^.*\.html$ /index.php [L] # I added this rewrite to skip all the other condition checks and push all *.html requests directly into index.php
    RewriteCond %{REQUEST_URI} !^/robots\.txt
    RewriteCond %{REQUEST_URI} !^/(media|skin|js|var)/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule .* index.php [L]
</IfModule>

and

# Magento media directory
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* /var/www/barebones_live/get.php [L]
</IfModule>

Worst of all, I can't replicate this error myself!

I am completely clueless as to how to track down this entry now and why it is occurring. ANY help or pointers would be greatly appreciated. Perhaps I can try an track this down through Magento, but where would I start? Hmm, maybe I can Mage::log() in the index controller for all URL requests and see how things go from there..?


texts: How to override app/code/core/Mage/Core/Controller/Varien/Router/Admin.php?

texts:
I want to override core class of Magento 1: app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
How I can do that?


texts: Adding Product Image/Gallery Without Loading the Whole Product

texts:
Is there a way to add images to a product without loading the whole product? updateAttributes() is definitely fast when updating a product but when adding an image to a product, this function is needed:

$product->addImageToMediaGallery($_filepath, array('image', 'small_image', 'thumbnail'), true, false);


texts: What kind of Magento (2.3) Installation is Best for Future any Updates?

texts: For further future updates what kind of installation is best  , Command-line installation (or) Setup Wizard installation


texts:
In layered nav shop by manufacturer filter we want for bundles and configurable products only to be displayed on the catalog list where the parent SKU manufacturer matches the filter.  Default magento will show other brands if they are a child of the bundle.

For instance, say you sell Sony TVs in bundles with Bose speakers.   If you set your filter to Sony, you will see this bundle.  Great, fine.

Now say you also in same electronics category sell just Bose speakers alone.  So you set your filter to Bose, now you see all Bose speakers, but also the Sony bundle displays because there is a Bose child product in that bundle.

We want the filter to only filter the parent manufacturer site wide.


texts: Magento2 The product's required option(s) weren't entered. Make sure the options are entered and try again

texts:
$product = $this->productFactory->create()->load($productId);

        $params = [
    'form_Key' => $this->formKey->getFormKey(),
    'product' => $productId,
    'qty' => '1',
    'options' => [
        '2' => '3',
    ],
];

        $this->cart->addProduct($product, $params);
        $this->cart->save();

I am using above code to pass Customizable options data to cart, but getting error

The product's required option(s) weren't entered. Make sure the
options are entered and try again.


texts:
I have a controller that is executed in the system configuration.  The desired result is that the code is executed and is redirected back to its original page.  When the url keys are active, the page is always redirected back to the admin dashboard rather than the system configuration.  When the keys are off, the redirect works as intended.  How can I do a proper redirect with the keys on?

  public function execute()
{
    $this->helper->testConnections();
    $this->_redirect('admin/system_config_edit/edit/section/settings/');
}


texts: Undefined offset in Abstract.php / Continue to checkout button doesn't work

texts:
I have upgraded to Magento 1.9.2 and am using the rwd theme (with a few tweaks). I have checkout as guest enabled. When you get to the stage in ordering where you choose between 'Checkout as Guest' or 'Register and Checkout', no matter which option you choose the continue button does not work. I enabled logging and the following errors were in the log although they don't seem to be created by clicking the continue button as such, i.e. clicking the button repeatedly does not create any more errors. Could they nonetheless be the reason the button isn't working?:

 ERR (3): Notice: Undefined offset: 1 in /var/www/html/magento/lib/Zend/Db/Adapter/Abstract.php on line 814

and

 ERR (3): Notice: Undefined offset: 1 in /var/www/html/magento/app/code/local/Bintime/Sinchimport/Model/Layer/Filter/Price.php on line 146

The code around line 814 in Abstract.php is:

 public function fetchPairs($sql, $bind = array())
 {
      $stmt = $this->query($sql, $bind);
      $data = array();
      while ($row = $stmt->fetch(Zend_Db::FETCH_NUM)) {
            $data[$row[0]] = $row[1];   //This is line 814
      }
      return $data;
 }

The code around line 146 in Price.php is

 protected function _getItemsData()
 {
      $import=Mage::getModel('sinchimport/sinch');
      $price_breaks=$import->price_breaks_filter;

      if(strstr($price_breaks, ';')){
          $price_ranges = explode(';', $price_breaks);

          foreach ($price_ranges as $price_range) {
                $price_range_value=trim($price_range);
                if($price_range && $price_range!=''){

                     $price_range = explode('-', $price_range);
                     list($minPrice, $maxPrice) = $price_range;  // This is line 146
                     if(((int)$minPrice || $minPrice==0) && ((int)$maxPrice || $maxPrice=='*')){
                          $count=$this->_getResource()->getCountMinMaxPrice($this, $minPrice, $maxPrice);
                          if($count){
                              $data[] = array(
                                      'label' => $this->_renderItemLabelMinMaxPrice($minPrice, $maxPrice),
                                      'value' =>$price_range_value,
                                      'count' => $count,
                                       );
                           }
                      }
                }
           }
           if($data){
               return $data;
           }
       }

       $range         = $this->getPriceRange();
       $dbRanges      = $this->getRangeItemCounts($range);
       $data          = array();

       foreach ($dbRanges as $index=>$count) {
           $data[] = array(
                   'label' => $this->_renderItemLabel($range, $index),
                   'value' => $index . ',' . $range,
                   'count' => $count,
                   );
        }

        return $data;
  }


texts: Paypal error 10486, redirected back to magento from paypal

texts:
Here is high level overview of how the paypal error 10486 is occurring in our magento store.

1. User adds items into our magento cart
2. select paypal as the payment method
3. user is directed to the paypal page. if the user inputs an expired credit card or just incorrect information...
4. user is redirected back to our magento store

The error that the user sees is:

"This transaction couldn't be completed. Please redirect your customer to PayPal (#10486: This transaction couldn't be completed)."

according to the paypal documentation Paypal Documentation available here, we should be able to redirect our user back into the paypal experience.
However, I cannot seem to find any location in the magento backend to set up this parameter, and know that I should never, ever have to touch core files. Unsure where I need to go with in magento to resolve this.


texts: Magento 1.* SUPEE 9767 "Reversed or previously applied patch detected

texts:
I am currently trying to apply patch SUPEE 9767 v2 to one of our legacy sites running Magento 1.9.2.4, however when I try to run it, I receive the following:

checking file app/design/frontend/base/default/template/checkout/cart/shipping.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/multishipping/billing.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/onepage/billing.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/onepage/payment.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/layout/page.xml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.

The errors seem to indicate that the patch has already been applied, but according to MageReport.com, that isn't the case. I've tried diff-ing the files to core, but can't seem to figure out what's wrong. Any ideas?


texts: Changing admin url in local.xml has no affect after flushing cache

texts:
I have multiple sites and changing the admin URL is a standard procedure. Update local.xml frontname value and flush the cache.

I have one site where this does not work. System->Configuration->Admin->Admin Base URL options are set to 'NO'. The /admin url always remains accessible and nothing else takes affect.

I'm not the first developer on this site. What else could be controlling this URL or is there some way to trace what is happening?


texts: What is the best way create user from guest user in magento 2

texts: I want to convert the guest user to the customer when guest user places the order.


texts: Can anybody share android app code for magento REST api

texts: I wanted sample android application which uses magento RESTful services ..so that i can browse all the products , catalog , customers , checkout and etc.


texts: product details page is featured attribute yes show attribute in magento 2.4

texts:
This attribute only show Is Featured Yes for attribute in product details page in magento 2.4

app/design/frontend/Magento/Theme/Magento_Catalog/templates/product/view/attributes.phtml

<?php
  $_helper = $this->helper(Magento\Catalog\Helper\Output::class);
  $_product = $block->getProduct();
?>

<?php if($_product->getAttributeText("test")): ?>

        <?= $_product->getResource()->getAttribute("test")->getStoreLabel() ?>:&nbsp;
        <?= $_product->getAttributeText("test") ?>

<?php endif; ?>


texts: How to add a custom data-bind function to a minicart item in Magento 2

texts: I'm trying to add some functionality to the minicart product items. On product list and view I was able to add this throught requirejs/knockout. Now, I can't find how to work with the minicart item. How can I add functions to the uiComponent for a minicart product item?


texts:
I am trying to print hello world using block and phtml file. here is my code,
app/code/Mageplaza/HelloWorld/Block/Display.php

<?php
namespace Mageplaza\HelloWorld\Block;
class Display extends \Magento\Framework\View\Element\Template
{
  public function __construct(\Magento\Framework\View\Element\Template\Context $context)
  {
      parent::__construct($context);
  }

  public function sayHello()
  {
      return __('Hello World');
  }
}

app/code/Mageplaza/HelloWorld/Controller/Index/Display.php

<?php
namespace Mageplaza\HelloWorld\Controller\Controller\Index;

class Display extends \Magento\Framework\App\Action\Action{
protected $_pageFactory;
public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\View\Result\PageFactory $pageFactory
)
{
    $this->_pageFactory = $pageFactory;
    return parent::__construct($context);
}
public function execute()
{
    return $this->_pageFactory->create();
}
}

view/frontend/layout/helloworld_index_display.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<referenceContainer name="content">
    <block class="Mageplaza\HelloWorld\Block\Display" name="helloworld_display" template="Mageplaza_HelloWorld::sayhello.phtml" />
</referenceContainer>
</page>

view/frontend/templates/sayHello.phtml

<?php

 /**
 * @var \Mageplaza\HelloWorld\Block\Display $block
 */

echo $block->sayHello();

etc/frontend/routes.xml

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


texts: Cannot buy via API due to the price always being zero

texts:
I have a fully working production site that I am trying to add API ordering to.

  I followed the sample here
  http://www.magentocommerce.com/api/soap/checkout/cart/cart.html

When I call cart_payment.list I only get back the "free" option

I add my item - which has a price - to the cart, and when I call cart.totals I get back

Array
(
[0] => Array
    (
        [title] => Subtotal
        [amount] => 0
    )

[1] => Array
    (
        [title] => Grand Total
        [amount] => 0
    )

[2] => Array
    (
        [title] => Insured Shipping & Taxes
        [amount] => 25
    )
)

As the price is always zero, I can't submit the order with cart.order because I get a SOAP exception

  SoapFault exception: [1] amount must be greater than 0

If anyone has any ideas after 2 days of trying numerous samples and approaches and ending up with the exact same result whatever I do, I'd be grateful to hear them


texts: Can I transfer database from public to development site using ftp?

texts: Can I transfer database (products & phots, clients, sales history) from public to development site using ftp?


texts: new password not send email for customer after reset ,magento 1.9.2

texts: I have no problem sending email to another section, only not working to send template password_new.html from path: \app\locale\en_us\template\email


texts: Call to a member function beginTransaction() on a non-object when deployed to live

texts:
On my laptop everything works fine but when I deploy to our live test server I get:

Fatal error: Call to a member function beginTransaction() on a non-object in /var/www/html/magento82/app/code/core/Mage/Core/Model/Abstract.php on line 313

It seems to be happening when I call:

//this works fine
$scan = Mage::getModel('company_returnscans/scan');
...
//the error is here
$scan->save();

Here's my config.xml:

<global>
    <models>
        <company_returnscans>
            <class>Company_ReturnScans_Model</class>
            <resourceModel>company_returnscans_resource</resourceModel>
        </company_returnscans>

        <company_returnscans_resource>
            <class>Company_ReturnScans_Model_Resource</class>
            <entities>
                <scan>

return_scan

                </scan>
            </entities>
        </company_returnscans_resource>
    </models>
</global>

And I'm using this class:

class Company_ReturnScans_Model_Scan extends Mage_Core_Model_Abstract
{
    protected function _construct()
    {
        $this->_init('company_returnscans/scan');
    }
}

this class:

class Company_ReturnScans_Model_Resource_Scan extends Mage_Core_Model_Resource_Db_Abstract
{
    protected function _construct()
    {
        $this->_init('compnay_returnscans/scan', 'scan_id');
    }
}

and this class:

class Company_ReturnScans_Model_Resource_Scan_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
{
    protected function _construct()
    {
        $this->_init('compnay_returnscans/scan');
    }
}


texts: I am getting an error "An error occurred while saving the URL rewrite" in admin panel system -> Index manager -> Catalog URL Rewrites -> REINDEX REQUIRED. How can I fix this?


texts: Navigating away from catalog pages gets 404 page

texts:
User is at -

http://randomCompany.net/rental/wheelchairs.html

not looking at any specific product, just at that catalog page, they click a new menu link from the navigation,  that leads to a CMS page --

http://randomCompany.net/diabetic-shoes (this is the url that should show)

but the user is show a 404 page and the url is

http://randomCompany.net/rental/diabetic-shoes

it is adding in the /rental/  which is not correct.

Note - Url's work fine from the base catalog page, this problem only happens from sub category pages. I have tried URL rewrites. I could not find anything in the database. Any one have any insight here?

Thanks!


texts: Further questions about swapping cross-sells and up-sells

texts:
Last week I asked a question about swapping the two.  I was given a solution ( Is there a way to swap cross-sells and up-sells easily? ).
Today my guy tried to implement it and got this error:
Error Code: 1062. Duplicate entry '5-6194-9438' for key 'UNQ_mg_CAT_PRD_LNK_LNK_TYPE_ID_PRD_ID_LNKED_PRD_ID'

Is there something we're missing?


texts:
I made a custom module wich sends a email now i want to edit the module so that it automatically uses one of the store email adresses i saw something like Mage::app()->getStore()-> but i dont know how to use this to get store mailadress
I use zend

    $mail = new Zend_Mail();
    $mail->setBodyText($bericht);
    $mail->setFrom($email, $name);
    $mail->addTo("admin@magento.com", "sales manager");
    $mail->setSubject("Snel offerte");
    $tmpFilePath = $_FILES['foto']['tmp_name'];
    if ($tmpFilePath != ""){
        $file_size = $_FILES['foto']['size'];
        if (($file_size > 22020096)){
            Mage::getSingleton('core/session')->addError($this->__('Bestand mag niet groter zijn dan 21 MB'));
        }
        else{
            $fname = $_FILES['foto']['name'];
            $ftempname = $_FILES['foto']['tmp_name'];
            $at = new Zend_Mime_Part(file_get_contents($tmpFilePath));
            $at->disposition = Zend_Mime::DISPOSITION_INLINE;
            $at->encoding = Zend_Mime::ENCODING_BASE64;
            $at->filename = $fname;
            $mail->addAttachment($at);
        }
    }
    try {
        $mail->send();

    }


texts: What does this error mean and how can I solve it?

texts:
I have been seeing this error in the console:

Uncaught TypeError: Cannot set property 'touchstart' of undefined
at String.<anonymous> (jquery.mobile.customized.min.js:10)
at Function.each (jquery-1.10.2.min.js:2)
at jquery.mobile.customized.min.js:10
at jquery.mobile.customized.min.js:10
at window.define (jquery.mobile.customized.min.js:10)
at jquery.mobile.customized.min.js:10

Does anyone know what this mean and how I can solve it?

Looking forward to hear from you! Thanks in advance :)


texts: Magento 2.2 Programatically apply coupon code

texts:
How can i apply coupon code programatically in magento 2 using cart id.

Thanks.


texts: How to add a separate header template only for product listing page

texts:
<reference name="header">
        <action method="setTemplate">
            <template>page/html/header_b.phtml</template>
        </action>
    </reference>

This code will overwrite the header.phtml with new phtml file,

But i want this rewrite only in my product listing pages.I don't want to overwrite my header html files in product description page

How to achieve this
I am adding this as layout updates from my admin panel


texts: How we can extend Varien_File_Csv class in magento?

texts: I want to open CSV file in a+ mode for append content. I open Varien_File_Csv class and check for that but I did not found any option for open file in a+ mode.


texts: 'catalog_category_save_commit_after' this same event is available in magento2?

texts:
I have tried to get the category id to store in my custom table with some values like cat_id, custom_value.

here i googled and get "catalog_category_prepare_save" to get category object when saving the existing category but when adding new order how will i get category id?

please suggest any events is there in magento2 for "catalog_category_prepare_save"? or suggest to some other method?

here by add my codes:

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="catalog_category_prepare_save">
        <observer name="categoryattributes" instance="Namespace\Module\Observer\Categoryattributes"/>
    </event>
</config>

Categoryattributes.php

<?php
namespace Namespace\Module\Observer;

class Categoryattributes implements \Magento\Framework\Event\ObserverInterface
{
    private $category = null;
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
         $this->category = $observer->getEvent()->getCategory();
    }
}


texts: $filter->getLabel() appending layered navigation filter URL when used in observer

texts:
I am using the core_block_abstract_to_html_before event to get the labels of the active filters of the layered navigation. I load the filters like this:

$activeFilters = Mage::getSingleton('Mage_Catalog_Block_Layer_State')->getActiveFilters();
$labels = array();

foreach ($activeFilters as $filter) {
$labels[] = array('label'=> strip_tags($filter->getLabel()));
}

The problem is that the filter url is appended in double curly brackets to each value (this is the case for all values like attribute name, code, label etc.), so the values of my array look like this

[label] => XL{{http://www.mydomain.com/shopby/XL/}}

Anyone has an idea why this is happening and how to prevent this?


texts: Magento color swatch images have black background when created from product image with transparency

texts:
I was running into this issue with the new Magento Configurable swatches feature in 1.9:

Some of my product images are .png with a transparent background, and the color swatch images seem to default to a black background.

Swatch (auto-generated):

Product image:


texts: Config Path variables available in Static Blocks

texts:
I've tried to find an answer for this, but can't manage to.

I'm trying to access {{config path="design/header/logo_src"}} in a static block in Magento 1.9CE, but all design/header/* values seem to be inaccessible. Is there any way to use them in a static block?

Thanks for all your help.


texts: Magento2: Add a custom image and link below account navigation in account dashboard

texts:
below the account navigation is there an easy way for a newbie to add an image pointing to a page in the magento2?  This account navigation appears on the side of my account dashboard.
thanks!


texts: How to add Currency switcher in footer using magento 2.1

texts: i want to add Currency switcher in footer section.


texts: Magento Duplicate Content Issue .htaccess rewrite 301 forwarding

texts:
i have some issues with duplicate content on my website. in the past i had diverse stores setup and i disabled them but the urls seem to exist still. i would like to set up a forwarding rule example:

now i have 2 product pages:

website.com/product-abc-123

website.com/product-abc-123?___store=tienda

i would like to setup now that ?___store=tienda will always be redirected to original url. i have checked the ?___store=tienda product page holds the canonical link rel= canonical href= website.com/product-abc-123 but i would like to get rid of them as i have tons of them showing up in google webmaster tools.

same happens to my integrated blog in magento with the fishpig extension, i write blog articles and it seems that it creates duplicate content with the same url structure:

website.com/blog/category/article1.html

website.com/blog/category/article1.html?___store=tienda

Ideally i wish to create a rule in .htaccess file, what i could do already was to redirect all links from ?___store=tienda to home page adding following in .htaccess file

RewriteEngine On

RewriteCond %{THE_REQUEST} \?___store=tienda

RewriteRule ^(.*)$ /$1? [L,R=301]

source: https://stackoverflow.com/questions/16291281/rewriting-all-urls-with-a-question-mark


texts: Overriding a block inside Mage/Adminhtml

texts:
I am trying to override the following block but it isn't working for me

magento/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php

Here's my config file under app/etc/modules

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

And my module's config file

<?xml version="1.0"?>
<config>
    <modules>
        <MF_Adminhtml>
            <version>0.0.1</version>
        </MF_Adminhtml>
    </modules>
    <global>
        <blocks>
            <adminhtml>
                <rewrite>
<catalog_product_edit_tab_alerts_stock>MF_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock</catalog_product_edit_tab_alerts_stock>
                </rewrite>
            </adminhtml>
        </blocks>
    </global>
</config>

And the local php class is located under magento/app/code/local/MF/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php and looks like this

class MF_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Alerts_Stock
{
    protected function _prepareCollection()
    {
        $productId = $this->getRequest()->getParam('id');
        $websiteId = 0;
        if ($store = $this->getRequest()->getParam('store')) {
            $websiteId = Mage::app()->getStore($store)->getWebsiteId();
        }
        if (Mage::helper('catalog')->isModuleEnabled('MF_ProductAlert')) {
            $collection = Mage::getModel('mf_productalert/stock')
                ->getCustomerCollection()
                ->join($productId, $websiteId);
            $this->setCollection($collection);
        }
        return parent::_prepareCollection();
    }
}

Magento is still using the core block instead of the local one. Anyone got any ideas?


texts: How to automatically google map on fill address then checkout street address ,city ,state, and zip code fiil in may form for magento2

texts:
Hiii
    For magento2,
 We want to google map on fill address then checkout street address ,city ,state, and zip code fiil in field form for magento2


texts:
I'm going to be doing a hosting migration from an old provider.

I'm moving a live site and a testing site over.
They both have separate Magento 1.9.3 back-ends and separate databases.
I've made changes to the testing site (added a plugin) which has changed the schema of the database, and added some configuration code.

I now want to move the sites and databases over to the new host and merge my changes on test into the live site.
What I want to know:

Does Magento have some kind of migration tool that will allow me to preserve the up-to-date data in the live table, but apply the changes from test?
Or would it be best to re-install the plugins on the new site and then overwrite the files with the modified versions?

I noticed when I was moving the test site over, and refreshed the site before restoring the database, Magento appeared to populate itself. Is this the case with plugins?


texts:
Admin

I would like to remove link to admin panel, but there is no li class so I can't remove it by using default.xml file


texts: I have added a new media image attribute also added in the Attribute Sets but its not showing at all in the backend. Any ideas ?


texts: Magento 2 programmatically create cart rule with condition issue on setOperator

texts:
As per my requirement am creating the cart rule programmatically, for that i am reviewed the following code and implemented in my local

public function createRule()
{
    $price = 100;
    $sku = '24-WG085';
    $discount = ($price - (($price + 1) / 2));
    $shoppingCartPriceRule = $this->ruleFactory->create();

    $shoppingCartPriceRule->setName('Add a second for $1 - ' . $sku)
        ->setDescription('Buy one item at regular price, and receive a second item for just $1.00 more!')
        ->setFromDate('2000-01-01')
        ->setToDate(NULL)
        ->setUsesPerCustomer('0')
        ->setCustomerGroupIds(array('0','1','2','3',))
        ->setIsActive('1')
        ->setStopRulesProcessing('0')
        ->setIsAdvanced('1')
        ->setProductIds(NULL)
        ->setSortOrder('1')
        ->setSimpleAction('by_fixed')
        ->setDiscountAmount($discount)
        ->setDiscountQty(NULL)
        ->setDiscountStep('0')
        ->setSimpleFreeShipping('0')
        ->setApplyToShipping('0')
        ->setTimesUsed('0')
        ->setIsRss('0')
        ->setWebsiteIds(array('1',))
        ->setCouponType('1')
        ->setCouponCode(NULL)
        ->setUsesPerCoupon(NULL);

    $item_found = $this->foundProductRuleFactory->create()
        ->setType('Magento\SalesRule\Model\Rule\Condition\Product\Found')
        ->setValue(1) // 1 == FOUND
        ->setAggregator('all'); // match ALL conditions
    $shoppingCartPriceRule->getConditions()->addCondition($item_found);

    $conditions = $this->productRuleFactory->create()
        ->setType('Magento\SalesRule\Model\Rule\Condition\Product')
        ->setAttribute('sku')
        ->setOperator('==')
        ->setValue($sku);
    $item_found->addCondition($conditions);

    $actions = $this->productRuleFactory->create()
        ->setType('Magento\SalesRule\Model\Rule\Condition\Product')
        ->setAttribute('sku')
        ->setOperator('==')
        ->setValue($sku);
    $shoppingCartPriceRule->getActions()->addCondition($actions);

    $this->ruleResource->save($shoppingCartPriceRule);
}

But, when i execute the code i am getting the 'Uncaught Error: Call to a member function setOperator() on null.

I am not sure what is the exact problem in that setOperator, the following operators are available in core

$this->setOperatorOption(
            [
                '==' => __('is'),
                '!=' => __('is not'),
                '>=' => __('equals or greater than'),
                '<=' => __('equals or less than'),
                '>' => __('greater than'),
                '<' => __('less than'),
                '()' => __('is one of'),
                '!()' => __('is not one of'),
            ]
        );

Thanks in advance for your support and suggestion


texts: How to add custom configs variables to custom shipping method?

texts:
I have created a custom shipping method following this tutorial:

  https://www.mageplaza.com/devdocs/magento-2-create-shipping-method/

Now I would need to add a couple of extra variables to admin configuration, and save it in any place to use it later when the checkout is done.
How can I do that?
Thanks!


texts: How to print searchCriteriaBuilder query in Magento 2?

texts:
How to print searchCriteriaBuilder query in magento 2 ?
I tried below code but it is not working.
$childProductIds = [1,2,3];
    $sortOrder = $this->sortOrderBuilder->setField('price')->setDirection('ASC')->create();

    $this->searchCriteriaBuilder->setSortOrders([$sortOrder]);
    $this->searchCriteriaBuilder->addFilter('entity_id', $childProductIds, 'in');

    $searchCriteria = $this->searchCriteriaBuilder->create();
    $searchCriteria->setPageSize(1)->setCurrentPage(1);
    $productList = $this->productRepository->getList($searchCriteria);
print_r($productList->getSelect()->assemble());


texts: Can't load a custom template through getChildHtml

texts:
I'm using Magento 1.8.1 with lots of changes (difficult to update) and I would like to introduce the 1.9 rwd top menu for mobiles to my website because it's really interesting.
The way I want to do it is to add on my header.phtml

<?php echo $this->getChildHtml('rwdtopMenu'); ?>
<?php echo $this->getChildHtml('rwdtopSearch'); ?>
<?php echo $this->getChildHtml('rwdtopAccount'); ?>
<?php echo $this->getChildHtml('rwdtopCart'); ?>

and hide it via css with display:none when window width is lesser than a specific value.

A part from this, I've also added to my local.xml

<default>
    <reference name="root">
        <block type="core/template" name="rwdtopMenu" as="rwdtopMenu" template="rwdmenu/rwdtopmenu.phtml"/>
    </reference>
    <reference name="root">
        <block type="core/template" name="rwdtopSearch" as="rwdtopSearch" template="rwdmenu/rwdtopsearch.phtml"/>
    </reference>
    <reference name="root">
        <block type="core/template" name="rwdtopAccount" as="rwdtopAccount" template="rwdmenu/rwdtopaccount.phtml"/>
    </reference>
    <reference name="root">
        <block type="core/template" name="rwdtopCart" as="rwdtopCart" template="rwdmenu/rwdtopcart.phtml"/>
    </reference>
</default>

And in the location default/mytheme/template/rwdmenu I've created the file rwdtopmenu.phtml with some testing text on it.

Some testing text

But it displays nothing and I don't know why it could be. Any idea?


texts: Multiple Vendors; fetching the products per vendor

texts:
Obviously lots of posts here are made about multi vendors, this is not a problem I've got a module running for this.

What I am wondering if someone can push me in the right direction without screwing up; I would like to add category-like pages, which contain all products from a "vendor". Or easier said per admin user.

Anyone have an idea to push me in the right direction?

Vendors will use multiple global categories, so i can't just create category pages to resolve this.

Any hints on fixing them to appear in the menu / creating the overview page will be great.


texts: Why Magento 2 uses Knockout instead of Angular or React

texts:
My question is as simple as it says in the title.
Its why would Magento choose knockout instead of other frameworks like angular or react?

Is there a specific reason?

Also is this the right platform to ask this question?


texts:
i have just installed magento 1.9 along with a theme. but i keep getting this error message on the home page.

   <[!--{page/html_cookieNotice_global_cookie_notice}--]>  <[!--/{page/html_cookieNotice_global_cookie_notice}--]>
    <[!--{page/html_notices_global_notices}--]>
<[!--/{page/html_notices_global_notices}--]> <[!--{page/html_header_header}--]>

then just below my navigation i get this message:

<[!--/{page/html_header_header}--]>

no other content renders on page.

But this error does not render on any other page except the home page.

can anyone please give me a tip on how to debug it or clear it


texts: Magento2: Explanation requested for default behavior product weight notation

texts:
Could anyone explain me the default behavior of the product weight attribute with special regards to dot or comma notation?
I just debugged an issue in which a shipment module (myParcelNL) uses getWeight & getQuantiy on a product and multiplies them with eachother. One of the products had a type string weight of 1,135 and was using the comma notation, thus giving a non well numeric value error. Replacing the values with a dot notation on the product config page in the backend solved the error.
I however went to back to check on the product in the backend. I noticed the following (magento 2.3.5)
When I enter a value with a comma, example 1,5, it persists in the database with 1,5, but the input field changes to 1. However the product page shows 1,5.
When I enter a value with a dot value, everything works as expected. (1.5 is shown everywhere correctly and solves the bug mentioned above)
Is there no default validation to prevent comma notation? Or a function that changes it? What is the default behaviour regarding this? Or should clients just simply be informed to always use the dot notation? (seems a bit risky).
Thanks in advance


texts: Magento : Not able to set a custom template using an extension

texts:
I am creating a custom module to set a custom template for

vendor/magento/module-catalog/view/frontend/templates/product/view/options/type/default.phtml

but I am not able to override it. I have tried using XML like below

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="product.info.options">
        <block class="Magento\Catalog\Block\Product\View\Options\Type\DefaultType" as="default" template="Hemag_StockStatus::product/view/options/type/default.phtml"/>
    </referenceBlock>
</body>

Please let me know how to do this.


texts: How to attach file in email in magento 2.3.5-p2 laminas

texts:
i want to attach file in email
magento 2.3.5-p2
now they removed Zend Framework now they are using laminas

how i can attach file in email?
in previous versions
i have used this code to work with but
now latest versions not working

https://meetanshi.com/blog/add-attachments-with-email-in-magento-2-3-x/
any one have any source or blogs to solve this problem?


texts: Wrong price when products are loaded from collection

texts:
I have a Magento site with several stores. Each store displays products in different currency. I'm trying to load products from one of the stores using product collection.

$_col = Mage::getModel('catalog/product')->getCollection();
$_col->addAttributeToSelect('*');
$_col->addIdFilter($product_ids_to_be_loaded);
$_col->setStoreId($store_id);
$_col->addFinalPrice();

Unfortunately when I try to 'display' the price using:

for($_col as $p) {
    echo $this->getPriceHtml($p, true);
}

it displays wrong price (I assume it's price in default currency).

When I load products using:

$model = Mage::getModel('catalog/product');
for($_col as $p) {
    $p = $model->load($_product->getId());
    echo $this->getPriceHtml($p, true);
}

it works fine. How come? What am I doing wrong?


texts: Magento 2.2 html tags display on frontend

texts: I created custom category attribute like full description and just copy layout and template from category description. But all text i put in my custom full description display with html tags


texts:
How can I change the admin edit id name  like if I want to change xx_id to id in a Ui component form in address bar?

http://localhost/Magento225/admin/vendor/module/edit/xx_id/1/

To:

http://localhost/Magento225/admin/vendor/module/edit/id/1/

I looked in to form data source which is :

<argument name="primaryFieldName" xsi:type="string">xx_id</argument>
        <argument name="requestFieldName" xsi:type="string">id</argument>


texts: Creating an API to communicate directly with Magento DB

texts:
We have been using the Magento Rest API to communicate between external systems and Magento. Painfully, we have discovered that the REST API does not scale well. Specifically, often times requests time-out when requesting large amounts of data (say, about fifty products). We are using version 1.7.0.2.

One solution we are investigating is creating a custom API not written using Magento for the purpose of reading/writing into Magento.

Is this a solution typically used?
If so, any packages that simplify read/write operations from Magento EAV tables?
If not, are there any ways to speed up the Magento REST API?

We are in the process of scaling and speed is very important to us.


texts: Magento 1.9.4.0- Special-price is not reflecting to the cart

texts: After magento upgrade, instead of special price, its loading the original price of the product to the cart. Though special price are on the listing page and product view page.


texts:
Before add to cart, how to get the simple product of configurable product which would be added?

Notice the Before, because I need compare the simple product attribute with products already in cart to decide whether to add it to shopping cart.

In the core CartController - addAction, it has the parent configurable product $product = $this->_initProduct(); and super_attribute in $params['super_attribute'], I guess use both could get the child simple product, but doesn't find a way after many attempts.

Anyone could give a help? Thanks.


texts: Using magento pagination with custom collections

texts:
It is posible to use magento standard pagination with custom colections ( not product ) ?

I am using a module , it display list of manufacturers and i need to add there pagination.

I used this code to display toolbar:

$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();

$toolbar->setCollection($_manufacturersCollection);

$toolbarHtml =  $toolbar->toHtml();

Toolbar apeared and total number is corect but pagination is not displayed

in XML added this

<block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                <block type="page/html_pager" name="product_list_toolbar_pager"/>
                <!-- The following code shows how to set your own pager increments -->
                <!--
                    <action method="setDefaultListPerPage"><limit>4</limit></action>
                    <action method="setDefaultGridPerPage"><limit>9</limit></action>
                    <action method="addPagerLimit"><mode>list</mode><limit>2</limit></action>
                    <action method="addPagerLimit"><mode>list</mode><limit>4</limit></action>
                    <action method="addPagerLimit"><mode>list</mode><limit>6</limit></action>
                    <action method="addPagerLimit"><mode>list</mode><limit>8</limit></action>
                    <action method="addPagerLimit" translate="label"><mode>list</mode><limit>all</limit><label>All</label></action>
                -->
            </block>

            <action method="setToolbarBlockName"><name>product_list_toolbar</name></action>


texts:
I am developing a custom module if user purchase a particular product I need to send information to a particular system. I am just searching for event where i can write my code.

Please help if someone already implemented such functionlity.


texts: Magento website goes down(loads without css&images) very frequently, but after restarting Redis services, website is up again

texts:
I am new to Redis and Magento both, so please ignore any misleading/non-correct terms,
I am working on Magento V1.9.2.4 configured Redis V3.0.7 with Mage_Cache_Backend_Redis,
we have OS REDHAT 7.x installed on the server.
The site on production goes down(i.e. loads without CSS and images) very frequently and after restarting Redis and its services by the below command, site loads normally
sudo systemctl restart redis-sentinel redis-obj redis-fpc redis-ses
I had a look over the server error.logs, exception.logs do not found any suspicious log entry anywhere
I had a look into Redis configuration on /var/run/redis/redis-fpc.conf and Redis default configuration on OS it's all the same except below points:-

Currently, the Redis version is 5.x and I have Redis version installed is 3.0.7
Default Redis: databases 16 and I have Redis conf on the server is databases 2
There was a suspicious warning in redis-obj.log file

20980:M 23 Aug 07:05:01.887 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

But that warning is also removed with the help of service providers support,
I want any possible lead in order to resolve this(website goes down) issue for my searching,
Now I am like blindly thinking/looking into the configuration files for the Issue,
It'll be a very great help from my side if anyone/community who knows or assumes the possible reason for this issue I'm struggling with,
Many many thanks in advance.


texts: create two different registation form according to customer group magento 2

texts: I have two different group i want to have under sign in a radio button to choose between local or export group then according to the choice the customer will be redirected to different form so how to do that and how to proceed thanks in advance


texts: How to create a custom Widget with custom conditions

texts:
I need to create a custom widget using custom conditions to show a product list in the home page. I have to show the option to add multiple inputs in the widget form to set conditions that I need.

When Group Id = 1, show Category Product 5.

I need the string Widget in the content like:

{{widget type="My\Module\Block\Widget" category_by_group="3=15,4=81,0=31" title="Title of widget" }}

The value 3=15 in the category_by_group field means that if Customer Group is 3, the category id will be 15, but I have to type the Group Id and the Category Id and separate them manually with comma.

I have this XML file:

  My/Module/etc/widget.xml

<widget class="My\Module\Block\Widget" id="custom_products">
    Product Carousel
    <description>Carousel of product based on a category.</description>
    <parameters>
        <parameter name="title" sort_order="0" xsi:type="text" visible="true">
            Widget Title
        </parameter>
        <parameter name="category_by_group" xsi:type="text" visible="true">
            Categories by customer groups
        </parameter>
    </parameters>
</widget>

Is there a way to add multiple inputs dynamically?


texts:
I have created a custom module that executes a function when an order is canceled. I am using order_cancel_after event to do this and it works most of the times, but not always.

There's a payment extension, which code is encrypted. When an order is canceled by this payment extension, the order_cancel_after event function is not executed.
Possible ways that the order is canceled are the following:

$order->registerCancellation();

$order->cancel()->save();

$order->setStatus(Mage_Sales_Model_Order::STATE_CANCELED)->addStatusHistoryComment($orderComment)->save();

Is there any other event I could use? Is order_cancel_after a safe way to track order cancelation?


texts: Observer or plugin use before the invoice creation

texts:
I have create custom attribute("current_seller_id") in sales_invoice_item and now want to save some value in this column how can i do this.
Actually i already save the value in sale_order_item table with same name attribute("current_seller_id"). i was use around plugin for that. code is

<?php
namespace MyVendor\MyModuleName\Plugin;
class QuoteToOrder
{
    public function aroundConvert(
        \Magento\Quote\Model\Quote\Item\ToOrderItem $subject,
        \Closure $proceed,
        \Magento\Quote\Model\Quote\Item\AbstractItem $item,
        $additional = []
    ) {
        /** @var $orderItem \Magento\Sales\Model\Order\Item */
        $orderItem = $proceed($item, $additional);
        $orderItem->setCurrentSellerId($item->getCurrentSellerId());
        return $orderItem;
    }
}

these lines of code save value in each record of sale_order_item table. you see this $item->getCurrentSellerId() i make attribute "current_seller_id" in eav_attribute table and save value of current user with each product saving.
I need the same event or plugin that fire before saving invoce items in sales_invoice_item table because i need to send some custom value in table column


texts:
My product images are not watermarked, no matter what settings I try in administration.

www-data has the write permission to ./pub/media/catalog/product/watermark and successfully writes the files there.
flush magento cache, "Flush Catalog Images Cache" and "Full page Caching" every time
have set the sizes and opacity for every picture, without the bug Can't set watermark in Magento2 / How to change footer links?

I run a Magento 2.1.7 with a custom theme. Since I still have the problem on the default "Blank theme", I am looking to the way Magento2 computes watermaks ( module may be missing with that settings?).

Thanks a lot by advance for any advices.


texts: Category based layered navigation position order change - Magento 2.1

texts:
May I know how can I change the order of layered navigation attribute (same attribute) position based on category

I have 2 category:

Eg:

Shirt,
T-shirt

Attribute :

Color

Shirt category: layer navigation display the color attribute position in 0

T-shirt Category:layer navigation display the color attribute position in  2


texts:
Until a few minutes ago I thought I understood how Magento xml files (config, layout, system, api, ...) are merged into one big xml that is later used by the application. Apparently I was wrong.
The question came into my mind after trying to find a solution for SOAP v2 catalogProductListOfAdditionalAttributes Uncaught SoapFault exception: Access Denied.
In the solution I found I had to make the Mage_Catalog module depend on one of my custom modules otherwise I would get strange results. Some nodes were not merged. They were overwritten.

I understand that for example these 2 xml sections:

<config>
    <some_node some_attribute="attr_value">Some label</some_node>
</config>

and

<config>
    <some_other_node some_other_attribute="other_attr_value">Other label label</some_node>
</config>

when merged, become

<config>
    <some_node some_attribute="attr_value">Some label</some_node>
    <some_other_node some_other_attribute="other_attr_value">Other label label</some_node>
</config>

But what happens if I have these:

<config>
    <some_node>
        Some label
    </some_node>
</config>

and

<config>
    <some_node attr="value"></some_node>
</config>

I thought that it will become

 <config>
    <some_node attr="value">
        Some label
    </some_node>
</config>

Apparently this does not happen at least for the api.xml files. It may not happen for other types of xmls, but most probably it does because the api.xml files are loaded fia the same method: Mage::getConfig()->loadModulesConfiguration().
After all this talk, here are my questions:
How are the xml files merged? What nodes are overwritten and what nodes are merged?


texts: Magento2 - How to update label for select "region_id" field on the Checkout page?

texts:
On the Checkout page, I need to update the label of the "region_id" field like this:
If the Country selected is Indonesia, the label of the "region_id" field is "City".
The remainder is still "State / Province".
(Only applicable to countries with regions)

After select Indonesia:

Thanks for reading!


texts: Magento 2 CSS and JavaScript not working on both admin and frontend

texts:
I have Magento 2.1.9 installed on my cPanel shared hosting account. Everything worked fine until I asked my hosting provider to run the necessary commands during Tawk.to chat integration. The commands he ran made my site to display blank pages.

I managed to get the site back online by running the following commands:

php bin/magento setup:upgrade php bin/magento

php setup:static-content:deploy

bin/magento cache:flush

chmod -R 777 var pub

Even though I can now access my site, but the CSS formatting and JavaScript in both the admin panel and frontend don't work.
 See how my admin panel looks like:

Please note: in line 607 of the app/etc/di.xml file, I had already changed the following content:

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

to:

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

What else can I do to fix this issue?

Be advised that I set the file permissions for the directories below to 777.

/pub/

/pub/static/

The following directories have 775 permissions:

/pub/static/frontend/

/pub/static/adminhtml/

/pub/static/_requirejs/

What are the proper file permissions those directories? 755 or 777?

Please, I'd really appreciate your time and insight in helping me to resolve this issue. Thanks.


texts: How can i solve Magmi - Update Disabled Error

texts: When i try o upload images using magmi, i get error like,


texts:
I have a Raw Controller where i load products in based on a search. Now i need this to be without JS and css (therefor the RAW type) because i will load that into my page later on with ajax.

This is the fastest way that i came up with to do this.

BUT , It is really hard to implement blocks and childblocks into the Raw Controller. I would prefer it much more if i could use an XML for that.

So how would i do that exactly?

Code now :

 public function execute()
    {
   $layout = $this->_template->getLayout();

        $html = '
';
        $html .= '
';
        $html .= $this->_template->setAttribute("class", 'page-products')->toHtml();
 $html .= $layout->createBlock('Vendor\Module\Block\Search\Products')->setTemplate('Vendor_Module::searchproducts.phtml')->toHtml();
        $html .= '
';
        $html .= '
';

        $this->_translateInline->processResponseBody($html);

        $result = $this->_resultRawFactory->create();
        $result->setContents($html);

        return $result;
}

As you can see i need to manually create blocks etc to have in my controller since its a raw controller.

But isn't here a way how to have a raw controller but still use an XML OR use a page controller but exclude all css/js so the page loads really fast.


texts: Magento PDF Invoice Format How to Change Grand Total Text font size

texts:
I am running magento 1.7

i have need to change invoice grand total font size its very small so i want to increase with custom word (Example: COD $100) i am using cash on delivery so some time courier service receive wrong amount.

i find it in app\code\core\Mage\Sales\Model\Order\Pdf\
invoice.php and
abstract.php but nothing i find it how to increase it


texts: How to query tracking number from Magento 1.5?

texts: Using MySQL Workbench I have a number of SQL queries that I use to pull all sorts of information from Magento databases (running on versions 1.7-1.9). I have to pull tracking numbers from a Magento database that is running a legacy version of Magento (1.5). Aside from Mageverse, is there another way to appropriately track the table structure differences across Magento versions? I have checked and it is hard to track down even developer notes and documentation from legacy versions.


texts: Inconsistent Cookies between www and non-www URLs

texts:
I have a site with some cookies issues where going to a non-www URL will set cookies that prevents customers from logging in. I have found other questions that refer to the cookies settings as the solution, but this isn't working for me. So...

exmaple.com/login requested -> cookie set for .example.com. This prevents logins.

www.exmaple.com/login requested -> cookie set for .www.example.com. This works.

I've tried settings the cookie path and cookie domain in the system config without any success. For now, I'm redirecting all non-www page request to the www URL to deal with this issue, but is there another way to do this on the Magento configuration-level instead of the web server?

We're using nginx, Redis, and on CE.


texts: Magento 2: Rediection from Category page to CMS Page Without Changing URL

texts:
I have tried below in .htaccess which works fine

I'm redirecting Category page to CMS Page

Redirect /my-page/contact-us.html /contact

Above works fine, but will change URL as it's Redirect.

I don't want to change URL.

So i tried below code, but seems not working

RewriteRule ^customer/account/login/?$ /customer/account/create/ [L,NC]
RewriteRule ^customer/account/login/?(.*)$ /customer/account/create/$1 [L]


texts: Magento Search is unable to search fulltext

texts:
I have products with names like Elite: 16-27 and SKU like ELW-16-27

I am trying to use full text search functionality so that a user should get exact match for the product.

if he/she searches with Elite: 16-27 but I am not getting it as expected rather.It is giving all the results with Elite: and if I am searching with 16-27.

it is showing no result.

Can anyone please help me here?


texts: How to enter the "Cost Price" of a membership product in Magento 2.3.5?

texts:
How can I enter the "Cost Price" of a membership product at the backend in Magento 2.3.5. I have checked the advanced pricing option, however i dont get "cost" field in the popup. Is there any other way?
My requirement is to be able to calculate the profit while in cart (Selling price - Cost price) so that my reward points program rule can work properly and award points based on the profit earned on the sale.
Any help is highly appreciated
Billy


texts: Magento 2.1 : How to overwrite default page layout in Block

texts:
I have a custom module having layout XML file for the front end, in which the default page layout configuration is set to one column, I wish to give the user the ability to change the configuration as specified in the system configurations(like 2columns-left, 2columns-right, 3coulmns). I can get the values from configuration via helper in to the block file prepareLayout ,I would like to know if we can  set the layout just like the pagetitle , metakeyowords we use to set.
How can we set and overwrite default values in prepare layout in block file? Thanks.

  The XML default value is :

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">


texts: Layered Navigation not showing Attributes

texts:
I have a Magento install which has several attributes in attributes sets, but they are not showing up in the layered navigation on the left hand side of the page.

I have made sure that the attributes are set as drop downs, they have been set to 'Filterable (with results)' and to show on the front end, but they are still not showing up.

I have tried deleting the attributes, re-adding them, re-inputting the attribute data on to the products and still no luck.

Its a strange problem because it works for some attributes but not others, yet the ones that are showing are set up exactly the same as the ones that aren't.

Has anyone had any problems like this before?

Any help would be greatly appreciated.

Thanks in advance,


texts: SUPEE8788 Issues with Get Payment Update (after suspected fraud cleared)

texts: After Applying SUPEE8788 Patch for magento 1.9.2.2, Get Payment Update no longer retrieves update from Authorize.net.  Status is "There is no update for the payment." and it shows nothing in the authorize.net logs.  I know the patch was just release but has anyone else come across this?


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

texts:
I am running magento 1.9, and I am using the RWD slider that comes with Magento 1.9 on the home page.

Google's PageSpeed doesn't like this and says:

  Eliminate render-blocking JavaScript and CSS in above-the-fold content

How can I do it for this java script file which calls the slider:

http://www.MYDOMAIN/media/js/sdhfksjfhdsjvbskj8e4w.js


texts: renaming discount coupon in checkout page

texts: Please let me know how to rename " Discount Coupons " in the checkout Page. I want to rename to " Discount vouches/ first 5 digits of your card "


texts: Change Order of Containers for iPad and Mobile-Tabs

texts:
I want to display Product-image before the main information but in iPads (and in other tabs) Main-information is displaying before product images. I try to achieve by changing order as:

<referenceContainer name="product.info.media" htmlTag="div" before="-" />
<referenceContainer name="product.info.main" htmlTag="div" after="product.info.media"  />

But this is not working. This problem prevails only in mobile tabs (iPads, tabs etc) and not on other mobile-devices. how can i achieve this?


texts: Get wrong number of products on price sorting on product collection

texts:
I am trying to get product collection on listing page using this query. :

 $_productCollection = Mage::getModel('catalog/category')->load(Mage::registry('current_category')->getId())
    ->getProductCollection()
    ->addAttributeToSort($_GET['order'], $_GET['dir']);
$_productCollection->addAttributeToSelect('*');
$_productCollection->addAttributeToFilter('status', 1);
$_productCollection->addFieldToFilter(array(array('attribute'=>'visibility', 'neq'=>"1" )));
$_productCollection->addUrlRewrite(Mage::registry('current_category')->getId())->setPageSize(10)
    ->setCurPage(1);
 $_productCollection->getSelect();

This query works fine for name and position sorting but return 2 products on price sorting.What i am doing wrong ? without sort it work perfect.


texts: Magento 2.3.5 Checkout Shipping Methods cURL error 7 Exception

texts:
Magento Version: 2.3.5p

Hey guys, I am not sure if you have gotten a similar error during checkout:

Internal Error. Details are available in Magento log file. Report ID: webapi-5ed2c83e06062

Looking at the browser console, I am seeing the following:

POST magentowebsite.com/index.php/rest/default/V1/guest-carts/szvNnGiFGE2eeRTxVX7n5N32pnr7kyfX/estimate-shipping-methods 500

I also looked into the /var/log/exception.log and this is what I am seeing:

[2020-05-30 20:55:26] main.CRITICAL: Report ID: webapi-5ed2c83e06062; Message: cURL error 7:  (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) {"exception":"[object] (Exception(code: 0): Report ID: webapi-5ed2c83e06062; Message: cURL error 7:  (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /var/www/html/vendor/magento/framework/Webapi/ErrorProcessor.php:208, Magento\\Framework\\HTTP\\AsyncClient\\HttpException(code: 0): cURL error 7:  (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /var/www/html/vendor/magento/framework/HTTP/AsyncClient/GuzzleWrapDeferred.php:88, GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 7:  (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:200)"}

I've tried a few fixes, including changing the Gateway URL for USPS to use https instead of HTTP.

Has anyone faced a similar issue before? Thank you in advance.


texts: How to get module name used to show option on admin menu

texts:
Hi I currently have a very peculiar problem.
Please check the image below.

I dont know from where the customer group is coming .
I want to find a way to remove this block.
Please help me.


texts: M2.2CE - Different weights when ordering different quantities

texts:
We have an issue where we have an item that is originally 3 pounds but goes inside an 8-pound box due to sizing. This is fine as we will then set the product to around 8 pounds and be done with it. However, when, say 5 of the same item is ordered on an order, we end up using a different box which essentially changes the weights again to be back to around 3 pounds per item instead of 8 pounds per item when purchased separately.

Example:

Order 1: 1 of Item X purchased, product weight comes as 8 pounds.

Order 2: 5 of Item X purchased, product weight should be 3 pounds each,
totaling 15 pounds, not 40 pounds.

Is there any way to attack this type of issue in Magento?


texts: MySQL error when targetrule indexer is executed

texts:
I'm trying to run the targetrule indexer in my terminal and it shows some syntax error

Command:

php indexer.php --reindex targetrule

Error:

exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint (`giftease`.`enterprise_targetrule_index_crosssell_product`, CONSTRAINT `FK_94AAB744E142C77E39E72506AB13F090` FOREIGN KEY (`targetrule_id`) REFERENCES `giftease`.`enterprise_targetrule_index_cr)' in /var/www/html/giftease-upgrade/lib/Zend/Db/Statement/Pdo.php:243

I've tried this:

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE enterprise_targetrule_index_crosssell_product;
SET FOREIGN_KEY_CHECKS=1;

With no success


texts:
I am trying to understand the way SOAP from Magento works, so I can use it from an external application.(Magento v1.9.2)
So in order to use the web service from my third party application, I need a WSDL to interpret. How can I access the default Magento SOAP WSDL files?

Where are they?

For instance, I try to acces the SOAP methods from Delphi XE, and for that I need to import a WSDL file.

I searched the web for the SOAP API specifications and I found this:

http://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogProduct/catalog_product.list.html

as an example on how to access the SOAP from php...

But as I said from Delphi I need to import a WSDL in order to be able to work with the web service.

So how can I get a hold of the WSDL files?


texts: how to remove login check when item added to wishlist?

texts:
I want to add an item in the wishlist without the customer logging in into Magento.

menace guest user can add item in wishlist. I don't want further added item, menace I send inquiry form to mail or add data in database or display at admin side. but I not want log in check when item added to wishlist.

Is it possible ? I already tried more. but no get any idea.

I see app\code\core\Mage\Wishlist\controllers\IndexController.php
but not getting result.

Please advice me.


texts: Magento2, problem with uploading favicon.ico

texts: Going to Admin sidebar -> Stores-> Settings ->Configuration -> General-> Design, there is no HTML Head section to expand and upload the new favicon.ico! I tried to copy the favico.ico to Magento_Theme -> web but did not help(cache was cleaned)


texts: Magento 1.9 module name conflict with different package

texts:
I have created an extension with "Mypackage_Wishlist". When I tried to
  override controller it conflicts with "Mage_Wishlist". It shows blank
  pages on my account -> My wishlist page.

  Can we remove conflicts with same module name with different package
  name?


texts: Magento 1.9 Home page ok but categories are very slow ( no products)

texts:
What maybe an issue of slow categories and sub categories without any products at all?
My home page is not too fast but at least I understand what can be done
(banners compression, less requests and such thinks can help).

But the problem is about categories. They simply very slow and they are empty. It does not have even 1 product inside. So when I locate in category A and want to go Category B or any category or subcategory it simply takes about 12 seconds and longer.

Thanks


texts:
I'm trying to override the Mage_Adminhtml_Block_Sales_Order_Grid class, but no success with that.

My config.xml file:

<?xml version="1.0"?>
<config>
    <modules>
        <AD_Tweaks>
            <version>1.0.0</version>
        </AD_Tweaks>
    </modules>
    <global>
        <models>
            <catalog>
                <rewrite>
                    <product>AD_Tweaks_Catalog_Model_Product</product>
                </rewrite>
             </catalog>
         </models>
         <blocks>
             <catalog>
                 <rewrite>
                     <layer_filter_attribute>AD_Tweaks_Catalog_Block_Layer_Filter_Attribute</layer_filter_attribute>
                     <layer_filter_price>AD_Tweaks_Catalog_Block_Layer_Filter_Price</layer_filter_price>
                </rewrite>
            </catalog>
            <adminhtml>
                <rewrite>
                    <sales_order_grid>AD_Tweaks_Adminhtml_Block_Sales_Order_Grid</sales_order_grid>
                    <sales_order_create_form_account>AD_Tweaks_Adminhtml_Block_Sales_Order_Create_Form_Account</sales_order_create_form_account>
                </rewrite>
            </adminhtml>
         </blocks>
     </global>
</config>

My overriding PHP File located on /app/code/local/AD/Tweaks/Adminhtml/Block/Sales/Order/Grid.php:

    <?php
    class AD_Tweaks_Adminhtml_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
    {
        public function __construct()
        {
            // ***This function should be executed, but it fails***
            Mage::log('Class ' . get_class($this) . ' is being created');
            parent::__construct();
        }
}

I tried even to put a Mage::log('1111'); statement on top of the overriding class (before the class operator), but it probably doesn't loads my PHP file because there is no 1111 shown in logs.

The error is displayed in the browser is:

  Fatal error: Call to a member function setSaveParametersInSession() on a non-object in  /var/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php on line 66


texts: How do I correctly use productRepository?

texts:
I am trying to get the SKU of a product, but I just can't find out how to correctly use \Magento\Catalog\Api\ProductRepositoryInterface. It works when i use the getList() method, but getById() leads to a timeout (see the following code):

class LiveItem extends \Magento\CatalogInventory\Model\Stock\Item
{
    public function __construct(
        ...
        \Magento\Catalog\Api\ProductRepositoryInterface $productRepository,
        ... more DI
        )
    {
        $this->productRepository = $productRepository;
        ...
    }

    public function getQty()
    {
        //this works:
        foreach (($this->productRepository->getList(
            $this->searchCriteriaBuilder->create()
        )->getItems()) as $item)
        {
            var_dump($item->getId()); //$item->getSku() works as well
        }

        //but this doesnt (4696 definitely exists according to the var_dump output above):
        print_r($this->productRepository->getById(4696));
    }
}

Can someone help me in finding out what's going on here?
I'm on Magento 2.2.1

Is there another way to get the product's SKU?


texts:
I had two websites in magento 2 and I deleted one but it gave me error that

  The website with code root that was requested wasn't found. Verify the
  website and try again

Now, I am unable to view the admin panel. What should I do? Thanks in advance.


texts: Magento 2 Taxes are still not figuring correctly

texts:
Subtotal   : $81.73

  Shipping & Handling  $10.55

  So currently tax is calculated on $81.73 but it needs to be calculated
  on (81.73+10.55) = $92.28. Right?

This is my tax setting

Thanks is advance

Dose anyone know how this will happen.


texts: I try to package my extension for magento connect but not found how to include to package custom email template


texts:
I'm looking if it's possible to put the search engine in a block.
What I use at the moment is:

{{block class="Magento\Search\Block\Term" template="Magento_Search::form.mini.phtml"}}

But if I add a module for the autocomplete it doesn't work.
So, maybe I don't use the right code for the block...

Some help will be welcome.


texts: How do you search css in related less file in Magento 2?

texts:
I want to change some css in header let says

media="screen and (min-width: 768px)"
@media (min-width: 768px), print
styles-l.css:1
.page-header {
    border: 0;
    margin-bottom: 0;
    background: #222;
}

i want to change the background #222 to #333, how can i search the related loaction in tones of less files? any ideas?


texts:
I am having Magento ver. 1.9.1.0 with Multi-Website and Multi-currency website, We are facing our issue of Tax being not calculated correctly in front-end and in the back-end. See my below configuration setting in admin side under

  System >> Configuration >> Sales >> Tax

I am having one product text_product_03 which have selling price and product price 80 GBP and 100 GBP respectively, please see the snap below, as you seen instead of showing 20.00 GBP it shows 16.67 GBP, and due to that, the order calculation gets wrong in front-end.

I have also checked the same issue there in Magento Fresh version to 1.9.2.4.So could you please help me out what was wrong here? Do you have any suggestion or solutions which will help me out to solve this issue, If yes please share with me so I will check that and will solve it out.

Thanks


texts:
While programmatically creating category, using the below code, i got a error

Category with the 'categorgyurl' url_key attribute already exists

code:

        $category = new Mage_Catalog_Model_Category();
        $category->setName('categorgyurl');
        $category->setUrlKey('categorgyurl');
        $category->setIsActive(1);
        $category->setDisplayMode('PRODUCTS');
        $category->setIsAnchor(0);

        $parentCategory = Mage::getModel('catalog/category')->load($root_catid);
        $category->setPath($parentCategory->getPath());

        $category->save();

how to set, if category url already exits then make it change(ie. Rename it automatically/programmatically).


texts: Showing related products in product view page

texts: I'm working on a website where I'm using Magento 1.7. I want to display the related product of the current product on product view page. I tried many links like these, but none of them worked for me. Please help me on this. I'm newbie to magento.


texts: Table Rate Message Sorry, no quotes are available for this order at this time

texts:
I am getting the error as "Sorry, no quotes are available for this order at this time."

My table Rate data is as follows :

Country Region/State    Zip/Postal Code Weight (and above)  Shipping Price
IN  *   *   500 120
IN  GUJAR   *   500 100
IN  MAHAR   *   500 80
IN  *   *   250 70
IN  GUJAR   *   250 55
IN  MAHAR   *   250 55

If i order any product of the weight it is displaying this message.

I tried on local server with default magento template but it is working fine. Please help me on this


texts:
When I Integrate HTML Theme Magento 1.9
For Learning Purpose, I Use Static Blocks For Display Some Content In Frontend,
but All Content Are Not Display Properly.
it was shown in middle.

pls help me,

Original Image is that Here. Can See The Difference Between Both
Images..


texts: Reattach a customer's quote to another customer

texts:
Is there a way to reattach a customer's quote to another customer?
This is what I have tried so far. Setting customer via assignCustomer or setCustomerId does not do the job.

// load customer objects
$fromCustomerObj = Mage::getModel('customer/customer')->load(2637);
$toCustomerObj   = Mage::getModel('customer/customer')->load(1923);

// load fromCustomer's quote
$quoteObj = Mage::getModel('sales/quote')->loadByCustomer($fromCustomerObj);

// add product to quote
$productObj = Mage::getModel('catalog/product')->load(25227);
$quoteObj->addProduct($productObj , 1);

// reattach quote to toCustomer
//$quoteObj->assignCustomer($toCustomerObj);
//$quoteObj->setCustomerId(1923);

// save quote
$quoteObj->collectTotals();
$quoteObj->save();


texts: Magento1.9: Not able to send newsletter template to all subscribers

texts:
Recently I created a new newsletter template. Then sent it out to all my subscribers. According to newsletter subscribers count, I have 430 subscribers, but when put in the queue, it only sent out the template to 391 subscribers.

Could anyone explain what is going on here?

Any help appreciated.


texts: How to use Different units for Magento 1.9.2.2

texts:
We recently start a store which includes grocery, clothing, and jewelry on this when I upload product for grocery and other we facing a problem. All product weight are considering Kgs or Lbs but we are using Oz, Kgs, Lbs, packets and grams for grocery.

My question is: How to change weight units for a different product, How to assign particular weight unit for products?

Is there any extension or have any customization need to do for Backend.
and one more question is If I change weight units How to consider Units for shipping?


texts: Navigation category - how to get a collection?

texts:
How can I get a collection of the categories and subcategories to build custom navigation ?

$_categories = Mage::getResourceModel('catalog/category_collection');

$i;

echo '
';

foreach($_categories as $_category){

    echo '
';

    echo $i. '
'. $_category->getName().'
';$i++;

    echo $categoryId = $_category->getId();

    $_category = Mage::getModel('catalog/category')->load($categoryId);

//$category = Mage::getModel('catalog/category')->load(228);

    $subcategories = $_category->getChildrenCategories()->addAttributeToSelect('*');

    if (count($subcategories) > 0){

        echo $_category->getName();

        foreach($subcategories as $id){

            echo $name = $id->getName().'
';
        }
    }
}
echo '
';`

It actually is giving me a full list of categories including all those I don't need ;)
Should I pull all categories from products ?


texts:
Magento offers different releases under download section such as 2.0.x and 2.1.x or 2.2.x.
Many people say that use recent release of Magento but when I browse to Magento download page I see three types of recent releases first 2.0.x, second 2.1.x and third 2.2.x like currently it is ver 2.0.17, ver 2.2.1 and ver 2.1.10, only one difference which I know is ver 2.0.x can be used with PHP 5.6 or 7.0 but ver 2.1.x and 2.2.x only supports PHP 7.0, so now my questions are

If 2.1.x or 2.2.x is better then why 2.x is still in use and available under recent release?
What is actually mean by Magento 2, ver 2.x or 2.1.x or 2.2.x? Is this mean that there are 4 types of Magento releases M1, M2, M21 and M22 LOL, Why they are offering such types of version? Because normally single version is publicly offered and rest are considered as outdated but they are offering 3 types of versions at the same time under recent release. Moreover If we observe version 2.2.1 then 2.0.17 and 2.1.10 must be considered outdated but it looks like it is not. On this point I would like to share recent experience, my client complained me that I am not using recent Magento ver (2.0.10) because recent is 2.1.2 (at that time) and to be frank I was already confused with this.
What is the preferred ver to be used?

Thanks in advance :)


texts: Filter product collection by non-flat attribute

texts:
I am doing the following:

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

$productCollection
    ->addAttributeToFilter('my_attribute', 1);

my_attribute is not in the flat tables, but flat tables are enabled.

I keep getting the full collection.

The reason seems to be in \Mage_Catalog_Model_Resource_Product_Collection::addAttributeToSelect:

$columns = $this->getEntity()->getAttributeForSelect($attributeCode);

No $this->getEntity() is an instance of Mage_Catalog_Model_Resource_Product_Flat which fetches the flat fields - and if none is found, just returns null.

What is a clean way to add a non-flat attribute to the collection filter?

In my case it does not sense, to add the attribute to the flat table.


texts: Magento 2.3.2 Add to cart not working even with 127.0.0.1

texts:
I have installed fresh Magento 2.3.2, but add to cart is not working even I have changed the secure and unsecure base url in core_config_data table from http://localhost/magento2/ to http://127.0.0.1/magento2 .
There is not showing any error in browser console also.
Below are the details of environment I am using to run Magento 2.3.2:
OS: Ubuntu 19.10
PHP version: 7.2.31
Mysql version: 5.7.30
Browser: Google Chrome / Firefox
Please find the screenshot below for the reference.

Mysql version

PHP Info

Database core_config_data table:

Please suggest.
Thanks in advance.

Debug log

System log


texts: error when submit shipment - Not all of your products are available in the requested quantity

texts:
Customer created order, and all went well.
Now I try to ship the product and get this error:

Not all of your products are available in the requested quantity.

I checked and all product are on plenty on stock.
'salable quantity' is also stock minus sold after the order.


texts:
Getting an error :

  Fatal error: Call to a member function isVisibleInSiteVisibility() In
  template/checkout/cart/item/default.phtml on line 60

Here is code:

$_item = $this->getItem();
$_item->getProduct()->isVisibleInSiteVisibility();

How can I fix this?


texts:
I'm attempting to rewrite protected function _prepareColumns() in Mage_Adminhtml_Block_Catalog_Product_Grid

I have created the class MyCompany_Overrides_Block_Adminhtml_Catalog_Product_Grid, extending Mage_Adminhtml_Block_Catalog_Product_Grid, with the following in the config.xml:

<global>
    <blocks>
         <catalog>
            <rewrite>
                <product_grid>MyCompany_Overrides_Block_Adminhtml_Catalog_Product_Grid</product_grid>
            </rewrite>
        </catalog>
    </blocks>
</global>

However, the rewrite function is not being hit, but instead the original function is hit.

Could anyone point out any obvious flaws in the setup?


texts: Adding Company Field to Customer Registration Field? Magento 2.1

texts: I want to add a company field to the customer registration form, but i can not find the backend option for it. Is there a way i can do it programmatically?


texts: Custom Order Status for Cancel not working

texts:
I have the following observer method thats been called successfully, but the order status is not changing.

public function customCancel(Varien_Event_Observer $observer) {

        $order = $observer->getEvent()->getPayment()->getOrder();
        $order = Mage::getModel('sales/order')->load($order->getId());
        $payment_code = $observer->getEvent()->getPayment()->getMethodInstance()->getCode();
        if ($payment_code == 'cashondelivery') {
            $order->setStatus("cod_cancel");
            $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Cancel Transaction.');
            Mage::log($payment_code, null, 'paymentMethod.log');
            $order->save();
        }
    }

I have implemented the following event.

  sales_order_payment_cancel


texts:
i'm using Magento 2.4 under AWS ec2 instance.
The frontend is okey, but the backend is extremly slow.
Admin access is 15 seconds,
product page is around 20 seconds.
I have around 1500 products, and i don't understand why it's taking so muchtime.
Can you help me?


texts:
I am using this event for my observer: controller_action_layout_load_before.

This is my method from my observer:

public function controllerActionLayoutLoadBefore(Varien_Event_Observer $observer)
{
    /** @var $layout Mage_Core_Model_Layout */
    $layout = $observer->getEvent()->getLayout();

    $layout->getUpdate()->addHandle('catalog_product_view_custom');
}

For all of the products I need to remove this:

<catalog_product_view>
        <reference name="product.info.options.wrapper">
            <remove name="product.info.bundle.options" />
        </reference>
</catalog_product_view>

But there are always a special case, so for my special case I don't need to remove product.info.bundle.options. I created my new handle and I m trying to add this back in my local.xml:

   <catalog_product_view_whey>
        <reference name="product.info.options.wrapper">
            <block type="bundle/catalog_product_view_type_bundle" name="product.info.bundle.options" as="type_bundle_options" template="bundle/catalog/product/view/type/bundle/options.phtml">
                <action method="addRenderer"><type>select</type><block>bundle/catalog_product_view_type_bundle_option_select</block></action>
                <action method="addRenderer"><type>multi</type><block>bundle/catalog_product_view_type_bundle_option_multi</block></action>
                <action method="addRenderer"><type>radio</type><block>bundle/catalog_product_view_type_bundle_option_radio</block></action>
                <action method="addRenderer"><type>checkbox</type><block>bundle/catalog_product_view_type_bundle_option_checkbox</block></action>
            </block>
            <action method="insert"><block>product.info.bundle.options</block></action>
        </reference>
    </catalog_product_view_whey>

For some reason it doesn't work and no errors. Any idea why ?

Thank you!

[UPDATE]

I tried this too:

<catalog_product_view_whey>
    <reference name="product.info.options.wrapper">
        <x-unremove name="product.info.bundle.options" />
    </reference>
</catalog_product_view_whey>

it doesn't work


texts: Excessive wait time on Mage_Core_Block_Template::fetchView on /cms/index/index

texts:
I'm investigating why our homepage wait time is so slow (4.8s). Using NewRelic I've found out that the Mage_Core_Block_Template::fetchView call is using an excessive 2800ms. I don't understand why it takes so long for it to fetch views while the Block Cache is active and that the Redis Server behind is working.

I'm using PHP 5.5 with PHP-FPM, Nginx, Redis and Percona MySQL 5.6.

Has anyone some clue on how to debug this weird behavior? This is the only page to do this, all the others requires under than 1.5s to render.


texts:
On load how to change the product price
display this new price

$Ringprice = $goldprice18*$_product->getWeight()+$_product->getPrice();


texts:
I have made an input box and on clicking input box the calendar appears and we can select the date and value is stored. Now i want the same functionality instead of input box, i want text. On clicking text the calendar appears and the same functionality should happen. Can anyone suggest anything.

<div class="product-ddate-calendar-block">
    <input type="text" style="width: auto"
        class="input-text example-date_<?= /* @escapeNotVerified */ $item->getProduct()->getId() ?>"
        name="example-date_<?= /* @escapeNotVerified */ $item->getProduct()->getId() ?>"
        aria-required="true"/>
    <input type="hidden"

        class="input-text example-date-itemId_<?= /* @escapeNotVerified */ $item->getId() ?>"
        name="example-date-itemId_<?= /* @escapeNotVerified */ $item->getId() ?>"
        value = "<?= /* @escapeNotVerified */ $item->getId() ?>"
        />
    <input type="hidden"
        class="input-text example-date-optionId_<?= /* @escapeNotVerified */ $optionId ?>"
        name="example-date-optionId_<?= /* @escapeNotVerified */ $optionId ?>"
         value = "option_<?= /* @escapeNotVerified */ $optionId ?>"
        />
</div>


texts: theme is not showing in admin panel list magento2

texts:
i just create new test theme but it is not showing in admin panel theme list

app/design/frontend/Magento/mytheme/theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
     <title>My theme</title> <!-- your theme's name -->
     <parent>Magento/blank</parent> <!-- the parent theme, in case your theme inherits from an existing theme -->
     <media>
         <preview_image>media/preview.jpg</preview_image> <!-- the path to your theme's preview image -->
     </media>
 </theme>


texts: Magento 2 Knockout JS How to bind data from response of ajax call

texts:
I want to bind image source to following div.

Following is my ajax call and their is my variable which I want to bind to image src.

define(
[
    'jquery',
    'ko',
    'Magento_Checkout/js/view/payment/default',
    'Magento_Payment/js/view/payment/cc-form',
    'Magento_Payment/js/model/credit-card-validation/validator',
    'mage/validation'
],
function ($, ko, Component) {
    'use strict';

    var bankImage = '';

    return Component.extend({
        defaults: {
            template: 'Nitesh_Payment/payment/form',
            transactionResult: ''
        },
        ajaxCall: function(){
                $('#input-cc-number').blur(function(){
                    var cc = $(this).val();
                    var cc_length = cc.length;
                    if(cc_length>=6){
                        var data= {cc:cc}
                        $.ajax({
                            dataType: 'json',
                            url: url,
                            data: data,
                            type: 'post',
                            success: function(result)
                            {
                                var myObj = result;
                                this.bankImage = myObj.image;
                            },
                            error: function(){
                                alert("You Failed!");
                            }
                        });

                    }

                });
        },

    });
}
);

Also I am unable to access bankImage variable inside Ajax call.
Please tell me how to access that variable in ajax function.