texts: Magento2: How to add Bundle Product in cart via REST API?

texts:
I need to add a bundle product in cart via REST API.

Is there any sample code by which I can pass only SKU code and bundle product will add into cart.

Please help me in this.


texts: How to get Store logo and image alt in magento

texts:
I want to get store logo and logo alt tag and homepage URL of store through to store id. I am using below code but its not working for me.

        $storeid=1;

        $store['id']=$collections->getStore_id();
        $store['image']=Mage::app()->getStore($storeid)->getLogoSrc();
        $store['alt']=Mage::app()->getStore($storeid)->getLogoAlt();
        $store['storeurl']=Mage::app()->getStore($storeid)->getHomeUrl();

In return i am getting

        [id] => 1
        [name] => Default Store View
        [image] =>
        [alt] =>
        [storeurl] =>

Let me know where i am doing wrong or how to get store logo and logo alt tag and homepage URL from store ID.


texts:
As a follow-up to a previous question I would like to know:

When should I use the category flat table option?

While googling I found an advice to enable it "when you have very much categories".
But what is much?

I can easily understand, that activating flat tables for products is a good decision in terms of performance, but is it really as much important for catalogs?

And what implications conclude from this?
I just learned that enabling flat category tables lead to not being able to save category product positions. At least not as easy as without the flat option (thx to Marius for your help).
Are there any other mentionable things?

Thanks in advance :)


texts: FishPig WordPress, filter category into widget

texts:
I need to show in the sidebar determinate category and its children through category widget

The file starts with :

    <?php $categories = $this->getCategories() ?>
<?php if (count($categories) > 0): ?>

        <?php if ($title = $this->getTitle()): ?>

                <?php echo $this->__($title) ?>

        <?php endif; ?>

                <?php if ($this->getDropdown()): ?>

                        <select name="blog-archive-dropdown" onchange="setLocation(this.value);">
                            <option value="<?php echo $this->helper('wordpress')->getUrl() ?>"><?php echo $this->__('Select Category') ?></option>
                            <?php foreach($categories as $category): ?>

How filter by category term or ID?


texts:
I have a problem with the auto-generation of my sitemap. I did everything I have written below.

I created a sitemap through Admin > Catalog > Google Sitemap option
I made the auto-generation setup Admin > System > Configuration > Catalog > Google Sitemap > Generation Settings
I added crontab a cron job for cron.sh (This cron job runs every hour / I have evidence that it works)

But the auto-generation still does not work! Is there any log files I can check? I don't know what's missing!


texts: How to remove replace null value in place of Zero(0) in minicart if There is no items in cart in magento2?


texts: what is the difference between magento 2.1.7 and 2.1.8?

texts: I chose magento 2.1.7 for a project. Now during the project my client asked me to upgrade it to magento 2.1.8. Can someone explain the difference?


texts: How i can change the minimum and maximum value in this aggregations price magento 2 graphql

texts:
Request

{
  products(filter: { category_id: { eq: "14" }}) {
    aggregations {
      label
      count
      attribute_code
      options {
        label
        value
        count
      }
    }    total_count    items {
      sku
      price_range {
        minimum_price {
          regular_price {
            value
          }
          final_price {
            value
          }
        }
      }
    }
  }
}

Response :

{
  "data": {
    "products": {
      "aggregations": [
 {
          "label": "Price",
          "count": 2,
          "attribute_code": "price",
          "options": [
            {
              "label": "Below 100",
              "value": "*_100",
              "count": 8
            },
            {
              "label": "100 and Above",
              "value": "100_*",
              "count": 2
            }
          ]
        },

Here
products aggregations
price value has

  *-100

  100- *

How i can change to minimum and maximum value(Price) instead of (*)  in this aggregations

magento 2.3.4 graphql?

i tried with

settings path : stores -> configuration -> catalog -> layered navigation -> price calculation

Tried every options


texts:
I have developed a module for Magento 2 for Promotions.

I have a form for this which is working and contains basic information:

Title
Description
Price
Start Date
End Date

I now need to add "Products" to the promotion.

I have two tabs for this

in the "Products" tab, I want to add a product selection form such as the one found in the categories page. like this:

I have searched through Magento SE and can't find the answer I am looking for.

Does anyone know a way of achieving this or a resource that I could read up on to learn how?


texts: How to programmatically edit a downloadable product

texts:
I would like to edit a downloadable product by php. Specifically I would like to change/add the file url that would be used by the system to access the file to be purchased e.g. http://somewhere/song.mp3. I looked at an example online and this seems to be fairly simple for samples(this is not my code):

 $sampleModel = Mage::getModel('downloadable/sample')->setData(array(
                'product_id' => $product->getId(),
                'sort_order' => 0,
                'sample_url' => '/u/n/untitled_1.png',
                'sample_file' => '',
                'sample_type' => 'file',
                 'title' =>'mYtitle'
));
$sampleModel->save();

I don't know how to do this for the link url. And Where do I place the script. Thanks.


texts: How can i filter custom atributes in graphql?

texts:
I am building an e-commerce app to sell products. There is a section in my website with products on sale and I want to show in this section just the products that are on sale. But in the backend of my app, the products on sale (Special) have the same value as the normal products (Price). So, to set those two apart I create a field custom atributes with the name type.

{"attribute_code": "type",
"value": "Special"
}

So how can I make the query bring only the products that have the value Special?

below is the code that filters but it's not bringing the products with the value Special

products(
        pageSize: $size
        currentPage: $page
        search: $filterBrand
        sort: { name: $sortByName, price: $sortByPrice }
        filter: { category_id: { eq: $id}, type: {eq : "Special"}}
    )


texts:
What would be the best way to create a modal after adding a product to cart (Showing "continue shopping" or "checkout")?

I though about using just JS with event. But, I don't know how to concile this the AJAX result.


texts: Generate.php fails when trying to set up FTF

texts:
I am trying to set up FTF on my OSX machine.  Whenever I try to php generate.php I get the error messages below.  Any ideas how to fix this?

frontend-mbp:utils jmargolis$ php generate.php
PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0

Warning: Module 'xdebug' already loaded in Unknown on line 0
PHP Notice:  Undefined index: class in /Applications/AMPPS/www/am.dev/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php on line 135
PHP Stack trace:
PHP   1. {main}() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:0
PHP   2. Magento\Mtf\Util\Generate\Page->launch() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:28
PHP   3. Magento\Mtf\Util\Generate\Page->generateClass() /Applications/AMPPS/www/am.dev/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php:64

Notice: Undefined index: class in /Applications/AMPPS/www/am.dev/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php on line 135

Call Stack:
    0.0003     227960   1. {main}() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:0
    0.2440    2881120   2. Magento\Mtf\Util\Generate\Page->launch() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:28
    0.2862    2881776   3. Magento\Mtf\Util\Generate\Page->generateClass() /Applications/AMPPS/www/am.dev/dev/tests/functional/lib/Magento/Mtf/Util/Generate/Page.php:64

PHP Notice:  Undefined index: value in /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php on line 239
PHP Stack trace:
PHP   1. {main}() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:0
PHP   2. Magento\Mtf\Util\Generate\Fixture->launch() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:29
PHP   3. Magento\Mtf\Util\Generate\Fixture->generateClass() /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php:45
PHP   4. Magento\Mtf\Util\Generate\Fixture->getDefaultValue() /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php:148

Notice: Undefined index: value in /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php on line 239

Call Stack:
    0.0003     227960   1. {main}() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:0
    0.4327    4764200   2. Magento\Mtf\Util\Generate\Fixture->launch() /Applications/AMPPS/www/am.dev/dev/tests/functional/utils/generate.php:29
    0.4489    4765032   3. Magento\Mtf\Util\Generate\Fixture->generateClass() /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php:45
    0.4490    4774744   4. Magento\Mtf\Util\Generate\Fixture->getDefaultValue() /Applications/AMPPS/www/am.dev/dev/tests/functional/vendor/magento/mtf/Magento/Mtf/Util/Generate/Fixture.php:148

|| Item               || Count || Time ||
|| Page Classes       || 112   || 0    ||
|| Fixture Classes    || 44    || 0    ||
|| Repository Classes || 38    || 0    ||

frontend-mbp:utils jmargolis$

Edit: This is not a clean install, but I don't think anyone has ever touched the testing area.


texts: How to enable Developer Mode in Magento 1.7

texts:
I am trying to enable Developer Mode on a site using Magento 1.7. So far I've added :

SetEnv MAGE_IS_DEVELOPER_MODE "true"

to the .htaccess file and :

...
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
    Mage::setIsDeveloperMode(true);
}
...

to the index.php file as described here. I have even removed the If clause, leaving only :

...
    Mage::setIsDeveloperMode(true);
...

in the index.php file. But still no luck.  What am I missing? What should I do in order to enable Developer Mode?


texts: Magento 1.9 Programmatically removing promo items from cart

texts:
I have a controller that loops through all items in the cart, and removes the item if it matches the condition, in this case all products should be removed because of the true as condition.

$cart = Mage::helper('checkout/cart')->getCart();

// Loop through products
foreach ($cart->getItems() as $item) {
  if(true) { // Normally a different condition
    $cart->removeItem($item->getItemId());
  }
}

The script does remove all items, except for those added as promotional item by a module (Amasty Free Gifts / Promo Items).
The items unique key doesn't change, so it is not being removed from the cart, neither added again by the module, because the key hasn't changed.

When I delete the main item, the promo item came with, the promo item is deleted.

How can I delete this product?


texts:
I am trying to get Magento to work on XAMPP, I currently use the newest version of XAMPP, I have followed the guidelines for XAMPP installation which can be found here:

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/installing_on_windows_with_xampp_and_wamp

But when I run the magento-check.php to see if everything would work, I get this really weird output that is partly an output and partly php code...

I get this:

You need PHP 5.2.0 (or greater)'; } else { $pass .='
You have PHP 5.2.0 (or greater)
'; } if(!ini_get('safe_mode')) { $pass .='
Safe Mode is off
'; preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version); if(version_compare($version[0], '4.1.20', '<')) { $fail .= '
You need MySQL 4.1.20 (or greater)
'; } else { $pass .='
You have MySQL 4.1.20 (or greater)
'; } } else { $fail .= '
Safe Mode is on
'; } foreach($extensions as $extension) { if(!extension_loaded($extension)) { $fail .= '
You are missing the '.$extension.' extension
'; } else{ $pass .= '
You have the '.$extension.' extension
'; } } if($fail) { echo '

Your server does not meet the following requirements in order to install Magento.'; echo '
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:'; echo '

'.$fail.'

'; echo 'The following requirements were successfully met:'; echo '

'.$pass.'

'; } else { echo '

Congratulations! Your server meets the requirements for Magento.
'; echo '

'.$pass.'

'; } } ?>

How can I fix this problem?


texts: Magento2 Auto capture using Stripe card payment

texts:
i am using stripe card payment method,
i place the order using card payment method,

when i debug the code in stripe extension i found that they are using Stripe\PaymentIntent when order is place,

now i want to auto capture using Stripe\Charge method without using card detail

how can i do this?


texts: Magento 2.2.6 not open after unzip and include all the extensions

texts:
I am new to the magento development. I am trying to install magento 2.2.6 .
My configurations

Apache/2.4.18 (Ubuntu)
PHP Version 7.0.32
Ubuntu 16.04
mysql 5.7.24

I have downloaded magento 2.2.6 (full release with sample data) from https://magento.com/tech-resources/download . then try to open localhost/magento.

It says

This page isn’t working
localhost is currently unable to handle this request.
HTTP ERROR 500

while i try composer install command

it provides output

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

What is the problem why i cant open magento setup in my locahost

ANSWER

I have found what is wrong .. I check the error log file and found out var folder permission issue. After i provide permission it working properly


texts: Magento2 - How do I write below query function into non-deprecated? without using getCollection()

texts:
How do I write below function into non-deprecated? In Magento2. without using getCollection()
 public function getNewCustomer()
    {
        $customerData = $this->customerFactory->create()->getCollection();
        $customerData->addAttributeToSelect("*");
        $currentDate = date("Y-m-d H:i:s"); // Y-m-d h:i:s
        $newDate = strtotime('-30 MINUTE', strtotime($currentDate));
        $newDate = date('Y-m-d H:i:s', $newDate);
        $customerData->addFieldToFilter('created_at', ['gteq' => $newDate]);
        $customerData->addFieldToFilter('created_at', ['lteq' => $currentDate]);
        $customerData->load();

        return $customerData;
    }

Please help
I changed below, but its not work
public function getNewCustomer()
{
    $customerData = $this->customerFactory->create();
    $customerData->getSelect()
         ->where(
            'created_at >= ?',
            $customerData->getConnection()->getDateSubSql(
                new Zend_Db_Expr('NOW()'),
                '30',
                AdapterInterface::INTERVAL_MINUTE
            )
        );

    return $customerData;
}


texts: How can I create a sales rule that applies a further reduction on special prices?

texts:
Our catalog extensively uses 'Special Price' prices throughout. We need to put on a sale with 'further reduction' of 15% with this as a catalog price rule.

If the product was £10 and marked down to £5 by 'special price' then we would want to show a further 15% discount and see £4.25 (rather than £5 or £8.50).

As a workaround I can get the prices in and out of Excel, however, this 'further reduction' is a feature of the store and retail in general. Therefore, how do I do it?
Using a cart rule is not what is needed here, I know I could apply a further reduction that way but I need the price to be actually paid on the front end.


texts: Magento Upgrade 2.2.10 to 2.3.3 Getting Integrity constraint violation php bin/magento setup:upgrade

texts:
I have upgraded from Magento2.2.10 to Magento2.3.3

after running

php bin/magento setup:upgrade

I got this error

  SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or
  update a child row: a foreign key constraint fails
  (db_amit.#sql-14b6_7ed, CONSTRAINT
  CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY (entity_id)
  REFERENCES catalog_product_entity (entity_id) ON DELETE CASCADE),
  query was: ALTER TABLE catalog_product_entity_decimal MODIFY COLUMN
  value decimal(20, 6)NULL COMMENT "Value", ADD CONSTRAINT
  CAT_PRD_ENTT_DEC_ATTR_ID_EAV_ATTR_ATTR_ID FOREIGN KEY (attribute_id)
  REFERENCES eav_attribute (attribute_id) ON DELETE CASCADE, ADD
  CONSTRAINT CAT_PRD_ENTT_DEC_ENTT_ID_CAT_PRD_ENTT_ENTT_ID FOREIGN KEY
  (entity_id) REFERENCES catalog_product_entity (entity_id) ON DELETE
  CASCADE, ADD CONSTRAINT
  CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_STORE_STORE_ID FOREIGN KEY
  (store_id) REFERENCES store (store_id) ON DELETE CASCADE


texts: how to edit the payment method in email template in magento 2.3.4


texts: How call Magento 2 module by url (or add route in module)?

texts:
I wrote module in Magento 2 and this is my /etc/frontend/routes.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/App/etc/routes.xsd">
    <router id="standard">
        <route id="test" frontName="test">
            <module name="Arthur_Test" />
        </route>
    </router>
</config>

and I have to access to my module from external script to get some data he generate. That data is in app/code/Arthur/Test/storage/data.txt

I cant get that data by exact url (example.com/app/code/Arthur/Test/storage/data.txt) because of 403 Forbidden so I want to call method in my module. How can I do it ?

url example.com/test/ give me 404 Not Found


texts: Magento 2 : How to get collection of all sources "MSI (multi source inventory)?

texts:
I have created a custom module and on my custom page, I want the collection of all the sources available on my website. Let's assume I have created 3 sources from backend like "US", "UK", "INDIA".
Now, I want the collection of all resources available on my website

How could I achieve this functionality?

Thanks in advance!


texts: Best Practise: Headless Magento2 Authentication For Login

texts:
Please could someone provide the best practise or documentation for how it can be achieved that the customer may login via Google, Facebook, etc when the Magento framework is only being used in a headless way?

I am aware that it runs on OAuth so I am hoping that there is a mechanism within OAuth which supports this? Please point me in the correct direction for this.

(NOT AUTHENTICATING API REQUESTS)


texts: Simple products being treated as configurable?

texts:
I'm currently working on a site and getting the following PHP error in my logs

Call to undefined method Mage_Catalog_Model_Product_Type_Simple::getUsedProducts() in /app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php on line 160

Which makes all simple products on the site load like the following page http://boxchilli.co/a3mdirect/portable-stands/portable-furniture/crescent.html

Nothing has been installed on the site before the issue came up and only changes made to the site is additional products being added.


texts:
I am new to magento, i am working on existing site.

Can you please help me. I found this {{unsecure_base_url}} syntax in Base link url.

Where shoul i find the value of unsecure_base_url value.


texts:
I found this great diagram for Magento Database Tables, however, I would like to know if this is still up to date.  I am running Magento 1.9.  It was published in 2009 and several Magento updates have been rolled out since then.  I am hoping that the database structure is still relatively the same.  I'd like to get confirmation before I send it to the printer to get a large copy of it.

Diagram: MAGENTO_v1.3.2.4-Database_Diagram.pdf

Also, does anyone know where to find the table definitions?  It would be a nice reference to go along with the diagram.


texts: Disable product from using API or filter API

texts:
Is it possible to disable a product to not use the API at all? We have several setup configured, but we also have a lot of product that use the API, but don't need too. I'd be okay to filter by API user.
That way the product can go to the proper network as I have about dozen or so.


texts: How to get adminhtml session data from the storefront?

texts:
I have been trying to get adminhtml session by DI  Magento\Backend\Model\Session but I get nothing.

Is it possible to get adminhtml session information from the storefront and vice versa?


texts: Enable exception printing on the webpage in Magento2

texts:
I was installing Magento 2 and got the following error.

    There has been an error processing your request
    Exception printing is disabled by default for security reasons.
    Error log record number: 354086296325

In Magento 1, I used to rename local.xml.sample to local.xml in errors folder and see the exception on the webpage itself instead of checking the file in var folder. How do I do the same in Magento 2 as I don't see errors folder?


texts: What startSetup() and endSetup() methods actually does?

texts:
I'm confused on what those 2 methods does. I have a code like:

public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
    $setup->startSetup();

    $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
    ...
    ...
    $setup->endSetup();
}

Could someone explain that to me?

why do I need to call a function from an interface?

What's the purpose of it?

Thanks for any help.


texts: Magento2 : How to create a basic progress bar with ajax, when I click on add to cart button?

texts:
I try to make a basic progress bar with ajax , when I click button add to cart, but I don't know how catch the xhr on console,to put on alert() or prepend()function

  I follow a video example in youtube, with XMLHttpRequest() function but I see doesn't work

see the code:

var xhr = new XMLHttpRequest();

xhr.upload.addEventListener('progress', ProgressHandler ,false);
xhr.addEventListener('load', CompleteHandler,false);
xhr.addEventListener('error', errorHandler,false);
xhr.addEventListener('abort',LoadHandler,false);

xhr.open("POST","/test/checkout/cart/add/uenc/aHR0cDovLzQ1Ljc5LjE0Ni4yMS90ZXN0L3Rlc3RpbmcuaHRtbA%2C%2C/product/1/");
xhr.send();


texts:
I'm trying to install a magento2 extension and while running the installation process magento tells me that I do not have enough disk space available.

Running df -h tells me, that I have 275 GB of free space which should be quite enough for a magento backup.

I verified that ./var/ and ./var/backups/ belongs to the www-data group and that the group has the permissions to write in this directory.

I'm unable to skip this step an cannot figure out what I need to change in order to get to the next step.


texts: Translating strings from phtml file loaded in a trans emails in Magento 1 issue

texts:
I am loading some content from a phtml file, like:

{{block type='core/template' area='frontend' template='mynamespace_mymodule/adyen_reminder_items.phtml' subscriptionId=$subscriptionId orderId=$orderId}}

and in the adyen_reminder_items.phtml file I have strings like:
<?php echo $this->__("Items in your order");?> or <?php echo $this->__("Price");?>

I created a file Mynamespace_Mymodule.csv in the app/locale/de_DE/ folder and in the config.xml I added:

    <translate>
        <modules>
            <mynamespace_mymodule>
                <files>
                    <default>Mynamespace_Mymodule.csv</default>
                </files>
            </fmynamespace_mymodule>
        </modules>
    </translate>

But when I am sending my email, I still go the english version instead of the german. Am I doing smth wrong ? What else should I try ?

Thank you


texts: Simple products is not showing on Catalog page/Catalog search Magento 2.3.2

texts:
I am using Magento 2.3.2 for my store. I observed that all my simple products are not showing on the catalog page & catalog search (Frontend) . otherwise configurable products working correctly.

I have tried
     -> re-indexing
     -> Save all simple products again.
     -> Clear cache stuff.
     -> Checked product configurations(Visibility,Stock & quantity etc.)

but no luck.

I have observed one weirdest thing when I am trying to run re-indexing then it shows me beloe output:

Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:00
Stock index has been rebuilt successfully in 00:00:00
Inventory index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Catalog Search index has been rebuilt successfully in 00:00:01

Almost all the process took 00:00:00 time

what should I do? Any suggestion?

Please help me out with this problem.


texts: Magneto 2: Different countries in billing and shipping address

texts: How to limit the countries in the shipping address, for example, I want to allow all countries in billing address but only one in the shipping address( at the moment). Any idea how to achieve this in Magento 2.3.1 community ..


texts:
I have something weird going on in my Magento 1.9.2.4 environment. I'm creating a new theme for different shops. This is what is looks like:

-package
--- default
--- theme1
--- theme2
--- theme3

I have theme1 set for my first store. In the skin I have some files in default/fonts and I don't have a fonts map with files in the skin of my theme1. Because of this, I expect my Magento to look in package/default, but it doesn't. In the console, it gives me the error that skin/frontend/package/theme1/fonts/specificfile.woff is missing.

Why doesn't it look in my theme1/default folder and how do I make this happen?

Edit: To be clear, I do have files in my app/design/frontend/package/default folder, so it's supposed to see this as a theme


texts:
First I should say that there are many questions and answers on this topic around the web but I'm not finding anything close to what's happening here so I really hope someone here is able to help.

I have the wysiwyg disabled by default and when I click on Insert Image the pop up comes up as expected but is not fully rendered, see attached screen shot.

The console is saying Uncaught SyntaxError: Unexpected identifier, see attached screen shot.

I have disabled all extensions to rule out conflict + both media and wysiwyg folders have 777 permissions.

EDIT: I have tested Chrome, Firefox and Safari on Mac + Chrome on PC, all with the same result.

Just let me know if I left out any necessary info!

Big thanks in advance!


texts: How can I find out version info required to select correct update method?

texts:
I have been asked to help a client upgrade their Magento site from v2.1.9 to v2.2.3 but from what I'm reading on the magento.com website so far, this sounds like a very complex process that depends on factors such as the installation method that was originally used for this instance of Magento and it requires more specific version info than I can find in the Magento admin pages. It appears attempting the upgrade without knowing this information is likely doomed to corrupting their installation.

How can I discover from looking at a Magento v2.1.9 website 1) whether it was installed by "cloning from github", "web setup wizard", or "command line"? and 2) whether their Magento v2.1.9 is a Magento v2.1.9EE or Magento v2.1.9 community edition / open source edition?

I have explored the Admin pages but the only version info I've found is "Magento ver. 2.1.9". Since the upgrade documents indicate it's critical to know this stuff before attempting an upgrade, I'm assuming it's here somewhere and I'm just missing it! If someone with more Magento experience could point me to the correct Admin page to see these details, I'd really appreciate it.


texts: How to use my custom module data as product attribute?

texts:
I have created a custom backend module(with eav attributes) in magento 2.3, where the customer can add some important data similar to this: number, number type, year.

I want to show these in a multiselect, as a product attribute. The appearance of this multiselect will be similar to the appearance of the category select.
Here is the example data and an image:

123456 - oem - 2006
 123456 - oem - 2007
 789457 - oem - 2007

Do I need to create a separate table for this, similar to catalog_category_product? Or the attributes will be saved as product attributes? I couldn't find much on this topic, the closest I got is this question.

Sorry if my question is a bit confusing, I am very new to magento, and i don't know the proper terminology yet.
It is important to note, that there will be thousands of these numbers, and the user has to be able to modify them in the backend.


texts: Fetch order status label in custom module configuration

texts:
Magento 2:

I need to fetch all order status labels list (Ex. Processing, Pending, Complete...) in my custom module configuration settings.

I have searched a lot but they give result of sales orders label. But I need all order status labels.

Please take a look on screen shot. I want this red box order status labels. So admin can select multiple order status for further task.


texts:
I'm trying to create two Order Attributes in Magento 1.9.1.0.

I have the following in my custom module install script;

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

$installer->addAttribute(
    'order',
    'ordersync_status_code',
    array(
        'type' => 'varchar',
        'backend_type' => 'varchar',
        'label' => 'Order Sync Status Code',
        'visible' => true,
        'required' => false,
        'user_defined' => false,
        'searchable' => true,
        'filterable' => true,
        'comparable' => true,
        'default' => ''
    )
);
$installer->addAttribute(
    'order',
    'ordersync_status_text',
    array(
        'type' => 'varchar',
        'backend_type' => 'varchar',
        'label' => 'Order Sync Status Text',
        'visible' => true,
        'required' => false,
        'user_defined' => false,
        'searchable' => true,
        'filterable' => true,
        'comparable' => true,
        'default'=> ''
    )
);
$installer->endSetup();

After install, I can see that two rows have been added to the sales_flat_order table for the above to attributes.

However, I can't see them in the eav_attribute table. Should I be able to see them here? I would have thought so. :/

The purpose of the fields;
I don't intend these to be editable when viewing or editing an order. They will simply hold some values that will be updated when orders are sent to a third party - so I simply need to present the data when viewing the sales order grid and the order itself.

Thanks.


texts: Magento 2 Insert data in custom column of order table

texts: I have added a custom column in Magento 2 "sales_order" table from my custom module, Now I want to insert value in this column.Can anyone help me in this?


texts: magento2, Change Payment method title in order detail page on the fly

texts:
I want to change my custom payment gateway title in the order details page (front-end, in  admin panel, and email sent to customer).
It has to be like "payment gateway title($option)" not a fixed like "payment gateway title".  I am getting the value of $option variable in payment gateway controller. i:e payment gateway title(visa)


texts: Magento 1.9.4.3 - Redirect to the custom checkout step after the paypal payment

texts:
I try to explain my problem
In Magento checkout I created a custom step where you can upload your logo. This step is located immediately after the payment step.
The problem is when the customer selects paypal as the payment method. After completing the payment he is redirected to the checkout page with the step of order summary open, while my custom step is closed and cannot open it.
How can I redirect the user, who made the payment from Paypal, to checkout page with my custom step open?
Thanks


texts:
I am using Magento 2.4.1, PHP 7.4, nginx and varnish and a stock import module that also creates URL rewrites. This part of it is all working fine and the url_rewrite table in the database has the rewrites listed but when browsing my site i get url's like
https://www.clicksaveandprint.com/catalog/product/view/id/36253/s/remanufactured-dell-593-10368-r717j-black-toner-cartridge-28132145/category/47/
instead of
https://www.clicksaveandprint.com/shop/printers-scanners/printing-supplies/toner-cartridges/remanufactured-toner-cartridges/remanufactured-dell-593-10368-r717j-black-toner-cartridge-28132145
(which also works but not showin in the browser address bar).
The category urls work fine as do any products listed on my homepage in a bestsellers block, but not when navigating to a category and then clicking on a product.
I have tried reindexing, resetting the index and reindexing, cleaning and flushing cache, none of it works. I am not in single store mode, URL rewrites have been enabled.
Any ideas how i can sovle this issue?


texts: Five-page checkout equivalent of onepage success action?

texts:
I have an observer programmed for the checkout_onepage_controller_success_action and need to know the corresponding event that I should use if the user has onepage checkout off and is using the default.

        <checkout_onepage_controller_success_action>
            <observers>
                <myextension>
                    <type>model</type>
                    <class>myextension/observer</class>
                    <method>handlePurchaseEvent</method>
                </myextension>
            </observers>
        </checkout_onepage_controller_success_action>

This event doesn't fire on success of the normal 5-step checkout flow.

Thanks for advice.


texts:
I want to make use of Magic Methods in my Custom Module.

I created a new Model with different member variables (variable1, variable2) and I want to get them like getVariable1.

How do I need to declare those member variables? Can I set them on private? What else am I missing?

Somewhere I read I need to save them in $_data['variable1'], but that doesn't work.

Thanks!


texts: Need some help with random related products code

texts:
I've been playing with some code that will display random products from the same category in the related products block.

The code works, however I would only like to display products that contain images. There are two ways I can do this, by either specifying a filter for images or I have an attribute that has a 0 or 1 value. 1 meaning it contains an image.

Here is the entire code:

{
public function getRelatedProducts($limit = false) {
    $products = $this->getData('related_products');
    if (!$products) {
        $product = Mage::registry('current_product');

        if ($category = Mage::registry('current_category')) {

        } elseif ($product) {
            $ids = $product->getCategoryIds();

            if (!empty($ids)) {
                $category = Mage::getModel('catalog/category')->load($ids[0]);
            }
        }

        if ($category) {
            if ($limit === false) {
                $limit = Mage::getStoreConfig('autorelated/general/limit');
            }

            $products = Mage::getResourceModel('reports/product_collection')
                ->addAttributeToFilter('visibility', array(
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG

                ))
                ->addAttributeToFilter('status', 1)
                ->addCategoryFilter($category)
                ->addAttributeToSelect('*')
                ->setPageSize($limit);

            if ($product) {
                $products->addAttributeToFilter('entity_id', array(
                    'neq' => Mage::registry('current_product')->getId())
                );
            }

            $products->getSelect()->order(new Zend_Db_Expr('RAND()'));
            Mage::getModel('cataloginventory/stock')->addInStockFilterToCollection($products);
            $this->setData('related_products', $products);
        } else {
            return false;
        }
    }

    return $products;
}
}

Now, here is the section I've been focusing on:

$products = Mage::getResourceModel('reports/product_collection')
                ->addAttributeToFilter('visibility', array(
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH,
                    Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_CATALOG

                ))
                ->addAttributeToFilter('status', 1)
                ->addCategoryFilter($category)
                ->addAttributeToSelect('*')
                ->setPageSize($limit);

            if ($product) {
                $products->addAttributeToFilter('entity_id', array(
                    'neq' => Mage::registry('current_product')->getId())
                );
            }

I've tried the following

->addAttributeToFilter('image_updated',array('eq' => 1))

and

->addAttributeToFilter('image', array('neq' => 'no_selection'))

directly bellow:

*->addAttributeToFilter('status', 1)*

But products without images are still appearing in the random related products.

I believe it may be because the loaded resource model doesn't contain the attributes I'm looking to filter.

Can someone see what I am missing to use either piece of code to filter out products that do not contain images?


texts: Error converting field `additional_data` in table `catalog_eav_attribute` where `attribute_id`=114

texts:
After upgrading Magento 2.1.9 to 2.2.4.
and Run command php bin/magento setup:upgrade  getting this error.

" Error converting field additional_data in table catalog_eav_attribute where attribute_id=114 using Magento\Framework\DB\DataConverter\SerializedToJson.
Fix data or replace with a valid value. "

Any Suggestion ?


texts: How to add Preference for Magento/Framework files?

texts:
I am using curl and it is working fine in local..but returning

Invalid response line returned from server: HTTP/2 200

in live server.

I referred this link

How to add preference or plugin to overwrite parseHeaders function in  vendor/magento/framework/HTTP/Client/Curl.php


texts: Get Configurable Product Price from Simple Product in Magento Order

texts:
We are writing synchronization of Magento and MAS90 ERP system. We are transferring Orders from Magento to ERP system. We have added observer for order_save_after.

Each of Magento Simple product has UPC code that needed to add item in ERP system.
Simple products are automatically added to Magento Order based on configurable item, but problem is that simple product's real price, quantity, tax amount...are stored in configurable product, but UPC is stored in simple product.
For resolving this problem, we decide to get simple products from Magento Order ( to get right UPC ).

Our question is, how to get RIGHT price, quantity, tax amount of automatically added simple product. ( How in Magento order are linked configurable product and automatically added simple product. )

Here is snippet of Code that is getting products.

    foreach ($order->getAllItems() as $orderItem){
        $tmpMAS90OrderItem = NULL;
        if($orderItem->getProductType() == 'simple'){
            $tmpMAS90OrderItem = $orderItem -> getUpc();
        }
        if($tmpMAS90OrderItem != NULL) {
            $setChildValuesArray = array(
                'ItemCode'            => $tmpMAS90OrderItem,
                'UnitPrice'           => $orderItem -> getPrice(), // THIS IS WRONG PRICE, right price is in configurable item
                'QuantityOrdered'     => $orderItem -> getQtyToInvoice()
            );
            $querySO->setChildFieldValues($setChildValuesArray,$childSequence); //child sequence ( line sequence )
            $childSequence++;
             $linesTaxAmountSum += $orderItem->getTaxAmount(); // THIS IS WRONG TAX AMOUNT, right amount is in configurable item
        }
    }


texts:
In my multi store website cart item price is not convert as per selected country's currency.Default currency is USD, When i change my store currency is changed but price display in USD insted of selected currency. Please see the attached screenshot.even symbol is changed but not currency.

Thanks for help in adv.


texts: (no code yet) How to make multiple cart sessions on each store

texts:
Correct me if I am wrong: for multiple cart sessions you multiply the store front. But how to allow a customer to manage multiple carts for a given store?

EDIT: Discussing with Fabian, two ideas emerge:

add to cart button prompts (pop-in) the choice to add to a cart from a list -manageable from customer/account
only one cart at a time, save cart for later use as a quotation (from customer/account: manage multiple quotations)

scenarii

cart -> checkout
cart -> quote
cart -> quote1 ; cart -> quote2 ; quote1 -> cart -> checkout

this second idea is a bit like the module "save for later" or "cart2quote", but the objective is not to save A list of products but many lists.

I am just at the beginning of the thinking, so no code yet.
Any suggestions?


texts:
In Magento 1.9, I have 3 stores(English, Dutch, French) in 1 one website.
I am trying to localize contacts url to store wise like below.

Magento's Default.

English Store : www.example.com/en/contacts

Dutch Store : www.example.com/nl/contacts

French Store : www.example.com/fr/contacts

What I want is language wise different url.

English Store : www.example.com/en/contact-information

Dutch Store : www.example.com/nl/contact-informatie

French Store : www.example.com/fr/infos-contact

Apart from above if someone use default contacts url, it should redirect to appropriate localized url.

I tried with url rewrite, but default url still works.

Can anybody please help?


texts: Magento2 : How to get the attributes values for products list page?

texts: I will trying to get the attributes values but i can't do this values ?


texts: How to Create Custom cookie in popup Magento 2

texts:
I create custom popup with custom cookie and when page is load my cookie have dot befor domain name.
How remove this dot?


texts:
sorry but im really quite new to magento.

Recently all emails stop sending from my site.

Emails are generated in core_email_queue but are not sending.

I have cron jobs configured and i have installed scheduler

Does anyone know what I need to do


texts: Magento 2 - Autoload error Module 'Iazel_RegenProductUrl'

texts:
After update composer

Please help me, I get this error.

  Module 'Iazel_RegenProductUrl' from '/var/www/vhosts/exm.com/httpdocs/app/code/Iazel/RegenProductUrl' has been already defined in '/var/www/vhosts/exm.com/httpdocs/vendor/elgentos/regenerate-catalog-urls/Iazel/RegenProductUrl'.


texts: SSL (TLS) Error on Chome ONLY - this page includes other resources which are not secure

texts:
I have a TLS Geotrust certificate installed. All browsers except for Chrome confirm the secure connection. On Chrome - it shows a triangle over the padlock and after you click on it - it says:

The identity of this website has been verified by Geotrust SSL CA...

BUT

underneath it says this:

"Your connection to www.example.com is encrypted with a 128-bit encryption. However, this page includes other resources which are not secure. These resources can be viewed by others while in transit, and can be modified by an attacker to change the look of the page.

This connection uses TLS 1.0

WHEN I PRESS THE CTRL+SHIFT+J shortcut - IT SAYS THE FOLLOWING:

The page at 'https://www.EXAMPLE.com/index.php/checkout/onepage/' was loaded over HTTPS, but is submitting data to an insecure location at 'http://www.EXAMPLE.com/index.php/catalogsearch/result/': this content should also be submitted over HTTPS.

I do NOT have any images other than the ones supplied by Magento (the Error does not even talk about any images)

Please help!

Thank you, thank you, thank you,

Allysin


texts: Logging stopped working after upgrading to Magento CE 1.9

texts:
After upgrading Magento CE to version 1.9.2.4, it stopped writing to log_url and log_url_info tables.

When I connect directly to mySQL database and make a SELECT query to log_url ordering by visit_time, the last record I get is about the time just before the upgrade.

At the same time I can see new records in other tables like log_visitor and log_visitor_info, so the logging seems to work only partially.

Questions:

Has anyone else experienced this after upgrading to CE 1.9 ?
Maybe the tables have been deprecated and are not used by Magento anymore? I could not find any official documentation on this.

I was able to reproduce this issue on my development scenario as well (just upgrade Magento CE from 1.7 to 1.9).


texts: Is Payone Supports Tokenization with payment method Paypal,Credit and debit card?

texts: I want to know that is Payone payment method supports tokenization with above methods ? So I can capture amount using token id in future.


texts:
I'm trying to add a checkbox above the 'billing address same as shipping address checkbox'.

I added this to my layoutProcessorPlugin:

    protected function addFieldsToSubscribeToNewsletter($jsLayoutResult)
{
        $jsLayoutResult['components']['checkout']['children']['steps']['children']['shipping-step']['children']
        ['shippingAddress']['children']['billing-address']['children']['subscribe_to_newsletter'] = [
            'component' => 'Magento_Ui/js/form/element/abstract',
            'config' => [
                'customScope' => 'shippingAddress.custom_attributes',
                'template' => 'ui/form/field',
                'elementTmpl' => 'BigBridge_Checkout/form/element/checkbox-overwrite'
            ],
            'provider' => 'checkoutProvider',
            'dataScope' => 'shippingAddress.custom_attributes.subscribe_to_newsletter',
            'description' => __('Subscribe to the newsletter'),
            'sortOrder' => '1008',
            'validation' => [
                'required-entry' => false,
            ],
            'displayArea' => 'checkout-newsletter-subscribe'
        ];

    return $jsLayoutResult;
}

If i try to add it to form-fields it works but that's the wrong location. (it says shipping-step because i moved it from the billing step to shipping step). I feel like maybe i need to create a new region first, because in billing-address.html there is no region to place new fields? But i'm not sure how.

Can anyone point me in the right direction?


texts: Invalid UI Component element name: Export button not working?

texts:
I have created grid using ui component.

  <container name="page_listing_top">
    <exportButton name="export_button">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="selectProvider" xsi:type="string">sales_report_report_listing.sales_report_report_listing_columns.ids</item>
            </item>
        </argument>
    </exportButton>
</container>


texts:
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', 'tlb1');
        $invStatus = $product->getResource()->getAttribute('product_inventory_status')->getFrontend()->getValue($product);

I quick log of the $invStatus says that the value is always set to 'No'.  Why is this?


texts: Magento 2 add custom product attribute validation from install script

texts:
[
    'type' => 'int',
    'backend' => '',
    'frontend' => '',
    'label' => 'XXXX',
    'input' => 'text',
    'frontend_class' => 'validate-greater-than-zero',
    'source' => '',
    'global' => \Magento\Eav\Model\Entity\Attribute\ScopedAttributeInterface::SCOPE_GLOBAL,
    'visible' => true,
    'required' => true,
    'user_defined' => false,
    'default' => 0,
    'searchable' => false,
    'filterable' => true,
    'comparable' => false,
    'visible_on_front' => false,
    'used_in_product_listing' => true,
    'unique' => false
]

I am adding custom product attribute which works fine, but not able to add validate-greater-than-zero validation.

If we look at any attribute properties in Input Validation for Store Owner there are limited number of validations in select options.

validate-number,validate-digits,validate-email,validate-url,validate-alpha,validate-alphanum

These are the only validations applied in Product attribute section.


texts:
Where would i be able to find the message that appears when a customer enters a wrong password when they try to log in, I have already looked in validation.js but i couldn't find it.

Thank you


texts: Missing "place order" button at step 5 after upgrade to Magento 1.9.1.0

texts:
After upgrading my store from 1.5.0.1 to 1.9.1.0 the checkout won't work correct anymore. After some Google queries I found out that I need to change the checkout file payment.phtml which can be found in /app/design/frontend/base/default/template/checkout/onepage/payment.phtml.

I have changed:

<fieldset>
    <?php echo $this->getChildHtml('methods') ?>
</fieldset>

To:

<fieldset id="checkout-payment-method-load">
    <?php echo $this->getChildHtml('methods') ?>
</fieldset>

This worked perfectly to get through the steps.
But in step 5, the order review page, the "Place Order" button is missing.

Does someone have a suggestion? Thanks!!


texts: How to create dynamic multiple grid regarding product attribute set

texts:
I have a requirement to create a multiple grids in a page on behalf of the attribute set.

Ex:
Jeans(Attribute Set)
Id  Sku Name    Qty Image
1   test1   Test product    3   image.jpg

Gloves
Id  Sku Name    Qty Image
2   test2   Test product 2  3   image.jpg


texts: Magento 2 Review / Ratings Stars ICONS are not correct showing in frontpage

texts:
we have Magento 2.1.2 with a Custom LUMA Parent Theme.
The Rating Stars are not correctly showing.

If i hover the "stars" the show me the red stars over the arrow but i need only stars not arrows!

Sombody here, how can help me to fix thats Problem?
Thanks for any help.


texts: move minicart before top.search magento 2.2

texts:
I have moved the mini cart before top.search using below code in my theme under

  app/design/frontend/Mytheme/luma_child/Magento_Checkout/layout/default.xml

  <?xml version="1.0"?>

  <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <body>
     <referenceContainer name="header-wrapper">
        <block class="Magento\Checkout\Block\Cart\Sidebar" name="minicart" as="minicart" after="top.search" template="Magento_Checkout::cart/minicart.phtml">
        -------rest of the code ---------
      </referenceContainer>
   </body>
  </page>

This code moves minicart before top.search successfully but it is breaking the minicart item rendering block

giving error in console like below

Uncaught TypeError: Unable to process binding "if: function(){return
getCartParam('summary_count') }"
Message: Unable to process binding "foreach: function(){return {
data:getCartItems(),as:'item'} }"
Message: Unable to process binding "foreach: function(){return $parent.getRegion($parent.getItemRenderer(item.product_type)) }"
Message: Cannot read property 'simple' of undefined
at UiClass.getItemRenderer (minicart.js:138)
at foreach (eval at createBindingsStringEvaluator (knockout.js:2624), <anonymous>:3:93)
at knockout.js:3889
at Object.init (knockout.js:5023)
at init (knockout.js:3914)
at knockout.js:2989
at Object.ignore (knockout.js:1249)
at knockout.js:2988
at Object.arrayForEach (knockout.js:151)
at applyBindingsToNodeInternal (knockout.js:2974)

Can anyone suggest how to move it properly? Or do I need to make any adjustment in minicart.js?


texts:
I am trying to rewrite this method. I was following this https://stackoverflow.com/questions/9783185/getaddresseshtmlselect-change-magento. But unseccessfully.

code:

<blocks>
  <checkout>
    <rewrite>
      <onepage_billing>Namespace_Module_Block_Onepage_Billing</onepage_billing>
    </rewrite>
    <rewrite>
      <onepage_shipping>Namespace_Module_Block_Onepage_Shipping</onepage_shipping>
    </rewrite>
  </checkout>
</blocks>

and shipping(billing) class:

<?php

/**
 *
 */
class Namespace_Module_Block_Onepage_Shipping extends Mage_Checkout_Block_Onepage_Shipping
{

  public function getAddressesHtmlSelect($type)
  {

    if ($this->isCustomerLoggedIn()) {
          $options = array();
          foreach ($this->getCustomer()->getAddresses() as $address) {
              $options[] = array(
                  'value' => $address->getId(),
                  'label' => $address->format('oneline')
              );
          }

          $addressId = $this->getAddress()->getCustomerAddressId();
          if (empty($addressId)) {
              if ($type=='billing') {
                  $address = $this->getCustomer()->getPrimaryBillingAddress();
              } else {
                  $address = $this->getCustomer()->getPrimaryShippingAddress();
              }
              if ($address) {
                  $addressId = $address->getId();
              }
          }

          if ($type === 'shipping') {
            # code...
            $addressId = 5;
          }

          $select = $this->getLayout()->createBlock('core/html_select')
              ->setName($type.'_address_id')
              ->setId($type.'-address-select')
              ->setClass('address-select')
              ->setExtraParams('onchange="'.$type.'.newAddress(!this.value)"')
              ->setValue($addressId)
              ->setOptions($options);

          $select->addOption('', Mage::helper('checkout')->__('New Address'));

          return $select->getHtml();
      }
      return '';
  }
}

 ?>

What I'am doing wrong? Tnx


texts: Magento 2 : How to solve the special characters in email subject?

texts:
I'm having some issues related to special characters in my transactional emails, it looks like a native bug in Magento 2.1.7 (It seems still in 2.2.3)
Steps to reproduce:
I've set the store name as "Bob's Burgers" in the admin panel, then I go to the store frontend and go to Request a password reset, in order to receive an email including the store's name that I did the setup in the admin panel.
Expected result:
The email's subject should be Reset your Bob's Burgers password as I did the setup in the admin panel.
Actual result:
The subject is Reset your Bob&#39;s Burgers password
How could I fix it?


texts: Magento Site Down with Integrity Constraint Violation

texts:
Recently going through this article on Inchoo, I tried their method. After refreshing, I got an integrity constraint violation error, So I just removed the module from Magento.

But to my bad luck, Site has been down since then. The error logs which I have say something like this:

`a:5:{i:0;s:3173:"SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_text` AS `t_d`
 LEFT JOIN `catalog_category_entity_text` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('54', '65', '56', '62', '44', '48', '47', '55')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_int` AS `t_d`
 LEFT JOIN `catalog_category_entity_int` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('69', '68', '42', '51', '50')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_varchar` AS `t_d`
 LEFT JOIN `catalog_category_entity_varchar` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('58', '66', '49', '45', '46', '41', '61', '133', '43', '57')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_datetime` AS `t_d`
 LEFT JOIN `catalog_category_entity_datetime` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('59', '60')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_decimal` AS `t_d`
 LEFT JOIN `catalog_category_entity_decimal` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('70')) AND (t_d.store_id = 0) UNION ALL SELECT `t_d`.`entity_id`, `t_d`.`attribute_id`, `t_d`.`value` AS `default_value`, `t_s`.`value` AS `store_value`, IF(t_s.value_id IS NULL, t_d.value, t_s.value) AS `value` FROM `catalog_category_entity_boolean` AS `t_d`
 LEFT JOIN `catalog_category_entity_boolean` AS `t_s` ON t_s.attribute_id = t_d.attribute_id AND t_s.entity_id = t_d.entity_id AND t_s.store_id = 1 WHERE (t_d.entity_type_id = 3) AND (t_d.entity_id IN (216, 10, 16, 39, 211)) AND (t_d.attribute_id IN ('146')) AND (t_d.store_id = 0)`

Is there anything I can do? I don't want to say good bye to this site(It's almost in production environment).


texts: Should custom Magento code always be a module, regardless of size

texts:
As a Magento newbie, I'm still trying to learn the good and the bad when it comes to developing for Magento.

I need to write a class, that in Yii I would just create a class in the 'vendors' directory and hey-presto.

Is there a similar place to put code in Magento or should I be creating a full module just for 1 class that initially will have 1 static function?


texts:
Controller is not executing Magento\Newsletter\Controller\Subscriber\NewAction.php
Below is the ajax request to call the execute method for  Magento\Newsletter\Controller\Subscriber\NewAction.php but it's not calling.
The call gets in constructor but not in execute method.
$("#newsletter_pop_up .actions .subscribe.primary").click(function(){
                var customurl = "<?php echo $this->getUrl('newsletter/subscriber/new/') ?>";
                $.ajax({
                    url: customurl,
                    type: 'POST',
                    dataType: 'json',
                    data: {
                        email: 'email@email.com',
                    },
                complete: function(response) {
                    console.log('success');
                    },
                    error: function (xhr, status, errorThrown) {
                        console.log('Error happens. Try again.');
                    }
                });
            });

Any thoughts why its behaving like this ?
Feel Free to share your thoughts.
Thankyou


texts: Magento redirects from virtualhost to localhost

texts:
In hosts:

127.0.0.1 www.demomage.com

In httpd-vhosts.conf

<VirtualHost *:80>
ServerName demomage
ServerAlias www.demomage.com
DocumentRoot C:/wamp/www/mage
<Directory  "/">
    Options +Indexes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
</Directory>
</VirtualHost>

But on www.demomage.com Magento redirects to localhost/mage


texts:
I have a module where we are allowing partners to signup. there's a table called partner, and another table called partner_template, where I'm storing email templates for each partner.

the business logic requires that there only be one template per partner. how would I specify that in the model? or is it a matter of just ensuring that I do a limit=1 on all my queries?

also, what is the best way to get the related template? in other ORMs I've worked with, you get a handy 'getPartnerTemplate()' method on the partner object if there's a foreign key. from what I can see, my only option is to get the collection and limit it to one.


texts: Magento 2.3.1 - Cannot send email with attachment using template

texts:
This code was working before in M2.1 but it is not working anymore after upgrade as Zend1 is depricated. Can you please suggest how to fix this code.

$transport = $this->_transportBuilder->setTemplateIdentifier('order_csv')
                ->setTemplateOptions(['area' => 'frontend', 'store' => $store])
                ->setTemplateVars(
                    [
                        'store' => $this->_storeManager->getStore()
                    ]
                )
                ->setFrom('general')
                ->addTo('email@gmail.com', 'Name')
                ->addCSVAttachment(file_get_contents($outputFile), $outputFile)
                ->getTransport();
        $transport->sendMessage();

Definition of addCSVAttachment

public function addCSVAttachment(
    $body, $filename
) {
     $attachment = new \Zend\Mime\Part($body);
        $attachment->type = 'text/csv';
        $attachment->disposition = \Zend_Mime::DISPOSITION_ATTACHMENT;
        $attachment->encoding = \Zend_Mime::ENCODING_BASE64;
        $attachment->filename = $filename;
    return $attachment;
}


texts: Module is not working on front and not sending emails

texts:
I have just created a form with sending email but my module is not working on front end its going to 404 so i am unable to test if my form is working and sending email

My Config.xml file in  app > code > community > Optfirst > ReviewMyCompany > etc

<frontend>
<routers>
  <reviews>
    <use>standard</use>
      <args>
        <module>OptFirst_ReviewMyCompany</module>
        <frontName>reviews</frontName>
      </args>
  </reviews>
    <emailus>
        <use>standard</use>
            <args>
                <module>OptFirst_ReviewMyCompany</module>
                <frontName>emailus</frontName>
            </args>
    </emailus>
</routers>
    <layout>
      <updates>
        <reviews>
          <file>reviews.xml</file>
        </reviews>
      </updates>
    </layout>

And Here is my EmailusController.php file:

      <?php

      class OptFirst_ReviewMyCompany_EmailusController extends Mage_Core_Controller_Front_Action
    {

      public function sendemailAction()
    {
    //Fetch submited params
    $params = $this->getRequest()->getParams();

    $mail = new Zend_Mail();
    $mail->setBodyText($params['comment']);
    $mail->setFrom($params['email'], $params['name']);
    $mail->addTo('shoaibswl123@gmail.com', 'Some Recipient');
    $mail->setSubject('Test  Module for Magento');
    try {
        $mail->send();
    }
    catch(Exception $ex) {
        Mage::getSingleton('core/session')->addError('Unable to send email. Sample of a custom notification error from Contact.');

    }

    //Redirect back to index action of (this) controller
    $this->_redirect('optfirst_reviewmycompany/');
}
  }

and my form action on frontend is this:

action="<?php echo $this->getUrl('optfirst_reviewmycompany/') ?>emailus/sendemail" method="post">

But its not sending email it just take to 404 page when i submit the form


texts: grid column filter based on existing values

texts:
In Magento 2.1.8 I trying to add a custom column to the admin order grid, that contains the cc_type field.

Long story short, I managed to make the column appear, display the correct data, and be updated dynamically via di.xml.

What I could not achieve yet is the filter in the grid. I need the filter to display an option list based on existing values in cc_type.

Cc_type is a field that is populated by payment methods, so it is not possible to provide a list of all the possible values. I want the filter to provide only the options that actually are stored in the table.

app/code/Vendor/Module/view/adminhtml/ui_component/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="cc_type">
            <argument name="data" xsi:type="array">
                <item name="options" xsi:type="object">Vendor\Module\Model\Ui\Component\Listing\Column\CcType\CcType</item>
                <item name="config" xsi:type="array">
                    <item name="filter" xsi:type="string">select</item>
                    <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
                    <item name="dataType" xsi:type="string">select</item>
                    <item name="label" xsi:type="string" translate="true">Payment Details</item>
                </item>
            </argument>
        </column>
    </columns>
</listing>

app/code/Vendor/Module/Model/Ui/Component/Listing/Column/CcType/CcType.php

<?php

namespace Vendor\Module\Model\Ui\Component\Listing\Column\CcType;

use Magento\Framework\Data\OptionSourceInterface;
use Magento\Sales\Model\ResourceModel\Order\Status\CollectionFactory;

/**
 * Class Options
 */
class CcType implements OptionSourceInterface
{

    public function toOptionArray() {
        $optionList = [];
        //retrive options with some kind of collection?
        return $optionList;
    }

}

Anyone has any hints on how to retrieve the existing values and populate the filter options?

Thanks!


texts: I am not getting Abandoned cart emails on mailchimp (magento 2)

texts:
I am not getting Abandoned cart emails.
Magento 2.1.8
Mailchimp 1.0.26

As list was not syncing on both sides so I manually ran cron job for it. Now list is sync but not getting any abandoned cart email.

Account info

Username: XXXXX
Total Subscribers: 32892
Ecommerce Data uploaded to MailChimp
Total Customers: 142
Total Products: 28
Total Orders: 7
Total Carts: 45
Account Synced since: 2018-03-14

And on magento side in Reports- > abandoned cart all user how abandoned cart are adding perfectly. So I think I am not getting webhook from magento to mailchimp ? or something like this ?


texts: Organic Internet SCP Extension - Show Configurable Options in Order Email & PDF

texts: I've made the necessary changes to Organic Internet's "Simple Configurable Product" extension so that all configurable options are displayed in the Admin Panel (Sales > Orders). However, I'm having trouble displaying configurable options in the order email and invoice PDF. I tried copying /template/sales/order/items/renderer/default.phtml and /template/sales/order/items.phtml to my template but that did not work. Has anyone solved this SCP extension issue?


texts: How to translate a url automatically in Magento 2 community?

texts:
I have got two websites (one in french, the other one in spanish). I have set up two websites and not view stores because selling prices are different.
The main website is the french one. I have translated the whole content in spanish. No problem.
My issue is about Spanish URLs :
For my category, it's ok (www.website.com/es/proyectos.html) the URL is correctly implemented in spanish.
But, If I select the subcategory the url is www.website.com/es/projet/subcategory.html
Or, for me, it should be www.website.com/es/proyectos/subcategory.html
I want this URL fully in spanish (better for the SEO). And I do not want to modify those URLs manually, because each time I will create a subcategory I will have this issue.
So could you help me please ? Do I have to developp something or Can I set up it in the Admin interface ?
Thanks in advance.


texts: Magento 2 Send Order Emails Without Cron

texts:
Due to some issue order emails are not sending with cron and always remain with pending status.

So I have to send it without cron. I have changed it to Send Asynchronously from Admin configuration. But still not getting emails.

Please help me.


texts: Load product attribute in module block without using load() methos

texts:
I've file like app/code/local/Xx/Multistepcheckout/Block/Cart/Item/Renderer.php

In which I've function like following

public function checkItemStatus($_item, $qty, $sku) {
        $product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);
        $_product = Mage::getModel('catalog/product')->load($product->getId());
        $stockstatus = $_product->getXxxstatus();
        //Rest of the code....
}

Here in function I don't want to use following lines

$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku);

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

Try 1 :
So to do so I've add following code in config.xml

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

And in this file app/code/local/Xx/Multistepcheckout/Block/Cart/Item/Renderer.php
I've used like $_item->getData('xxxstatus')) but it's not working.

So is there any way in which I can reduce the use of load() method?

Let me know if you want more details.


texts: show regular and special price separately

texts:
I'm trying to separate normal price and special price on my catalog/product/view.phtml page.
I want to display them like this:

  Retail Price: £5.99   Trade Price: £4.09

It's currently set up like this:

 Retail Price :
<?php echo $this->getPriceHtml($_product); ?>

But it seems getPriceHtml($_product); gets both normal and special price so I'm unable to separate them.
I can only get it to look like this:

  Retail Price: £5.99
   £4.09
   Trade Price:

Ive tried this - which I hashed together from various other answers here

 Retail Price :
<?php echo $_product->getRegularPrice(); ?>

 Special Price:
<?php echo $_product->getSpecialPrice(); ?>

But this is just showing blank.

Ideally I would actually like the regular retail price to come from another store view price and trade price to be the regular price of a second store view - but I can work around that with catalog price rules it if that is not possible.

Apologies for the convoluted question, i know 0 PHP


texts: After changing list.php => error: the resource is not defined

texts:
after chaning line 87 in list.php (/public_html/app/code/local/Mage/Catalog/Block/Product) from:

  $this->_productCollection = $layer->getProductCollection();

to

  $this->_productCollection = $layer->getProductCollection()->joinField('inventory_in_stock', 'cataloginventory_stock_item', 'is_in_stock', 'product_id=entity_id','is_in_stock>=0', 'left')->setOrder('inventory_in_stock','desc');

I am doing this so that products that are in stock are shown before products out of stock.

It's working, but when I search in the search bar, see attached image for error.

Thank you.


texts: Find if there are reviews or not in reviews/form.phtml

texts:
Im trying to find out if there are reviews for the product the user is on within the review/form.phtml template file.

The idea is if the product has reviews give the review form a particular class to position it on the page, if the product doesn't have any reviews, don't change to class name and leave it where it is.

Does this make sense?

So my question is how to i retrieve amount of reviews for a product in the review/form.phtml file?

thanks

Edit

I have tried this statement:

<?php if( count( $this->getReviewsCollection() > 0 ) ): ?>

<?php else: ?>

<?php endif; ?>

This doesn't give me fatal errors which means its along the right tracks, but theres a big problem in the ract that it always returns true, so even if the product doesn't have reviews, i still get the

  got-reviews-form

class. Any ideas why this could be?

Thanks


texts: Problem with Set Attribute after migration from Magento 1.9.4.3 to 2.3.3 via Data Migration Tool

texts:
The data migration has ended successfully.
The only problem is when I switch the product attribute set from the default magento 2 to a custom one.

Error:
"A technical problem with the server created an error. Try again to continue what you were doing. If the problem persists, try again later."

The theme I use is Porto.


texts: How in Block a productcollection of template render?

texts:
How in Block

  app/code/Name/Name/Block/Rewrite/TopMyMenu.php

a productcollection of template

  "vendor/magento/module-catalog-widget/view/frontend/templates/product/widget/content/grid.phtml"

render?

$productCollection = $this->categoryFactory->create()->getCollection()
              ->addAttributeToSelect('*')
              ->addAttributeToFilter('is_active', 1)
              ->setOrder('position', 'ASC')
              ->addIdFilter($category->getChildren());

  $html = $produCtcollection->toHtml(); ?????


texts:
I'm trying to extend the "Mage_Catalog_Product_CompareController" class with my own class which is "Invent_Catalog_Product_CompareController" from the core.

But I can't seem to get the results that i am looking for. I suspect the problem on my config xml
here is my config.xml

<config>
<frontend>
    <routers>
        <catalog>
            <args>
                <modules>
                    <invent_catalog before="Mage_Catalog">Invent_Catalog</invent_catalog>
                </modules>
            </args>
        </catalog>
    </routers>
</frontend>
</config>

and here is my CompareController.php

require_once(Mage::getModuleDir('controllers','Mage_Catalog').DS.'CompareController.php');
class Invent_Catalog_Product_CompareController extends Mage_Catalog_Product_CompareController

 public function addAction()
    {
      //My Code goes here
   }


texts:
I want to add in Advanced Search possibility to search products by many sku-s.
How to do it ?

In query it look like

sku=code&...

I want it to look like

sku=code,code,code$

or

sku=code;code;code&


texts: Why add .html.html on save product in admin after migration from magento1 to magento 2?

texts:
Magento adds .html key after product url when save the product in admin in magento 2.

Product url already have .html but again its added .html in end of product url.


texts: Changing the order of `getGroupChildNames`

texts:
I've added a new tab to the product.info.details block, and would like it to be shown first (before the "Review" and "More Information" tabs).

I can't seem to change the order with the before and after attributes, or the move instruction, since getGroupChildNames doesn't seem to take the order into account.

The two options that I see are:

create a plugin and somehow force a reorder (maybe using Magento\Framework\View\Layout\Data\Structure::reorderChildElement
Overwrite the template (product/view/details.phtml), preg_match the block name and hardcode it to go first.

Any other options? What's the best way to do this?


texts: How to create / update customer information using REST API?

texts:
How to create/update customer using REST API in magento2?

I searched a lot on google but not getting any solution for this.

Please help me in this.


texts: How to have 2 different registration forms in one module in magento 2 (B2B, B2C)

texts:
Trying to add different attributes to 2 different registration forms.

If anyone can advise where i can make this change please ? see below for the file structure that i Currently have:

1. module.xml

2. registration.php

3. InstallData.php

4. additional.phtml

5. customer_account_create.xml

If needed i can provide code within file, Thank you.


texts: Area code is not set when creating category

texts:
I'm using this function to create categories
public function fetchOrCreateProductCategory($categoryName, $parentId = 1)
{
    //when parent id is 1, then it's root category
    $parentCategory = $this->categoryFactory->create()->load($parentId);

    $category = $this->categoryFactory->create();
    $cate = $category->getCollection()
        ->addAttributeToFilter('name', $categoryName)
        ->getFirstItem();

    if (!$cate->getId()) {
        var_dump('in');
        $category->setPath($parentCategory->getPath())
            ->setParentId($parentId)
            ->setName($categoryName)
            ->setIsActive(true);
        var_dump('in 2');
        $category->save();
    }
    var_dump('end');
    return $category;
}

Then I call it
$rootCategory = $this->fetchOrCreateProductCategory('Default Pro Category');

It works
Then I call it with a sub category
$subCat1 = $this->fetchOrCreateProductCategory('Cofee',$rootCategoryId);

And here it fails right after

in 2

with the message

Area code is not set

Obviously something is wrong when I try to save a subcategory...but I can't figure it what is it.


texts: Sometimes it is required like to show promotional popup for the first time when customer visits the site. How to create popup based on cookie in magento 2? Like I want to display any CMS static block in popup.


texts: Execute function from the shell directory in cron file present in model dir of a module

texts:
I have created a custom code in shell directory in magento 1.9.2.3 and executed this file from the ssh using php filename.php from the shell dir. now i want this code to be executed in the cron file present in the model of a module.

How can i run a function from shell dir in cron file present in the model folder.

Please help me


texts:
I tried to update the order status using an external app file the process in Magento file execute successfully that I can update the order status but the issue in jsonp I get false function here is my index code (only ajax code showing)

<script>
jQuery(document).ready(function() {
jQuery(".foot").hide();
jQuery("#shipstatus").hide();
    jQuery(".btn").click(function(){
    var ordid = jQuery('#orderNum').val();
//alert(ordid);
        var dataString = 'id='+ordid;
    alert(dataString);
        var response='';
        jQuery.ajax({

          type: "GET",
          async:false,
          url: "http://www.example.com/shippingstatus/index/updatestatus",
          data: dataString,
          timeout: 5000,
          dataType: 'jsonp',
          jsonpCallback: 'foo', // for caching
          cache: true,
        success: function (parsed_json) {
        console.log(parsed_json);
},
           error: function() { jQuery(".foot").show();
           jQuery('.foot').text("Some error occured please try after some time"); }
      });
});
function foo(data) {
      console.log(data)
    }
});

        </script>

  and my magento code to update status

<?php
namespace Aneka\ShippingStatus\Controller\Index;

class UpdateStatus extends \Magento\Framework\App\Action\Action
{
  public function __construct(
\Magento\Framework\App\Action\Context $context)
  {
    return parent::__construct($context);
  }

  public function execute()
  {
    $orderId = $_GET['id'];
    /*$orderId=$this->getRequest()->getPost('ordnum');*/
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $order = $objectManager->create('\Magento\Sales\Model\Order')->load($orderId);
    $order->setState("complete")->setStatus("complete");
    $order->save();
    $response["success"] = 1;
    $response["uid"] = 10;
    echo json_encode($response);
    //exit;
  }
}

  error in console

  GET
   http://www.example.com/shippingstatus/index/updatestatus?callback=foo&id=7567567567
  500 (Internal Server Error)


texts: Preserve Maintenance Mode during Magento Core Deployment

texts:
On remote webserver, i am deploying Magento core and modules through modman and Jenkins. During the deployment, a static maintenance page is shown which i enable and disable by the file maintenance.flag.

However, since i am also deploying the Magento core (and these files are removed on start of deployment), there is a (short) time frame when the Magento core files do not exist on the remote server. Consequently the file maintenance.flag does not work and the Magento maintenance page does not appear, but a PHP error page instead. For example:

  magento/app/Mage.php was not found

I want to avoid this behaviour.

What would you suggest in order to preserve a static maintenance page during the whole deployment process? Is it better to temporarily modify the .htaccess file to rewrite to a separate maintenance page, for example maintenance.html, that is not conntected with Magento core?

Thanks for your suggestions!


texts: Magento 2 - Conflict in localisation csv file

texts:
I understand the general structure of i18n csv files that is like
<key_hook>,<translation_of_that_key>

but according to the documentation there is the possibility to add a module restriction:
<key_hook>,<translation_of_that_key>, module, <module_vendor>

In my case in de_DE.csv (in my custom theme i18n directory) I've used:
"Summary", "Zusammenfassung", module, Magento_Review
"Summary", "Kassenübersicht", module, Magento_Checkout

The problem is now that if the customer likes to write a review on the single product page, there is still "Kassenübersicht" instead of "Zusammenfassung". Why is that? Does this restriction really work? Do I (really) have to use different original Translation Hooks?
Magento Verion 2.3.5


texts: billing and shipping address should have different address

texts:
If i changed the "billing address" by clicking "change billing address" automatically

both "billing and shipping address" are changing....

I want " if we change billing address, only billing address should change and if we change

shipping address than only  "shipping address should change".

please help me to find solution.

thanks in advance....


texts: How to redirect to success page from controller

texts:
This is my controller page. I need to redirect to success page and place all orders in cart. This returns https 500 error.

<?php

namespace Cod\Otp\Controller\Index;

use Magento\Quote\Api\CartManagementInterface;
use Magento\Quote\Model\Quote;
use Magento\Checkout\Model\Type\Onepage;
use Magento\Framework\Controller\ResultFactory;

class sotp extends \Magento\Framework\App\Action\Action
{

    protected $cartManagement;
    protected $quote;
    protected $resultRedirect;
    protected $checkoutSession;

    public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Quote\Api\CartManagementInterface $cartManagement,
        \Magento\Quote\Model\Quote $quote,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Framework\Controller\ResultFactory $resultPageFactory

        ){
        parent::__construct($context);
        $this->cartManagement = $cartManagement;
        $this->quote = $quote;
        $this->resultRedirect = $context->getResultFactory();
            $this->_checkoutSession = $checkoutSession;
    }
    public function execute()
    {

        $this->_view->loadLayout();
        $this->_view->getLayout()->initMessages();
        $this->_view->renderLayout();
        $this->quote = $this->checkoutSession->getQuote();
        $this->quote->getPayment()->setMethod('payfull');
        $this->cartManagement->placeOrder($this->quote->getId());
        $resultRedirect = $this->resultRedirect->create(ResultFactory::TYPE_REDIRECT);
        $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]);
    }
}


texts:
I want to add my phtml before </body> tag.

I m trying this code

<reference name="before_body_end">
    <block type="core/template" name="marketplace_player" template="magenetwork/list.phtml" />
</reference>

But this phtml add in wrapper class div i want that phtml exactly before </body> tag how can i do this?


texts: Magento2: Show custom currency symbol in specific store view

texts:
How to show custom currency symbol in specific store view based on local location ar_SA or ar_EG ?

I tried XML files inside vendor\magento\zendframework1\library\Zend\Locale\Data\ but not working.

Magento 2.1.6


texts: Sending custom email template in phtml file

texts: How can i send a new Transactional Email with order information in the success.phtml? And how can i add custom order information?


texts:
I'm building a 'global importer' module that allows an admin to upload a csv, choose a model and import.

Is there a way to check if the model is not an EAV entity (since flat csv's will not work with EAV entities)?

Here's the code being used to get a list of the Models:

public function getModels(){
    $models = array();
    $aliases = array();
    foreach (Mage::getConfig()->getNode('global/models') as $key=>$value) {
        $aliases[] = $value;
    }
    foreach($aliases[0] as $object){
        $models[] = $object->class;
    }
    return $models;
}


texts: Magento 2 Frontend Page shows Try clearing your cookies

texts:
I have installed magento through command line by using
bin/magento setup:install --base-url=http://127.0.0.1/magento2/
--db-host=localhost --db-name=magento --db-user=magento --db-password=magento
--admin-firstname=Magento --admin-lastname=User --admin-email=user@example.com
--admin-user=admin --admin-password=admin123 --language=en_US
--currency=USD --timezone=America/Chicago --use-rewrites=1
I used Https for base url, Installation completed successfully but when i access home page it is showing an error as Try clearing your cookies.Too many redirects. I tried all the solutions in stack overflow but none of them worked. Can you please suggest any solution?


texts: How to Filter collection based on multiple store view ids?

texts:
My custom model collection has a database table that contains store_ids value separated by comma like this:
ID | store_ids  |
+++++++++++++++++
 1 |  0,1,3     |
 2 |  1         |
 3 |  0,1       |
 4 |  0,2       |
 5 |  3         |

I'm using this input field to save the store_ids in the backend:

i noticed the 0 value is the default value , and the rest is the specific store ids value. My question is , how can i retrieve by the current store id, and prioritize the record that has the single store id value, for example with store_id  = 1 it will retrieve the record with ID 2 ?
i tried this, but this filter can not give the specific store_id as first priority :
     ->addFieldToFilter(
              'visible_stores',
              [
                  [
                      array('like' => '%'.$this->getStoreId().'%')
                  ],
                  [
                      array('like' => '%0%')
                  ]
              ]
          );


texts: How to change path for contact us page in magento?

texts:
My contact us code is coming from this file

  frontend/base/default/template/outsourceOnline/captcha/contacts.phtml

i want to change layout from new path
(outsourceOnline/captcha/contacts.phtml)
to old path (default/mytheme/template/contacts/form.phtml
)

In short i want to use default template page for contact us. i dont want use outsourceOnline extension.


texts:
In magento 2.2.5, I tried to get the quote item using below codes. But it is not working.

link 1 link 2


texts:
We have a Magento CE 1.9 and we recently purchased a live chat script by the name of phplivesupport.com now we created a new folder called livehelp and uploaded all the script files.

Our issue is anytime we try to access the domain.com/livehelp directory we are just redirected back to the main Magento page. The new directory does not have any .htaccess file in it also if we delete all the live chat files and just have a default index.php file with the text hello world we then are able to go to the URL domain.com/livehelp and see the hello world text. So there is something with the script causing it to redirect to the main page. even if we in the top line of the scripts index.php file we put echo "hello"; die(); and go to the url domain.com/livehtlp still we get rerouted to the Magento main page? Anyone know where to look to fix this?


texts: Magento 2 : Create Order from admin results in email error?

texts:
So I'm running Magento 2.1.5 and I have installed a MagePal extension which sends email through Amazon SES.

If the system sends any emails from anywhere everything works fine. But if I am creating an order I get an error.

If I create an order as a customer, it just comes back:

  An error occurred on the server. Please try to place the order again

This has been throwing me for a loop and I have no idea what is going on.

But then I placed an order from the admin and get an error also but it's a bit different. It says:

  Invalid MAIL FROM address provided

So it seems to be an error maybe from Amazon SES? However, all other emails I send are fine, if I change a password the user gets notified, I send a test, it comes through, if I "forgot password", it works. I'm stumped and I don't have much else to go on, if someone has any ideas of even where to look.


texts: Fatal error: Cannot declare class , because the name is already in use

texts:
Fatal error: Cannot declare class Vendor\Modelname\ResourceModel\Doccount, because the name is already in use in /var/www/html/readyresale/app/code/Vendor\Modelname/Model/ResourceModel/Doccount.php on line 23

ResourceModel/Doccount.php file

namespace Vendor\Modulename\ResourceModel;

use Magento\Framework\Model\ResourceModel\Db\AbstractDb;

class Doccount extends AbstractDb
{
    /**
     *
     */
    protected function _construct()
    {
        $this->_init ( 'documentcountable','id' );
    }
}

model/Doccountmodel.php file

namespace Vendor\Modulename\Model;

use Magento\Framework\Model\AbstractModel;

class Doccountmodel extends AbstractModel
{
    public function _construct()
    {
        $this->_init ( 'Vendor\Modulename\Model\ResourceModel\Doccount' );
    }
}


texts: how to give links to the track order image to get the tracking information

texts: i have added the track order image through static block in the footer,how can i give link to that image to get the tracking information.


texts: I'm trying to find a way to programtically send out an email, that doesn't depend on some front-end or admin behavior. Ideally, this email would be sent when the order status is changed to 'processing'. From what I gather, there isn't an event I can use for this, nor can an email be sent using the API. Does anyone know of a way to do this, or some kind of work-around that will result in basically this type of behavior? I found this event: checkout_onepage_controller_success_action. I'm not sure how it works. It seems to fire off when the order success page is loaded, which wouldn't work in my case.


texts: Only Collect in Store for Certain Products

texts:
I am on Magento 1.9.2 CE.

I have setup a Shipping method called "Collect in Store". There are some products which cannot be shipped and need to collected in person, Can anyone suggest any extension or some sort of starting point for creating an extension. For Example: if the Cart has a product from category Id 35 , then only display the "Collect in Store Method". Not any other

Many Thanks for you help.


texts: How to create an event in magento 2 mailchimp programmatically?

texts:
Basically I have successfully connected mailchimp with magento 2 and I am able to see my magento store data in mailchimp backend. Also I can see mailchimp in magento 2 backend and I have pulled the code using the command below. But my question is how should I create an event programmatically by making api call to mailchimp as per their guide?. I am referring to https://mailchimp.com/developer/guides/create-custom-events/ also I tried to find any another resource which can help me implement the coding part of creating an event but I didn't find any relevant resources. It would be great if I can get any suggestions or advice from where to start? because it would really help me to learn mailchimp using magento 2.

composer require mailchimp/mc-magento2


texts: Enable Credit Card Save just for backend orders

texts:
I have a credit card gateway with my bank but does not allow backend orders... Is there a way where I can place backend orders for some clients that prefer placing orders over the phone and use the CC save payment method? I will manually check the cards and put them trough a manual credit card machine.
Love to hear some expert opinion on this :)

Looking forward to your replies!

Cheers


texts:
Suddenly without making any changes in the setup, I am getting stuck at
checkout/onepage
when checking the response of that page in console, I am getting this:

Error 521 Ray ID: 48d5b5ffc61f23ea • 2018-12-22 21:34:10 UTC
Web server is down
You
Browser
Working
Ashburn
Cloudflare
Working
magentopatchupdate.com
Host
Error
What happened?

The web server is not returning a connection. As a result, the web page is not displaying.
What can I do?
If you are a visitor of this website:

Please try again in a few minutes.
If you are the owner of this website:

Contact your hosting provider letting them know your web server is not responding. Additional troubleshooting information.

Cloudflare Ray ID: 48d5b5ffc61f23ea • Your IP: myserver-ip • Performance & security by Cloudflare

Not able to makeout, what this error is about, anyone having faced this issue, can throw some lite, as where to fix the same.

No cloudflare service is being used by the site.

The response I am getting is against the request to this url
mysite/checkout/onepage/saveOrder/form_key/ivatVdDpZSe8m3ax/


texts: Get all available custom options for product

texts:
I have a before-plugin for the addItem function of \Magento\Quote\Model\Quote.

In this function I need to access ALL possible options that can be set for my product.

With $item->getProduct()->getTypeInstance()->getOrderOptions($item->getProduct())['options'], I can successfully get the options that have been set by the visitor, but not all options.


texts: Page content in CMS doesn't reflect live page

texts: I've inherited a project from another dev. I'm trying to make a small edit to a static page that he's set up through CMS>Pages in the admin. Strangely, the content that is displayed on the actual page is different than what I see in the admin. Any ideas what's going on here?


texts: Magento 2 - Extend custom validation / add own validation rule

texts:
In Magento 1, I used the below javascript code inside of a template to add my own validation rule:

// Add new validation class for the name. Also supports names with two hypen in the name e.g. Hans-Maier-Friedrich.
// Also supports umlauts and some special chars like é or á
Validation.add('validate-name','Please only use (A-Z a-z àèéáäÄüÜöÖ) in this field.', function(v) {
    return Validation.get('IsEmpty').test(v) || /^[A-Za-zàèéáäÄüÜöÖ]+-?[A-Za-zàèéáäÄüÜöÖ]+-?[A-Za-zàèéáäÄüÜöÖ]+$/.test(v);
});

How does it work in Magento 2?


texts: Magento 2: How to override product collection in Category page?

texts: I want to add load a custom product collection into a specific category page in Magento 2 instead of rendering default category page product collection ? is this possible? how to do this?


texts:
I think I am missing something simple and  just lack the understanding to notice it.

I have created script to pull a category and list it in a slider but I am unable to actually call the price. It just displays blank. I don't know what I have done wrong, can anyone suggest a fix? Or explain why it is not showing?

<?php
    $categoryid = 6;

    $category = new Mage_Catalog_Model_Category();
    $category->load($categoryid);
    $collection = $category->getProductCollection();
    $collection->addAttributeToSelect('*');
?>

                <?php foreach($collection as $_product):?>

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

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

<?php echo $this->getPriceHtml($_product, true, '-featured') ?>

                                    <button type="button" title="<?php echo $this->__('Buy') ?>" class="button btn-cart" onclick="setLocation('<?php echo $this->getAddToCartUrl($_product) ?>')"><?php echo $this->__('Buy') ?></button>

                <?php endforeach; ?>

                        <?php echo "<";?>

                        <?php echo ">";?>


texts: Magento 2.1.3 Import configurable products

texts:
I use import function to import some configurable products. But after I import, the configurable products is not listed.

Here is the csv file I used. Please help me fix this.

https://drive.google.com/open?id=0B4dGujTqvOsHREJ5OFVMb01NRkk