texts: Display product collection without limit in Magento 1

texts:
I created a custom module that redirects your homepage to a landing page (CMS Page) that is a campaign page, for example, black friday.

I've created a new layout for the page, layout that uses a phtml to list the products from a category page. The problem is that if I have to many products, nothing listed. It displays only the header and the footer of the website, the content of the cms page is not displayed.

I use this function to load the products:

$products = Mage::getResourceModel('catalog/product_collection')
        ->addCategoryFilter($category_id)
        ->addAttributeToSelect('*');

foreach ($products as $prod) {
    //list product here
}

The single solution until now is if I put the products in more than one category and load the categories in a foreach, like this:

foreach ($catIds as $category_id) {
    $products = Mage::getResourceModel('catalog/product_collection')
        ->addCategoryFilter($category_id)
        ->addAttributeToSelect('*');

    foreach ($products as $prod) {
        //list product here
    }
}

This method works but in my case I need to have all the products in one category.

Is there any way to display a large collection of products on a page?
Am I doing something wrong or this just doesn't work because there are to many products?
Is there any limit in Magento for getting and displaying so many products from a collection?


texts:
After customer confirms their account via mail by this style of link:

site.dev/customer/account/confirm/?id=47&key=2dc2e5b29dda81cf4c1e174bd67b85c5

They are redirected to site.dev/customer/account/index/ which displays the dashboard and the message, that confirm is good.

I want to show different template for message after confirm mail.

I tired to make some changes in AccountController, but this has not helped.

Transaction mail in CMS not working!

Maybe somebody do something similar? Thanks!


texts: mageTranslationDictionary error while running bundling command

texts:
Tracing dependencies for: requirejs/require

Tracing dependencies for: mage/bootstrap
Error: ENOENT: no such file or directory, open 'D:/eden_robe/pub/static/frontend/Mgs/custom/en_US/mageTranslationDictionary.js'
In module tree:
    mage/bootstrap
      Magento_Ui/js/lib/knockout/bootstrap
        Magento_Ui/js/lib/knockout/bindings/bootstrap
          Magento_Ui/js/lib/knockout/bindings/i18n
            mage/translate

Error: Error: ENOENT: no such file or directory, open 'D:/eden_robe/pub/static/frontend/Mgs/custom/en_US/mageTranslationDictionary.js'
In module tree:
    mage/bootstrap
      Magento_Ui/js/lib/knockout/bootstrap
        Magento_Ui/js/lib/knockout/bindings/bootstrap
          Magento_Ui/js/lib/knockout/bindings/i18n
            mage/translate

at Object.openSync (fs.js:440:3)


texts:
I've inherited several Magento projects, and one is back on Magento 1.4.  I'd like to upgrade this project to 1.9.x but I don't know if previous developers have made any changes to Magento core as the project has had a history of developers with questionable practices.

I doubt there's many options except upgrading and testing in a non-production environment but wanted to check to see if there's a way to see what has been changed, if anything.


texts: How to create a product's category which is visible ONLY after logging in?

texts:
A client of mine wants me to create a group of products which could be seen only to registered users. I mean: if you are not logged in, you can not see this category (but you can navigate inside the site and see all the other products), when you are logged in instead you can see also the hidden one.
That's not the right place to explain all the reasons why he would like to have this kind of thing, but that's it. :(

Can anybody help me?


texts: Setting up Magento Cron for selected indexing

texts:
Magento 1.8

How can I setup a cron job for Indexing particularly Product Prices?

This is my current cron script but it doesn't seem to run

4 * * * * php -f /shell/indexer.php reindexall


texts:
I work in ubuntu 14 server. The problem is that in the console i see the version of my php is 7.0.14, and in the magento2 setup it says my version is 5.5.9

I appreciate any help


texts:
I am working on a project where i want to give personal discount for every customer.
I want to add a customer attribute where i will give the discount amount for every customer.
As example if a gave 30 to customer "John doe" then John doe will get a discount of fixed 30.

Can anyone please help me how to do that??


texts: Where Can I add these labels in my form /checkout?


texts:
I have to create one page like offers (It will show all offers here).

I have to include bootstrap in this offers page only.

Thanks
SomuN


texts: Magento 2 - static content deploy make en_GB default

texts:
Simple question, but can't seem to find anywhere online that explains it.

Using static content deploy, to generate the theme files like so:

bin/magento setup:static-content:deploy

Obviously once the theme is deployed and in developer mode, i don't need to do this again, but...

This deploys to en_US but my store is running under en_GB , is there a default way to deploy to en_GB inside of my theme or anywhere in-particular? or do i have to pass this through each time i want to do a S:S:D

If anyone knows if it can or cannot be done, that'd be a big help.

Thanks


texts: How to get product attribute color text from quote item?

texts:
I want track quote items color and brand in our checkout process. Regarding this answer I should do this in config.xml:

<global>
    <sales>
        <quote>
            <item>
                <product_attributes>
                    <color />
                </product_attributes>
            </item>
        </quote>
    </sales>
</global>

And this in my checkout process:

<?php
    foreach($cartItems as $_quoteItem) {
        echo $_quoteItem->getProduct()->getAttributeText('color');
    }
?>

But this is not working - result is nothing.


texts: How to add simple product in magento 2.2.5 programmatically?

texts:
I am new to Magento. I am trying to do things programmatically.

Is there another way to add simple product programmatically than Programmatically create a simple product in magento 2 this.

I don't want to add a file in the root folder


texts: What are the possibilities of error for not Export and Import

texts:
I have a problem of export and import in my site,

error are :

system - import/export - export  :

http://i.stack.imgur.com/C5y2X.png

system - import/export - dataflow profiles - export all products  :

http://i.imgur.com/PkRsHxQ.png


texts: remove or hide the "Complete" order status from status filter drop down

texts:
As you see attached image, I would like to remove or hide the "Complete" order status from the status filer drop down. Can someone please let me know how to do that. i am a newbie to magento and kindly show me the direction as which file need to be edited. thanks

Updated: Ajay, your solution worked:) thanks you so much. As you can see attachment below. i have hided all order status except the "processing" status. i would like to find out you can can show me how to remove or hide the "blank" selection of order status. see attached image below.(i basically only want to see the "processing" status under the status filter)


texts: Custom reference number on checkout inserts data into wrong order

texts:
I've been trying to add a field to checkout where the customer could add a reference number. Right now it sort of works, but my observer grabs the previous order and adds the information to that order in the database. So what i need to figure out is how do i get it to pick the next order / the one being ordered or get some hints on how to do it in a different way. I'm working with Magento 1.9.0.1

Config.xml

    <events>
        <adminhtml_sales_order_create_process_data_before> <!-- Adding reference number in backend working -->
            <observers>
                <customorderfield_backend>
                    <type>singleton</type>
                    <class>customorderfield/observer</class>
                    <method>saveCustomData</method>
                </customorderfield_backend>
            </observers>
        </adminhtml_sales_order_create_process_data_before>

        <controller_action_predispatch_checkout_onepage_saveBilling> <!-- Adding reference number on onepage doesn't work -->
            <observers>
                <customorderfield_onepage>
                    <type>singleton</type>
                    <class>customorderfield/observer</class>
                    <method>saveCustomDataOnepage</method>
                </customorderfield_onepage>
            </observers>
        </controller_action_predispatch_checkout_onepage_saveBilling>
    </events>

Observer.php

    class Lightsolutions_CustomOrderField_Model_Observer
    {
       public function saveCustomData($event) //Adding reference number in backend working
    {
       $quote = $event->getSession()->getQuote();
       $quote->setData('my_custom_input_field', $event->getRequestModel()->getPost('my_custom_input_field'));

       return $this;
    }

    public function saveCustomDataOnepage($observer) //Adding reference number on onepage doesn't work
    {
        $orders = Mage::getModel('sales/order')->getCollection()
         ->setOrder('created_at','DESC')
         ->setPageSize(1)
         ->setCurPage(1);
        $orderId = $orders->getFirstItem()->getEntityId();
        $order = Mage::getModel('sales/order')->load($orderId);
        $order->setData('my_custom_input_field', $_POST['my_custom_input_field']);
        $order->save();
    }

mysql4-install-1.1php

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

$installer->addAttribute("order", "my_custom_input_field", array("type"=>"varchar"));
$installer->addAttribute("quote", "my_custom_input_field", array("type"=>"varchar"));
$installer->endSetup();


texts: Custom attribute value not displayed in 'Order Total Report' magento 2 admin grid

texts:
I want to add new columns 'ID' & 'Affiliate ID' to 'Order Total Report' admin grid (REPORTS > Customers > Order Total). I am able to add these 2 columns, but only customers Id's are getting displayed & custom attribute 'Affiliate ID' value is not getting displayed.

Please check the image below

I have created app/code/vendor/module/view/adminhtml/layout/reports_report_customer_orders_grid.xml and added below code

                <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.report.grid.columnSet.entity_id" as="entity_id">
                    <arguments>
                        <argument name="header" xsi:type="string" translate="true">ID</argument>
                        <argument name="index" xsi:type="string">entity_id</argument>
                        <argument name="type" xsi:type="string">text</argument>
                        <argument name="id" xsi:type="string">entity_id</argument>
                        <argument name="column_css_class" xsi:type="string">col-id</argument>
                        <argument name="header_css_class" xsi:type="string">col-id</argument>
                    </arguments>
                </block>
                <block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.report.grid.columnSet.unitee_affiliate_id" as="unitee_affiliate_id">
                    <arguments>
                        <argument name="header" xsi:type="string" translate="true">Affiliate ID</argument>
                        <argument name="index" xsi:type="string">unitee_affiliate_id</argument>
                        <argument name="type" xsi:type="string">text</argument>
                        <argument name="id" xsi:type="string">unitee_affiliate_id</argument>
                        <argument name="column_css_class" xsi:type="string">col-id</argument>
                        <argument name="header_css_class" xsi:type="string">col-id</argument>
                    </arguments>
                </block>

It's not displaying custom attribute 'Affiliate ID' value. Please tell me what shall I do so that grid will display value.


texts: How does magento2 associates an entity with it's table?

texts:
How does magento2 connects an entity with it's table ?
For example if in \Magento\Customer\Model\ResourceModel\Customer we do $this->getEntityTable(). We get the table name customer_entity.
Where is this set ?


texts: How to get product manufacturer swatch image?

texts:
I have next string, where I get manufacturer attribute:

$brand = $currentProduct->getResource()->getAttribute('manufacturer');

I need to get attribute swatch image. How can I get it?

On product filters I got it:

                        <img class="object-fit-contain w-100 h-100"  src="<?=
                    $objectManager->get('Magento\Store\Model\StoreManagerInterface')
                            ->getStore()
                            ->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA).'attribute/swatch/'.
                    $swatchData['swatches'][$option]['value']?>" alt="<?= /* @escapeNotVerified */ $label['label'] ?>">


texts: Product Images are uploading but not showing up after upload

texts: Image upload is not working, it stays stuck on "Complete" like this and nothing happens. My magento version is 1.9.1.0. I've changed the media folder permissions also checked removing the cache storage and magento cache, reindexed the data but nothing seems to work for me


texts: How to hide a shipping method in front end and visible on admin section Magento 2?

texts: How can I enable shipping method only in admin section and hide from frontend in magento 2?


texts: Errors occur when importing products with images in magento 1.9.2.3

texts:
At the 1st time "image not valid error" occurred after copying all images to site-name/media/import/. that error is not occurred now.But the new errors are occurred.

I have tried all kind of steps to import products.I have around 2000 products in my old site.Now I want to move those products to new site.But I cant import 2000 products.I have tried it with System ->import/export -> Data flow profiles -> Import all Products.But all the time different kind of errors occurred.So now I am trying with only 2 products.But still cant see any success.Help me if you have proper steps with image import too.


texts: How to get the Magento Sync manager to update modules (sync) through CLI?

texts:
In a Magento 2 system (2.0.9) I need to sync the Module manager to get the new bought modules from the Magento2 Market place. It just does not work! Syncing offers the "Spinning wheel" that it is busy loading and that's it. So nothing is loaded. How to get this done through the CLI?

Or how to get the modules from the Market Place as a file to upload them manually?


texts: Why sending email taking too long in Magento 2 on AWS ubuntu server?

texts: I am using the AWS Ubuntu server(PHP 7.2 installed) for Magento 2.3.5 -p1 version, It is very fast in most cases(page loading, registration, login) but when sending email via SMTP it is taking too long to send the email. Why this is happening I have also changed email service provider (Gmail, Sendgrid, etc.) and updated all available configuration to send emails in Magento Admin like(asynchronous sending enabled, etc.) but no improvement is seen. What should I do to send an email fastly?


texts: How to create directory and text file and write content in file in media folder programmatically in Magento 2?

texts:
I tried to create directory and file and then put content in file programmatically but it does not work.
Here is my code in sample.phtml

<?php
$om = \Magento\Framework\App\ObjectManager::getInstance();

    /** @var \Magento\Framework\Filesystem $filesystem */
    $filesystem = $om->get('Magento\Framework\Filesystem');
    $directoryList = $om->get('Magento\Framework\App\Filesystem\DirectoryList');
    /** @var \Magento\Framework\Filesystem\Directory\WriteInterface|\Magento\Framework\Filesystem\Directory\Write $writer */
    $media_url = getMediaBaseUrl();

    $writer = $filesystem->getDirectoryWrite($media_url."module1/");
    /** @var \Magento\Framework\Filesystem\File\WriteInterface|\Magento\Framework\Filesystem\File\Write $file */
    $contents = "ddddddddddddddddddddddddddd";
    $relativeFileName = "sample.txt";
    $file = $writer->openFile($relativeFileName, 'w');

    try {
        $file->lock();
        try {
            $file->write($contents);
        }
        finally {
            $file->unlock();
        }
    }
    finally {
        $file->close();
    }

function getMediaBaseUrl() {
    /** @var \Magento\Framework\ObjectManagerInterface $om */
    $om = \Magento\Framework\App\ObjectManager::getInstance();
    /** @var \Magento\Store\Model\StoreManagerInterface $storeManager */
    $storeManager = $om->get('Magento\Store\Model\StoreManagerInterface');
    /** @var \Magento\Store\Api\Data\StoreInterface|\Magento\Store\Model\Store $currentStore */
    $currentStore = $storeManager->getStore();
    return $currentStore->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
}
?>


texts:
I am trying to show Magento category using bestseller products i.e bestsellers of that category should show first and all i have is configurable products. I tried bestsellers code from google but those seems to work only for simples.

your help is much appreciated


texts: How do I add a block on the home page above the content, below the navigation on the home page only?

texts:
How do I add a block to the home page only above the content section, but below the navigation to spread across the page whilst still using the two-column template?

I am using Magento version 1.9.

See image:


texts: ”Undefined offset: 4” when reindexing “Search indexer”

texts:
After module update I've got such error for indexing via SSH

Catalog Search indexer process unknown error:
Notice: Undefined offset: 4 in /home/sellastu/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/Full.php on line 384

Now, when I'm trying to enter any product page I've got such result:

But I can enter any other places on the site. All static pages, catalogue, checkout, admin etc.

This line is located in system.log file:

[2018-11-07 17:13:10] main.ERROR: Cron Job indexer_reindex_all_invalid has an error: Notice: Undefined offset: 4 in /home/sellastu/public_html/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Action/Full.php on line 384. Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":121634816,"emalloc_start":115599216} [] []

I tried to remove all static files, restore database, which was created before module update, and still have the same problem. Does anyone know what to do next?


texts: Configurable product pricing, 2 attributes

texts:
I've ran into a bit of a problem (Magento 1.9.2.4) which I can't seem to figure out. Hopefully, someone may have an answer to my question.

Basically, I'm trying to create a configurable product with two different attributes:

A - Dimension
B - Colour

Now, each dimension has its own price. At the same time, with any other colour than white, the product price increases by 25% in relation to the price of the chosen dimension.

Which is something I can't seem to re-create in Magento.

Let's say:

Dimension A, white colour, costs 10 USD.
Dimension A, red colour,    costs 12,5 USD, aka, 25% more than the
original 10 USD.

This is all nice and dandy.

The problem is, after setting the price rule for the red option (which is set as a 25% price increase), this happens:

Dimension B, white colour, costs 20 USD.
Dimension B, red colour, costs 22.5 USD, which is wrong, as it should
cost 25 USD (25% more than 20 USD)

Magento seems to only consider the price of dimension A and does not take into consideration that dimension B might be priced differently than dimension A, and so the price should be increased by 25% of 20 USD, not by 25% of 10 USD.

Hopefully, my question is clear enough, if not, I'll be happy to shed more light on it. Is there a way to work around this?

Thank you for any help in advance :)!


texts:
I created an "add to cart button" for a product at below location.

  app/design/frontend/rwd/default/template/catalog/product/view.phtml

Now I want while clicking on the button, the product,  should go into "cart". How can I do it? I am very new in Magento developer.So, please explain step by step, and  also suggest me a better website and book for  developement.


texts: Product image zoom issue on product details page when drop-down menu have overlap area with it

texts:
Zoom works fine,

But when hovering on category drop-down menu to the overlap area of product image and drop-down menu, The zoom is acting normally, even the mouse is still on the drop-down menu.

Please check the capture picture:


texts: after configurable product being imported, on editing it shows attributes to make configurable(like you are creating first time)

texts:
I have successfully imported a configurable product with all it's simple products. But on editing the configurable product from backend, it shows global attributes to make configurable product like the first time i'm creating.

Below is the screenshot of what i see on editing the already imported product.

Did i miss anything important to import configurable products ?

Note: I'm in magento version 1.9.2 & using CSV file to import/export.


texts:
I get the error "Stock Status Index process is working now. Please try run this process later." when trying to reindex.  Other answers say to clear var/lock/.

where is var/lock in 1.9?


texts: Get the date of last purchase of product, by customer

texts:
How can I get the last date that a customer has purchased a product?

Thank you


texts: Magento2 catalog_product_category / catalog_category_product - Serialization failure Deadlock

texts:
Lately I'm experiencing some issues when trying to reindex catalog_product_category and/or catalog_category_product (most of the issues seem to be on this last one). The reindex process fails to execute successfully throwing the following error:

SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction, query was: INSERT INTO `catalog_category_product_index` (`category_id`, `product_id`, `position`, `is_parent`, `store_id`, `visibility`) SELECT `catalog_category_product_index`.* FROM `catalog_category_product_index` ORDER BY `catalog_category_product_index`.`category_id` ASC
LIMIT 500 OFFSET 500 ON DUPLICATE KEY UPDATE `category_id` = VALUES(`category_id`), `product_id` = VALUES(`product_id`), `position` = VALUES(`position`), `is_parent` = VALUES(`is_parent`), `store_id` = VALUES(`store_id`), `visibility` = VALUES(`visibility`)

What I've tried to do to workaround this issue

I've killed the locked transactions, reset the indexer using the php bin/magento indexer:reset catalog_product_category catalog_category_product command and manually reindexed running the php bin/magento indexer:reindex catalog_product_category catalog_category_product command but from time to time I still get the error. I've also tried to execute those separately but I still got the error on catalog_category_product.

I've recreated the catalog_category_product_index, catalog_category_product_index_tmp and chron_schedule tables (drop and recreate from create syntax) - some of the solutions I've found on the internet but non of them work.

I've set the mode of catalog_category_product to execute on schedule and set it to execute via cron but it also failed - this seems to be the recommended fix on most of the Github bug reports.

Any thoughts on how can this issue be mitigated/fixed?


texts:
There do exist many questions about product attributes in order items. I hope my question has a new aspect.

If I have an order item I can use Mage_Sales_Model_Order_Item::getProduct to get the product:

public function getProduct()
{
    if (!$this->getData('product')) {
        $product = Mage::getModel('catalog/product')->load($this->getProductId());
        $this->setProduct($product);
    }

    return $this->getData('product');
}

When we use Mage::getModel('catalog/product')->load($id) we have access to all product attributes and since the getProduct() method makes use of it I was quite surprised to see that I did not get all product attributes from this:

     foreach( $order->getAllItems() as $item ){
        $product = $item->getProduct();
        Mage::log($product->debug());
     }

My question is:
Which part is responsible for setting the product data to an order item?

And how can I extend it?
My goal is to get the value of a custom boolean product attribute from an order in an observer after the order has been placed.

In the meantime I found the answer I was looking for (see answer below).
But if someone can explain to me why it is not sufficient to clear the cache but instead rebuild the index as well, I will gladly accept this as the answer.
It seems the info from the config.xml are written to an index table. Which table and what process is this?


texts:
I am using Magento 1.7. In head.phtml, the last line calls getIncludes(), like this

<?php echo $this->getIncludes() ?>

What exactly is this function including in the page head? I am not able to distinguish which scripts (or other lines) come from getIncludes() and which not.

Is it harmful to remove this line of code?


texts: 'TABLE 607 WHERE `Non_unique` = 1' - Setup Upgrade Error

texts:
When i run this command (setup:upgrade) in Magento 2. Then i am getting this error.
Please tell me how to i can fix this issue. which table is 607 ?
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'TABLE 607 WHERE Non_unique = 1' at line 1, query was: SHOW INDEXES FROM TABLE 607 WHERE Non_unique = 1
Screenshot is attached.
Thanks


texts: Magento 2 add current class in Customer Account dasboard Custom Link

texts:
I added custom Link In Customer Dashboard. It's Working Fine I want to add current class if i am in that page

Module_index_index.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="customer_account"/>
    <head>
        <title>Title</title>
    <body>
      <referenceBlock name="customer_account_navigation">
          <referenceContainer name="content">
            <block class="Namespace\Module\Block\Index\Index" name="name" template="template.phtml"></block>
        </referenceContainer>
    </referenceBlock>
    </body>
</page>

**`customer_account.xml`**

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="customer_account_navigation">
            <block class="Magento\Framework\View\Element\Html\Link\Current" name="customer-account-navigation-custom-index-index">
                <arguments>
                    <argument name="path" xsi:type="string">custom/index/index</argument>
                    <argument name="label" xsi:type="string"> My Link</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
 </page>


texts: get item price before applying shopping cart price rule

texts:
i m trying to display price in subtotal before shopping cart price rule aaplied.but it always give nothing when print my code.i m use below code to display price in cart.

echo Mage::getModel('catalogrule/rule')->calcProductPriceRule($_item->getProduct(),$_item->getProduct()->getPrice());


texts: Custom product multiselect attribute not saving in admin

texts:
I have created custom product multiselect attribute successfully.

But when i edit the product in admin and selecting some options(countries) of my multiselect attribute and if i click save its saved successfully.

but when i open same product again its not showing before selected options.that means its not saving my custom product attribute to product model.

can you Please help anyone.I'm very tired.and i tried lot of hours.then i'm placing here.

etc/config.xml file

<config>
    <modules>
        <Exinent_Shiplimit>
            <version>0.1.0</version>
        </Exinent_Shiplimit>
    </modules>

    <global>
    <models>
       <checkout>
         <rewrite>
           <type_onepage>Exinent_Shiplimit_Model_Checkout_Type_Onepage</type_onepage>
         </rewrite>
        </checkout>
      </models>
    <resources>
            <exinent_shiplimit_setup>
                <setup>
                    <module>Exinent_Shiplimit</module>
                    <class>Mage_Catalog_Model_Resource_Eav_Mysql4_Setup</class>
                </setup>
            </exinent_shiplimit_setup>
        </resources>
    </global>
    </config>

app\code\local\Exinent\Shiplimit\sql\exinent_shiplimit_setup\mysql4-install-0.1.0.php

<?php
$installer = $this;
/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */

$installer->startSetup();
$installer->addAttribute(
    'catalog_product',
    'custom_countries',
    array(
        'group'             => 'General',
        'type'              => 'varchar',
        'backend'           => '',
        'user_defined' => '1',
        'frontend'          => '',
        'label'             => 'Shipping Restricted Countries',
        'input'             => 'multiselect',
        'source'            => 'Mage_Catalog_Model_Product_Attribute_Source_Countryofmanufacture',
        'global'            => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE

    )
);

$installer->updateAttribute('catalog_product', 'custom_countries', 'backend_model', '');
$installer->endSetup();
?>


texts: Edit contents on product page catalog_product_view help

texts:
I am trying to add some text below this in a magento 2 store (see image):

When I inspect element I find the div responsible is:

I have then opened up catalog_product_view.xml and found the line of code which I think renders this:

<container name="page.main.title.wrapper" htmlTag="div" htmlClass="title-wrapper" before="-" >

My question is how do I edit the HTML of that container (if that makes sense) so I can add a
 tag in underneath.

Thanks in advance.


texts: serious need of explanation with addSaleableFilterToCollection

texts:
I have spent days looking for a simple tutorial about adding filters to a product collection.  If anyone has a link to a good tutorial or explantion I would really appreciate it.  I found a Magento Skin and the list.phtml file uses this code:

$products_collection = Mage::getModel( 'catalog/product' )
        ->getCollection()
        ->addAttributeToSelect( '*' )
        ->addCategoryFilter( $_cat )
        ->addOrder( 'position', 'ASC' );
    Mage::getSingleton( 'catalog/product_status' )->addSaleableFilterToCollection( $products_collection );
    Mage::getSingleton( 'catalog/product_visibility' )->addVisibleInCatalogFilterToCollection( $products_collection );
    Mage::getSingleton( 'cataloginventory/stock' )->addInStockFilterToCollection( $products_collection );

I have not seen filtering done with this method "addSaleableFilterToCollection".  What other attributes can be used in that way?  What are the possible reasons a developer would use that approach? The themes category list doesn't have reviews setup.  I found the code that outputs the reviews but I think the reviews are missing from the product model.  I tried

Mage::getSingleton( 'review/review' )->addReviewToCollection( $products_collection );

but that didn't do anything.

I'm more interested in learning how to fish instead of being handed a fish.


texts:
We are having problems with translations on our store for our multi lingual sites.

They used to work ok but when we add modules it seems that the translations are now lost.

As an example "Add to Cart" on the product page used to translate on our French site to "Ajouter au panier" as that was called from the /app/locale/fr_FR/Mage_Catalog.csv file.

When we add a third party module called AW_Productpdates.xml the language on the French store returns to "Add to Cart" and the scope for the translation looks like it changes and is looking for "Add to Cart" in the language file for "AW_Productupdates". As "Add to Cart" has not been translated it will just use the English version.

Is this normal or should it still try and look for "Add to Cart" translation still within the app/locale/fr_FR/ folder?

If it helps, I am still doing some overrides in my /app/frontend/theme/default/locale/fr_FR/translate.csv file but I don't want to replicate the translations if they are already within the /app/locale/fr_FR/ folder.


texts: Admin Add a New Button in Form Container which send form to other controller

texts:
In magento 2 Admin i have create a form using a NON UI component method that is using block classes.

I wanted to submit this form to two different controller. By default it sends data to save controller. How can i send this data to other controller too. For example Send Controller


texts: Magento 2 : How to add additional fields to newsletter

texts:
I need to display newsletter subscribe form on my CMS page.

Default form has only email field but I need to display with additional fields.

Additional fields like : Gender, First-name, and Last-name.

How I can add these fields in the table, display it on the form, save values in the table.


texts: 1.9.4.3 One Page checkout stuck on step 4 when entering credit card but Paypal still works

texts:
I've exhausted the forums and keep in mind I'm new to Magento but I've added the codes to the multiple phtml files to enable for the formkey validation. I've been unable to get that to work. With the formkey validation disabled, I can get to the payment section and checkout through Paypal but if I try to enter credit card info, the continue button doesn't do anything but will validate that cc #'s align with visa/mc type.

I've looked at opocheckout.js & Ive checed out the methods.phtml and info.phtml files to make sure they are configured correctly according to the forums I've seen referencing similar problems.

Not seeing any new errors in the system or exceptions logs.


texts: Payment method should be active based on country magento2

texts: I want to set payment method based on country in Magento2 . I am having two payment method, one for international and other for local. So, based on the country , payment methods should be active.


texts: magento 1.9 | process starts mysql on its own

texts:
My site automatically turns on mysql process, which loads the database and CPU  sometimes to  120% and some other processes are also running, but I can’t understand what it. because of this, the site slows down

I tried to kill processes, but they start again, how can I be with this. help me please


texts: link is not working in header file after complete loading in chrome and opera

texts:
please visit this link :

on right top, you can see link : "Email us", it is clickable when the page is loading , after it complete wepage loaded, i can not able to click on "Email us". That's link is not working.

please help me to find some solution.

Thanks in advance.


texts: Importing customers from Magento 1.9.1.0 to 1.9.2.3

texts:
I have a production instance of Magento which is running on version 1.9.1.0, and I have another instance of Magento which is running on version 1.9.2.3.

I am trying to export customers from the production instance into the new instance from Magento admin panel System=>Import/Export Area.

When trying to import the CSV file into the new instance I face many errors mainly due to the emptiness of some columns such as postcode for some customer. so I have filled all of them with "0" values. And right now when I try to import I get the following error :
"E-mail and website combination is not found in rows: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10......"

My Questions are:

What might be the problem due to? and how can I resolve this?

Can I achieve the same thing by importing the customer tables via PHPMyAdmin instead of Magento admin panel? If yes, Do I need to import all tables that start with **customer_?**


texts:
I created script like this.and I have created token also from admin side.

ini_set('display_errors',1);
require('vendor/zendframework/zend-server/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client.php');
require('vendor/zendframework/zend-soap/src/Client/Common.php');
$token = "e3wcugwhdhqoxccwdli8yxepaih5lm3b";
$opts = ['http' => ['header' => "Authorization: Bearer " . $token]];
$context = stream_context_create($opts);

$wsdlUrl = "http://192.168.11.175/magento2/soap?wsdl&services=customerAccountManagementV1,customerCustomerRepositoryV1";
$serviceArgs = array("customerId" => 1);

$soapClient = new \Zend\Soap\Client($wsdlUrl);
$soapClient->setSoapVersion(SOAP_1_2);
$soapClient->setStreamContext($context);
$soapResponse = $soapClient->customerCustomerRepositoryV1GetById($serviceArgs);
var_dump($soapResponse);

and I’m getting following error when i run the script.

Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://192.168.11.175/magento2/soap?wsdl&services=customerAccountManagementV1,customerCustomerRepositoryV1' : failed to load external entity "http://192.168.11.175/magento2/soap?wsdl&services=customerAccountManagementV1,customerCustomerRepositoryV1" in /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client/Common.php:37 Stack trace: #0 /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client/Common.php(37): SoapClient->SoapClient('http://192.168....', Array) #1 /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client.php(1023): Zend\Soap\Client\Common->__construct(Array, 'http://192.168....', Array) #2 /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client.php(1195): Zend\Soap\Client->_initSoapClientObject() #3 /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client.php(1106): Zend\Soap\Client->getSoapClient() #4 /var/www/html/magento2/soapcall.php(16): Zend\Soap\Client->__call('cus in /var/www/html/magento2/vendor/zendframework/zend-soap/src/Client/Common.php on line 37


texts: Order Collection based on Multiple Select Option Values Magento2

texts:
I have a list of products (books) with a custom eav multiple select attribute named 'authors' in magento 2. This attribute is 'visible_on_front' and also 'used_for_sort_by'.

I am trying to use that multiselect attribute for sorting my products in frontend by the attributes option value (specific: the first option value if more than one option is assigned).

Therefore I extended the Magento\Catalog\Block\Product\ProductList\Toolbar and manipulated the setCollection($collection) method like so:

public function setCollection($collection)
{
    $this->_collection = $collection;

    $this->_collection->setCurPage($this->getCurrentPage());

    // we need to set pagination only if passed value integer and more that 0
    $limit = (int)$this->getLimit();
    if ($limit) {
        $this->_collection->setPageSize($limit);
    }
    if ($this->getCurrentOrder()) {
        if ($this->getCurrentOrder() == 'position') {
            $this->_collection->addAttributeToSort(
                $this->getCurrentOrder(),
                $this->getCurrentDirection()
            );
        } else {

            // START CUSTOM PART -> the user selected 'Sort by author'
            // where
            // $this->getCurrentOrder() resolves in 'authors' and
            // $this->getCurrentDirection() resolves in 'asc' or 'desc'
            $this->_collection->setOrder($this->getCurrentOrder(), $this->getCurrentDirection());
            // END CUSTOM PART

        }
    }
    return $this;
}

I expected to get a productlist in frontend, that is sorted by the authors name (= custom attribute option value). And in my first impression it seemed to work fine.
But after checking the frontend, I noticed, that NOT all products were sorted correctly. After further investigation I found out, that it looks like my product list is getting sorted by the custom attributes option key instead of the options value.

Example:
3 simple products with author names (attribute option id in brackets)

- product1 - Obama, Michelle (7)
- product2 - Bannour, Karim-Patrick(6); Grabs, Anne(1); Vogl, Elisabeth(2)
- product3 - Bloom, Cameron(8)

Expected ordering:

product2 > product3 > product1.

Actual ordering:

product2 > product1 > product3

This is very confusing, due to the fact that magento allows us to make multi-selection eav's 'used_for_sort_by'.

Is it possible to order my collection to achieve a sorting based on the authors name.

If not, how could I achieve this.


texts: Failed to communicate with Braintree with taxamo checkout in magento 2.x

texts:
In Magento 2.1.2 configure taxamo site - set merchant and braintree   configuration in taxamo site & set test mode.

In cart.phtml page add script as below:

Taxamo.initialize('SamplePublicTestKey1'); //public key here

var transaction = { currency_code:'EUR',
transaction_lines: [{'custom_id': 1, amount: 1.99}] }

var metadata = { allowed_payment_providers: 'braintree',
require_invoice_address: true };

var checkout = new Taxamo.Checkout(transaction, metadata);
checkout.overlay(function(data) { //you can also use .redirect() here
alert('callbackhandler:' + JSON.stringify(data, null, '\t'));
});

Add to cart any product then taxamo checkout form will open fill the details and click on proceed button.

But when fill up form and click on proceed button which throw error

  Failed to communicate with Braintree with taxamo checkout in magento2


texts: Not getting data in phtml file in magento 2

texts:
I have override email/shipment/items.phtml in custom module.
in view/frontend/sales_email_order_shipment_items.xml

Vendor_module::email/shipment/items.phtml

I am not getting any data on printing $shipment = $block->getShipment();
Is their any thing missing?


texts: Product images do not show on Category pages and do show on product view pages

texts:
There is a lot written about this kind of issues. but all do not seem to be the same as what we are experiencing.
We have a big portion of products (so not all) that has product images not shown in the category list.phtml view. but are shown at the view.phtml (product detail page).
This is what we tried already

Changed from normal to flat catalogue
Reindex
Check to be sure the correct storeview has a default image selected
Chmod -R 777 Media/Catalog
Removed image cache to let it regenerate
Changed the code in the backend from small_image to image
Removed ->resize(135) to show original image
Checked error and access log for error or notices related to this
Removed .htaccess from media folder

Nothing seem to help what to try next?


texts:
I have custom  Mytable has field(id,name,product_id, status...).
how do get product name by product_id in Mytable in file  Mycustom\Custom\view\adminhtml\ui_component\mycustom_custom_custom_listing.xml


texts: Pin it button error : Invalid source URL

texts:
I am using below methods to generate pinit button

protected function getPinterestHref()
{
    $params = array();

    $url = 'url=' . $this->getProductUrlShared();
    $params[] = $url;

    $media = 'media=' . $this->getProductMediaShared();
    $params[] = $media;

    $description = 'description=' . $this->getProductDescriptionShared();
    $params[] = $description;

    $src = 'http://www.pinterest.com/pin/create/button/?url='. implode('&', $params);

    return $src;
}

protected function getProductUrlShared()
{
    return urlencode(Mage::registry('product')->getProductUrl());
}

protected function getProductMediaShared()
{
    return urlencode(Mage::registry('product')->getImageUrl());
}

protected function getProductDescriptionShared()
{
    return Mage::registry('product')->getName();
}

i am getting the below error

  Parameter 'source_url' (value http://xyz.abc.com/meemee/asd.html) is
  not a valid URL format.

what am i doing wrong ?


texts: Transfering Order history, customers, newsletter subscriber to new Magento Site

texts:
So I wanted to start from scratch and make a new magento folder (with magento 1.9.1 ) for my existing site (which runs on 1.7.0.2) and eventually point it to this new folder once it is done. Basically I do not want to have downtime while I am working on the new one.

Question: How hard (or easy) is it to import order history, customers and newsletter subscribers to the new database?


texts:
Every time I goto products and click on any particular product I get the following error

jquery.js:9666 GET http://192.168.1.176/wmgr/mui/index/render/key/5c8e239c07b73e71850f0c57868db87dcef095fbe86124cea5f76f9d75745184/?namespace=review_listing&isAjax=true 500 (Internal Server Error)send @ jquery.js:9666ajax @ jquery.js:9211requestData @ insert.js:228(anonymous function) @ insert.js:135(anonymous function) @ async.js:135(anonymous function) @ events.js:85trigger @ events.js:82trigger @ events.js:159addBounded @ bound-nodes.js:42applyBindings @ bound-nodes.js:128(anonymous function) @ wrapper.js:78(anonymous function) @ knockout.js:4862invokeForEachNodeInContinuousRange @ knockout.js:4813activateBindingsOnContinuousNodeArray @ knockout.js:4860executeTemplate @ knockout.js:4908ko.dependentObservable.disposeWhen @ knockout.js:4950evaluateImmediate @ knockout.js:1737evaluatePossiblyAsync @ knockout.js:1677notifySubscribers @ knockout.js:1103observable.valueHasMutated @ knockout.js:1300observable @ knockout.js:1285(anonymous function) @ engine.js:54fire @ jquery.js:3099fireWith @ jquery.js:3211(anonymous function) @ jquery.js:3263fire @ jquery.js:3099fireWith @ jquery.js:3211deferred.(anonymous function) @ jquery.js:3301(anonymous function) @ loader.js:96execCb @ require.js:1650context.execCb @ resolver.js:131check @ require.js:866(anonymous function) @ require.js:1113(anonymous function) @ require.js:132(anonymous function) @ require.js:1156each @ require.js:57emit @ require.js:1155check @ require.js:917enable @ require.js:1143init @ require.js:774(anonymous function) @ require.js:991(anonymous function) @ require.js:132(anonymous function) @ text.js:149xhr.onload @ text.js:112


texts: Extend Magento 2 Onepage Success Block and success.phtml to display addition order information

texts:
I created a new module to display order total and some other information on Magento 2 success since page OOB success displays order id alone. Steps taken are below.

Created new Block that extends Onepage Success and added new method(s).
Copied OOB Onepage success.phtml to custom module view\frontend\templates\mysuccess.phtml and modified to call new methods from custom Block.

Added di.xml to replace OOB <preference for="Magento\Checkout\Block\Onepage\Success" type="VendorName\Checkout\Block\Onepage\CustomSuccess"/>

Also created view\frontend\layout\checkout_onepage_success.xml with below entry to use new template phtml file.

<referenceBlock name="checkout.success" template="VendorName_Checkout::mysuccess.phtml"/>

Also created module.xml and increased sequence number. Can anyone tell me what else do I need to use the new template and Block since I see blank success page instead of new block methods getting called?

I looked at Call custom phtml on success page without override and made similar changes but still no luck. What am I missing?
It's Magento 2.2.x CE.


texts: Magento 2 How to save data to custom column in "admin_user" table

texts:
Hi Here I have created a extra column school in the table Admin_user. While I trying to update or save it inside a "PLUGIN" its giving me error.
Here is my Plugin code
class Adminsave
{
  protected $userCollectionFactory;
  public function __construct(\Magento\User\Model\ResourceModel\User\CollectionFactory $userCollectionFactory)
  {$this->userCollectionFactory = $userCollectionFactory;}
  public function aroundexecute(\Magento\User\Controller\Adminhtml\User\Save $save)
    {
       $set = $this->userCollectionFactory->create();
       $set->setUserId(3);
       $set->setSchool(5);
       $set->save();
    }
}

Error: Call to undefined method Magento\User\Model\ResourceModel\User\Collection::setUserId()

Where am Doing wrong? Can i get help? Thank you in advance


texts: import shows success but products are not getting added

texts:
I am trying to import list of products. While importing I am getting success message as below

  Import successfully done.

But When I check catalog->Products products are not actually imported.

Can someone guide me on this?


texts: Get category name from product detail page

texts:
I have an URL from which I would like to get the categories. I have this: /hats/trucker-hats/hat1.html/ which is a product detail page.

I need to retrieve the categories, which are "hats" and "trucker-hats". I tried using $product->getCategoryIds() and looked through the IDs, the categories are there, but never at the same index, is there a way to retrieve these?

Thanks


texts: Magento2: How to call helper function in model?

texts:
I need to call helper function in model.

Here is my code:

namespace Abc\Mkt\Model;

use Magento\Framework\Validator\Exception as ValidatorException;
use Magento\Framework\Exception\AlreadyExistsException;
use Abc\Mkt\Helper\ObjectManager;
class Callback extends \Magento\Framework\App\Config\Value
{
protected $objHelper;
    public function __construct(
          Abc\Mkt\Helper\ObjectManager $objHelper,
          \Magento\Framework\App\Action\Context $context
        ){
           $this->objHelper = $objHelper;
           parent::__construct($context);
        }
public function afterSave()
{
$objectManager = $this->objHelper->getObjectManager();
$data='';
if(!$productobj){
throw new ValidatorException(__('Please Enter product Name. '));
}
}

Please suggest

Thanks


texts:
I have used below code in di.xml

<type name="Magento\Framework\App\RouterList">
    <arguments>
        <argument name="routerList" xsi:type="array">
            <item name="customrouter" xsi:type="array">
                <item name="class" xsi:type="string">Custom\Catalog\Controller\Router</item>
                <item name="disable" xsi:type="boolean">false</item>
                <item name="sortOrder" xsi:type="string">50</item>
            </item>
        </argument>
    </arguments>
</type>

But i am not able to call the funtion Custom\Catalog\Controller\Router also to tried to exit the code but unable to reach given controller. Can any one give me solution


texts:
I need to get the current page type, but i get the wrong type. for example, in home, i use this

$this->getAction()->getFullActionName();

And sometimes i get catalog_category_view, sometimes i get catalog_product_view

But, in the body tag I get the right classes

<body class=" cms-index-index cms-home" id="mainbody">


texts: Magento 2 how to import custom link type products

texts:
We have created custom link types like consumable, recommended, etc..like cross-sells, upsells, related.
Now we would like to implement the import functionality for these custom types. We have written below code on vendor file (Magento/CatalogImportExport/Model/Import/Product.php) so that while import custom link types are working as expected.

  File Path: Vendor/Magento/CatalogImportExport/Model/Import/Product.php

 /**
     * Links attribute name-to-link type ID.
     *
     * @var array
     */
    protected $_linkNameToId = [
        '_related_' => \Magento\Catalog\Model\Product\Link::LINK_TYPE_RELATED,
        '_crosssell_' => \Magento\Catalog\Model\Product\Link::LINK_TYPE_CROSSSELL,
        '_upsell_' => \Magento\Catalog\Model\Product\Link::LINK_TYPE_UPSELL,
        '_required_' => \StackExchange\RequiredProduct\Model\Product\Link::LINK_TYPE_REQUIRED,
        '_consumable_' => \StackExchange\AdditionalItems\Model\Product\Link::LINK_TYPE_CONSUMABLE,
        '_recommended_' => \StackExchange\AdditionalItems\Model\Product\Link::LINK_TYPE_RECOMMENDED,
        '_optional_language_arts_' => \StackExchange\AdditionalItems\Model\Product\Link::LINK_TYPE_OPTIONAL_LANGUAGE_ARTS,
        '_fivedays_also_includes_' => \StackExchange\AdditionalItems\Model\Product\Link::LINK_TYPE_FIVEDAYS_ALSO_INCLUDES
    ];

/**
         * Map between import file fields and system fields/attributes.
         *
         * @var array
         */
    protected $_fieldsMap = [ ......
                                           .......
            '_required_sku' => 'required_skus',
            '_consumable_sku' => 'consumable_skus',
            '_recommended_sku' => 'recommended_skus',
            '_optional_language_arts_sku' => 'optional_language_arts_skus',
            '_fivedays_also_includes_sku' => 'fivedays_also_includes_skus'
        ];

Now I would like to override and add my data from my custom module. Can anyone guide and provide me the steps, please.

I have followed below link but no luck

https://github.com/magepal/magento2-link-product

My CSV format looks like this:


texts: using Magento from another framework as embedded library or as REST API?

texts:
We have our own CMS built over YII framework. now we need to use Magento for Ecommerce.
 which is better (A) adding Magento to our project as embedded library:
 calling magento internally php to php
OR
(B) give magento its own subdomain and use Magento REST API
now  for each task we need to do HTTP request to the same server.
what are the pros and cons of each approach ??
Note customers won't see any magento interfaces only the backend users to track the product and orders.


texts:
I have an image that i need to use in .less file, the image is located in:

pub/media/kool/setting/blank.gif

in the .less files i tried to define it like this:

@footer_bg_file:~"../kool/setting/blank.gif"

but i always got an error like this in var/log/system.log

[2020-05-04 09:05:03] main.CRITICAL: Unable to resolve the source file for 'frontend/vendor/theme/en_US/kool/setting/blank.gif' [] []


texts: How to call an existing payment methods in the registration form?

texts:
When a customer registers it is necessary that he chooses one of the payment methods that are enabled from the admin panel, someone can help, at least give directions to solving this task, thanks

(i have enabled two methods - credit cards  and check )


texts: Magento 2 : Edit Product view XML to move element

texts:
I want to move the product description to appear right after the short description on our Magento 2.1 product detail page.

However My issue is I am not sure what the element name is for the short description and long description fields are.

I know I need something like

<move element="product_info_long_description" destination="product.info.main" after="product.info.short_description"/>

Here is my page layout xml I need to alter

<?xml version="1.0"?>
 <!--
   /**
    * Copyright © 2016 SW-THEMES. All rights reserved.
    * See COPYING.txt for license details.
    */
 -->
 <page layout="2columns-right" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <!--<script src="Magento_Catalog::js/jquery.zoom.min.js"/>-->
</head>
<body>
    <referenceContainer name="sidebar.additional">
        <block class="Smartwave\Porto\Block\Template" name="product_view_custom_block" before="-" template="Magento_Catalog::product/view/custom_block.phtml"/>
    </referenceContainer>
    <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
    <move element="catalog.product.related" destination="sidebar.additional" after="product_view_custom_block"/>
    <move element="product.info.overview" destination="product.info.main" after="product.info.review"/>
    <referenceContainer name="after.body.start">
        <block class="Magento\Catalog\Block\Product\View" name="product_custom" template="Magento_Catalog::product/view/product_custom.phtml" before="-"/>
        <block class="Smartwave\Porto\Block\Template" name="product_view_config" after="-" template="Magento_Catalog::product/view/config.phtml"/>
    </referenceContainer>
    <referenceContainer name="columns.top">
        <block class="Magento\Catalog\Block\Product\View" name="prev_next_products" template="Magento_Catalog::product/view/prev_next.phtml" before="-"/>
    </referenceContainer>
    <move element="prev_next_products" destination="product.info.main" before="-"/>
    <move element="page.main.title" destination="product.info.main" before="-"/>
    <referenceContainer name="product.info.social">
        <block class="Smartwave\Porto\Block\Template" name="product_view_addthis_links" after="-" template="Magento_Catalog::product/view/addthis.phtml"/>
    </referenceContainer>
    <referenceContainer name="content">
        <block class="Smartwave\Porto\Block\RickSnippet" name="rich_snippet" template="Magento_Catalog::product/view/rich_snippet.phtml" before="-"/>
        <block class="Smartwave\Porto\Block\Template" name="product_view_main_custom_block" before="product.info.main" template="Magento_Catalog::product/view/main_custom_block.phtml"/>
        <block class="Smartwave\Porto\Block\Template" name="product_view_main_custom_block2" after="-" template="Magento_Catalog::product/view/main_custom_block2.phtml"/>
    </referenceContainer>
    <move element="product_view_main_custom_block2" destination="product.info.main" after="product.info.overview"/>
    <var name="gallery">
       <var name="allowfullscreen">false</var>
    </var>

</body>


texts: How to call widget with products of specific category in ".phtml" file?

texts:
How can I call a widget that displays product from a specific category in a phtml file?

Currently I can only display "all_products" in my phtml file like that:

echo $this->getLayout()->createBlock("Magento\Catalog\Block\Product\Widget\NewWidget")->setDisplayType("all_products")->setProductsCount("5")->setTemplate("product/widget/new/content/new_grid.phtml")->toHtml();

How to do this with products from specific category and not all products?


texts: How to clear checkout-data selectedShippingAddress when the checkout page it is refresh by the user

texts:
I need to get the default shiping method when the user refresh the checkout page.
What I notice is that magento keep the last selected shipping method in the Local Storage:
checkout-data selectedShippingAddress
How can I force back the default shipping method when the page have being refresh.


texts:
On our Magento 2.1.8 CE site we noticed random problems with orders where PayPal Express was used. Once the order is placed, it will not show up in the Magento admin. When we check in our PayPal dashboard we can see the transaction and it has an Invoice ID. When we look back in the Magento admin we can see that Order ID already exists.

For example today Customer A placed an order using PayPal Express at 9:21:47 AM PDT for $21.97. We can't see the order in the Magento admin. In the PayPal dashboard, we can see the transaction and it has an Invoice ID of 100004929 for $21.97. Back in the Magento admin we can see Order 100004929 was placed today at 9:21:14AM PDT but it's for Customer B. The order total is completely different and so is the email.

Some how certain PayPal orders are using existing Order IDs.
We've had our dev team researching this issue for a couple of weeks but haven't been able to find a solution.

This problem does not happen to all PayPal orders.

We did have a problem about a month ago where somehow the customer table in the Magento database got dropped. Our dev team couldn't explain what caused that. We had to restore the database from the previous night's backup. I'm thinking that may have something to do with this problem but that is just speculation at this point.

Has anyone every ran into a problem like this before? Anyone have any ideas on where to look or what to try?


texts: Product Delete create re- indexer issue in magento 2

texts:
When I delete a product in Magento 2 using CSV import or through admin then after I re-index then category product and product category having indexer issue like

  SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0-82-1-9.0000' for key 'PRIMARY', the query was: INSERT INTO catalog_product_index_eav_decimal_idx.

when I check-in database table, find a product is deleted only from a catalog_product_entity table.

But in the remaining table that entity id are still present like in catalog_product_entity_decimal, catalog_product_entity_int, catalog_product_entity_text etc.


texts:
Is there any convention for version numbers and community modules?

I see a varied combination of the following as starting numbers:

1.0.0
0.1.0
0.0.1

I always tend to use the last one: 0.0.1 but asking if there is a standard we should all try and follow?


texts: My block call to get products from category dont work

texts:
My client wants to display some product groups on his frontpage.
So i used the code i used on every other magento site i have worked on. But on this it does not work.

{{block type="catalog/product_list" category_id="3" template="catalog/product/list.phtml"}}

Why does it not work?


texts:
I am testing CE ver 1.9.1.1 and discover the error. To replicate, go to any sales order page in admin and enter "80%" in the comment history, click the button Submit Comment. So far so good, then hit F5 to refresh the page and you'll see the error:

  Warning: vsprintf(): Too few arguments  in .../app/code/core/Mage/Adminhtml/Helper/Sales.php on line 133

Here's the function that contains line 133:

public function escapeHtmlWithLinks($data, $allowedTags = null)
{
    if (is_string($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
        $links = array();
        $i = 1;
        $regexp = '@(<a[^>]*>(?:[^<]|<[^/]|</[^a]|</a[^>])*</a>)@';
        while (preg_match($regexp, $data, $matches)) {
            $links[] = $matches[1];
            $data = str_replace($matches[1], '%' . $i . '$s', $data);
            ++$i;
        }
        $data = Mage::helper('core')->escapeHtml($data, $allowedTags);
        return vsprintf($data, $links);
    }
    return Mage::helper('core')->escapeHtml($data, $allowedTags);
}

Is this a bug? Is there a workaround?


texts:
I have problem with adding block inside another block..

my code:

 <reference name="content">
        <block type="checkout/onepage_login" template="opc/login.phtml" >
            <block type="webformat_loginwithpaypal/checkout_onepage_login_button" name="loginwithpaypal.checkout.onepage.login.button" />
        </block>
    </reference>

Then when i call $this->getChildHtml(); in login.phtml I do not see this view.

Any help ?


texts:
I have a product that is available in different variants and they are as follow:

Type: Leather
Form: Round, or Rectangular
Position: Up, or Down
Size: Small, Medium, Large, XL, and XXL
Quantity: Customer will enter the desired quantity
Prices: Depending on quantity

All of the above options should be listed in the front end as Drop Down but if customer chooses the form 'Rectangular', then the 'Position' option should not be shown (hide or disappear) in the front end as an option but the rest would show!

Your help would be very much appreciated!


texts:
I want to redirect the user to specific page in Magento 2 from PHTML file.

In Magento 1 we use following method to redirect

Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getBaseUrl().'?login=false');`

but not finding any solution for Magento 2.

I have also read this blog but it shows to create a custom module for that.
As I don't want to do this from the module.

Please provide any solution if available.

Edit

I just want to redirect the user to the specific page if not log in for that to create module it will be a not a good thing.


texts: Custom Attribute Value not getting in Category Page in Magento 2

texts:
I have created is_freeshipping attribute it's a boolean (Yes/No), and it's showing while product editing in Admin Panel.

And I am getting its value successfully on the Product page, But Category page returning false (No) even though it is true(Yes).

I tried to get this value by below code.

<?php $isFreeShipping = $_product->getResource()->getAttribute('is_freeshipping')->getFrontend()->getValue($_product); ?>

Is it the correct procedure? Please suggest me how to get the value of a custom attribute in Category Page?


texts:
I trying to setup build system for setup:di:compile and setup:static-content:deploy based on official devdocs.

  Build system

  The build system compiles code and generates static view files for
  themes registered in Magento. It doesn’t need a connection to the
  Magento database; it needs only the Magento codebase.

  On your build system:

  Pull the shared configuration file from source control.
  Use the magento setup:di:compile command to compile code.
  Use the magento setup:static-content:deploy -f command to update static file view files.
  Check the updates into source control.

I have prepared docker image (bmxmale/magento2-php:2.2-cli) and running docker with mounted magento code, without access to DB.

Before I exec magento app:config:dump and settings are now stored on config.php and env.php

Run docker with mounted Magento:

docker run -it -v $HOME/www/magento2:/srv/magento2 bmxmale/magento2-php:2.2-cli bash

Try to compile DI

magento@578fc8d10f6d:/srv/magento2$ magento setup:di:compile

  [Zend_Db_Adapter_Exception]
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

  [PDOException]
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known

  [PDOException]
  PDO::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known

setup:di:compile

Anyone know how build system should look like to make build code like described on devdocs?


texts: what is the difference between the functions getAddUrl and getAddToCartUrl?

texts:
I have found two function returning the exactly same value.

getAddUrl in \app\code\local\Mage\Checkout\Helper\Cart.php

getAddToCartUrl in \app\code\local\Mage\Catalog\Block\Product\Abstract.php

what is really the difference between these two, as I am adding an add to cart button in my block.
Which function should I use to add the product to the cart ?


texts: How can i remove product gallery " fotorama__stage" class height?

texts:
I am facing issue of image height on product details page gallery.

If i remove fotorama__stage class height from inspect element then its work fine.

Please check below image.

How can i remove product gallery fotorama__stage class height ? In which file ?


texts: Magento 2 Add Custom Column To Sales Order Grid from Sales Order

texts:
Want to save column data

  instore_order_number (present in both tables)

  from sales_order to sales_order_grid

Currntly I am able to save the instore_order_number from sales_order to sales_order_grid but facing issue in mapping i.e. when I am saving instore_order_number it is creating a new row with 0 id i.e. it is not mapping the sales_order with sales_order_grid

Code:
di.xml

<virtualType name="Magento\Sales\Model\ResourceModel\Order\Grid">
        <arguments>
            <argument name="joins" xsi:type="array">
                <item name="sales_order_grid" xsi:type="array">
                    <item name="table" xsi:type="string">sales_order_grid</item>
                    <item name="origin_column" xsi:type="string">entity_id</item>
                    <item name="target_column" xsi:type="string">entity_id</item>
                </item>
            </argument>
            <argument name="columns" xsi:type="array">
                <item name="instore_order_number" xsi:type="string">sales_order.instore_order_number</item>
            </argument>
        </arguments>
    </virtualType>

sales_order_grid.xml

<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="sales_order_columns">
        <column name="instore_order_number">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">text</item>
                    <item name="label" xsi:type="string" translate="true">instore_order_number</item>
                </item>
            </argument>
        </column>
    </columns>

Note: didn't made install schema as the attribute was present in both tables


texts: custom address field not showing in billing address in sales order view page admin

texts:
I have created custom address field using below code in my module--

   $installer = $this;

$installer->startSetup();

$setup = $this;

$entityTypeId = $setup->getEntityTypeId('customer_address');
$attributeSetId = $setup->getDefaultAttributeSetId($entityTypeId);
$attributeGroupId = $setup->getDefaultAttributeGroupId($entityTypeId, $attributeSetId);

$this->addAttribute('customer_address', 'delivery_premises_type', array(
    'type' => 'int',
    'input' => 'select',
    "backend" => "",
    'label' => 'Delivery Premises Type',
    "source" => "",
    'visible' => 1,
    'required' => 0,
    'user_defined' => 1,
    'default' => '',
    'visible_on_front' => 1,
    "frontend" => "",
    "unique" => false,
    'source' => 'address/entity_dpt',
));

$attribute = Mage::getSingleton("eav/config")->getAttribute("customer_address", "delivery_premises_type");
$setup->addAttributeToGroup(
        $entityTypeId, $attributeSetId, $attributeGroupId, 'delivery_premises_type', '999'  //sort_order
);

$used_in_forms=array(
                     'customer_address_edit',
                     'adminhtml_customer_address',
                     );

$attribute->setData("used_in_forms", $used_in_forms)
        ->setData("is_used_for_customer_segment", true)
        ->setData("is_system", 0)
        ->setData("is_user_defined", 1)
        ->setData("is_visible", 1)
        ->setData("sort_order", 100)
;
$attribute->save();

$sales_quote_address = $installer->getTable('sales/quote_address');
$installer->getConnection()
        ->addColumn($sales_quote_address, 'delivery_premises_type', array(
            'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
            'comment' => 'New Delivery Premises Type Field Added'
        ));

$sales_order_address = $installer->getTable('sales/order_address');
$installer->getConnection()
        ->addColumn($sales_order_address, 'delivery_premises_type', array(
            'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
            'comment' => 'New Delivery Premises Type Field Added'
        ));

$installer->endSetup();

and also changed in Configuration > customer Configuration > address template , I followed below links--

https://indiestechtips.wordpress.com/2011/07/30/how-to-add-custom-field-in-the-billing-and-shipping-address-of-onepage-checkout-in-magento/

https://raghunathgurjar.wordpress.com/2014/04/04/how-add-a-new-custom-field-to-customer-address/

still its not showing in sales order view page and in pdf as well.

Please help.

EDITS-

Here is config.xml

<fieldsets>
            <sales_convert_quote_address>
                <delivery_premises_type>
                    <to_order_address>*</to_order_address>
                    <to_customer_address>*</to_customer_address>
                </delivery_premises_type>
            </sales_convert_quote_address>
            <customer_address>
                <delivery_premises_type>
                    <to_quote_address>*</to_quote_address>
                </delivery_premises_type>
            </customer_address>
        </fieldsets>

I checked tables 'sales_flat_quote_address' and 'sales_flat_order_address', there is column 'delivery_premises_type but no values is saving in this column in both tables, if I do manual entry in this column in both tables, it works fine.
why entry is not going in both tables.

SOLVED---
I did mistake in billing.phtml file during putting my custom field on checkout page.


texts: Magento 2 EE: Running composer update is giving error

texts:
I am trying to run composer update and want to push the changes to magento cloud but is giving the following error:
Problem 1

magento/product-enterprise-edition 2.3.4 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
magento/product-enterprise-edition 2.3.4 requires ext-bcmath * -> the requested PHP extension bcmath is missing from your system.
Installation request for magento/product-enterprise-edition 2.3.4 -> satisfiable by magento/product-enterprise-edition[2.3.4].

Maybe because it is conflicting with my local PHP environment?
I am running the command outside the docker container. Is it necessary to run the commands inside a docker container?


texts: How to limit the search index fields in Magento?

texts:
We are using elastic search 6.x and facing search index limit exceeded error. As per this doc

  https://support.magento.com/hc/en-us/articles/360003290654-Exception-on-category-page-with-Elasticsearch-5-0-Limit-of-total-fields-1000-in-index-has-been-exceeded
  How can we limit the search index fields in Magento? Any body knows where that setting or config resides in Magento


texts: Magento2: how to get product video by product id or sku?

texts:
I've tried to get video on product page on other place not on gallery. But i can't retrieve it. I've seen it stored on catalog_product_entity_media_gallery_value_video

I want to get it proper not direct query. anybody knows proper way?


texts:
The first time I ran the patch, I got

  patching file .htaccess Hunk #1 FAILED at 207. It was the only file that had an issue.  All the rest patched successfully.

I replaced with the stock .htaccess and .htaccess.sample, and ran the patch again.  This time, new .htaccess issue:

  Checking if patch can be applied/reverted successfully...
  /usr/bin/patch: **** Can't rename file /tmp/polM4FGJ to .htaccess : Permission denied
  ERROR: Patch can't be applied/reverted successfully.

I've checked all permissions, everything seems to be okay. Anyone run into this?


texts: Magento2 - How can I convert default Magento cart icon into simple text like Cart?

texts:
I need to convert the cart icon having the following CSS

.minicart-wrapper .action.showcart:before{
font-size: 35px;
line-height: 33px;
color: #8f8f8f;
content: '\e611';
font-family: 'icons-blank-theme';
margin: 0;
vertical-align: top;
display: inline-block;}

into simple text  like Cart(0)


texts: Problem with link in responsive menu (go to undefinied url)

texts:
I'm facing a pretty ugly issue. When I'm on desktop, no problem with the menu link.

When I'm on responsive, when I go through the menu, I have the right URL but when I press the item, I'm redirected to a 404 page ( my.url/undefined)

But I have no problem on responsive when I do "Click Right" -> "Open in new tab"

Does anyone faced this issue ?


texts: Magento 2 Create New Customer Account gives `We can't save the customer.` error while creating new customer account in frontend

texts:
I am facing some issue while I am adding new customer account from frontend. When I fill the details of Create New Customer Account Form and submit the form then I got the error We can't save the customer. in frontend.

And when I check for the customer record in admin panel under CUSTOMERS > All Customers. The customer record has been added to my records in admin panel.

Then I followed this, and added $this->messageManager->addException($e, $e->getMessage()); to trace out the issue and it only shows the error:

Invalid argument

Is there any issue related to customer attribute? How can i debug and fix this issue?
----- Update -----
I checked system.log, It shows this error:

main.CRITICAL: Exception message: Invalid argument
Trace: #0 /var/www/html/mydomain.com/vendor/magento/zendframework1/library/Zend/Mail/Protocol/Smtp.php(167): Zend_Mail_Protocol_Abstract->_connect('tcp://57:587')


texts: Is the Magento expo geared towards potential new customers or is mainly for programmers and designers?


texts: Magento 2 multi-select field in block not displaying values in magento admin panel

texts:
I have created custom form in which I want a multi select field and display dynamic data. I have created a collection object in the form of array and passing it as a value for my multi select field.

 $fieldset->addField(
            'collection_block',
            'multiselect',
            array(
            'name'=>'collection_block[]',
            'label'=>'Collection Blocks',
            'value' => $collectionCheckboxes
        ));

  $collectionCheckboxes is an array of values which has dynamic data.

I am able to get the multi select design in admin panel but my values not displayed.

Can anyone suggest with some solution.

Thanks


texts: Add a custom fee to totals block of invoice/order email

texts:
So far I could add a custom fee to an order. It shows on checkout page, admin order view, admin invoice view, invoice pdf. But I don't know how I should do to display it in order/invoice email.

I see one way to do this is: override _initTotals method of Mage_Sales_Block_Order_Totals class. But I don't know if this will affect another places, or if other extension wants to do the same thing (adding some custom fees to the totals block), then they will conflict.

I doubted that there's a way to add a total to totals block via xml, or binding to some event...

Given the fact that there's a column called customfee_total in sales_flat_order table, what's the best way to achieve that?


texts:
Reading the M2 docs I can see there is meant to be Page Hierarchy

However I can't If I go Stores->Settings->Configuration->General->Content Management I don't see any mention of Configuring Page Hierarchy (see screenshot below)

Could anyone advise how I enable this?


texts: Magento2 solution specialist exam: What is the passing score of and study material for that

texts:
I Just come to know that Magento announces first certification exam in Magento2 version.

After reading in this page https://u.magento.com/certified-magento2-solution-specialist

I have some question about the exam.

What is the number of question asked in an exam (I think 150 But need to confirm)?

What is the passing score for this exam?

what is study material useful for this exam?

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

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


texts: How to pass parameters to Magento 2 crons

texts:
In Magento 1.X we have a field "parameters" in the cron_schedule table. However I don't see it in Magento 2.X

So how can we have parameters for cron jobs in Magento 2? Any suggestions?


texts: Magento Widget not showing up on frontend

texts:
I am trying to add widget instance from Magento Admin Panel for Categories pages left sidebar, Product pages right sidebar, Home Page main content. None of the widgets are appearing on frontend. Is it possible that Block Reference to not work for adding widgets in a theme? I selected the theme package and widget type is CMS Static Block.

I contacted the theme designer on his support forum. He said I can add widgets to the sidebar using Magento Backend interface. But the widgets are not showing up on frontend. No matter I add a Static Block, a Category link or anything else, it doesn't show up on frontend.


texts: Magento2 Cart price rule not getting applied after flat rate shipping customisation

texts:
I have override the

Magento\OfflineShipping\Model\Carrier\Flatrate

Added some custom conditions for shipping flatrate, now the issue is that when I apply shipping cart price rules it doesn't get applied. If I remove this overrride file then the rule is getting applied
Can anyone let me know in the Flatrate file what change shouldn't be made so that cart rule gets applied?


texts: Magento2 : How to add button in admin custom module page?

texts:
I want to add one button here

how I can add code??

and how to add action controller

any idea ??

i already tried this answer(https://magento.stackexchange.com/a/212656/73525)  but showing
error

  Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Framework\View\Element\UiComponentFactory::argumentsResolver()
           must be of the type array, null given, called in /var/www/html/equpo2/vendor/magento/framework/View/Element/UiComponentFactory.php on line 206 and defined in
          /var/www/html/equpo2/vendor/magento/framework/View/Element/UiComponentFactory.php on line 172


texts: delete a system attribute in magento which is no longer in database

texts:
I know i can go to eav_attribute and make it user defined and delete it, but its not there ..

This was created by an extension, which i have uninstalled and now the attribute is throwing errors something like

a:5:{i:0;s:76:"Source model "marketplace/source_option" not found for attribute "seller_id"";i:1;s:3374:"#0
/mysite/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php(387): Mage::exception('Mage_Eav', 'Source model "m...')

i can see still see seller_id attribute in backend, however it is system attribute and i just want to get rid of it.
Now its nowhere in eav_attribute :-(

P.S: This was a magento marketplace plugin www.magentocommerce.com/magento-connect/super-simple-multi-vendor-marketplace-free.html


texts: Product Images not shown after uploading , how?

texts:
I am having a very strange problem, i am uploading product images through admin panel but when i upload image it shows 100% uploaded but doesn't show image row at all . Tried so many things but couldn't make it work.

Please help if anybody know about this problem

I have tried giving permissions 777 to media folder but it doesn't work for me. This happens when i uploaded the site on server, when it was on my local machine it was working fine.


texts:
Not long ago I made my first Magento 2 custom/child theme so that my website
changes won't be erased when I upgrade to another version.

I now want to override some core Magento 2 files that I need to make changes
in.

The official theme document on Magento's website makes no sense to me.

For days I have looked at many different guides on how to override the core
Magento 2 files, but I can't seem to wrap my mind around where I should place
the copied files in my theme folders so that I can modify them.  Two of the
files (default.xml) have the same name but have different content.

This is pretty much the only thing I have done so far, because of my ignorance and confusion:
I placed a modified default.xml file to customize the footer links in the
/Magento_Theme/layout folder of my theme, but when I enable my theme, the
links at the top and bottom of the homepage turned light blue, and the mini
cart doesn't display any items that are in the cart, and wouldn't let me
"Proceed to Checkout" when pressing that button.

Obviously, there is something that I am missing.

Am I only supposed to copy files from the /vendor/magento/theme-frontend-blank folder, or the /pub/static/frontend/Magento/blank/en_US folder?

Does anyone know of a good newbie/dummy guide to theming in Magento 2, or can
just tell me what I am missing?

Thanks.

I am using Magento 2.2.1

My custom/child theme is inheriting from the Blank theme.

This is my theme structure: /app/design/frontend/ABC/ABC_Theme/, then inside
that folder are etc, Magento_Theme, media, web, composer.json,
registration.php, and theme.xml.

Below are the files that I need to put in my theme folders and modify them,
and what I want to do with them:

To change the Captcha noise level:
/vendor/magento/zendframework1/library/Zend/Captcha/image.php

To change the text for the captcha from "Please type the letters below":
/vendor/magento/module-captcha/view/frontend/templates/default.phtml

To change some of the words in the notice:
/vendor/magento/module-theme/view/frontend/templates/html/notices.phtml

To change "What's on your mind", and "Jot us a note and we'll get back to you as quickly as possible" in the contact us page:
public_html/vendor/magento/module-contact/view/frontend/templates/form.phtml

To remove the "Orders and Returns" link from the footer, and to remove the
sales-guest-form-link:
/vendor/magento/module-sales/view/frontend/layout/default.xml

To customize the popup's text:
/vendor/magento/module-customer/view/frontend/web/template/authentication-
popup.html

or should it be from

/pub/static/frontend/Magento/blank/en_US/Magento_Customer/template/authentication-popup.html

To customize the links in the footer:
/vendor/magento/module-checkout/view/frontend/layout/default.xml

Should all of these files go somewhere in the 'Magento_Theme' folder or
folders of their own?


texts:
I am currently working on my website, Magento 2.1.9. I have created a grouped product and now trying to figure out how to configure the number of products shown. How do I display only 5 products and add "show all" button?
Please help. Thanks!


texts: Dataflow Profiles - Not amending customers - creating new one

texts:
Hi basically I have 1000s of customers who don't have addresses in magento (1.9.0.1) that were imported previously.

I go into dataflow profiles, export a specific customer (as a test) so I have a CSV layout and then paste into the columns the data for the customers and their addresses to import back in.

What I want is to basically amend these customers with new addresses I have in another CSV.

I exported a customer and pasted in the address into the billing and shipping columns and used data profiler to import it back in.

However the problem I am having is that it is creating a duplicate customer and not amending the current one.

Can anyone suggest why this may be happening?

Thanks


texts: Magento 1 - How to trigger the password reset email to customer , instead of an email with an auto-generated password?

texts: Magento 1 - How to trigger the password reset email to customer , instead of an email with an auto-generated password ?


texts: Magento 2.3: How to Create Order Using Braintree Vaulted Card

texts:
I'm trying to create an order programmatically using braintree payment method and the customer's saved credit card.

// prepare adresses, products in quote, shipping method - skipped
    $quote->setPaymentMethod('braintree');
    $quote->setInventoryProcessed(false);
    // Set Sales Order Payment

    $quote->getPayment()->importData(array('method' => 'braintree, 'cc_type' => 'AE', 'cc_exp_month' => '05', 'cc_exp_year' => '2022', 'public_hash' => $public_hash));

    $customer = $this->customerRepository->get($contact->email);
   // prepare customer
    $quote->setCustomer($customer);

    // Collect Totals & Save Quote
    $quote->collectTotals()->save();
    $order = $this->quoteManagement->submit($quote);

I have access to all of the saved CC information from the customer, I'm just not sure what info needs to be passed in $quote->getPayment(importData(array(....));

In my payment.log file I see the following error when attempting to create orders using the saved CC:

Cannot determine payment method.

Any ideas how to process payments using Braintree vaulted cards?


texts: how to add parent filter in Magento2 product collection?

texts:
How to load new product collection in Magento 2 something like

$collection->addAttributeToFilter('parent_id', null);

I want all simple product which is not  associate with configurable which mean it has no parent.

Or any other approach ?


texts:
If we click on one link, we  have to display the following url

http://2.kidsdial.com/marketplace/marketplaceaccount/new/

i can use the code like this :

click

but i think this is not good practice

I am trying this ,

but its not working.


texts: Delete payment step from checkout and connect to bank

texts:
In my site because I'm using one bank for payment I want to delete payment step from checkout and when customer clicks the continue button in shipping method, review will show to customer and also the payment step done in backend. So after click order button in review step, customer will connect to bank for payment.

Also I want to do this without changing the core files because of update magento in future. But I don't know how can do this?

Thanks for help.

EDIT:

My question is different, now I have a problem that I now remove payment step but I want when I click the order button in review step it's connect to bank for payment but now it doesn't connect and after click order button in review step it shows me this page: http://example.com/checkout/onepage/success/

These are the files that I add to my site.

Excellence:

app\code\local\Excellence

1- app\code\local\Excellence\Remove\Block\Onepage.php

2- app\code\local\Excellence\Remove\controllers\OnepageController

3- app\code\local\Excellence\Remove\etc\config.xml

4- app\code\local\Excellence\Remove\Helper\Data.php

5- app\code\local\Excellence\Remove\Model\Method\Free.php

remove.xml:

app\design\frontend\default\my-theme\layout\remove.xml

remove:

app\design\frontend\default\my-theme\template\remove

1- app\design\frontend\default\my-theme\template\remove\checkout\onepage\review\info.phtml

2- app\design\frontend\default\my-theme\template\remove\checkout\onepage\progress.phtml

3- app\design\frontend\default\my-theme\template\remove\checkout\onepage\shipping_method.phtml

4- app\design\frontend\default\my-theme\template\remove\checkout\onepage.phtml

Excellence_Remove.xml:

app\etc\modules\Excellence_Remove.xml

removecheckout.js:

skin\frontend\default\my-theme\js\removecheckout.js

In which of these files I should make changes that with click order button in review button page connect to bank for payment?


texts:
I want to update PHP version from 7.0.32 to PHP 7.3.

How to do that?

UPDATE


texts: customer/account and customer/address assistance. magento 2

texts: I have scoured the git repository and my local copy, I am trying to find what files magento2 uses to create the edit section of the customer account dashboard for address. specifically for logged in customers when they click the edit address link. I need to remove first and last name from those screens and add company on them. I found it for the customer checkout section.


texts: Custom non-editable product attributes not visible on backend grid

texts:
I am edding and filling some attributes programmatically
with addAttribute in magento 1.9.3

I don't want them to be editable, so I set "input" => "label", but when I do it I can't select the attributes for the product grid to show on backend ("Manage Products" -> "Grid Attribute Columns" -> "Attribute Columns"). For those for which I set "input" => "text" I can see them in the selection.

How can I make the non-editable custom-attributes visible on the backend product grid?
Has anyone dealt with this (input=label)?
Should I modify the backend code?

This question is different from Read-Only Product Backend attribute because in my case the attributes are visible in the products tab and everything seems fine from the first glance. Later on it looks like some inconvenience. So I would not just address it to the question about not-working readonly attributes.


texts: How to customize message in Newsletter subscribe if user already subscribed

texts:
I want to change newsletter subscribe message for users who are already subscribed with that email. By default it show the same message as user gets first time for subscription success.

  Thank you for your subscription.

Kindy guid me from where i can customize it. I am using magento(2.1.8) version.


texts: Magento2 : Error The "Is New" attribute value is empty. Set the attribute and try again

texts:
When I try to save a new category, the result is the following error.
  I'm using magento 2.3


texts: Magento 2 : Override custom option text template

texts:
I tried to change the template of the text custom option in frontend.

I copied the original

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

to

Vendor/Module/view/frontend/templates/catalog/product/view/options/type/text.phtml.

and add to

Vendor/Module/view/frontend/layout/catalog_product_view.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <referenceBlock name="product.info.options">
                <action method="setTemplate">
                    <argument name="text" xsi:type="string">Vendor_Module::catalog/product/view/options/type/text.phtml</argument>
                </action>
            </referenceBlock>
        </referenceContainer>
    </body>
</page>

my custom.phtml file is well called, but craches at the first lines :

<?php
    $_option = $block->getOption();
    $class = ($_option->getIsRequire()) ? ' required' : '';
?>

$_option being null after $_option = $block->getOption();

Thank you for your help,

EDIT 1:

I tried for catalog_product_view.xml

 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <body>
<referenceBlock name="product.info.options">
                <referenceBlock name="text">
                    <action method="setTemplate">
                        <argument name="template" xsi:type="string">Vendor_Module::catalog/product/view/options/type/text.phtml</argument>
                    </action>
                </referenceBlock>
    </referenceBlock>
        </body>
    </page>

but it is not working...


texts: get product name for the order in my dashboard

texts:
I am working on magento 2.1.8. In the my dashboard There are orders listing. But i want the product name of that order also.

right now product name could be shown by clicking on the view all list. This order is coming from recent.phtml. I also tried to get the product name from. order>items>renderer>default.html The code i copy was this.

<?php echo $block->escapeHtml($_item->getName()) ?>

how ever i am still not able to get this. Can any body help me in this regard.?


texts:
I recently had my website moved to a new server. After a day my CPU is maxed out. There are not any errors in my logs and my cache is running. When I check the processes I see that the same command has ran multiple times and is taking up all the resources. What would cause this and how do I solve/debug the issue?
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
buyglas1  587780  0.1  0.0 382708 17612 ?        S    09:31   0:04 lsphp
buyglas1  591422 11.8  0.2 492944 91408 ?        Rs   10:03   1:16 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592033 11.6  0.2 500096 98032 ?        Rs   10:09   0:31 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592036 12.0  0.2 420052 84956 ?        Rs   10:09   0:31 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592054  0.0  0.0  11828  3860 pts/2    S    10:09   0:00 /bin/bash -l
buyglas1  592282 11.9  0.2 420028 83120 ?        Rs   10:10   0:27 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592285 11.8  0.2 498944 95000 ?        Rs   10:10   0:26 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592288 11.9  0.2 420028 83132 ?        Rs   10:10   0:25 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592311  0.0  0.0   6720   744 pts/2    T    10:10   0:00 less
buyglas1  592356 11.8  0.2 420028 83132 ?        Rs   10:11   0:20 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592368 11.7  0.2 416212 79904 ?        Rs   10:11   0:17 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592375 11.4  0.2 494408 90660 ?        Rs   10:11   0:17 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592380 11.6  0.2 420028 82820 ?        Rs   10:11   0:16 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592412 11.3  0.3 502084 99284 ?        Rs   10:12   0:11 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592413 11.4  0.2 417992 81072 ?        Rs   10:12   0:11 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592432 11.6  0.2 422076 84856 ?        Rs   10:12   0:08 lsphp:/home/USERNAME/public_html/index.php
buyglas1  592519  0.0  0.0  49840  1644 pts/2    R+   10:14   0:00 ps -aux

Update
I've found that there is a cron job that is running into this error
General error: 1525 Incorrect DATETIME value: 'NULL', query was: SELECT `main_table`.* FROM `cms_block` AS `main_table` WHERE (`valid_from` != 'NULL') AND (`valid_to` != 'NULL'). Statistics: {"sum":0,"count":1,"realmem":0,"emalloc":0,"realmem_start":176422912,"emalloc_start":174038040}


texts: How to stop configurable and simple product to add to cart together in magento 2?

texts: Hello i want to do if there is simple product is added in cart then when customer is try to add configurable product then they should get message "you can't add configurable product with simple product please remove simple product from cart and then add the configurable product" i want this functionality how can i achieve this?


texts: In Magento 2, can I have a per item shipping cost of $1, but only for items from a specific category?

texts:
I know I can set a rule to set the shipping to free.
I know I can set a table rate for the whole site.

I want to keep my regular table rate for most products which is a weight based table.  What I would like to find is a way to charge $1 in shipping for any Greeting card purchased, and have that as a choice on the checkout screen as well.

This way, if a customer buys a windchime and a card, the weight of the card would essentially be free for shipping purposes.

If that same customer only buys a card, they have the option of only paying $1 for shipping.


texts: Magento 2: How to get Order Wise Product's Manage Stock?

texts:
Does Magento store Product Wise Manage Stock in DB?

Example: I have Product A : Qty: 10 with Manage Stock Yes

Order : 10 Qty

Now I have same product with Manage Stock No

Order : 5 Qty

Can I get Order wise Product A's when it's Manage Stock On/Off?

Output:

Order Id Product Id Manage Stock  Qty
1         1          1            10
2         1          0            5


texts: Magento 2.1- How to Integrate Google Maps API in Ui Component Form

texts:
I have been looking around to find any good solution, that could help me to integrate Google Map to my admin form, my goal was to get the latitude, longitude and zoom from the drag able marker on the map to dynamically fill my form fields.

Is it necessary to attach the JS in Knockout format?
Did any body achieve this?


texts: I am using a theme called GalaElectronics I believe. I am looking to change the default select tab when the product is viewed. Currently it displays Description first and its on the left, I need it to display features first and have it on the left instead. What do I have to modify to accomplish this.