texts: Hide attribute added by Manage attribute

texts:
In project I have added an attribute Status in Dropdown. I want to hide that attribute on adding product page. While Managing Attribute there is no such configuration to hide Attribute. Is there any way to hide attribute on product page ?
Thanks in advance.


texts: How to save multiselect box value to magento cms table?

texts:
I have added multiselect box attribute to cms page with following code

$fieldset->addField('counts', 'multiselect', array(
        'label'     => Mage::helper('cms')->__('Total Counts'),
        'name'      => 'counts',
        'values'    => array(

            array(
                'value'     => 0,
                'label'     => Mage::helper('cms')->__('One'),
            ),
            array(
                'value'     => 1,
                'label'     => Mage::helper('cms')->__('Two'),
            ),

            array(
                'value'     => 2,
                'label'     => Mage::helper('cms')->__('Three'),
            ),
            array(
                'value'     => 3,
                'label'     => Mage::helper('cms')->__('FOur'),
            ),
        ),
        'value' => $model->getCounts(),
    ));

When i save, its saved as "Array".Please anyone help me to save the option values to the database..


texts: Magento2: Mailchimp Error: Script error for: campaigncatcher

texts:
My Magento version is 2.1.4 and Mailchimp version is 1.0.25.
The issue is, when I enable Mailchimp extension, the checkout page is not working properly. We are using Mageplaza's Onestepcheckout extension for checkout. On disabling Mailchimp, everything works fine.
Firebug shows following error on checkout page:

Error: Script error for: campaigncatcher
http://requirejs.org/docs/errors.html#scripterror

Can someone tell me what could be the issue here?

Thanks in advance!


texts: Magento 2: How to use form key parameter in GET request?

texts:
I'm using magento 2.3.4 and i tried to generate a delete cart item like this in phtml file:
    <?php $formKey =  $this->helper('Vendore\Module\Helper\Data')->getFormKey() ?>
    <a href="<?php echo $this->getUrl('checkout/cart/delete',array('form_key'=>$formKey,'id'=>$_item->getId())) ?>" title="<?= __("Remove Item") ?>" class="btn-remove btn-remove2"> <?= __("Remove Item") ?> </a>

the $formKey is retrieved successfully, but when I clicked the link it redirects me to 404 page


texts:
In Magento 1 i used something like this to create 2000 store views on the fly.
How would I do the same thing in Magento 2?

require_once('app/Mage.php');
umask(0);
Mage::app('admin');

$strnm =1;
while ($strnm < 2001){
    $store = Mage::getModel('core/store');
    $store->setCode('tsm'.$strnm)
        ->setWebsiteId(1)
        ->setGroupId(1)
        ->setName('TSM'.$strnm )
        ->setIsActive(1)
        ->save();
        $strnm += 1;
}


texts: How to customize the footer container in magento 2

texts:
I want to remove the footer container add new customize footer! I already remove the footer links but the (Enter your email address | Subscribe) and the white background is still there!

I want to remove them all and add new custom footer!


texts: Magento 2.1 Mini cart is not working knockout.js error

texts:
2.0.7 was working fine with all browsers but after upgrade to 2.1 the store is not working, bought items not adding to the cart so customer cannot checkout. even with fresh installation the cart is not functioning properly. please see herara.com.

browser inspection showing :
knockout.js:2908 Uncaught Error: You cannot apply bindings multiple times to the same element.


texts: Add website/store name to manage attributes options/labels page

texts:
We have a multistore system with several websites and storeviews in different languages.

The storeview name (from Manage Stores) is used for language switcher label and also for manage attributes section.

Since we dont want to use any "fake names" our store names are not unique and manage attributes page looks like:

So our product management does not know which column belongs to which store/website.

Any ideas how to solve it?


texts:
I am using the following code to list sub categories of main categories instead of products. It works great but I need to check if the category has an image. if it doesn't I want it to not show a broken image.

here is the code i'm using:

<?php
$_category  = $this->getCurrentCategory();
$collection = Mage::getModel('catalog/category')->getCategories($_category->entity_id);
$helper     = Mage::helper('catalog/category');
?>

<?php foreach ($collection as $cat):?>
        <?php if($_category->getIsActive()):?>
            <?php
                 $cur_category = Mage::getModel('catalog/category')->load($cat->getId());
                 $_img = $cur_category->getImageUrl();
            ?>

                <a href="<?php echo $helper->getCategoryUrl($cat);?>">
                     <img src="<?php echo $_img?>" title="<?php echo $cat->getName();?>"/>
                     <?php echo $cat->getName();?>

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


texts: Configurable product dropdown is not working in quick view

texts:
I am trying to get drop down   of a configurable  in quick view of a configurable product thus i will cart the product.all content is coming  from ajax.

*Pack Size

                    <select name="super_attribute[136]" id="attribute136" class="required-entry super-attribute-select">
                        <option>Size</option>
                      </select>

This json script can not create the drop down.I throght that product.js not initialize for that.i have add  prototye js ,configurable js and product js with this ajax


texts:
When I'm searching for the product name "Dell" then getting products which don't have any word "Dell" in the product name.

e.g- I'm getting following product name when searching for "Dell":-

1- "TRANSCEND JETFLASH GO 300 64GB USB 3.0 (3.1 GEN 1) USB TYPE-A CONNECTOR BLACK USB FLASH DRIVE"

2- "SANDISK ULTRA MICROSDHC 32GB UHS-I + SD ADAPTER 32GB MICROSDHC UHS-I CLASS 10 MEMORY CARD"

Similarly when I searched "Lenovo" then getting the following:-

1-"LENOVO KEYBOARD NON-BACKLIT L440/L450/T440/T450 US INT"
2-"LENOVO 04X0324 DISPLAY NOTEBOOK SPARE PART"
3-"MICROBATTERY MBI51069 LITHIUM-ION 4400MAH 10.8V RECHARGEABLE BATTERY"

But there shouldn't be products which don't contain "Lenovo". means the product "MICROBATTERY MBI51069 LITHIUM-ION 4400MAH 10.8V RECHARGEABLE BATTERY" shouldn't be in the search result.

According to my requirement, if any product doesn't contain any word in their name during search then it shouldn't be displayed in the search result.

In the case of "Dell", my search result didn't display any "Dell" related product name.so there should be an empty result.

Please visit here:-

http://nimb.ws/87NOM6

http://nimb.ws/UapEsK

So please help me to fix the issue.

--
Thanks!!!


texts: Magento 2 : How to create customer attribute with disabled input programmatically?

texts: How to disable this input field, It's a custom attribute.


texts:
I want to change the product image on mouse hover on product list page.
It would be helpful, if some one can guide me towards the correct approach to follow.


texts: How to translate " This is a required field. " in magento 2. I was change in file csv but it not working, please help me!


texts: Magento 1.8 - Class 'Mage_Helloworld_Helper_Data' not found

texts:
I can't access System -> Configuration in the backend anymore. I get the message Class 'Mage_Helloworld_Helper_Data' not found.

How can I debug this, I am new to magento.

I found a Module named "HelloWorld" in app/code/local/Webkochshop.

This is the snippet where the helper is at:

<global>
    <helpers>
        <Webkochshop_HelloWorld>
            <class>Webkochshop_HelloWorld_Helper</class>
        </Webkochshop_HelloWorld>
    </helpers>
</global>


texts:
I'm attempting to get a list of products that are only assigned to the default category and not assigned to any other categories.

I tried the following:

// default category id
$categoryId = 2;

$category = Mage::getModel('catalog/category')->load($categoryId);
$_products = $category->getProductCollection()->addAttributeToSelect('*');

echo $_products->getSize();

The product sized echoed back to me is 5. This is way smaller than the actual product count should be. Remember I'm looking for only products assigned to just the default category.

If I investigate the SQL query that is ran from the above collection I find something interesting (note I truncated the fields in the original dump from echoing $_products->getSelect())

SELECT 1 AS `status`,
       `e`.`sku`,
       `e`.`entity_id`,
       `e`.`type_id`,
       `cat_index`.`position` AS `cat_index_position`
FROM `catalog_product_flat_1` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id
AND cat_index.store_id=1
AND cat_index.category_id = '2'
AND cat_index.is_parent=1

Running the SQL query returns the 5 rows of products. I noticed that none of these 5 products have a category assigned. They are not even assigned to a category how are they showing up when I query category_id 2 (default category).

If can verify that they dont have a category assigned by the following query:

SELECT cc.* FROM catalog_category_entity cc
JOIN catalog_category_product cp ON cc.entity_id = cp.category_id
WHERE cp.product_id IN (
    SELECT `e`.`entity_id`
    FROM `catalog_product_flat_1` AS `e`
    INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id = e.entity_id
    AND cat_index.store_id=1
    AND cat_index.category_id = '2'
    AND cat_index.is_parent=1
)

The query below is more or less what I want to achieve but using Magento collections:

SELECT cp.product_id, cc.* FROM catalog_category_entity cc
JOIN catalog_category_product cp ON cc.entity_id = cp.category_id
WHERE path = '1/2'

Does anybody have any ideas how to use the collection model to retrieve a list of products that are ONLY assigned to the Default Category (in my case category_id = 2)?

I could be overlooking something simple. Thanks.


texts: What is the most performant way to get Childs of a configurable Product

texts:
In some cases you need the simples belonging to a configurable, or specific attributes of them.

Example1: the product types

Example2: the prices

Example3: 3 attributes at once (I assume this is harder to get performantly done)


texts:
$product->getRatingSummary() where this function come ?

I'm using a custom template on my magento site and I've got everything working but star ratings are not showing on the site's homepage (The one that displays latest and featured product). Its also not showing on recently seen items on side bar and also related products but it is showing on category pages and on product individual pages.

Can someone please explain what I need to do?

Appreciate your response(S). Below is the code;


texts: Is Magento a better choice than, say, OpenCart?

texts:
I've been developing non-ecommerce sites for years and I've learned is that CMS code/architecture quality, and the size of the community/ecosystem around the CMS are two essentials. For example, there are some smaller CMS's with great codebases that do very well in their specific niches. And WordPress is a perfect example of a very imperfect codebase and design, but it is supported by such a massive ecosystem of users, theme developers, plugin developers, installers and optimizers. It's hard not to find support for whatever you need.

I've worked on a couple of smaller ecommerce sites with Magento, OpenCart and some of the hosted solutions. Magento seemed overkill for the smaller site, but with a good ecosystem, and OpenCart was very light weight and it looked difficult to find off-the-shelf components for it.

There is an existing OpenCart install for this new site I'm working on - it has been configured and is working to some degree. I will not be the only developer working on this new site, but to get it off the ground it is 90% on me.

1) Is Magento the best choice for a new medium to large scale ecommerce site for me?

2) Is Magento superior to OpenCart, both in terms of code quality and architecture?

3) Are there other factors that should influence my decision for and against choosing Magento?


texts: Assign same image to both Base & thumbinal

texts:
We are uploading same image 2 times to Programatically created product & we are selecting one image as Thumbinal & another one as Base Image in backend.

Instead we want to create single image and we want to assign that image to both Base & Thumbinal.

if ($doSave) {

                $images = array(
                    'thumbnail' => 'image.png', // cart page

                    'image' => 'image.png' // my design & product view page
                );
                //print_r(array_merge($images));

                $imag_data = Mage::getSingleton('core/session')->getProductImage();
                $newImagePath = $imag_data;

                foreach ($images as $imageType => $imageFileName) {
                    $path = '';
                    if ($newImagePath != "") {
                        $dir = Mage::getBaseDir('media') . DS . 'custom_product_preview/quote/';
                        $path = $dir . $newImagePath;
                    } else {
                        $dir = Mage::getBaseDir('media') . DS . 'example/amasty/';
                        $path = $dir . $imageFileName;
                    }

                    if (file_exists($path)) {
                        try {
                            $product->addImageToMediaGallery($path, $imageType, false);
                        } catch (Exception $e) {
                            echo $e->getMessage();
                        }
                    } else {
                        echo "Can not find image by path: `{$path}`<br/>";
                    }
                }
            }
            $product->save();


texts: How to get CMS / Catalogue page text and content to behave responsive?

texts:
Added text to CMS pages or Catalogue pages in Magento 2 are not behaving responsive. All other parts of the page are responsive. How to get the CMS / catalogue text to behave responsive as well?

On large screen the text is fine but when displayed on a mobile device the text (block) is not adapted and the content is running of the screen!
I'm using a Template based on the Luma Template.


texts: Separate billing/shipping addresses in magento?

texts:
One of customers contacted him to point out that he is not able to specify different billing and shipping addresses for his account. When he changes one address, the other automatically changes as well.

I logged into the Magento admin console to try and separate the addresses myself, but I didn’t find a way.

Any Idea!!!!


texts: Increasing Quantity via CSV Import Magento 2

texts:
We are working heavily and daily with the Magento 2 CSV import. We use something like this
"sku","qty"
"12345","100"

In this case, the qty for 12345 is set to be 100.
The next day I would like to upload something like this:
"sku","qty"
"12345","5"

The problem now is that 12345 will have 5 qty, and not 105 or ar at least 5 + (100 - sold qty).
Is there any way I can increase the quantity with the upload file?
Thanks


texts: Can anyone explain to create custom Product Attributes Catalog Input Type for store owner field?

texts:
Can anyone explain to create grouped input text field in Product Attributes Catalog Input Type for store owner field?

I need to create an catalog attribute with grouped input text field. Please see below example:

Attribute Name: Specification
Text Input field 1: Density (kg/L)
Text Input field 2: Kinematic viscosity (cSt) @40°C
Text Input field 3: Kinematic viscosity (cSt) @100°C
Text Input field 4: Cetane Index
Text Input field 5: Sulphur content, %wt
Text Input field 6: Water and sediments, %vol.
Text Input field 7: Flash point, °C
Text Input field 8: Pour point, °C
Text Input field 9: Hydrogen sulphide (H2S)

Above fields are grouped with one "Specification". Please suggest me how to create attribute with above grouped type.

Thanks.


texts:
How can i set a name or custom attribute for a specific storeview through REST API?

Adding a product hroug POST /V1/products it seems like it only  sets the Name/Label for the default storeview and in other storeview Name and custom attribute are set to use default value.

Is there a way to add or update the other storeviews name and custom attribute values

/Thomas


texts: Display Out of Stock Configuration not working in magento1.9

texts:
I have a configurable product with 3 simple products associated to it that were added via REST.

I have set the "Display Out of Stock Products" option in System->Configuration->Inventory to "Yes"

Configurable Product

Manage Stock => Yes; Use Config Settings
Stock Availability => In Stock

Simple Product 1

Manage Stock => Yes; Use Config Settings
Stock Availability => In Stock
Quantity => 5

Simple Product 2

Manage Stock => Yes; Use Config Settings
Stock Availability => In Stock
Quantity => 1

Simple Product 3

Manage Stock => Yes; Use Config Settings
Stock Availability => Out of Stock
Quantity => 0

Why won't Product 3 show on my website (front-end)? It displays when I set the product to "In Stock".

EDIT: So I got it working in a roundabout way. I sent the URL twice and it now displays as "backordered". Full disclosure - I am using someone else's code and trying to make this work. Here is the important part of the URL (minus my website info)

  https://****/index.php/****/****/push?&prodcode=29543&sku=E29543&name=Ethyl%206-(trifluoromethyl)pyridazine-3-carboxylate&name1=Ethyl%206-(trifluoromethyl)pyridazine-3-carboxylate&name2=&inchi=&inchi_key=&formula=C8H7F3N2O2&mass=220.148&cas=1192155-06-8&purity=&mdl=&msds=&total_stock=5.1g&images[0]=29543.png&categories[0]=&categories[1]=&categories[2]=&categories[4]=&categories[5]=&categories[6]=&options[1][price]=940&options[1][code]=E29543G1&options[1][unit]=G1&options[1][size]=1g&options[1][instock]=yes&options[1][stock]=5&options[2][price]=2810&options[2][code]=E29543G5&options[2][unit]=G5&options[2][size]=5g&options[2][instock]=yes&options[2][stock]=1&options[3][price]=4610&options[3][code]=E29543G10&options[3][unit]=G10&options[3][size]=10g&options[3][instock]=yes&options[3][stock]=0&options[4][price]=&options[4][code]=&options[4][unit]=&options[4][size]=&options[4][instock]=yes&options[4][stock]=&options[5][price]=&options[5][code]=&options[5][unit]=&options[5][size]=&options[5][instock]=yes&options[5][stock]=&options[6][price]=&options[6][code]=&options[6][unit]=&options[6][size]=&options[6][instock]=yes&options[6][stock]=%3F

Why would this work the 2nd time but not the first??? Not sure if it's relevant, but it would seem the previous developer created a custom data controller.


texts:
Our company make shopping web site for customers and we want sell magento more expensive than woocomerce plugin of wordpress but there is a question "Why some one must pay more for magento?"
I know magento has very features but many free plugin exist for wordpress to make your website a good shopping site, please answer me.
Thanks.


texts: my theme stopped working after I switched back to the tip of the branch from an older git commit

texts:
So I have backups of all the files in the Magento root folder and tried overwriting the current Magento folder with the backup folder and it still doesn't recognize the changes I've made in my child theme. My setup is here:

How do I add images into the "header content" class with a block?

I have tried setting the theme to other themes and no theme and clearing the cache both times and then switching back to mine and it doesn't recognize my theme unless I restore from a database backup from before switching to and from the old git commit. (it really seems like the database somehow got corrupted when I switched commits) Any ideas of what might cause this? This problem can cause people to loose a lot of work. Thanks.


texts: Error: Mage registry key "_singleton/mage_gextorshop/observer" already exists

texts:
(Sorry if my english is bad, but is not my language)

My Magento version is 1.9.3.8

I tried to solved this error whit this in SSH:

php -f shell/compiler.php disable
php -f shell/compiler.php clear
php -f shell/compiler.php compile

But didnt work (with compile, and without it).

This is my config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Mage_Gextorshop>
            <version>0.0.1</version>
        </Mage_Gextorshop>
    </modules>
    <global>
        <models>
            <mage_gextorshop>
                <class>Mage_GextorShop_Model</class>
            </mage_gextorshop>
        </models>
                <helpers>
                        <mage_gextorshop>
                                <class>mage_gextorshop_Helper</class>
                        </mage_gextorshop>
                </helpers>
        <events>
            <sales_order_save_commit_after>
                <observers>
                    <mage_gextorshop>
                        <class>mage_gextorshop/observer</class>
                        <method>logUpdate</method>
                        <type>singleton</type>
                    </mage_gextorshop>
                </observers>
            </sales_order_save_commit_after>
        </events>
    </global>
</config>

In LocalHost had the same problem and when I used the SSH commands, solved it.
Also I uninstalled the custom module, used SSH commands and installed again the module but error continue.

Other similar questions that I found didnt help me.


texts: Solved - Magento 2 - Get Products by Attribute Set

texts:
I'm looking for a way to get all products that belong to a certain attribute set, say 'Gloves'. I have look around online to see if I could find a way but could only find the code below which I believe is for Magento 1 because I'm getting a 500 error code. Also it is a .phtml template where I'm trying to get this data.

This is the code I have tried:

<?php
//Fetch attribute set id by attribute set name
$attrSetName = 'Gloves';
$attributeSetId = Mage::getModel('eav/entity_attribute_set')
    ->load($attrSetName, 'Helmets')
    ->getAttributeSetId();

//Load product model collecttion filtered by attribute set id
$products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToSelect('name')
    ->addFieldToFilter('attribute_set_id', $attributeSetId);

//process your product collection as per your bussiness logic
$productsName = array();
foreach($products as $p){
    $productsName[] = $p->getData('name');
}
?>

Any help or pointers would be greatly appreciated.


texts: Magento 2.3.2 CE and Cron jobs, flock and RabbitMQ

texts:
Last few days I was chasing an interesting bug in production system running Magento 2.3.2 CE
Where as per community recommendation I run cron jobs like this

flock --timeout=0 /run/lock/magento_system_cron.lock  /usr/bin/php /var/www/html/bin/magento cron:run

After few executions of cron task it is suddenly gets locked and flock never releases this lock. The only way to release it is to either remove the lock file (which is incorrect, don't do it) or figure out related process IDs and kill them. One can figure out process IDs like this:

fuser -u /run/lock/magento_system_cron.lock

Once you know process IDs - do something like ps aux | grep <process-id-from-fuser-command>

Well, when you see processes that are involved there you would probably understand why it gets locked forever. Those processes are message consumers and they are supposed to sit and wait (they are actually blocked and effectively sleeping) till they receive a message via the message-queue mechanism and then process them.

Magento documentation is somewhat vague on this:

https://devdocs.magento.com/guides/v2.3/config-guide/mq/rabbitmq-overview.html
https://devdocs.magento.com/guides/v2.3/install-gde/prereq/install-rabbitmq.html
https://devdocs.magento.com/guides/v2.3/config-guide/cli/config-cli-subcommands-cron.html

At the same time I noticed that cron jobs get blocked once I see this in logs:

main.INFO: Consumer "async.operations.all" skipped as required connection "amqp" is not configured. Unknown connection name amqp []

And googling for that was always leading me to the tip to disable the cron configuration for those message consumers, which didn't sound right to me:

// app/etc/env.php
// ...
'cron_consumers_runner' => array(
    'cron_run' => false,
    'max_messages' => 1000,
    'consumers' => array(
        'async.operations.all',
    )
)

See this for instance:
https://community.magento.com/t5/Magento-2-x-Admin-Configuration/Consumer-async-operations-all-skipped-as-required-connection/td-p/129621

Related questions:

Add RabbitMQ to existing Magento 2 EE installation
Which core modules use RabbitMQ in Magento Open Source 2.3?

Somehow it became clear to me that something is not right with that message-queue setup as well with cron configuration. So I was looking through Magento docs multiple times and were not finding there what is supposed to consume messages that magento pushes into rabbitMQ, see this for example: https://www.rabbitmq.com/tutorials/tutorial-one-php.html

The question that I was asking myself all the time: "What am I missing here?" and "What is a recommended setup here?"


texts: Magento 2 : Get Items Ordered in Email Template

texts:
I'm looking to achieve a product grid of items ordered in an email template upon successful product. This is what I'm trying to achieve, in this exact order for each product.

Is this doable? I can't seem to find variables to do this.

Thanks in advance.


texts: Magento2 : Error when running setup:di:compile

texts:
I create a custom model and di.xml was written up, however when I try to run setup:di:compile, it said the

"generated/code/Magento/MediaStorage/Model/File/Storage/Response/Interceptor.php" file can't be deleted......No such file or directory

I am running docker at windows machine, I can see the files inside the folder, but I don't have permission to do it,  I did google the result but can't find any solution. such as "setup:static-content:deploy -f" or chmod 777

Any help would be appreciated..!

Thank in advance..!


texts: Magento Backup - required? Little Question

texts:
I´m ready with my first magento shop. I´ve just a little question:
Is it required to backup the system every wekk / months? How strong is magento? Is it possible that the system no longer works at once?

So how do you handle the backup in magento? How often do you backup the system? And what do you backup? database / ftp files / customer export?


texts: Magento catalog price rule apply percentage discount but it's rounding up to 21% and 22%

texts:
I am applying a catalog price rule to reduce certain items by 20%, however some items are showing a reduction of 21%, 22% and 23% which is shown on the sale tag. We are using the theme 'Harbour' which I presume is applying the sale tag. The code that calls this is the following:

<?php echo MAGE::helper('ThemeOptionsHarbour')->getProductLabels($_product, 'sale'); ?>

Obviously I don't want this happening. I have already tried changing Calculation Settings-> Apply Discount on Prices - Including Tax to Excluding Tax but this didn't seem to work.

Here are a few screen shots of my settings:


texts: Magento 2 Programatically update price attribututes per store but code is updating for all stores

texts:
I want to update price for particular store(us) by programmatically.I used below script and its working but problem is it updates for all stores not for particular

function updateconfigProductPrice($productsku_update,$price_to_update,$storeCode)
             {
                $proObj = getObjectInstance()->get('Magento\Catalog\Model\Product');
                if ($proObj->getIdBySku($productsku_update))
                {
                   $productId = $proObj->getIdBySku($productsku_update);
                }
                else
                {
                   return FALSE;
                }

                if($storeCode=='us')
                {
                  $storeId = '9';
                }

                //echo 'store_code'.$storeId;

               if ($productId!= '') {
                    $configProduct = getObjectInstance()->create('Magento\Catalog\Model\Product')->load($productId);

                    //var_dump($configProduct->getWebsiteIds());
                    //die;
                    $_children = $configProduct->getTypeInstance(true)->getUsedProducts($configProduct);
                    //echo count($_children);die;

                    foreach ($_children as $child) {

                        //echo $child->getSku();die;

                        if($child->getID()!=''){

                            $childId = $child->getID();

                        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
                        $productFactory = $objectManager->create('Magento\Catalog\Model\Product');
                        $productResourceModel = $objectManager->create('\Magento\Catalog\Model\ResourceModel\Product');
                        $productResourceModel->load($productFactory, $childId);
                        $productFactory->setStoreId($storeId);

                        $special_price = $price_to_update;
                        $productFactory->setPrice($special_price);
                        $productResourceModel->saveAttribute($productFactory, 'price');
                        echo $child->getSku()."child product updated for store==".$storeId."=with s Price".$special_price.".<br/>";
                        }
                    }

                }
             }

Its update price for all stores but I want to update only for my US(store). Please share your thoughts and let me know what is wrong with code.


texts: How to see cookies name in magento websites

texts:
I found this link, Show used cookies Magento website

how to see the cookies we use


texts: Include only top level parent category in product url (not all parent categories in path)

texts:
The site I am migrating over to Magento from Virtuemart used only the top level parent category in the product url path. The client insists on not having to redirect a bunch of traffic once we launch. So I am looking for a way to display only the top level parent in the product url.

If I have a product located in Hand Tools, like so:
Root Category > Tools > Hand Tools > Product

Currently Magento creates product url as:
http://anystore.com/tools/hand-tools/product

I would like Magento to create the product url as:
http://anystore.com/tools/product

Is this possible without the use of a whole lot of url rewrites.


texts: What is the query readers here i can't understand magento 2.3

texts:
I can't find the what query rendes here and i can't it is not readable so any can to find what query renders hear please tell what are the table involved here
 public function getCount(\Magento\Catalog\Model\Layer\Filter\FilterInterface $filter)
    {
        // clone select from collection with filters
        $select = clone $filter->getLayer()->getProductCollection()->getSelect();
        // reset columns, order and limitation conditions
        $select->reset(\Magento\Framework\DB\Select::COLUMNS);
        $select->reset(\Magento\Framework\DB\Select::ORDER);
        $select->reset(\Magento\Framework\DB\Select::LIMIT_COUNT);
        $select->reset(\Magento\Framework\DB\Select::LIMIT_OFFSET);

        $connection = $this->getConnection();
        $attribute = $filter->getAttributeModel();
        $tableAlias = sprintf('%s_idx', $attribute->getAttributeCode());
        $conditions = [
            "{$tableAlias}.entity_id = e.entity_id",
            $connection->quoteInto("{$tableAlias}.attribute_id = ?", $attribute->getAttributeId()),
            $connection->quoteInto("{$tableAlias}.store_id = ?", $filter->getStoreId()),
        ];

        $select->join(
            [$tableAlias => $this->getMainTable()],
            join(' AND ', $conditions),
            ['value', 'count' => new \Zend_Db_Expr("COUNT({$tableAlias}.entity_id)")]
        )->group(
            "{$tableAlias}.value"
        );

        return $connection->fetchPairs($select);
    }


texts:
I used this event in Magento 1:- sales_quote_config_get_product_attributes.

In Magento 2 this event is removed, in CHANGELOG.md it's saying, use plugin instead of event.

How can i use this event as plugin in Magento 2?


texts: how to save values to magento customer module default stored attributes in magento2?

texts:
I have created new filed in Magento 2 registration form

I want to save the values to default stored attributes

(if Zip code =>  default in Magento 2 attributes)

How to pass the values to that attribute ??


texts: Filtering orders by status containing space

texts:
I am building a php script for a magento site. The script is located in a subfolder to the document root and is called from cron/terminal. In this script I am trying to create a collection of orders filtered by order status. This is the code I'm using atm:

$orderStatuses = explode(",", $argv[4]);
$rightNow = date("Y-m-d H:i:s");
$midnightToday = date("Y-m-d H:i:s", strtotime('midnight'));

$salesToday = Mage::getModel('sales/order')
    ->getCollection()
    ->addFieldToFilter('status', array('in' => $orderStatuses))
    ->addAttributeToFilter('created_at', array('from' => $midnightToday,'to' => $rightNow))
    ->addAttributeToSelect('grand_total');

the following parameter is sent to $argv[4]: 'Processing,Payment Accepted,Complete'

Orders with the status Payment Accepted are not included in the collection. I have tried to escape the white space in the parameter using \ but the result remain the same. How can I modify my code to include statuses containing white space?


texts: Magento 1 payment captured, but order not in Magento

texts: Every couple of weeks we have a customer who's card was charged, but the order did not go through, it's stuck in the customers cart and it doesn't show them in abandon cart, but in the customers profile it shows the items. Logs show no issues, which is quite frustrating. Has anyone else had this issue and is there a way to get the order out of the cart in the meantime? I'd like to process it without canceling through the processor and having the customer checkout again.


texts:
When I try to upload an image to a product in the back end, the upload 'bar' turns red and nothing happens. Is there any obvious reason why this might be happening?

Before pressing Upload files:

After:


texts: How to get user's profile information from magento facebook extension?

texts:
i am using "facebook connect and like free" extension of Magento and it is working perfectly. My next task is to get gender and age of a user who is logged in through his/her facebook account so that i can use this information in my code. How can i obtain that information?
Thank You.


texts:
I get this error when trying to upload a package file via magento connect of a Magento 1.9.3.0 installation.

CONNECT ERROR: Package community/DynamicCreative 1.0.0: requires PHP version >= 5.4.0 and <= 5.6.32 current is: 5.6.32-1+ubuntu16.04.1+deb.sury.org+2

The package file contains following specification as per the system requirement

<php><min>5.4.0</min><max>5.6.32</max>

When I check php -v on the machine, I get

PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+2 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Can anybody help how to fix the max version which can work across all php 5.6.x versions?


texts:
I was wondering how can I format a column into a certain date format? Right now I'm getting this format

But what I wanted was something like MM/d/Y format. I already tried this
<column name="created_at">
  <argument name="data" xsi:type="array">
     <item name="config" xsi:type="array">
        <item name="filter" xsi:type="string">dateRange</item>
        <item name="editor" xsi:type="string">text</item>
        <item name="label" xsi:type="string" translate="true">Order Date</item>
        <item name="sortOrder" xsi:type="number">6</item>
        <item name="dateFormat" xsi:type="string">dd/MM/Y</item>
     </item>
   </argument>
</column>

But it didn't work. Any idea how to fix this?


texts:
I want to change quantity number on specific product after payment receive.  And after that I reveave 400 error.
Is it possible to change the stock quantity? Or Am I doing something wrong?
I try to do API CALL with url and body
/rest//V1/products/
{
    "product": {
        "sku": "<skuNumber>",
        "extension_attributes": {
            "stock_item": {
                "qty": 4
            }
        }
    }
}


texts:
i'm trying to upgrade my magento1.8 to magento1.9  in my local magento

how to upgrade it with all my local files and custom changes?

i have tried this in local magento, but not working.

could someone explain it step by step.


texts: Override and replace default JS component

texts:
I want to replace default component Magento_Ui/js/grid/columns/actions with my own component that extends default one.

This is my ./view/adminhtml/requirejs-config.js:

var config = {
    map: {
        '*': {
            'Magento_Ui/js/grid/columns/actions': 'Vendor_Module/js/grid/columns/actions'
        }
    }
};

This is my ./view/adminhtml/web/js/grid/columns/actions.js:

define([
    "jquery",
    "Magento_Ui/js/grid/columns/actions"
], function ($, Component) {
    "use strict"

    debugger
    return Component
})

My custom module is loaded but original (default) "Magento_Ui/js/grid/columns/actions" is undefined (cause I have replaced it in requirejs-config.js I suppose).

How can I extend original component in this case?


texts: How is mode passed through Mage::app()->cleanCache($tags)?

texts:
I'm trying to understand the behaviour of the cleanCache() method on Mage_Core_Model_App.

My understanding is of the sequence after Mage::app()->cleanCache($tags) is:

Mage_Core_Model_App will call clean() on its _cache attribute, which is Zend_Cache_Core. It doesn't pass a $mode parameter.
The signature for that method on cache core is clean($mode = 'all', $tags = array()). So only passing $tags should result in the default mode of 'all'.

However, when I debug, the $mode parameter in Zend_Cache_Core::clean() has a value of 'matchingAnyTag'.

If it's not passed in and the default isn't that, where does it get that value from? I think I must be missing something in the call chain.


texts: how to use the collection walk iterator in magento2

texts:
I have 50k products in my website and want update tier price . i have existing tier price for products, but based on existing product price i need to update customer price.
i have created external root file and created one function.
like in magento1 i did
$products = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('id') ->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', 4) ->addAttributeToSort('created_at', 'desc');  Mage::getSingleton('core/resource_iterator')->walk( $products->getSelect(), array(array($this, '_Callback')),array() );
same thing i want with magento2 how to possible with magento2 collection, i want only call _Callback function with magento2 product collection so that it can work collection walk iteratorly.
$productCollection = $objectManager->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$productcollection = $productCollection->addAttributeToSelect('name')->addAttributeToSelect('price')->addAttributeToSelect('entity_id')->setOrder('entity_id','ASC')->load();
Please give me solution.


texts: Other Store View prices changed to default store price

texts:
I am running a Magento 2 store. It has one Default store for the main domain and the second store for the other location/language. I have different prices for same product across 2 stores.
Suddenly a day, I see the price on second store is showing as the price in default store. I checked the log files but nothing to find. Can someone advice what could cause this and how to prevent this.


texts: How to get current product in phtml without registry?

texts:
I would like to get my current product in my phtml.
I saw lot of examples with registry in the Block file, but now, in M2.3, it's deprecated.

Someone have an idea how to do ?


texts:
Today automatically added two admins to my site?
Is my site hacked?
What should I do to fix this bug?


texts:
I have the following JS:

$('.mydata:gt(4)').hide().last().after(
$('<a />').attr('href', '#').text('Show more').click(function () {
    var a = this;
    $('.mydata:not(:visible):lt(5)').fadeIn(function () {
        if ($('.mydata:not(:visible)').length == 0) $(a).remove();
    });
    return false;
}));

which you can find here: http://jsfiddle.net/niklasvh/nTv7D/

Instead of .text('Show more') I want to use a button.

Any help?


texts: Magento 2: Get all product types pro-grammatically in system admin?

texts:
Magento 2 provides product types as simple, bundle, configurable, grouped, gift card, etc.

Is there any way programmatically to fetch all the product types which exist in the Magento codebase including custom product type also?

This should probably scan the product-type.xml which is located in the respective module.


texts:
In module's helper Template.php I'm setting session variable using below code

public function getCategoryAddtoLinksIcons($_product, $_compareUrl, $wrapperClasses = '')
{
    $html = '';

    if (Mage::helper('wishlist')->isAllow())
    {
        $url = Mage::helper('wishlist')->getAddUrl($_product);
        if(isset($url)){
            Mage::getSingleton('core/session')->setWishlistUrl($url);
        }
        $html .= '

';
}
if (!empty($html))
    {
        return '
' . $html . '
';
    }
    return $html;
}

and doing an ajax request to controller function where retriving session variable and unsetting it using

$wishlist_url = Mage::getSingleton('core/session')->getWishlistUrl();
Mage::getSingleton('core/session')->unsWishlistUrl();
Mage::log($wishlist_url, null, 'session.log');

But still I see, next time variable is set. Do I need to give timing also while setting/destroying session variable?


texts: Generate SOAP request from UI transactions

texts:
Is there a way to generate SOAP API requests from actions taken in the Magento UI?

For example, adding a shipment to an order.

This would be helpful for testing the API for a particular site.


texts: Magento 2 icon font position problem (navigation menu)

texts:
Magento2 - I am trying to put some icons in my navigation menu, I want them to be on top of the subcategory name but this is what I have until now:

This is my code for the first item, I have it in >Magento Theme>web>css>source>_module.less:

.navigation li:nth-child(1){
.lib-icon-font(
@_icon-font-content: @icon-phones2,
@_icon-font-color: @color-gray-omnie1,
@_icon-font-color-hover: @color-gray-omnie1,
@_icon-font-color-active: @color-gray-omnie1,
@_icon-font-size: @tamanho-iconos,
@_icon-font-vertical-align: top,
@_icon-font-margin: 0 0 0 30px
);
}

Thank you!


texts: Sitemap and Product URLS to include a specific parent category in URL - Magento 2

texts:
I would like to use the "Use Categories Path for Product URLs" feature within Magento 2 however default to it. Not only that but in the case a product belongs to multiple categories be able to set the default path to include a "Master" category.
By default the sitemap seems to generate basic urls like domain.com/product.html. And even when "Use Categories Path for Product URLs" is set to enabled the products are accessible from other urls.  I want to achieve domain.com/master-category/product.html as the only route to that product if possible.
Not sure the best route to achieve this weather it be a module that creates redirects based on master categories and generates URLS redirects accordingly and then similarly mods the sitemap generation to include these URLS or if there is an easier route e.g default settings or recommended module?


texts:
i am trying to filter orders that have sku in its item collection
I am not sure if we can use filters directly for product attributes on order collection using function.
is their any way to do so ?


texts: Magento2 Something went wrong while saving the page

texts:
I have problem with creating new page from backend
it shows me this message: Something went wrong while saving the page.

I can edit and save the page but I can't create the new page.
any idea??


texts:
The Magento stock RWD theme does not respond well in a IE 11 browser. Account is on top of the logo. Minicart.phtml does not appear in IE. How can we find a resolution to this issue?

Screenshot below of IE and Chrome browsers.

Thank you for your time.


texts: After changing caption text of button Place Order still no change visible

texts:
I have subzero knowledge of Magento, yet I was asked to change just the Caption of the Button place order as the existing Spanish translation confused customers. So I went to locale and changed the text where it said: Hacer un pedido I wrote Completar este pedido.

I uploaded the csv file back,. but I am still seeing "Hacer un pedido".
I am afraid to mess with the cache or index or whatever because I have no understanding of the inners of magento, but I have not even modified any  php code, just a text of a button. What do I need to do to make the change visible to customers now?

thank you


texts: Magento 2 Display 3 items per row in products/category pages?

texts: How to display 3 items per row on products/category pages for 2 column Magento 2?


texts: Extensions in Magento 2 in Plesk 12 via APS Package

texts: after a while of trying to run magento2 on plesk 12 manually I decided to try the APS package and installed Magento 2 as an application on my domain. Everything seems to work almost fine, but I cannot get any extemsions to be installed. Whenever I try to install an extension, my server crashes and I have to reinstall the whole application. When installing vie Setup Wizard, it is stuck at "Update pending" and a manual installation via console leads to the server being not reachable (HTTP Error 500). What can I do to install extensions properly? One interesting find: when I copy the code files and change the config.php to include the extension (in this case a language pack), the server is unreachable as well, but after revoking the changes in config.php, the language pack worked (withoit officially being active). Unfortunately this does not work for other extensions.


texts: Images in custom /media path redirect some images to get.php when accessed via CloudFront CDN

texts:
I have some images stored in media/email/images/. I accessed the images via CDN and all loaded as they should. Afterwards I mistakenly deleted a few images and eventually the CDN URL for the missing images begin redirecting to Magento's get.php.

I restored the missing images to the directory yet these particular files continue to redirect. I can access the file at www.site.com/media/email/images/missingimage.jpg but not at cdn.site.com/media/email/images/missingimage.jpg - it redirects to www.site.com/get.php.

I have tried the following CloudFront invalidation:

/media/email/images*
/media/email/images/image1.jpg
/media/email/images/image2.jpg
/media/email/images/image3.jpg
media/email/images/image1.jpg
media/email/images/image2.jpg
media/email/images/image3.jpg


texts: Magento2 : Get Url of included JS file in my Custom Module

texts:
I am working in a custom module for admin section and used to add a third party JS file in my layout and saved JS file in magento2\app\code\[Namespace]\[Module]\view\adminhtml\web\js\JSFILE.js

Now, at other part of my custom module in Block section i need to access that file, and need to use JS file path. How should i get the full path  included.

Example:
http://localhost/magento2/pub/static/adminhtml/Magento/backend/en_US/Namespace_Module/js/jsfile.js

The above given path i need to get dynamically.

any help is appreciated.


texts: How to install modules in app/code with composer in Magento 2

texts:
How can I force composer to install modules in app/code instead of vendor directory in Magento 2?

I have few modules they strictly need to be install in app/code, but when I update them with composer, they install in vendor directory.


texts: what is the options meaning in the repo url ----- Upgrading magento 2.2.6 to 2.3.2

texts:
I am trying to upgrade magento using the custom script

php -f pre_composer_update_2.3.php -- --root='<path/to/magento/install/dir>' --repo=https://repo.magento.com/ <options>

I understand the path to Magento install directory but can you please help me to understand the options meaning in the above code? please provide an example for the above code.

thanks in advance.


texts:
My site is very slow. So I have to decide to apply lazy load.

Someone please suggested me how to apply lazy load in magento 1?


texts: Magento Wordpress Multisite - Wrong Dashboard

texts:
I am using the Fishpig WordPress Integration with WP Multisite, and I cannot get to the subsites Dashboard, only the main one.

magento/wordpress/wp-config.php (partial)

...
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'mydomain.com');
define('PATH_CURRENT_SITE', '/news/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);

define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
...

magento/wordpress/.htaccess

RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]


texts: How do I open a csv file in the root of my module directory?

texts:
I've been writing a rather complicated module as of late. One of the steps I need to do is pre-populate one of the models with all of the data it needs to work right. This data is slowly replaced using a syncing system / rest calls from our database software, but it needs to be there initially so the end user doesn't think its 'all missing' before this sync happens.

I've been trying to use a csv file in my module directory.  For the life of me, I can't figure out the combination of factories and methods to get that folder. I can't assume its going to be in ANY particular place though, since this module will end up on a CDN hosted platform.

I've tried injecting

\Magento\Framework\Module\Dir\ReaderFactory
\Magento\Framework\App\Filesystem\DirectoryListFactory

as well as direct php

__DIR__
dir()
dirname()
$_SERVER (ugh)

None of this can figure out

/var/www/app/code/mycompname/modulename/data.csv

while developing.. and

/var/www/vendor/mycompname/modulename/data.csv

when testing the composer distribution.

Any suggestions are welcome. I need to load the full path to use something like this....

$csv = file($pathThatWasFound);

EDIT: I read http://alanstorm.com/magento_base_directories <--- based on 1.x magento. I need 2.0 suggestions

EDIT: I may be bumping into constraints of FILE magic and xdebug (https://stackoverflow.com/questions/4924676/how-can-i-get-the-php-magic-constant-file-work-with-eclipse-and-pdt)


texts: Display the size of the ordered product shipment pdf

texts:
I modified the pdf of the delivery slip to add a return slip. However, this does not display the size of the product purchased but the size of the configurable.
How do I change this?
  $product = Mage::getModel('catalog/product')->load($item->getProductId());
        if ($product->getId()) {
            $size = $product->getAttributeText('size') ?: $product->getData('size_label');

Magento 1.9
Thank for this help


texts:
I create new Block Xyaddons\Productzoom\Block\Product\View\Gallery override Block \Magento\Catalog\Block\Product\View\Gallery.
I want set template image.phtml in Xyaddons_Productzoom::product/image.phtml override template product/view/base-image.phtml in core.
I try create function in block new Block. But i not success. so any help me? thank so much!

public function beforeToHtml(\Magento\Catalog\Block\Product\Gallery $originalBlock) {
        $originalBlock->setTemplate('Xyaddons_Productzoom::produtc/image.phtml');
    }


texts: Magento 2| How to get full billing address of orders?

texts:
I am trying to get list of all billing addresses of all orders along with other information. Rest is working fine.

This is the function:

 public function getHtml()
   {

        $_orders = $this->order->getOrders();
        foreach ($_orders as $order){
            $itemName = '';
            $itemQty = '';
            $customerName = '';
            $billingAddress = '';
            $OrderId = $order->getEntityId();
            $customerName= $order->getCustomerName();
            $billingAddress = $order->getBillingAddress();
            $OrderItems = $order->getAllItems();
        foreach ($OrderItems as $item) {
          $itemQty.= $item->getQtyOrdered().'
';
          $itemName.= $item->getName().'
';
        }

                echo $OrderId;
                echo $customerName;
                echo $itemName;
                echo $itemQty
                echo $billingAddress;

}

Problem is when I do

$billingAddress = $order->getBillingAddress();

Get this: 1 exception(s):
Exception #0 (Exception): Recoverable Error: Object of class Magento\Sales\Model\Order\Address could not be converted to string in..remote file path and line number

and when

$billingAddress = $order->getBillingAddress()->getStreet();

Get this: 1 exception(s):
Exception #0 (Exception): Notice: Array to string conversion in remote file path and line number


texts: Problem with Admin CSS after switching from custom path

texts:
We upgraded a client to 1.13EE and removed the custom path in admin. The switch works fine on Local, Dev and Staging.

But on production we are getting this for Admin css (in front of css and js)

<script type="text/javascript" src="8gTJvKZ1/js/prototype/prototype.js"></script>

I have changed the value in core_config_data to 0 for use custom url and restarted the web server. I grep'd the server for the code 8gTJvKZ1 and could not find it.

EDIT:

I did switch use secure for admin to 0 and now I get this error

There has been an error processing your request
Illegal scheme supplied, only alphanumeric characters are permitted


texts:
Now all products are were gone on all store view. I checked and product and category index is proccessed.

I try reset indexes and reindex again but now I wait about 50 minutes and no result.

Any solution ?


texts: Apply Customer Group Filter To Banner Module

texts:
I am currently looking to build a banner module that will allow a Magento admin user to upload banners to appear on their home page and then select what store views they want these to appear on as well as setting what customer groups they want the banner to appear for.

I have created a single table model that is managed through the admin area and have the store view selector working correctly but cant work out how I can obtain a list of the websites available customer groups and display them in a multiselect form element to enable the admin to choose which customer group the banner is for when creating or editing a banner item.

Can somebody advise the best way to obtain a list of available customer groups and display these in a multiselect form element?


texts:
If using the _module.less convention in a custom module - do we have access to all of the files included there (lib-clearfix, etc)?

Is this the only way or are there other methods that have been found?


texts: After installing magento 2.3.1, page can not open properly

texts: After installing Magento 2.3.1 with sample data on my localhost, When I am trying to open the home page it shows blank. My console contains an error as shown in the image. Please help.. Thanks!


texts:
I need to display price in my custom template

   $productCollections = $productCollections->addAttributeToSelect('*')
                      ->addAttributeToFilter('status', 1)
                      ->addAttributeToFilter('is_sale', 1)
                     // ->addAttributeToFilter('show_in_home', 1)
                      ->addAttributeToFilter('visibility', \Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH)
                      ->load()
foreach($productCollections as $productCollection){
  echo $productCollection->getName();
}

I am using above code to implement product listing in home page.

I need to display price of product with html style

$this->getPriceHtml($product);


texts: Very slow processing time / TTFB of 4-5 seconds

texts:
The TTFB on this website I've been put in charge with is extremely slow with a custom made template and a few plugins which I've tried disabling with no luck. Using the inbuilt profiler with the Aoe_Profiler plugin, I've retrieved the following results:

It shows that config/load-db is taking almost the whole 4 seconds of the processing time. I'm not too savvy with Magento and was wondering if there was any way to further debug and find what specific areas of the database are causing this massive page load.

Additional Information:

Disabling the modules does not do anything
The database is reasonably large at about 90mb+ but the majority of it is in temp and log tables e.g. catalog_product_index_eav_tmp and so on.
I have tried optimizing MySQL with no improvement to this slow load time.
Magento ver. 1.9.1.1


texts: How do I install Paystack Payment Plugin on My Magento 2.3 Site

texts:
I would like to install paystack payment plugin on my site, I have downloaded the zip file but the issue is that I don't see the familiar magento 2 directories after unzipping the package where I could just copy the files to the corresponding directories on my magento 2 root directory.
Please how do I install the plugin in a scenario like this?


texts: Magento2 bin/console commands returned empty

texts:
I'm wroking with Magento 2.1.1 (with PHP 5.6) and when I try to run a bin/magento command I'm getting nothing.
No error, no message, nothing.

I didn't found any special message on logs.
Has anyone seen this problem before? There's some recomendation to try to debug this issue?


texts: Magento some Category view pages are not displaying Properly

texts:
Please visit this link.

http://joinery.newtrendzonline.com/handles/led-lighting/led-flexible-ribbon.html

I added lot of products to this site. .

Now Category view pages started to display like in the above link.


texts:
I'm wondering if it is possible to hole punch the block cache, or if I need to rethink how the block is being included. The PHTML file is being brought in with a _parepLayout() method in a module (extended off of Mage_Catalog_Block_Category_View).

protected function _prepareLayout()
{
    parent::_prepareLayout();

    if ($this->isMixedMode()) {
        if(!$this->getRequest()->getParam('listing')){
            $root = $this->getLayout()->getBlock('root');
            $root->setTemplate('page/1column.phtml');
            $root->unsetChild('left');

            $this->_addChildBlock('something_categorylisting/subcategory_listing', 'something.subcategory.listing', 'subCatListing', 'something/subcat_listing.phtml');
        }else{
            // Add cart blocks to product listing page
            $this->_addChildBlock('another_multicart/addtocart', 'another.catalogaddtomulticart', 'catalogaddtomulticart_addtocart', 'something/multicart/addtocart.phtml');

            $this->_addChildBlock('core/template', 'another.catalogaddtocart', 'catalogaddtocart_addtocart', 'catalog/category/categoryaddtocart.phtml');
        }
    }

    return $this;
}

I'm trying to hole punch the subcat_listing.phtml block. In it is some conditions to show certain buttons on the page based on a count. I am completely lost on how to accomplish this. I've tried methods found on Google and in other code samples. Does anyone have any direction on where to begin doing this? Doesn't have to be a complete solution. I just need a base to go from on solving this.


texts: How do I get a visitor time zone in magento 2 in contact us form

texts:
I have a contact us form, I want to set echo the time zone in my "abc.phtml" file on the basis of the visitor visits the page into  the contact us form, it should display there and in my contact sent mail, i will understand the timezone of my visitor who filled my "contact us" form. Kindly tell me some way how can i achieve this by following all the magneto rules.
Using Ip address and some geo-location it may be possible but i want to know the exact way or to the point solution for this. Please help in this matter.

In the image you can BST written there, we can have IST or EST or GMT etc, i want it according to visitor's location.


texts: Magento 1.9.2.4 media uploader freezes browser

texts:
When I want to add an image to a page or static block I use the media gallery and upload a new image.

Unfortunately, when I press the browse button I can select a file. But as soon as I select it, it freezes in all browsers.

I know the media uploader has been updated not to use flash anymore, which is a great improvement. But It suddenly stopped working, and I am not sure how to debug this kind of problem using the inspector.


texts:
I implemented redirection for users when some condition become true. My code

<?php

namespace send\sms\Observer;

use Magento\Framework\Registry;
use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Message\ManagerInterface;

class check implements ObserverInterface
{

    protected $redirect;
    protected $_customerSession;
    protected $_objectManager;
    protected $_urlInterface;

    public function __construct(
        \Magento\Customer\Model\Session $customerSession,
        \Magento\Framework\App\Response\RedirectInterface $redirect,
        \Magento\Framework\ObjectManagerInterface $objectManager,
        \Magento\Framework\UrlInterface $urlInterface
    ) {

        $this->_customerSession = $customerSession;
        $this->redirect = $redirect;
        $this->_objectManager = $objectManager;
        $this->_urlInterface = $urlInterface;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $actionName = $observer->getEvent()->getRequest()->getFullActionName();
        $controller = $observer->getControllerAction();

        $obm = \Magento\Framework\App\ObjectManager::getInstance();
    /** @var \Magento\Framework\App\Http\Context $context */
    $context = $obm->get('Magento\Framework\App\Http\Context');
    /** @var bool $isLoggedIn */
    $isLoggedIn = $context->getValue(\Magento\Customer\Model\Context::CONTEXT_AUTH);
    if($isLoggedIn){
      $om = \Magento\Framework\App\ObjectManager::getInstance();
           $customerSession = $om->create('Magento\Customer\Model\Session');
           $suser_id = $customerSession->getCustomer()->getId();
    $this->_resources = \Magento\Framework\App\ObjectManager::getInstance()->get('Magento\Framework\App\ResourceConnection');
    $connection= $this->_resources->getConnection();
    $tableName = $this->_resources->getTableName('otpp');
    $sql = "SELECT verified FROM otpp WHERE `entity_id`='$suser_id'";
    $result = $connection->fetchall($sql);
    @$otparray = $result['0'];
    $verified = $otparray['verified'];

        if($verified == 0) {
            $url = $this->_urlInterface->getUrl('otp/index/index'); // give here your controller/action
        // below code redirects to cart controller
        $observer->getControllerAction()
                    ->getResponse()
                    ->setRedirect($url);
        }

    }
    }

}


texts: How to display Static Boxes in a row (rather than on top of each other)

texts: I am trying to add multiple static boxes in the same category. I am able to add them via short code by calling several at a time, but the boxes (which utilize images and links) only appear/show up on top of each other. I need them to list in a row (ex: 1, 2, 3, 4, next line down: 5, 6, 7, 8). Is there a way to get them to list in a row in short code?


texts:
I have configured Advanced reporting in Magento 2.3.4 and in 2.3.5-p1. I have followed all the given steps to configure Advanced reporting in Magento, even my subscription is showing "Enabled" status. But still it shows me 404.
Not sure what I did wrong or what could be the settings other that need to add.
Can you please provide solution on this?


texts: Creating review by code is not setting the created_at

texts:
I am creating reviews on Magento 2.1 using the factory and setting the created_at but it seems magento is ignoring it.

$review = $this->reviewFactory->create(
                [
                    'data' => [
                        'created_at' => $myReview->createdAt,
                        'updated_at' => $myReview->updatedAt,
                        'stores' => $this->getAllStoreIds(),
                        'code' => $myReview->id,
                        'status_id' => Review::STATUS_APPROVED
                    ]
                ]
            );

It does create the review but without created_at


texts: Is it possible to use Paypal with base currency INR?

texts:
Currently i am developing magento 1.9 website with base currency INR,
Also website has multiple currencies. Like USD, EURO, AUD.

Is it possible to pay with paypal when website's current currency is USD or AUD or EURO,

I already setup paypal, but during its doesn't redirecting to paypal.

Any help would be appreciate.


texts: How do I show the message "No Products" when there's no products in my custom block?

texts:
I need to show the message "No Products" or "There are no products matching the selection" when there's nothing to show in my block.

<?php
$manufacturer = Mage::registry('current_product')->getMerchantName();

$productCollection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('*')
->addAttributeToFilter('merchant_name',$manufacturer);
$productCollection->getSelect()->order('RAND()');
$productCollection->getSelect()->limit(5);

foreach ($productCollection as $_product)
?>

<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'thumbnail')->resize(228) ?>" width="228" height="228" alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />

<a href="<?php echo $_product->getProductUrl() ?>"><?php echo $this->htmlEscape($_product->getName()) ?>

<?php
$merchant_name = $_product->getAttributeText('merchant_name');
if ($merchant_name){?>

by <?php echo $merchant_name;?>

<?php }

else if ($_product->getIsEbayaffiliate()) { ?>

by eBay

<?php }

else { ?>

by Home Done

<?php } ?>

Also I need to add getPriceHtml to the above code to show the product price.

I have tried <?php echo $this->getPriceHtml($_item, true) ?> this but price remains blank.


texts: Your session has expired main home page magento 2

texts:
Go to home page and add to cart product and then this time error is come Your Session Has Expired
I also try to change pen PHPMYADMIN
run:
UPDATE core_config_data SET value = 864000 WHERE path = 'admin/security/session_lifetime' but not working tell me how to find this solution


texts: UPS - Malformed XML on shipping rates request

texts:
inside the shipping.log file i can see this error:

The XML document is not well formed

After some digging I see that my Auth information are not well encoded.
It works perfectly when I write them directly without actually using the getConfigData() function. Is there anything to do to have these information correctly encoded, without writing directly my login information inside my file?


texts: Magento 2 : Not able to place order. Error is following

texts:
[2018-08-21 12:16:02] main.CRITICAL: Rolled back transaction has not
  been completed correctly. {"exception":"[object] (Exception(code: 0):
  Rolled back transaction has not been completed correctly. at
  /home/groceryp/www.tripochure.com/bikeon/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php:270)"}
  []


texts: Magento 2: Page Builder Product Carousel slick slide custom options

texts:
Can someone please help me to add custom options to the slick slider init for page builder product carousels?

I don't know exactly where it's being initialized and I have very little experience in creating mixins.

I was easily able to do this by copying over

vendor/magento/module-page-builder/view/base/web/js/resource/slick/slick.js

to my theme directory and replacing the response: null with the below but I know it's not the correct way to overwrite an entire library for a small change like this.

responsive: [
    {
        breakpoint: 9999,
        settings: {
            slidesToShow: 6,
            slidesToScroll: 6
        }
    },
    {
        breakpoint: 1024,
        settings: {
            slidesToShow: 4,
            slidesToScroll: 4
        }
    },
    {
        breakpoint: 768,
        settings: {
            slidesToShow: 3,
            slidesToScroll: 3
        }
    },
    {
        breakpoint: 480,
        settings: {
            slidesToShow: 1,
            slidesToScroll: 1
        }
    }
],

What would be the correct way to add my custom options to the slick init for page builder product carousels?


texts: Magento 2 REST API Get TaxRate by Tax Class ID

texts:
i'm using RestSharp in C# to connect with Magento2 REST API.

Everythings fine, except one simple thing:

lets say i've got a product, in its JSON-DATA there is a tax_class_id "4". Inside of this tax_class_id theres a tax rate of 19% integrated. How do i get the taxrate "19" from the tax_class_id "4"?

here's the call:

var response = new RestRequest("/rest/default/V1/products/SampleProduct",Method.GET);
response.RequestFormat = DataFormat.JSON;
response.AddHeader("Authorization","Bearer " + Token);
response.AddHeader("Accept","application/json");

here's the json-data from the response (all unnessary data like meta data etc. are cropped). I added some annotation "<<" for better understanding what i need

{
  "items": [
    {
      "id": 1,
      "sku": "SampleProduct",
      "name": "a Simple Sample Product",
      "attribute_set_id": 4,
      "price": 4.99,            << this is with tax, i need the taxrate to get the price without tax aswell
      "status": 1,
      "visibility": 4,
      "type_id": "simple",
      "created_at": "2017-10-04 12:11:03",
      "updated_at": "2017-10-24 10:02:50",
      "product_links": [

      ],
      "tier_prices": [

      ],
      "custom_attributes": [
        {
          "attribute_code": "tax_class_id",
          "value": "4"      << i've got the class_id, now i must have the taxrate. Its 19% but how do i get the value "19"
        }
      ]
    }
  ],
  "total_count": 1
}

what can't be done:

- using PHP to do the Task
- changing some files to get it to work

what i have:

- the Magento 2.2 REST API
- C# as programming language to work with
- a Magento Shop with Access Token for REST API Requests, but no other physical access
- the product and all its data (except the taxrate ^^)
- the tax_class_id of the product
- the information that tax_class_id in *this* Shop for *this* product , id = 4 is 19% taxrate
- it must work with every other shop, every other tax_class_id, every other product as well, where e.g. id = 1 is 19% and id = 4 is like 7%

what i can use to get to it:

- the {TAXCLASSID} which is not the same as the {TAXRATEID}

what i need:

- the {TAXRATEID} to get the rate (e.g. 19 or 8.25)

Hope someone can help me with that task.
Thanks in advantage.


texts: How to make refund shipping optional in Credit memo

texts:
Heyy,
So I'm tearing my head trying to figure how to make the refund shipping optional in credit memo (like checking on a box would make refund shipping appear) ,I've gone through all the forums and still couldn't figure it out , any help would be appreciated.


texts: Apache configuration file for Magento 2.4

texts:
I have installed Magento 2.4 on Apache 2 sever running on Ubuntu 20.x
When I try to load the magento root directory on browser, I get

Not Found
The requested URL was not found on this server.

I have the .htaccess (default file created by install) like this
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/pub/
RewriteCond %{REQUEST_URI} !^/setup/
RewriteCond %{REQUEST_URI} !^/update/
RewriteCond %{REQUEST_URI} !^/dev/
RewriteRule .* /pub/$0 [L]
DirectoryIndex index.php

Can someone help me understand what this is trying to do?
My understanding is, this is looking for index.php file (which is not present in the root installation directory - and thus the error).
I have a feeling that the error has to do something with the line
RewriteRule .* /pub/$0 [L]

Thanks in advance!


texts: Omnichannel magento solution api requests int

texts:
the company i work for is having difficulty linking a new Epos system to our new Magento 2 website.
Our previous Magento 1 website was connected to a legacy Epos system and for most of the time it worked fairly well. Given the fact that we continuously ran into costly problems with the synchronisation of the legacy system and magento 1 website, we decided to upgrade to a cloud based system called TRIMS. This provider (TRIMS) has linked with several magento 2 websites without errors.
The problem we are having is that the TRIMS (Epos Provider) connector API is failing to map the product data to the magento 2 api , and the errors being thrown back are as follows:
"Last Error""The remote server returned an error: (400) Bad Request. {"message":"Error occurred during "custom_attributes" processing. Attribute "type" has invalid value. The "COATS" value's type is invalid. The "int" type was expected. Verify and try again."}"
This error seems to be related to the epos system is sending up the value of the product Type which is "COATS" but magento2 need an integer.
Our web developers have recommended us that the epos system needs to send up an ID for the type "Coats" instead of the string value.
The developer for TRIMS is disagreeing with this recommendation and is saying that the types attribute do not use ID's , just the value is stored in the epos database. They have also suggested that the magento 2 attribute that is expecting an integer (ID) for the product type is an old practice and it can be configured to accept a string value and will also on retrieval of a new value , will assign a magento2 id to the type. I also think this makes more sense as to not clog up the epos system with un-needed data.
We are getting this error with all attributes so far i.e productBrand, productSize, productType and i expect we will get the error for other attributes such as season and any other attributes we try to push up in the future.
To boil it down to a bare question would be to ask, can the magento 2 api be configured to receive a string value to map to product attributes instead of sending an ID. Is seems the epos developer is making more sense and our web developers are unaware that magento 2 can recieve string values to map to product attributes instead of id's.
Hope this question makes sense,
Any help or advise on this is greatly appreciated.


texts: How to get product object from observer in product edit prepare form event?

texts:
I want to create custom note for an attribute I added to the products, so I hooked an event adminhtml_catalog_product_edit_prepare_form, but I need the actually edited product object, how can I get that from the $observer?

(I could get the ID from URL and load it by myself, but I'm sure there is a way to get the already loaded object...)

Thanks,
   TeeCee :o)


texts: CSS Changes take roughly 24 Hours to become live

texts:
I make changes on my Magento website im using 1.9.2 version and whenever i create any CSS changes the page doesn't change until the next day.

I have cleared the Cache in backend, by flushing everything System > Cache Management and no changes

I have deleted all the folders found in Var / Cache and still no changes

I have deleted all my Cache in my browser and tried different browsers/computer and no changes are happening.

I am stumped on what to try next or whats going on


texts: "Layout Update XML" field in Magento2 admin is missing

texts:
I installed a clean version of Magento 2.3.4 with composer and added a template. Then I wanted to edit some pages by inserting some XML code into the "Custom Layout XML" field that is visible in this screen:

But in my admin there is shown another field labeled "Custom Layout Update" not XML:

The help tooltip says

  List of layout files with an update handle "selectable" matching
  PageIdentifier_UpdateID. See Magento documentation for more information

But I can't find any information in the documentation and don't know how to enable the "Custom layout xml" field?


texts: Singed integers are not saving properly?

texts:
I have a custom table with column 'discount_percentage', which is a signed integer.

e.g. +5 , -2 likewise

I have defined the data type as Varchar for this field. But it's not saving the value properly. When I save +10 it will only save 10. But I want it to be as +10.

I tried by enclosing the single quotes. But didn't work.

Please can anyone explain what am I missing here?


texts: How to make product grid in frontend in custom module magento 2?

texts:
I have created brand page to display details with associated product list.

I want to show that product list in grid same as admin.

Can it be possible to show grid in frontend same like backend ?


texts:
How i can translate "Close (Esc)" button? I tried add translate csv file "Close (Esc)","text (Esc)" but doesn't work.

This is below code what need edit?

Javascript

'class': 'action primary',
click: function () {
this.closeModal();
$('.mfp-close', parentBody).trigger('click');

Html

<button title="Close (Esc)" type="button" class="mfp-close">×</button>


texts: How to add static blocks to transactional emails?

texts:
I have been looking around on how to add a static block into the transactional emails.

I found the solution on github here:  https://gist.github.com/mkdizajn/6351957

The regular way to add a static block to a CMS page is:

{{block type="cms/block" block_id="this_block"}}

This does not work in transactional emails.

The github solution on the other hand:

{{block type="cms/block" block_id="this_block" template="cms/content.phtml"}}

This works.

Why does it work?  And is this a good way to add static blocks to transactional emails?


texts: Removing all instances of Nexcess / Turpentine

texts:
I have 4 stores and I was successfully able to remove it from all stores except one of them. When i remove the last folder from my problem store i throw some system.log errors.

public_html/var/log/system.log:1549:2015-10-09T16:02:32+00:00 ERR (3): Warning: include(): Failed opening 'Nexcessnet/Turpentine/Model/PageCache/Container/Notices.php' for inclusion (include_path='/public_html/app/code/local:/public_html/app/code/community:/public_html/app/code/core:/public_html/lib:.:/usr/share/pear:/usr/share/php')  in /public_html/lib/Varien/Autoload.php on line 94
./public_html/var/log/system.log:1550:2015-10-09T16:02:41+00:00 ERR (3): Warning: include(Nexcessnet/Turpentine/Model/PageCache/Container/Notices.php): failed to open stream: No such file or directory  in /public_html/lib/Varien/Autoload.php on line 94

I'm able to successfully remove all the other files/folders from my other stores. They throw the same error in my system.log but the stores are still up and running. This store on the other hand it shows just a blank page, I still see the favicon in the tab so i guess it looks like it wants to load but nothing.


texts: Getting current customer with registry in Magento2

texts:
below is my block file code

class View extends \Magento\Framework\View\Element\Template
{
protected $_registry;
protected $_customerSession;
protected $_customer;
public function __construct(
    \Magento\Framework\App\Action\Context $context,
    \Magento\Framework\Registry $registry,
    \Magento\Customer\Model\Session $customerSession,
    \Magento\Customer\Model\Customer $customer
) {
    $this->_registry = $registry;
    $this->_customerSession = $customerSession;
    $this->_customer = $customer;
    parent::__construct($context);
}

public function getUser()
{
    if (!$this->_loadValidUser()) {
        return;
    }
    return $this->registry->registry('current_user');
}

protected function _loadValidUser($userId = null)
{
     $userId = (int) $this->getRequest()->getParam('user_id');
    try {
        $user = $this->_customer->load($userId);
        $this->registry->register('current_user', $user);
        return $user;
    }catch (Exception $e) {
       print_r($e->getMessage());
         return false;
    }

}

}

What is the mistake in above construction? I am getting the error like

  PHP Fatal error:  Uncaught TypeError: Argument 1 passed to
  Magento\Framework\View\Element\Template


texts: Category page manager stuck in reload (CentOS7 + ngingx 1.11.8)

texts:
I already checked out Category Manager Page in a Reload Loop Nginx and saw a similar problem that I am encountering. The solutions mentioned in the mentioned topic DO NOT solve my problem. The Category page manager seems to be forever in a loop after trying to save a changed category. Unfortunately I use CentOS7 instead of Ubuntu and I think therefore my adjustments need to be different.

My nginx.conf

#user  nginx;
# The number of worker processes is changed automatically by CustomBuild, according to the number of CPU cores, if it's     set to "1"
worker_processes  4;
pid /var/run/nginx.pid;
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;
events {
    include /etc/nginx/nginx-events.conf;
}

http {

    ##
    # Basic Settings
    ##
    include /etc/nginx/mime.types;
    map $scheme $fastcgi_https { ## Detect when HTTPS is used
    default off;
    https on;
    }

    # For user configurations not maintained by DirectAdmin. Empty by default.
    include /etc/nginx/nginx-includes.conf;

    # Supplemental configuration
    include /etc/nginx/nginx-modsecurity-enable.conf;
    include /etc/nginx/nginx-defaults.conf;
    include /etc/nginx/nginx-gzip.conf;
    include /etc/nginx/nginx-proxy.conf;
    include /etc/nginx/directadmin-ips.conf;
    include /etc/nginx/directadmin-settings.conf;
    include /etc/nginx/nginx-vhosts.conf;
    include /etc/nginx/directadmin-vhosts.conf;
    include /etc/nginx/conf.d/*.conf;
}

And my /conf.d/magento.conf

server {
    listen 80 default;
    # server_name magento.lan www.magento.lan; # like ServerName in Apache
    # root /var/www/magento; # document root, path to directory with files
    # index index.html index.php;
    autoindex off; # we don’t want users to see files in directories
    location ~ (^/(app/\|includes/\|lib/\|/pkginfo/\|var/\|report/config.xml)\|/\.svn/\|/\.git/\|/.hta.+) {
        deny all; #ensure sensitive files are not accessible
    }

    location / {
        try_files $uri $uri/ /index.php?$args; # make index.php handle requests for /
        access_log off; # do not log access to static files
        expires max; # cache static files aggressively
    }

    location \~\.php$ {
        try_files $uri =404; # if reference to php executable is invalid return 404
        expires off; # no need to cache php executable files
        fastcgi_read_timeout 600;
        fastcgi_keep_conn on; # use persistent connects to backend
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root${fastcgi_script_name};
        fastcgi_param MAGE_RUN_CODE default; # Store code is defined in
    #administration > Configuration > Manage Stores
        fastcgi_param MAGE_RUN_TYPE store;
    }

    location ~ .php/ {   ## This was apparently the solution due to others but not for me
        rewrite ^(.*.php)/ $1 last;
    }
}

I would really appreciate if one of the nginx/centos gurus can help me get rid of this annoying problem because I do not get it and my knowledge of nginx is too limited.

Let me know if any other files are needed.

More info: if the page is stuck in reload loop, then doing a browser refresh (F5 in chrome or CTRL-R in Firefox) unlocks the loop. Also doing the category edit on a mobile phone, doesn show this issue.

Weird or what ?


texts: Magento Development Workflow: how to "source control" databases and update the live Magento installation from the Test magento installation?

texts:
I am posting this question because I would like to know what the best
development workflow is for someone who wants to manage all aspects of
an online store.

As with all web development of course, having a live copy and at least
one development copy of the entire software solution is of course very important.
However managing Magento stuff is not like managing other "file-based" software
because there is also a database component which comes into play, so, besides
the fact that I can use a tool like Git as a VCS tool for source control,
how would I go about managing differences in the database between the
live and development versions?

I could of course make backups of the live database via cron, and insert the
SQL INSERT statements from backup into source control, but after that
two databases will evolve separately while customers register and place
orders on one hand which go into the live database, and as updates are made
to the development database separately. When it will come to merging development
and live versions, the php files can be updated no problem via git (using gitignore
on the single file which host database configuration details), but what about the
database files? How can I merge the two files containing INSERT SQL statements
from the two backups without causing a disaster and wrecking the system?

This is the shady area of the Magento development lifecycle which I am facing:
managing database differences.

It seems to me, like the only solution to synchronizing the database contents
which differ between the development/testing and live versions of the Magento
store is to write down on a piece of paper all changes made in the development
version via the Magento Admin Panel, and hope not to make any mistakes, and
then once everything is tested and works file, to go over to the live version
and carry out those exact same changes while Magento is taken offline and
is put into maintenance mode. Since this is a manual process, is it prone
to error.

So, what is the better way to handle database synchronization between the
test magento server and the live magento server?

Thanks.


texts: How to add in stock filter to category products collection?

texts:
I want to show only products in stock, how to do this with following Magento code?

$category_model = Mage::getModel('catalog/category')->load(55);
$collection = Mage::getResourceModel('catalog/product_collection');
$collection->addCategoryFilter($category_model);

How to add this filter to above code?


texts: Piwik iframe displaying multiple tab instead of showing analytics of website

texts:
I have installed piwik in ubuntu and then i have installed Piwik Ecommerce from magento connect. Piwik is running on sever, but piwik iframe is not displaying any results in magento backend.

Reports->PiwikIframe displaying multiple tabs, and not giving any information. I have also added the following line in config/config.ini.php under general tab:

enable_framed_pages=1


texts: I am not able to overwrite the reorder.php file which is an abstract class. Anyone can help whether I have use di.xml or any other method.


texts: Resource Model vs Repository in Magento 2

texts:
I am quite confusing on the concept of Resource Model and Repository in Magento 2.

Are they both responsible for managing the persistent storage, like MYSQL?

Let says I would like to get specific customer model by ID from MYSQL, how do Resource Model and Repository work, to return correct result?

Please kindly correct me if I mis-understand the concept.

Thanks a lot!!!!


texts: How to load product collection in Magento 2 and what is the difference between Magento 1 and Magento 2 load product collection


texts: Magento Catalog URL Rewrites not indexing (site hosted in AWS EC2)

texts:
I have two magento sites hosted in AWS. Two different sites and two different server. Only the Catalog URL Rewrites is not indexing. Is there something i have to configure in AWS?
magento v1.9.2.2

every time i have to truncate core_url_rewrite in phpmyadmin to index it. Please guide what i did wrong.

magento v1.9.2.2


texts: how to show tax percentage of each product on wishlist page - magento?

texts:
I wants to show tax percentage of each item on wishlist page.

This is my wishlist product div please suggest me how to show tax percentage for each item.

        <?php if ($this->helper('wishlist')->isRssAllow() && $this->hasWishlistItems()): ?>
            <a href="<?php echo $this->helper('wishlist')->getRssUrl($this->getWishlistInstance()->getId()); ?>" class="link-rss"><?php echo $this->__('RSS Feed') ?>
        <?php endif; ?>

<?php echo $this->getTitle(); ?>

    <?php echo $this->getMessagesBlock()->toHtml() ?>

    <form id="wishlist-view-form" action="<?php echo $this->getUrl('*/*/update', array('wishlist_id' => $this->getWishlistInstance()->getId())) ?>" method="post">
        <?php echo $this->getChildHtml('top'); ?>

            <?php if ($this->hasWishlistItems()): ?>
                    <?php echo $this->getBlockHtml('formkey');?>
                    <?php $this->getChild('items')->setItems($this->getWishlistItems()); ?>
                    <?php echo $this->getChildHtml('items');?>

            <?php else: ?>

<?php echo $this->__('You have no items in your quote.') ?>

            <?php endif ?>

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

    </form>

    <form id="wishlist-allcart-form" action="<?php echo $this->getUrl('*/*/allcart') ?>" method="post">
        <?php echo $this->getBlockHtml('formkey') ?>

            <input type="hidden" name="wishlist_id" id="wishlist_id" value="<?php echo $this->getWishlistInstance()->getId() ?>" />
            <input type="hidden" name="qty" id="qty" value="" />

    </form>

Thanks in advance


texts: Adding new order status in extension in Magento 1.9

texts:
Ok so I've made a quick module. All seems to be working fine, corn job is running, admin section working and logging is working fine. However the order status I've defined in my XML is not appearing in the back end.

config.xml

....
<global>
    <sales>
        <order>
            <statuses>
                <pending_canceled translate="label">
                    <label>Timed Out</label>
                </pending_canceled>
            </statuses>
            <states>
                <canceled>
                    <statuses>
                        <pending_canceled/>
                    </statuses>
                </canceled>
            </states>
        </order>
    </sales>
    ...
</global>
...

I've been googeling around for a few hours now and have found very sparse resources on this. Some mention adding a dependency to Mage_Sales and some mention having to now run this through PHP, but the only example of this I was able to find was a french article

Does anyone have an example of doing this in 1.9 (or 1.7 above I suppose). I get the feeling I'll need to run a script on install but I'm not sure how these install scripts run (if they're run once and its added, or if it needs to run constantly, or remove on uninstall...)


texts: Where can I find the jQuery for place order now button?

texts:
I'm trying to find the jQuery of the place order button in the onepagecheckout page.

Does anybody know how I can edit the jQuery functionality of the place order button? Please give me a suggestion.


texts:
This is the content of my store contact address:

text

text2

text3

I am getting this content in the Pdf/Abstract.php file, like:

$storeAddress = Mage::getStoreConfig('general/store_information/address');

and I displayed it like:

$page->drawText(
    $storeAddress, 350, $top - 54
);

For some reason, it didn't recognize the
 tag.

So I tried to replace the
 tag with \n, but I got the same result. Is there a way to add a line break in the PDF?  Thx !


texts: Get Storefront Product URL for Magento 2

texts:
I am trying to get the storefront product URL.
$_Product = $objectManager->create('Magento\Catalog\Model\Product')->load($product->getId());
echo $_Product->getUrlModel()->getUrl($_Product);
For some of the products, the URL is showing as the product admin url. i.e., http://example.com/admin/catalog/product/view/id/463/s/product-name/key/21e3132388ab54cb00eb98bd047bb535057a7e9e44efac8b79cfe599e7ec7bad/
I want the product URL as http://example.com/product-name.html


texts: Magento 2 URL Redirect (301) not working

texts:
I am trying to redirect account creation to account sign in.  I create customer accounts in admin panel instead.  However attempting to redirect using Magento's URL Rewrite module is not working for me.

URL Rewrite: Custom
Store: Default store view
Request path: customer/account/create
Target path: customer/account/login
Redirect Type: Permanent(301)

Upon clicking "create account" in the store, it doesn't redirect to sign in page.

I am using Google Chrome and also tried with Safari.  I have cleared my browser cache, reindexed and cached Magento but to no avail.

Here's a photo of my configuration:


texts: Magento 2 - Admin form custom validation

texts:
I have a custom form in admin.

And this is one of my form field

    $fieldset->addField(
        'price_coefficient',
        'text',
        [   'name' => 'price_coefficient',
            'label' => __('Price Coefficient'),
            'title' => __('Price Coefficient'),
            'validation' => ['validate-price-coefficient' => true],
            'note' => 'Absolute figure (+8,-3), percentage (+15%, -20%) or Currency rate (1.44)'
        ]
    );

Now I want to add validation to this field with below regular expression.

      value.match(/^[+-]?\d+[.]?\d*[%]?$/g);

How this can be done in Magento 2?


texts: How to disable slider only in home page?

texts:
I have an slider in home page and this slider show 5 product in every line
everything all right but, when a user's page is small the number of products decreases and the slide starts to move.

How can I disable the slider only in the homepage only ?


texts:
I want to create an order attribute that creates a field in sales_order_item table also.
I want to insert some product-related data in this table which I want to filter later in sales report.


texts: how to display a message if a product is direct delivery (attribute = yes)

texts:
I have an attribute called direct delivery. Is there a way to display a message on the shipping method page tell the customer they have a direct delivery item in their cart. The attribute "direct delivery" is a yes/ no attribute.

thank you


texts: Magento 2 - Disable cache invalidation temporarily during processing, then invalidate appropriate caches?

texts:
I'm in the process of developing a bespoke product import/sync module for Magento 2 and I'm trying to find ways to speed the process up as much as possible.

The full set of products contains over 800k entries, and that data will be processed at least once a day (more likely to be 2-3 times per day).

I've significantly improved the creating/updating of product entities and attributes by using ResourceConnection::insertMultiple/insertOnDuplicate, but using StockRegistry::updateStockItemBySku seems to be taking up a huge portion of the overall time.

According to \Magento\Framework\Profiler the majority of the time taken while setting quantities is taken up with EVENT:clean_cache_by_tags, specifically Magento\Framework\Cache\Frontend\Decorator\Profiler::clean

Is there a practical way to disable cache invalidation/events for the duration of data processing, then invalidate the relevant caches in one batch afterward?

I suppose I could go the same route I have with product entities/attributes and just update/insert records, but without more investigation I'm not sure what other events/handling is taken into account when it comes to stock and availability of products.

Anyone have any ideas/tips or direction that might be helpful?


texts: Magento 1 price reload function for custom option is called as many times as options are present

texts:
I have a long list of custom option for a product. it's around 5000 options (multiple select) inside the custom option. And I found that it's extremely slow each time when I select or unselect an option because there is a javascript function optionsPrice.reload() is called (from reloadPrice function) so as to reflect the price. But the worse part is that function call occurs 5000 times when I select or unselect an option.

After I take optionsPrice.reload() out of the looping, it becomes fast and seems works all fine. My question is actually to ask is there a particular reason put optionsPrice.reload() inside the looping or just mistakenly leave there?


texts:
Not able save anything from admin redirecting to 404 page.
If I save any blocks or cms pages it is redirecting 404 page.How to fix this issue.


texts: Building forms programmatically on the front-end

texts:
I am tasked with creating a couple of new forms on the front-end, and had the idea to use Varien_Data_Form instead of hard-coding them.

Many of the forms in Magento Admin are built using the Varien_Data_Form class, as shown in this tutorial: http://astrio.net/blog/magento-admin-form/

I had a hard time finding any examples of this being used on the front-end, which made me think there might be a reason why.

Does anyone have any experience (or better, examples) of using Varien_Data_Forms on Magento's front-end?