texts: Paypal express checkout magento 2 - Shipping address is invalid when place order using Russian country and address

texts:
I am using magento 2.1.13 and facing issue with paypal express checkout.

When I place and order using China, Japan, and Us. it's working but when I place an order using Russian country with their address it's showing me error "we can't place an order" I check debug log and it's showing "Shipping address is invalid." I try to many more address from Russia but same issue is there. here is paypal log.

 array (
  'url' => 'https://api-3t.sandbox.paypal.com/nvp',
  'DoExpressCheckoutPayment' =>
  array (
    'TOKEN' => 'EC-33D21907WX527562D',
    'PAYERID' => 'UTZY4EHG8787G',
    'PAYMENTACTION' => 'Authorization',
    'AMT' => '13.00',
    'CURRENCYCODE' => 'USD',
    'BUTTONSOURCE' => 'Magento_Cart_Community',
    'NOTIFYURL' => 'https://mysite/paypal/ipn/',
    'RETURNFMFDETAILS' => 1,
    'SHIPPINGAMT' => '5.00',
    'ITEMAMT' => '8.00',
    'TAXAMT' => '0.00',
    'L_NUMBER0' => NULL,
    'L_NAME0' => 'Calming oz',
    'L_QTY0' => 1,
    'L_AMT0' => '8.00',
    'BUSINESS' => NULL,
    'EMAIL' => 'pratik.kk@yahoo.com',
    'FIRSTNAME' => 'Pratik',
    'LASTNAME' => 'asasas',
    'MIDDLENAME' => NULL,
    'SALUTATION' => NULL,
    'SUFFIX' => NULL,
    'COUNTRYCODE' => 'RU',
    'STATE' => '',
    'CITY' => 'Nizhnelunohodsk ',
    'STREET' => 'Svetlaya ul. Apt 191',
    'ZIP' => '877561 ',
    'PHONENUM' => '35535353',
    'SHIPTOCOUNTRYCODE' => 'RU',
    'SHIPTOSTATE' => 'AD',
    'SHIPTOCITY' => 'Nizhnelunohodsk ',
    'SHIPTOSTREET' => 'Svetlaya ul. Apt 191',
    'SHIPTOZIP' => '877561 ',
    'SHIPTOPHONENUM' => '35535353',
    'SHIPTOSTREET2' => '',
    'STREET2' => '',
    'SHIPTONAME' => 'Pratik asasas',
    'ADDROVERRIDE' => 1,
    'METHOD' => 'DoExpressCheckoutPayment',
    'VERSION' => '72.0',
    'USER' => '****',
    'PWD' => '****',
    'SIGNATURE' => '****',
  ),
  'response' =>
  array (
    'TOKEN' => 'EC-33D21907WX527562D',
    'SUCCESSPAGEREDIRECTREQUESTED' => 'false',
    'TIMESTAMP' => '2018-07-03T11:30:03Z',
    'CORRELATIONID' => 'd23e3f82f3c47',
    'ACK' => 'Failure',
    'VERSION' => '72.0',
    'BUILD' => '000000',
    'L_ERRORCODE0' => '10424',
    'L_SHORTMESSAGE0' => 'Transaction refused because of an invalid argument. See additional error messages for details.',
    'L_LONGMESSAGE0' => 'Shipping address is invalid.',
    'L_SEVERITYCODE0' => 'Error',
  ),


texts: Why isn´t my featured image not saving when editing post?

texts:
I followed this tutorial to add a featured image to my blog post

https://forum.aheadworks.com/featured-image-t3821.html

I added the following code

if(isset($_FILES['featured_image']['name']) and (file_exists($_FILES['featured_image']['tmp_name']))) {
           try {
              $uploader = new Varien_File_Uploader('featured_image');
              $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png'));
              $uploader->setAllowRenameFiles(false);

              // setAllowRenameFiles(true) -> move your file in a folder the magento way
              // setAllowRenameFiles(true) -> move your file directly in the $path folder
              $uploader->setFilesDispersion(false);

              $path = Mage::getBaseDir('media') . DS ;

              $uploader->save($path, $_FILES['featured_image']['name']);

              $data['featured_image'] = $_FILES['featured_image']['name'];
           }catch(Exception $e) {

           }
        }

        // handle delete image
        else {
           if(isset($data['featured_image']['delete']) && $data['featured_image']['delete'] == 1)
              $data['image_main'] = '';
           else
              unset($data['featured_image']);
        }

to the file

app/code/community/AW/Blog/controllers/Adminhtml/AWblog/Manage/BlogController.php

and it works you can go to the post, add the featured image, click save, it saves, but if you click save again it wipes out the featured image,

I added

$model->setFeaturedImage($_FILES['featured_image']['name']);

just before

$model->save();

but isn't making a difference, any ideas would be greatly appreciated.


texts: Why can't I find information about Magentio Extension in this site?

texts: I am looking for extensions for my sites but I can't find any information here.


texts: connect magento site with other platform site using API and display same quantity in both sites

texts:
we are working on Magento Marketplace Multi vendor site.

Means Sellers can able to sell the products through our site.

Our sellers are selling the same products in other e-commerce site [not magento - http://www.flipkart.com/ ],

http://builtwith.com/flipkart.com - platform of flipkart site.

sellers using same sku in both our site and in flipkart.

what we want to achieve is display "same Quantity" in both sites.

Suppose if one product sold in flipkart, than quantity will decrease in flipkart.

same quantity should reflect in our site too for that sku.

flipkart provides an API for this : https://seller.flipkart.com/api-docs/FMSAPI.html

Is it possible to display same quantity in both sites using an API.


texts:
i want to add custom donate(like tip) module in addition to product price

suppose Product A (price 100) have text box field
1:donate with blank value which user have to enter user can insert any value and product price will be donated value + product price

how can i implement this via observer

i tried using "checkout_cart_product_add_after" observer

code of observer.php

class Mour_Customgroup_Model_Observer
{
    public function modifyPrice(Varien_Event_Observer $obs ){
    // Get the quote item

        $quote = $obs->getEvent()->getQuote();
        $item = $obs->getQuoteItem();
        $product_id=$item->getProductId();
        $_product=Mage::getModel('catalog/product')->load($product_id);
        $newprice=$_product->getPrice()+10;

        Mage::log('My log entry', null, 'mylogfile.log');

        // Set the custom price
        $item->setCustomPrice($newprice);
        $item->setOriginalCustomPrice($newprice);
        // Enable super mode on the product.
        $item->getProduct()->setIsSuperMode(true);

    }
}

but this code adds same amount to add items in cart

my issue are

how to pass value of donate text box to observer
add donated value to product price
donted value should also show in admin order detail


texts: Magento customer import programmatically without e-mail address

texts:
I am inserting customer data in magento programmatically; for my client, email is not a mandatory field, so some users will not have it.

When I insert the customer without email, it throws an error "email is a required field" .

code

$customer = $this->_getCustomerModel();
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$userid = Mage::helper('customer')->CreateUserid(Federallawyer_Customer_Helper_Data::LAWYER);

$customer->setFirstname($_customer->getFirstname());
$customer->setLastname($_customer->getLastname());
$customer->setGroupId(Federallawyer_Customer_Helper_Data::LAWYER);
if($_customer->getEmail()!='')
{
    $customer->setIsSubscribed(1);
    $customer->setEmail($_customer->getEmail());
}
$customer->setUserid($userid);
$customer->setWebsiteId(Mage::app()->getWebsite()->getId());
$customer->setConfirmation(null);
$customer->save();

Is it possible to insert the data in customer table without email?


texts:
We've created an extension that sets a default shipping method for the cart. Below $50 the shipping costs will be $5,95, above $50 the shipping will be free.

The function itself works fine, but the problem is that the amount for shipping seems to be cached (different than other cart totals).

If I have a product that costs $19,95, add this to my cart, and in my cart set the quantity on 4, free shipping should be shown. All totals are updated, only the shipping still shows the $5,95. After I refresh the page again, the shipping cost is update to 'Free'.

How can I prevent this cache?

This is the cart: https://www.dropbox.com/s/0qr9nxrrqidnp4n/Schermafbeelding%202017-08-30%20om%2011.28.54.png?dl=0


texts: One Page Checkout - save customer address before complete the order

texts: Does someone write an observer to save the customer address before the user completes the order ? This is possible ?


texts: Magento connect manager page just shows "Permission denied for write to" (Magento 1.5.1.0)

texts:
One of our client wanted to upgrade existing Magento website which is Magento 1.5.1.0. I was able to setup the website in our local environment successfully but when I try to navigate to the "Magento Connect Manager" from Magento admin, it just shows "Permission denied for write to". But it did not mention which file/folder. I tried to check the logs, But I did not see any updates related to this in the log files.

I tried to search magento.stackexchange.com for a solution but nothing helped me so far.

Can someone please let me know what is the cause of this issue.


texts:
I have the following problem:

I need to add products into the cart with for example:

http://host.com/checkout/cart/add?product=2&qty=5

I have tried to create a module to "catch" the GET request and to proceed some process and then to redirect the user to the checkout page

I have tried this solution:

Passing the Product id and form key but not adding to cart in magento2

But it doesn't work. Any ideas on how to make this work?
My Module Structure is Gep/Cartadd


texts:
I have a special field (Customer reference no, field id = cus_ref_no) that i need to add to checkout.
it is not related to shipping and billing. I have been following the answer from here, but for adding the custom field to checkout page app/code/Vendor/Module/view/frontend/layout/checkout_index_index.xml
I am not sure how to do this part - since the field is neither part of shipping and billing. It is an independent field that needs to be displayed as the first step on the checkout. How should i proceed to adding this field?
And how can i sort the field so that it is displayed as the first field on the checkout page - since i do not see this in the answer to the previous question?


texts: Permissions: Apache user: www-data and my own magento user: magento added to same group but not working

texts:
I am running apache as www-data in group www-data
I create a magento file system user: magento and assigned it to a new group - web
I then also added www-data user to web.
Assigned permissions per Magento docs:

   cd /var/www/html/magento2 && find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; && chown -R :web . && chmod u+x bin/magento

AND

find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

This did not work. However, when I actually assigned magento user to www-data group and ran the two commands above, it works.

My question is if there a logic behind this behavior? Or I might have just made an error while try things out with the web group?

Thanks!


texts: Send customer account creation email to admin

texts:
I want to send account creation notification email to admin
.

I followed following code.
events.xml path Namespace/Modulename/etc

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="customer_register_success">
        <observer name="sendmail_toadmin" instance="Namespace\Modulename\Observer\SendMailToAdmin"/>
    </event>
</config>

SendMailToAdmin.php path Namespace/Modulename/Observer

namespace Namespace\Modulename\Observer;

use Magento\Framework\Event\ObserverInterface;

class SendMailToAdmin implements ObserverInterface
{

    const XML_PATH_EMAIL_RECIPIENT = 'trans_email/ident_general/email';
    protected $_transportBuilder;
    protected $inlineTranslation;
    protected $scopeConfig;
    protected $storeManager;
    protected $_escaper;

    public function __construct(
        \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder,
        \Magento\Framework\Translate\Inline\StateInterface $inlineTranslation,
        \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Framework\Escaper $escaper
    ) {
        $this->_transportBuilder = $transportBuilder;
        $this->inlineTranslation = $inlineTranslation;
        $this->scopeConfig = $scopeConfig;
        $this->storeManager = $storeManager;
        $this->_escaper = $escaper;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {

        $customer = $observer->getData('customer');

        $this->inlineTranslation->suspend();
        try
        {
            $error = false;

            $sender = [
                'name' => $this->_escaper->escapeHtml($customer->getFirstName()),
                'email' => $this->_escaper->escapeHtml($customer->getEmail()),
            ];
            $postObject = new \Magento\Framework\DataObject();
            $postObject->setData($sender);
            $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
            $transport =
                $this->_transportBuilder
                ->setTemplateIdentifier('1') // Send the ID of Email template which is created in Admin panel
                ->setTemplateOptions(
                    ['area' => \Magento\Framework\App\Area::AREA_FRONTEND, // using frontend area to get the template file
                    'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,]
                )
                ->setTemplateVars(['data' => $postObject])
                ->setFrom($sender)
                ->addTo($this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope))
                ->getTransport();
            $transport->sendMessage(); ;
            $this->inlineTranslation->resume();

        }
        catch (\Exception $e)
        {
            \Magento\Framework\App\ObjectManager::getInstance()->get('Psr\Log\LoggerInterface')->debug($e->getMessage());
        }

    }

}


texts: Custom Contact Form on Selected Product Pages

texts:
I need to hide the prices on selected products and on those selected product pages have a button to request a quote which opens a contact form. Upon filling the form the script will send them an email with the price for the product and a link to add the product to the cart.

The reason being certain suppliers do not want prices advertised.

In short what would be the best method to go about having a customised contact form on selected product pages and hiding their prices.


texts: How to change URL of PWA in Magento 2.3?

texts:
I have installed the PWA studio successfully with the Venia storefront. But my development environment URL is generating something like below.

  https://magento-venia-concept-3328z.local.pwadev:8048/

How I can change the URL to something else.


texts: How to add rating in leyerd navigation in Magento 2

texts:
Add rating tab in layered navigation in magento 2

I want override Magento\Catalog\Model\Layer\FilterList to
Vender\Modulename\Model\Layer\FilterList

<preference for="Magento\Catalog\Model\Layer\FilterList" type="Vender\Modulename\Model\Layer\FilterList" />

But it's not working

Magento 2 : Rating Filter in Layered Navigation

also try to above link it's working fine but how to implement in our module b'coz it's core file

Can anyone give me suggestion.


texts: magento 2.2.4 : Create orders programmaticaly

texts:
I want to know how to create orders programmatically.

I want to create an order in the same time, add cart product when I click on by "confirm my order".

I want my customer to add product to his cart.
Then, when he goes on "checkout", my custom page is displaying with some info (such as addresses...).
Then when he clicks on "validate", his comment is created in magento but he doesn't had to go to the payment step.
The order is created only for information (in magento), because the "real" order will be manage by an API.

I know it's possible, using helper (or model, but I can't find the link) :

https://webkul.com/blog/create-quote-and-order-programmatically-in-magento2/

This seems to work (I found this link on other topics in stackExchange), but some methods are deprecated, I want to avoid this. Can anyone help ?

EDIT : according to Magento Doc (https://devdocs.magento.com/guides/v2.1/extension-dev-guide/persistent-entities.html), the way to replace deprecated method is by using resource model. But I'm looking in Magento Github to find order resource (https://github.com/magento/magento2/tree/2.1/app/code/Magento/Sales/Model/ResourceModel/Order) but I don't find it...


texts: How to hide or disable the product price for all the pages in magento 2.3.2

texts:
I don't want to use any commercial module for hiding price.

  And i don't want hide by using templates.

Is there any way to hide price from entire site using plugins or rewrites?


texts: Magento 2 : How To Remove Canonical Link on Page

texts: How to remove canonical link on page (using xml)?


texts: Magento 1.9.0.1 product image upload issue

texts:
I installed version 1.9.0.1 of Magento CE on a dedicated server.
Everything works fine except when my customer uploads images for the products: he selects a bunch of images, clicks upload, the first one goes fine but then it gets slower every picture until it prints SSL certificate error on Firefox or the progress gets stuck at 100% for some minutes on other browsers.
On top of this it doesn't happen to me and it looks like it happens when there are two or mroe people inserting products with images.
I disabled SSL from the backoffice and set every url without using the {{base_url}} variable but I guess it's not a real SSL problem.
Can anybody help me? Maybe you have some advices or you can tell me how to debug the upload process.
Thank you!


texts: Magento event "sales_order_creditmemo_save_after" taking long time to set the data

texts:
I have created a custom module and used event sales_order_creditmemo_save_after, here is my event code:

    <sales_order_creditmemo_save_after>
        <observers>
            <stocksync_stockupdate>
                <class>Test_Stocksync_Model_Observer</class>
                <method>refundOrderInventory</method>
            </stocksync_stockupdate>
        </observers>
    </sales_order_creditmemo_save_after>

Observer code :

public function refundOrderInventory(Varien_Event_Observer $observer){
  $creditmemo = $observer->getEvent()->getCreditmemo();
  foreach ($creditmemo->getAllItems() as $item) {

   Mage::helper('stocksync')->syncStock($item->getSku(),$currentstock->getQty());
    }
}

I am trying to set the value through helper,everything working fine,The problem is that,when I generate the credit memo, it keeps loading, taking much time to set the data. Any best way to do the same ?

Thanks


texts:
I can run php bin/magento on my remote server, but locally, when i attempt to run it, I get the following errors:

D:\Magento2>php bin/magento
PHP Fatal error:  Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dyn
PHP Stack trace:
PHP   1. {main}() D:\Magento2\bin\magento:0
PHP   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
PHP   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
PHP   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
PHP   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
PHP   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
PHP   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager.php:57

Fatal error: Cannot instantiate interface Magento\Framework\Console\CommandListInterface in D:\Magento2\vendor\magento\framework\ObjectManager\Factory\Dynamic\

Call Stack:
    0.0002     124312   1. {main}() D:\Magento2\bin\magento:0
    0.0320     845168   2. Magento\Framework\Console\Cli->__construct() D:\Magento2\bin\magento:22
    1.0122   12222368   3. Symfony\Component\Console\Application->__construct() D:\Magento2\vendor\magento\framework\Console\Cli.php:83
    1.0180   12586728   4. Magento\Framework\Console\Cli->getDefaultCommands() D:\Magento2\vendor\symfony\console\Symfony\Component\Console\Application.php:91
    1.0189   12625928   5. Magento\Framework\Console\Cli->getApplicationCommands() D:\Magento2\vendor\magento\framework\Console\Cli.php:112
    4.1712   39443128   6. Magento\Framework\ObjectManager\ObjectManager->create() D:\Magento2\vendor\magento\framework\Console\Cli.php:140
    4.1712   39443384   7. Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create() D:\Magento2\vendor\magento\framework\ObjectManager\ObjectManager

I'm working in developer mode, with all caches off. This started occuring after upgrading from 2.0.X to 2.1.0rc2

It seems like Symfony isn't working properly...


texts: Magento 2 Uncaught TypeError Cannot read property 'done' of undefined

texts:
Uncaught TypeError: Cannot read property 'done' of undefined
    at UiClass.continueToPayPal (paypal-express-abstract.js:80)
    at HTMLButtonElement.<anonymous> (knockout.js:4245)
    at HTMLButtonElement.dispatch (jquery.js:5232)
    at HTMLButtonElement.elemData.handle (jquery.js:4884)

when I have click on the PayPal Express Checkout button page is not redirect and show me the error in the console any one idea why to show this error.


texts:
I am trying to renidex (through CLI) magento catalog but the routine is hangs (or executing very slow) on catalogsearch_fulltext. I am tried to wait more 8 hours, but it didn't finish. There are 18k SKUs in catalog. Magento installed on a DigitalOcean VPS which has a 4Gb of RAM. I am tried to make truncate catalogsearch_fulltext - but that didn't help.

UPDATE: I am using Magento 1.9

UPDATE 2: I am deleted French and German stores, an reindexing finally finished: "Catalog Search Index index was rebuilt successfully in 03:03:16" It really should work so long?


texts: Hyperlinks from Magento 2 Email Templates to Outlook Destop are Gray not Blue. Please help!

texts:
I cannot figure out why all our our emails from our Magento 2 store like order confirmations, contact us emails have grey colored hyperlinks.

See screenshot as an example:
https://gyazo.com/a225a0a5014e50f725555436a8dfbdee

Now if I check this email in Gmail via a browser the links will look blue like a hyperlink should look.  I've talked with tech support at Outlook and they cannot figure it out.  Its not an outlook issue because I can get emails from everywhere else and hyperlinks look blue. Its only email from our Magento 2 store that come to outlook desktop where hyperlinks are grey colored.

Here is a screenshot of our contact us template:
https://gyazo.com/1e9e4c80c282cbbd9da1d71621aa25c8

Our developer i think tried to add color to areas and that hasn't fixed the issue either.  I also created a new template for our contact us page and test it and everything came to outlook with grey hyperlinks.

Again I can check the same contact us email in Gmail online https://gyazo.com/4ebdb9e8c141b1c5df950aed4ed9d7d6 and it will show blue hyperlinks but in outlook they always show up grey colored from our Magento 2 store only.

Any ideas what could be causing this issue?


texts: Where do you place code that effects ALL Products or Customers in the backend?

texts:
Hey everyone I know the title is vague so I will clarify here.

I have code that updates Customer attributes and Product attributes.
Unfortunately you guys are all going to frown upon me because I run all these updates programmatically on the front-end pages... that's right! the phtml... My reasoning behind it was that users have to select certain drop downs to update their own attributes and product attributes so I kept everything together.

If I wanted to write code that effects ALL Products or Customers such as adding an attribute where would you suggest writing it?  I know HOW to do it I just want to know WHERE you would place it, not necessarily the best place just where you do and why?

Sorry if you don't like how my question is formatted! I'll make sure to up-vote helpful tips and tricks ^^

I'm pretty sure I shouldn't write in any of the
app/code/core files
Possibly create a file in local and make custom modules?


texts: Showing custom tab menu only on customer edit issue

texts:
This is my code from my layout:

    <adminhtml_customer_edit>
        <reference name="customer_edit_tabs">
            <action method="addTab">
                <name>tabname</name>
                <block>mynamespace_mymodule/adminhtml_customer_tab_tickets</block>
            </action>
        </reference>
    </adminhtml_customer_edit>

I want to hide this tab if I create a new customer and only show on customer edit. How can I do that ? thx


texts: Why I cannot create an invoice from an completed order

texts:
I am using Magento 1.7.0.2 and I have a problem with some orders. They are paid by CC and the order is now Completed but I can not create an Invoice. I can not see the invoice button on Order and I can not invoice it Pro-grammatically too. I tried to invoice it with a custom module that I created but still it is blocked on $order->canInvoice().

How can I force it to create or at least how can I see the detailed error?

I am printing out the caught $e and it says data_invalid that is all.

Any help will be appreciated.


texts: What are the "Third party Extensions" ? Which extensions are considered as Third party extension in Magento Framework?

texts:
I have two questions.

What are the  "Third party Extensions" ?
Which extensions are considered as Third party extension in Magento
Framework ?

Thankyou


texts: How can I remove the category filter from category page that do not have further any categories?

texts:
I am using Porto Theme (Magento 2) for building an e-commerce website. I have some categories that has sub-categories, so when I go to that sub-categories page, then it is showing the category filter empty, so I want to remove the category filter only (not price filter) only where further sub-categories are not there. For example: https://www.ekaani.com/brands/ekaani-gods.html

I have tried to remove that, but when I try to edit category_view.xml page, then the whole sidebar disappears. What I have tried is that adding remove=true in the last block.

<?xml version="1.0"?>

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

        <referenceContainer name="page.top">
             <block class="Magento\Catalog\Block\Category\View" name="category_banner" template="category/banner.phtml" ifconfig="porto_settings/category/category_description" before="-"/>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="porto_settings/category/category_description" before="category.products"/>
        </referenceContainer>
        <move element="category.image" destination="content" before="category_desc_main_column"/>
        <referenceContainer name="sidebar.main" remove="true">
            <block class="Smartwave\Porto\Block\Template" name="category_view_custom_block" after="-" template="Magento_Catalog::category/custom_block.phtml"/>
        </referenceContainer>

</page>

For the mentioned page, I only want to remove the sub-categories that do not have further sub-categories.

  Update:

Here is my category_filter.phtml

    <?php
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $category = $objectManager->get('Magento\Framework\Registry')->registry('current_category');
?>
<?php if($category): ?>
<?php
    $categoryHelper = $this->helper('Magento\Catalog\Helper\Category');
    $subcategories=$category->getCategories($category->getId());
    if(count($subcategories)>0){
?>

        <?php echo $category->getName() ?>

        <?php
        foreach($subcategories as $subcategory){
            if (!$subcategory->getIsActive()) {
                continue;
            }
        ?>

                <a href="<?php echo $categoryHelper->getCategoryUrl($subcategory) ?>"><?php echo $subcategory->getName() ?>

        <?php
            }
        ?>

<?php
    }
?>
<?php endif; ?>


texts: Not on staging, but on my local instance of magento, logged in as the admin user I created during installation, I am unable to configure any options related to currency, as they are disabled. Is there an option to enable these features that I am missing? The "Use system value" checkboxes are disabled, so I cannot uncheck them.


texts:
We can't add this item to your shopping cart right now. remove or edit

how can we remove or change its text.


texts:
I created a .html  file which I coded in the way my new projects home website's design  should be. Now I want this .html file to integrate inside my newly installed magento folder as Home page.

The .html file has some main parts which should not be changed when the user visits some other pages such as:

Header
Footer

where should I start from?

I know some ways to integrate this page like adding as new theme or as CMS block but I don't know much about both of the aproaches.


texts: Magento 2.1: How to use getParam('param')?

texts:
I have a code:
$params = unserialize(base64_decode($this->getRequest()->getParam('params')));
I don't know how to find out params any where. Could you show how to do that? Thanks.


texts: How to change layout of catalog search page if results are empty

texts:
Wanted to change from two columns to the one column xml when catalog search results returns zero counts.
Using Magento 2.3 version of the community.
Showing empty sidebar on the left side.


texts: getImage method always return placeholder image - Magento2.1.7EE

texts:
One of my extension using the below code to retrieve product image in listing page.

$productImage = $block->getImage($_product, $image);

getImage() method presents in vendor/magento/module-catalog/Block/Product/AbstractProduct.php

public function getImage($product, $imageId, $attributes = [])
{
    return $this->imageBuilder->setProduct($product)
        ->setImageId($imageId)
        ->setAttributes($attributes)
        ->create();
}

But the above one always return placeholder image instead of product image.

Note : We have all the product images in pub/media/catalog/product/cache (bin/magento catalog:images:resize) but somehow above one always return placeholder.

any ideas? how to debug? how to find the actual image URL?


texts: Error : An error occurred during upload to channel MagentoConnect: Version not found. , When uploading package magento connect for extension

texts:
I am facing a problem to upload version in magento connect extension. When I am trying to upload the package file for the extension, it's giving the following error.

  An error occurred during upload to channel MagentoConnect: Version not
  found

.

However I have given the Version Number to 1.0.0.0 and also given the Release Version same in package extension in magento admin. Then the package file is namespace_module-1.0.0.0.tgz. I am trying to upload this file in Upload package section and giving the following error.

May I know what wrong I have done to upload package extension.


texts:
I'm just trying to test my module by adding some text to the homepage and I can't seem to get this to work. I'm on Magento 1.7.0.2. Magento is aware of my module, I already checked that.

Here is my config:

<?xml version="1.0"?>
<config>
<modules>
    <MyPackage_MyModule>
        <version>1.0.0</version>
    </MyPackage_MyModule>
</modules>
<global>
    <blocks>
        <mymodule>
            <class>MyPackage_MyModule_Block</class>
        </mymodule>
    </blocks>
</global>
<frontend>
    <layout>
        <updates>
            <mymodule>
                <file>mymodule.xml</file>
            </mymodule>
        </updates>
    </layout>
</frontend>
</config>

Here is what I'm trying to add to the Default Handle, code is in mymodule.xml

<?xml version="1.0"?>
<layout>
<default>
    <reference name="content">
        <block type="core/text" name="redundant">
            <action method="setText"><text>Hello Again</text></action>
        </block>
    </reference>
</default>
</layout>


texts: Reindex Not Happening Automatically Magento 2.3

texts:
Every time I update a product stock in magento it updates perfectly in the backend but only when I manually run a reindex via SSH does it update on the front end.

Very annoying when I am sometimes updating stock several times a day with deliveries.

So for example a product has 0 in stock, if i change to qty 5  the back end shows in stock qty 5 but front end still shows out of stock.
After reindex it updates on the front end.

Any idea what is wrong?


texts: Magento individual discount for inner product of bundle product

texts:
Hello I have one question regarding bundle product in magento

Let me take one example to be clear

Suppose I have one bundle product named "bundle_test" and their child product which are simple product named "bundle_child_1", "bundle_child_2", "bundle_child_3"

Now I have work to do is If some one is selecting "bundle_test" then I need to set 10% discount on "bundle_child_1" 50% on "bundle_child_2" and price will for that bundle will be calculated dynamically and the product will display like

suppose "bundle_child_1" has price 100 "bundle_child_2" has price 200

then product will bundle_test bundle_child_1: 100 (-10) bundle_child_2: 200 (-100) bundle_child_3: 300

subtotal: 600 discount: -110 grandtotal: 490


texts: Does setting a cacheable false on block invalidate full page cache for entire page?

texts: I have heard this but I cannot confirm it. Does anyone know?


texts: Push an array of all sku's on a category page into my $data = array();

texts:
I want to list all sku's on a category page in a data array.

Currently if i'm on a product detail page i can push the sku into my data array like this:

if ($module === 'catalog' && $controller === 'product' && $action === 'view') {
            $product = Mage::registry('current_product');
            $category = Mage::registry('current_category');

            // Product(s) IDs
            $data['u2'] = $product->getSku();
}

I'm trying to find a way to push all the skus into my data array when i'm on a category page that might have 10 or more products.

Here's what i've tried:

// Category Page
     if ($module === 'catalog' && $controller === 'category' && $action === 'view') {
         $category = Mage::registry('current_category');
         $collection = Mage::getResourceModel('catalog/product_collection');

         // Product(s) IDs
            $data['u2'] = $collection->getSku();

// Category ID
            $data['u6'] = $category->getId();

            // Category Name
            $data['u7'] = $category->getName();

            // Page Type
            $data['u14'] = 'Category';
    }


texts: How enterprise magento2.1 stores product attributes with schedule updates? (row_id)

texts:
In Magento2.1 enterprise, schedule updates has been introduced, which changes the table schema of product & other cms page.

Take product attributes as example, a column "row_id" has been added to indicate current value/revision of attributes.

As the changes is quite big, many v2.x extension are unable to use because it cannot map to correct column.
Anyone knows how magento2 handles row_id & product, and any opinions for migrating old extension to support this new schema?


texts: Catalog Price Rule containing several SKU-s doesn't work

texts:
Upgraded a store from CE 1.5 to 1.9.0.1 and while everything else works just fine several Catalog Price Rules stopped working. After some investigation I found something weird:

ANY condition is TRUE
  SKU "is one of" sku1
  SKU "is one of" sku2

works just fine.

ANY condition is TRUE
  SKU "is one of" sku1,sku2

doesn't work.

Any ideas what causes this anomaly, how to fix it and why is this behavior different from older versions?

UPDATE: Preliminary investigation reveals that it's actually a bug in Magento core ... once I have a fix, I'll post it here as an answer.


texts: Add "Delivery Time" to Product Page [Magento2]

texts:
I would like to edit a file where I can add the attribute "delivery_time" to the product page view so my customers can see the shipping / delivery times right away when checking out the product.
How can I do this / Where is that file I need to edit located?

Thanks alot!! :)))


texts: Set custom default qty when creating new product Magento 2.3

texts:
I need Quantity field to be filled with custom value when creating new product in admin. I have already tried modificators (haven't figured out how to set data for new product with modifyData($data) and
this answer seems to be not working anymore.. Is there some way to do so?

Making an observer on event catalog_product_new_action and $observer->getEvent()->getProduct()->setQty(%number%) doesnt work either.

Cheers.


texts: How i can get static value with the pound symbol?

texts:
I am trying to assign pound value for input box. I am getting error
can u please help me? if i give alert means its showing the value but i cant see the input value in inputbox
I have tried below code

var valchrCode = String.fromCharCode('163');
var abc = valchrCode + 30;
document.getElementById("mrp30ppm").value = abc;
alert(abc );


texts:
ALL our URL rewrites are now linking to the base URL. I only noticed this morning our biggest changes were updating to the latest patches. I looked at the backend and they are all correct 100%, but when clicking on one they only redirect to the main base URL.

As seen at here the links on the left hand side MS OFFICE and below.

Thanks, Steve


texts: Triggering a 404, 500, 503 error in Magento 2

texts:
Is there a standard way in Magento 2 to programmatically trigger an HTTP error state and have the system just deal with it?  i.e. is there a standard exception we can throw or global method we can call when, in our code, something unexpected happens and we just want to send the user to an error page?

Or is the only way to deal with this to create your own error state, and then ensure your controller's execute method returns an appropriate error code?


texts: Overriding the Core Models and Controllers

texts:
What could be the best method to override the core classes for the following scenario?.

I just want to change the error message thrown from a controller or from a model. For example, I want to change the login error message as 'Please sign in correctly' instead 'Invalid username or password'.

For this simple case should I use preference or plugin? Plugins may be used so that we can simply override the method itself. But is there any way which even simplifies the process for those kind of simple ovverriding?


texts: Magento 2.3 URL_KEY bug , but if i saved product its ok

texts:
I'm having a strange problem with magento related to my url key on products

I explain to you :

I import my products via CSV (Pimgento), everything is good. (Photo, Description, Name etc ...)

But for the url keys of my products I have an empty field:

But if I click on 'Save the product' (without any changes), the url key appears!

Do you have any idea why such a bug?

You would have a solution? Or a module that can make a save of all my products?

Thank you for your time & help!


texts: Create Bundle Product Programatically and Assign Simple Products

texts: I am using Magento 2.3.*  and I want to create a Bundle Product and Associate the simple products using code.


texts:
How to add 301 redirections for the base URL in Magento 2 via .htaccess.

http://www.example.com//?

I want to redirect to these url versions 301  to http://www.example.com


texts: Upload file not working as expected in Magento 2

texts:
I'm using following code to upload files to server.

use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem;

class Test implements ObserverInterface {
    protected $_storeManager;
    protected $_filesystem;
    protected $_fileUploaderFactory;

public function __construct(
            , StoreManagerInterface $storeManager
            , \Magento\Framework\Filesystem $filesystem
            , \Magento\MediaStorage\Model\File\UploaderFactory $fileUploaderFactory
    ) {
        $this->_storeManager = $storeManager;
        $this->_filesystem = $filesystem;
        $this->_fileUploaderFactory = $fileUploaderFactory;
        $this->marketplaceData = $marketplaceData;
        $this->areamasterModel = $areamasterModel;
    }

public function execute(\Magento\Framework\Event\Observer $observer) {
    .
    .
    .
    $testImage = $this->fileUpload ( $_FILES ['test_image'], 'Image', 'test_image' );
    }

public function fileUpload($image, $folder, $fileId) {
        if (isset ( $image ) && $image ['size'] > 0) {
            $currenttimestamp = date ( 'Y-m-d H-i-s' );
            $pathurl = $this->_storeManager->getStore ()->getBaseUrl ( \Magento\Framework\UrlInterface::URL_TYPE_MEDIA ) . $folder . '/';
            $mediaDir = $this->_filesystem->getDirectoryRead ( DirectoryList::MEDIA )->getAbsolutePath ();
            $mediapath = $this->_mediaBaseDirectory = rtrim ( $mediaDir, '/' );
            $imageName = $currenttimestamp . $image ['name']; // Prepending with time stamp to avoid duplication of file name
            $imageName = preg_replace ( '/\s+/', '_', $imageName ); // Replacing single/multiple spaces with underscore in file name
            $uploader = $this->_fileUploaderFactory->create ( [
                    'fileId' => $fileId
            ] );
            $uploader->setAllowedExtensions ( [
                    'jpg',
                    'jpeg',
                    'gif',
                    'png',
                    'pdf'
            ] );
            $uploader->setAllowRenameFiles ( true );
            $path = $mediapath . '/' . $folder . '/';
            $result = $uploader->save ( $path );
            return $imageName;
        }
    }

Above code works well and upload files to the mentioned folder name but the name of the file doesn't append datetime stamp at the start.


texts:
When checking out a product on a mobile device, the step where you would have to write down your name, email and address the page never succeeds to load. Instead the "loading" ring just keeps spinning.

*#60 /var/www/safegear.dk/public_html/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-varnish-...')
#61 /var/www/safegear.dk/public_html/vendor/magento/module-page-cache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#62 /var/www/safegear.dk/public_html/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#63 /var/www/safegear.dk/public_html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'renderResult', Object(Magento\Framework\View\Result\Page\Interceptor), Array, 'result-builtin-...')
#64 /var/www/safegear.dk/public_html/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#65 /var/www/safegear.dk/public_html/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor))
#66 /var/www/safegear.dk/public_html/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#67 /var/www/safegear.dk/public_html/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#68 /var/www/safegear.dk/public_html/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#69 /var/www/safegear.dk/public_html/index.php(75): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#70 {main} [] []*


texts:
I am facing a issue while trying to install magento.

I am getting the following error:

Fatal error: Uncaught Error: Function name must be a string in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php:555
Stack trace:
#0 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#1 /var/www/html/magento/app/code/core/Mage/Install/controllers/WizardController.php(120): Mage_Core_Controller_Varien_Action->renderLayout()
#2 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Install_WizardController->beginAction()
#3 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('begin')
#4 /var/www/html/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#5  /var/www/html/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#6 /var/www/html/magento/app/Mage.php(682): Mage_Core_Model_App- in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout.php on line 555

Configuration details:

OS: ubuntu 15.10
Apache: 2.4.18
php: 7.0.2
mysql: 5.7.10


texts: Need to add validation on custom heap box

texts:
            -- Please Select --

            Signature

            Southern Comfort

            Signature-Southern Blend

Js Code:

if(!$("#checkoutSteps").length){
    if($("select").length){
            $("select").heapbox({
                    'onChange':function(value, elem){
                    if(elem[0].name == 'blgcategory'){
                    if (value != '') {
                    window.location.href = value;
                    }
                    }
                }
            });
        }
    }

Above Html not have validation when we click on Add to cart.
can you please let me know how we can put validation on customized heapOptions.
https://www.cacaoandcardamom.com/the-perfect-selection


texts: Adding a cart review block to One-Step-Checkout Extension from AddWeb Solutions. Magento CE 1.9

texts:
I would like to know(step-by-step) how to add a cart review block(one with quantity updater, product image thumbnail and info), to my One Step Checkout from AddWeb Solutions. Im having trouble importing the block through xml in that particular one page checkout page.
Thank you.


texts: Starting with Magento 2.3.0+, the use of a flat catalog is no longer a best practice and is not recommended

texts:
Can anyone shed some more light on why Magento recommends against this now? Other than the short description they have in their dev docs.

  Continued use of this feature is known to cause performance
  degradation and other indexing issues.

Flat indexers can cause:

Heavy SQL load and site performance issues.
Long running and stuck    crons.

https://docs.magento.com/m2/ce/user_guide/catalog/catalog-flat.html


texts: Magento CE 1.9.1.0 error 404 with category_widget_link on static page

texts:
Using the category_widget_link on a static page I get an error 404 when I click on the link in the frontend.
The category page shows up fine. I get this 404 after clicking on the link.
The link that shows up is: localhost/Magento//Type.1.html__store=default.
What is wrong and what can be done to prevent this.
I'm testing on a XAMPP 1.8.1 server


texts:
I have created the new theme and new phtml file in magento2.1.5

The file path is app/design/frontend/demo/static/Magento_Theme/templates/html/staticpage.phtml

The staticpage.phtml file contains static content, I have used the URL http://localhost/magento2/staticpage.phtml but it shows the 404 page.

I want to show this file content in this URL,
What are steps and changes needed to show phtml file content?


texts: Magento 2.3 - Unexpected error Exception: Warning: SessionHandler::read()

texts:
I am getting Unexpected error,

Exception: Warning: SessionHandler::read(): open(/var/opt/remi/php72/lib/php/session/sess_5292j25aa4ugpdgrv9r6a3l3p8, O_RDWR) failed: Permission denied (13) in /usr/share/nginx/html/gta/vendor/magento/framework/Session/SaveHandler/Native.php on line 22 in /usr/share/nginx/html/gta/vendor/magento/framework/App/ErrorHandler.php:61

How to solve the error?


texts:
I am trying to send emails from my custom module. But its not working.

1.) Created Email template with following path,

app/code/module/namespace/view/frontend/email/myemail.phtml

{{template config_path="design/email/header_template"}}

{{trans "%myname," customer_name=$data.myname}}

{{trans "%myemail," customer_email=$data.myemail}}

{{template config_path="design/email/footer_template"}}

2.) Declared email template in xml file.

app/code/module/namespace/etc/email_templates.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Email/etc/email_templates.xsd">
    <template id="mymodule_email_template" label="Email Form" file="myemail.html" type="html" module="Jute_Ecommerce" area="frontend"/>
</config>

3.) In my controller file,

public function execute()
{
    $post = $this->getRequest()->getPostValue();
    $this->inlineTranslation->suspend();
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $customerSession = $objectManager->create('Magento\Customer\Model\Session');

    try {
        $postObject = new \Magento\Framework\DataObject();
        $post['myname'] = $customerSession->getCustomer()->getName(); //Loggedin customer Name
        $post['myemail'] = $customerSession->getCustomer()->getEmail();

        //Loggedin customer Email
        $postObject->setData($post);

        $myname = $post['myname'];
        $myemail = $post['myemail'];

        $sender = [
            'name' => $this->_escaper->escapeHtml($myname),
            'email' => $this->_escaper->escapeHtml($myemail),
        ];

        $sentToEmail = $this->scopeConfig->getValue('trans_email/ident_support/email',ScopeInterface::SCOPE_STORE);
        $sentToname = $this->scopeConfig->getValue('trans_email/ident_support/name',ScopeInterface::SCOPE_STORE);

        $senderToInfo = [
            'name' => $this->_escaper->escapeHtml($sentToname),
            'email' => $this->_escaper->escapeHtml($sentToEmail),
        ];

        $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
        $transport = $this->_transportBuilder
            ->setTemplateIdentifier('mymodule_email_template') // My email template
            ->setTemplateOptions( [
                'area' => \Magento\Framework\App\Area::AREA_FRONTEND, // this is using frontend area to get the template file if admin then \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE
                'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
            ])
            ->setTemplateVars(['data' => $postObject])
            ->setFrom($sender)
            ->addTo($senderToInfo)
            ->addBcc($senderBcc)
            ->getTransport();

        $transport->sendMessage();

        $this->inlineTranslation->resume();
        $this->messageManager->addSuccess(__('Thanks'));

        $resultRedirect = $this->resultRedirectFactory->create();
        $resultRedirect->setRefererOrBaseUrl();
        $resultRedirect = $this->resultRedirectFactory->create();
        $resultRedirect->setRefererOrBaseUrl();

        return $resultRedirect;
    } catch (\Exception $e) {
        $this->inlineTranslation->resume();
        $this->messageManager->addError(__('Try again'));

        $resultRedirect = $this->resultRedirectFactory->create();
        $resultRedirect->setRefererOrBaseUrl();
        return $resultRedirect;
    }
}


texts: Magento WordPress still works even after changing directory

texts: I have magento wordpress integration and running a blog,i want to change somethings in my feed and it hasn't been reflecting changes. I tried to rename the folder where wordpress files reside in magento but its showing up on my blog url, whereas it should display empty or something?I even tried changing the feed file or add plugin, but not changes are apparentWhy is that?


texts:
I have a lot of observers that work like that:

<controller_action_postdispatch_checkoutopt_index_pagamento>
    <observers>
        <auto_invoice_order>
            <type>singleton</type>
            <class>IsabelaFlores_SGPico_Model_Observer</class>
            <method>acessarCheckoutPagamento</method>
        </auto_invoice_order>
    </observers>
</controller_action_postdispatch_checkoutopt_index_pagamento>

Where checkoutopt_index_pagamento: page`s URL with _ instead of /, and all of it worked fine, until now.

The problem: I have to put an observer to a checkout page with URL "checkoutopt/index/revisao", but file path "onestepcheckout/onestep.phtml" and it isn't working.

I already try to use onestepcheckout_onestep, onestepcheckout_onestep_index, onestepcheckout_onestep_index_revisao, onestepcheckout_onestep_revisao, and a lot of others combinations.

How exactly could I define a observer to this page?


texts: How to database select query with limit in magento 2

texts:
I am trying to select records from database table here is query

 $select = $this->newDbConnection()
        ->select()
        ->from($this->getDbPrefix() . 'test', '*')
        ->order('id', 'ASC')

I want to limit result records lets say 500 recoreds per request.

final query would look like this

SELECT `test`.* FROM `test` ORDER BY `id` ASC LIMIT 0,500

How I can set limit**(LIMIT 0,500)** by magento2 way?


texts: From where this table is created: "scconnector_google_feed_cl"

texts:
I have Magento 2.3.5. I have checked all code but I'm not able to find out from where this table scconnector_google_feed_cl is created in Magento2 database and what is the relation of this table with products table.
Can anyone know about this, please let me know.
Thanks in advance.


texts: Add a class to custom Widget input field

texts:
There is a nice little feature when you add form fields to the system configuration where you can use:

<my_field>
    ...
    <validate>some-class</validate>
    ...
</my_field>

This will add a class to your <input> form field which is useful for all sorts of things. Is there a method to do the same when declaring a widget parameter in widget.xml?


texts: How to access custom table/attributes using the ORM?

texts:
I've been struggling with this for a while - I'm new to Magento and haven't programmed in PHP for a while, so please, bear with me.

Doing some changes on a Shipping module to magento I've come to need to save and query an specific extra attribute, which I've managed to add through a simple update script:

<?php

$installer->startSetup();
$table = new Varien_Db_Ddl_Table(); $table->setName('shipping_token');

$table
->addColumn('token_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
    array(
        'unsigned'  => true,
        'nullable'  => false,
        'primary'   => true,
        'identity'  => true,
    ), 'Entity Id')
->addColumn('rate_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null,
    array(
        'unsigned'  => true,
        'nullable'  => false,
    ), 'Quote Id')
->addColumn('token', Varien_Db_Ddl_Table::TYPE_VARCHAR, 255,
    array(
        'unique'    => true,
    ), 'Quote Token')
->addIndex(
    'ID_QUOTE_TOKEN',
    'token_id')
->addForeignKey(
    'FK_TOKEN',
    'rate_id',
    'sales_flat_quote_shipping_rate',
    'rate_id',
    Varien_Db_Ddl_Table::ACTION_CASCADE,
    Varien_Db_Ddl_Table::ACTION_CASCADE);

 $installer->getConnection()->createTable($table);
 $installer->endSetup();

After that, with some ups and downs, I've been following this tutorial trying to access the models with:

 $shipping = Mage::getModel('shipping/token');
 $shipping->setToken("whatevercomes");

or

 $shipping = Mage::getModel('shipping/token');
 $shipping->setData('token', 'whatevercomes');

but since I'm doing this when I receive the shipping rates, hitting

 $shipping->save();

not only doesn't work but doesn't throw any exceptions either. So, am I doing anything blatantly wrong, or is there any way to dig deeper on the debugging of the matter? I'm lost here.


texts:
I have created a new module that has a custom cron task to export orders. What i'm trying to do though is to only export orders that have been placed since the cron task last completed successfully.

Here's my etc/config.xml

<crontab>
    <jobs>
        <orders_exportsales>
            <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
            <run><model>Orders/export::ExportSales</model></run>
        </orders_exportsales>
    </jobs>
</crontab>

My controller

public function exportSalesAction()
{
    Mage::getModel('Garraways_OrderSync/export')->OrderExport();
}

In my model, I am then grabbing the orders to export, but I would like to use the 'start from' as the time that the cron task last finished so that I can get new orders. I assume that i will need to check for the relevant job_code, status and finished_at but i'm not sure how to do that from within the model so that it just gets the orders since the cron task last ran?

public function OrderExport()
{

    //Check here for job_code, status and finished_at?
    $lastRun = ;
    $current = now();

    //A collection of orders
    $orderCollection = Mage::getModel('sales/order')->getCollection();

    $orderCollection
        ->addAttributeToFilter('status', array('in' => array('pending', 'complete')))
        ->addFieldToFilter('start_date', array('gteq' => $lastRun))
        ->addFieldToFilter('end_date', array("lteq" => $current));

}


texts: Is is possible to make order state to processing from complete programmatically?

texts:
i'm try to make a order's state to processing from complete. here is the code

class TempName_HelloWorld_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
     $this->loadLayout(array('default'));
     $this->renderLayout();

     $order = Mage::getModel('sales/order');
     $order->loadByIncrementId(100000041);
     $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'Gateway has authorized the payment.');
     $order->save();
    }
}

?>

the above code can update the order state from pending/pending payment to processing, but i can't update the order state from complete to processing. Anyone can what is the problem?


texts: How to retain the permissions of a "staging/development" subdomain to its live counterpart?

texts:
As the title implies, I am working with a copy of a live Magento site that has been placed in a subdomain. We have applied a new theme and have done some other customizing. We are now trying to test it on the live server through a subdomain.

When I had first copy/pasted the entire folder we worked on into the subdomain, I went through the usual steps: uploading the database and deleting the local.xml. Those steps went flawlessly.

At the Magento installation wizard things went awry. It seemed as if CSS files weren't loading (no styling) as well as JS files (no functionality such as being able to click on the "continue" button.)

Using my browser's Web Console, I was able to see some of the problem files which mostly entailed the install.php file and various javascript files. I matched the permissions of these files up with the one's on the live public_html folder and matched the permissions.

Voila, install wizard was styled and functional. Went through the steps, no issues with database connection, etc. Now onto the Magento admin panel, we're having a similar issue. No styling at all but links are functional.

Now when viewing the site, it's the opposite. The new theme and styling are there but anything that seems to utilize javascript (animated text, home slider, etc) doesn't show up at all. As well as product images — however its dynamic text (description, names, etc) show up.

When I use Web Console on product pages this time, there are plenty more files that come up in errors. Half are CSS and JS. This time they don't pinpoint a specific file path since it generates per product page.

So my main question, was there something we could've done while uploading to the staging subdomain that would've retained the original permissions? Some way to match everything to the live site so that everything that should execute does?

Please feel free to let me know if I need to post screenshots or be more specific about the matter.

Thanks!


texts:
I am using

Mage::getSingleton('customer/session')->loginByid(…);

in a controller to let a customer log in as a different user (background: customers have "subaccounts" which they can switch to). This works fine for the most part, however the cart stays connected to the previous user, i.e. the user you logged into Magento in the first place.

So if you log in as user A, add some items to the cart and then switch to user B, the cart will still have the items from user A. When items are added to the cart, the items in sales_flat_quote_item in the database are still assigned to the quote of the previously logged in user.

Is there something special I have to execute to make this work as expected?


texts: Shopping Cart Price Rule - Discounts on Products when buying as combo

texts: I have 5 products say 'PROD1' to 'PROD5'. If the customer buy any other products along with any one of these 5 products, I want to give a discount. Is this possible to configure.


texts: Block rendering issues in Magento 1.9.2.0

texts:
having some weird issue in Magento 1.9.2.0

I've got my local.xml file:

<?xml version="1.0"?>
<layout>
    <catalog_product_view>
        <reference name="root">
            <block type="core/template" name="leftmenu" as="leftmenu"
                   template="catalog/product/view/left.phtml />
        </reference>
    </catalog_product_view>
</layout>

When I try to do: $this->getChildHtml('leftmenu'); it doesn't render anything, if I var_dump it it shows string '' (0)

However if I change the reference to root to content then it renders, but below all the html.

If I then change it back to root and change $this->getChildHtml('leftmenu'); to $this->getLayout()->getBlock('leftmenu')->toHtml(); it will then render as it should... any idea why?

Thanks


texts:
This is part of a custom module. I want to validate a frontend form. The validation works; it doesn't submit and it highlights the relevant fields:

However, if all fields are correctly populated, the form submits via the browser, not AJAX.

My code is in a PHTML template file. The Javascript looks as follows:

<script type="text/javascript">
//<![CDATA[
    var formId = 'myForm';
    var variableForm = new VarienForm(formId, true);
    function ajaxIfy(theForm) {
        var validify = new Validation(theForm);
        if (validify.validate()) {
            new Ajax.Updater(
                { success:'formSuccess' },
                '<?php echo $this->getUrl("module/method/post") ?>',
                {
                    method:'post',
                    action:'<?php echo $this->getUrl("module/method/post") ?>',
                    asynchronous:true,
                    evalScripts:false,
                    onComplete:function(request, json) {
                        Element.hide.delay(3, formId);
                        Element.show('formSuccess');
                    },
                    onLoading:function(request, json){
                        Element.show('formLoader');
                    },
                    parameters:Form.serialize(this)
                }
            );
        } else {
            return false;
        }
    }

    Event.observe(variableForm, 'submit', function(e){
        e.preventDefault();
        ajaxIfy(variableForm);
    });
//]]>
</script>

If the form fields are all populated, the form submits in the traditional way, NOT via AJAX. The data appears as a query string append and the request happens as a GET. The form tag is as follows:

<form name="myForm" id="myForm" class="module-form">

Any help or suggestions would be so appreciated. Thanks.


texts: Please give information about file path for create product programmatically magento 2

texts:
where i put file of programatically create product

<?php
use Magento\Framework\App\Bootstrap;
include('app/bootstrap.php');
$bootstrap = Bootstrap::create(BP, $_SERVER);

$objectManager = $bootstrap->getObjectManager();

$state = $objectManager->get('Magento\Framework\App\State');
$state->setAreaCode('frontend');

$_product = $objectManager->create('Magento\Catalog\Model\Product');
$_product->setName('Test Product');
$_product->setTypeId('simple');
$_product->setAttributeSetId(4);
$_product->setSku('test-SKU');
$_product->setWebsiteIds(array(1));
$_product->setVisibility(4);
$_product->setPrice(array(1));
$_product->setImage('/testimg/test.jpg');
$_product->setSmallImage('/testimg/test.jpg');
$_product->setThumbnail('/testimg/test.jpg');
$_product->setStockData(array(
        'use_config_manage_stock' => 0, //'Use config settings' checkbox
        'manage_stock' => 1, //manage stock
        'min_sale_qty' => 1, //Minimum Qty Allowed in Shopping Cart
        'max_sale_qty' => 2, //Maximum Qty Allowed in Shopping Cart
        'is_in_stock' => 1, //Stock Availability
        'qty' => 100 //qty
        )
    );

$_product->save();
?>


texts: Magento2.3.3 Facing Error during Data migration

texts:
I am trying to migartion from Magneto1.9.3.10 to Magento2.3.3 but I am facing error during [Eav Step] data migration like:

SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

Please check below screenshots:

If anyone having idea about this error on how to get resolved then please share your thoughts for the same.

I am waiting for your feedback to get resolved this error.

Any help would be more appreciated.


texts: Class Rewritting. Not working core function works by default

texts:
I am creating a new model. insted to core module modification. as

Catagory.php But it runs core by default

   <?php

   class TutsPlus_Catalog_Model_Category extends Mage_Catalog_Model_Category
  {

 public function getChildren()
      {
      die("this");
      return $this->getResource()->getChildren($this, false);
      }
   }

My etc->config.xml

 <?xml version="1.0"?> <config>   <modules>
    <TutsPlus_Catalog>
        <version>0.1.1</version>
    </TutsPlus_Catalog>
</modules>   <global>
 <models>
   <tutplus>
        <class>TutsPlus_Catalog_Model</class>
  </tutplus>
   <catalog>
      <rewrite><category>TutsPlus_Catalog_Model_Category</category></rewrite>
   </catalog>
 </models>   </global> </config>

AND The modules->TutsPlus_Catalog.xml

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

My tesp.php

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

    $category = Mage::getModel("Catalog/Category")->load(3);
    var_dump($category->getChildren());

The problem is it executes the core modules itself. not the new one

Output loaded from core module


texts: Change Shipping Address Form to Billing Address Form on Guests Checkout Magento2 2.3

texts:
my client wants that the shop guests should first fill in the billing address instead of the shipping address on the checkout page.

How can I change the shipping address form with the billing address form? Is there any Extensions?

Thanks in Advance


texts:
I am trying to figure how to have by default all my pages display "| Company Name" in the page title. Each product, category and any other pages I have on the site once I add the Meta Title for each of the pages the feature | Company name is automatically added to the title of each page so I ant have to manually type it in every time
I have done this in my two previous Magneto 1 sites and want to create this in my new M2 site. I cannot remember where and how this was created.


texts: How to add My Wishlist link in product detail page of My Account dropdown?

texts:
Actually in My Account page I am able to see the My Wishlist link in dropdown but in Product detail page I am not able to see

Add default.xml in app/design/frontend/your-theme-namespace/yourtheme/Magento_Wishlist/layout with following content

<?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>
    <referenceBlock name="top.links">
        <block class="Magento\Wishlist\Block\Link" name="wish-list-link" after="my-account-link"/>
    </referenceBlock>
</body>
</page>


texts: add attribute in add new product genaral tab

texts:
I have this error: Wrong attribute set ID , where is a problem

I tried this:

$installer = $this;
$installer->startSetup();
Mage::log("other_setup_addAttribute UPGRADE 0.0.1 -> 0.0.2 START");

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$data=array(
    'type'=>'varchar',
    'input'=>'text',
    'sort_order'=> 7, //under visibility field
    'label'=>'Promotion %',
    'global'=>Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'required'=>'0',
    'comparable'=>'0',
    'searchable'=>'0',
    'is_configurable'=>'1',
    'user_defined'=>'1',
    'visible_on_front' => 1,
    'visible_in_advanced_search' => 0,
    'is_html_allowed_on_front' => 0,
    'unique'=> false
);

$setup->addAttribute('catalog_product','sd_promotion_label',$data);

$attributeId= $setup->getAttribute('catalog_product','sd_promotion_label');

$setup->addAttributeToSet(
                          'catalog_product', 'Default', 'General', $attributeId
);

Mage::log("other_setup_addAttribute 0.0.1 -> 0.0.2 END");
$installer->endSetup();

EDIT

$installer = $this;
$installer->startSetup();
Mage::log("other_setup_addAttribute UPGRADE 0.0.2 -> 0.0.3 START");

$setup = new Mage_Eav_Model_Entity_Setup('core_setup');

$data=array(
    'type'=>'varchar',
    'input'=>'text',
    'sort_order'=> 7, //under visibility field
    'label'=>'Promotion %',
    'global'=>Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
    'required'=>'0',
    'comparable'=>'0',
    'searchable'=>'0',
    'is_configurable'=>'1',
    'user_defined'=>'1',
    'visible_on_front' => 1,
    'visible_in_advanced_search' => 0,
    'is_html_allowed_on_front' => 0,
    'unique'=> false
);

$setup->addAttribute('catalog_product','sd_promotion_label',$data);

$attributeId= $setup->getAttribute('catalog_product','sd_promotion_label');

$_attributeSetId = $setup->getAttributeSetId('catalog_product','Default');//default
$_attributeGroupId = $setup->getAttributeGroup('catalog_product',$_attributeSetId,'General'); //General

$setup->addAttributeToSet(
    'catalog_product', $_attributeSetId, $_attributeGroupId, $attributeId
);

Mage::log("other_setup_addAttribute 0.0.2 -> 0.0.3 END");
$installer->endSetup();


texts: Magento 2 : How to Remove Customer Account Navigation Link Without XML

texts:
I want to remove customer account navigation tab without use of xml file.

How to remove this ABC customer account navigation link in magento2?

Please help me...

Thanks in advance :)


texts: Duplicating products does not allow the changing of categories for the new duplicated product

texts: I am not able to duplicate the product and change the categories in the new duplicated product.  When changing the categories and then saving I get this error is "Could not save product "551" with position 1 to category 5" which reverts back to the original categories that the duplicated product originally had.


texts:
If I click on "buy" with an empty field, I get this message in the wrong position. Where can I find the template to edit this? Is there a solution? I've been troubling on it for days.

Try this here https://mobiroloshop.com/motion

SOLUTION:

For anyone struggling with this, I added this script in my footer and it works like a charm. Seems like it's a magento bug, this is just a work-around but does the job for now, hope Magento will soon fix this.

<script>
require([
    "jquery"
], function($){
    $(document).ready(function () {
        'use strict';
        var validationErrorMoved = false;
        $('#product-addtocart-button').click(function() {
            if (!validationErrorMoved) {
                $('.swatch-attribute').each(function() {
                    var attrId = $(this).attr('attribute-id');
                    var validationElement = $('input[name="super_attribute['+attrId+']"]').get(0);
                    $(validationElement).appendTo(this);
                });
                validationErrorMoved = true;
            }
        });
    });
});

Have a nice day :)


texts: Language and Currency Switcher are not working on Magento 2.2.2 in Mac safari and Chrome Explorer

texts:
Preconditions

Magento2 ce 2.2.2
php 7.0.1
3.Mac safari 11.1 and Chrom67.0.3396.87 Explorer
Steps to reproduce
I had a Magento 2.2.2 with a website that has one store and two store's views (en and tc);

On Stores -> Configuration -> Web, I set "Add Store code to URLs" to "YES" OR "No"(I test)

in default store view(en), I change the language to Chinese, It works first time, Then I change the language to en， It works too；When I change the language to Chinese again, It doesn't work any more；Even if I refresh the page still does not work；

The issue seems to be related to caching, I clear the cache and switch languages, It works again;

Expected result

Language and currency Switcher can switch at any time;

Actual result

Language and currency Switcher are not working at the second time;

ps:
I test in phone7 safari and window Chrome, IE 9; It works any time;
The issue occurs in Mac Safari and Chrome Explorer;


texts: Magento2-Product PNG Image is resizing as Transparent due to which it's showing as blank on Product/Category/Product Admin Grid Page

texts:
PNG product image is not showing on the front end.

When i checked for the reason then found this format is resizing but always resized a blank image due to which it's not showing(as we know that to show the product images only thumbnail image used) on category and product pages.

Even it's not showing on admin product grid section.

While JPG format is working fine.

LibPNG version is "   1.5.13" and server OS is Centos.

We're using Magento 2.2.4 version.

Note:- During R&D someone suggest to downgrade/upgrade libPNG version but due to some server end problem it's not upgrading/downgrading.

while on fresh M2.2.4 setup it's working fine on same server.

I'm using porto theme.also tried the same by changing the theme from the backend but no luck.

It's urgent so please help me to resolve the issue.


texts: Magento 2 Scheduled Mass Update of Product Attributes based on Filters/Rules

texts:
It has always boggled me. We can target products using filter/rules conditions for coupon discounts, we can target products using filter/rules conditions for price rules using a schedule..
But we can't target products using filter/rules conditions to set and update attributes, to automate store membership and more. There is a mass update method but it is limited and slow, and the action cannot be scheduled.
On the other side we have all these php scripts that do stuff at night, update attributes, set values, change store membership etc. Let's get rid of that.
Question: Does code or an extension exist where an admin can?

target products using filter/rules conditions
execute an action on these products (set an attribute, remove value, regex search/replace, set store membership)
schedule this action daily/weekly/monthly
have an option to email the admin? maybe even attach the results?

The business goals are enormous, to name a few:

set store membership based on attributes so this is not forgotten during imports and automated (all shirts in the shirt shop, all shoes in the shoe shop etc)
set a discount flag using a multiselect based on some selection, or unset the flag
assign products to categories (although I believe this should be done using dynamic categories directly in the category setup and this should be a core function)
search/replace values or incorrect html
try to identify products with erronous or empty values, or without an image, i.e. situations that should not exist: and schedule an email to the product team with the list of SKU's?
and I can go on and on an


texts: Magento 2.3.5: How to hide Shipping Method

texts: I want to do this thing if customer orders over $50 then give free shipping method will be shown and if customer orders below $15 flat order will be shown and free shipping will be hide.


texts: How to show products that are in two categories?

texts:
How do I get products that are in any sub-category AND category b, ignoring all other products that are in one or the other?
$cats = explode(',', $_category->getChildren()); // all sub-category products // array(4,5,6)
$cats[] = 15; // Specific brand category //$cats = array(4,5,6,15)
$bottomRangeCollection = Mage::getModel('catalog/product')->getCollection()
                                 ->addAttributeToSelect('*')
                                 ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left outer')
                                 ->addAttributeToFilter('category_id', array('in' => array('finset' => $cats)))
$bottomRangeCollection->getSelect()->group('e.entity_id');

But this is returning all products in all categories.
How do I filter the products to categories 4 and 15, or 5 and 15, or 6 and 15.
edit
Hacky solution:
Remove the specific brand category id from the $cats array, so we just get all products from the sub-categories, then we do the below - a foreach that adds products that are in the brand category to an array.
//if product is also in brand category, add it to our little array
$rangeProducts = array();
foreach($bottomRangeCollection as $product) {
    if(in_array(15, $product->getCategoryIds())) {
        $rangeProducts[] = $product;
    }
}
unset($bottomRangeCollection); //throw out the garbage.

There has to be a way to do this in Magento.
edit
I have the following category structure:
root
|-Bathrooms
|--Sinks
|--Cabinets
|--...
|-Bedrooms
|--Lights
|--Beds
|--...
|-Ranges
|--Deor
|--Puro
|--...

Products will be put into a relevant category (such as Sinks) and into a Range category (such as Deor). What I am trying to do, is get the range products (the Deor products in this example) that are also in the Bathroom sub-categories (both Sinks and Cabinets), BUT ignoring all other range products, and any products in the bathroom sub-categories that is not in a Range category (which shouldn't be any. But, you know, covering all bases).


texts: After installing magento my admin login page is blank

texts: After installing magento 2 my admin login page and home page is not showing what is the problem i dont know what to do because i am begginer


texts:
I need to add text to the payment methods box in the checkout process.

I've narrowed the file down to payment.html, and worked out where the message code should go.

However, this code needs to be multi-language, changing from English to German, as I switch store language etc.

How can I do that? Thanks.


texts: Search Bar is not showing on main page in mobile but works fine the rest of the site

texts: MOBILE ISSUE The website is www.Storksplows.com when clicking the magnifying glass nothing appears on the home page. I feel like something is covering it because the keyboard appears and if you type and press enter it performs the search but without it appearing most people do not know they can actually search. As stated it works fine on the other pages of the site any help would be appreciated. Magento 2.3.4


texts: Magento 2 : How to generate programmatically wishlist sharing code

texts:
i have Magento 2.3 and i want to manage customer wishlist via database.
I understand how it works but i don't know how can i generate sharing_code on my php script.
Thanks
Antonello


texts: Magento 1.9 : Moved from subdomain to public_html now wysiwyg problems

texts:
I have moved my magento 1.9 from a subdomain to the folder public_html. This is now for my primary domain www.mydomain.co.uk
I have changed everything that needed changing, also now adjusted the unsecure and secure urls

I noticed that some pictures of my category descriptions had disappeared.
so I looked and found out that the WYSIWYG Editor is no open by default (which should be by the settings)
In the description I have added a picture. The path shows something like www.mydomain.co.uk/index.php/admin/cms_wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvaW1hZ2VzL2NhdC10YWJsZS10aHVtYi5qcGcifX0,/key/2f044931a0e6fbd04b37cfdc3e7b05e2/

On the frontend this picture is not visible.

Then I changed to static URLs for the picture. Still no show on the frontend.

I then went to the frontend to see the information from this picture and it shows me that the path to this particular picture is to
www.mydomain.scot/image/catalog/cat_tea/cat_tea-400px.png

the domain ending .scot is with a different provider where the "old" website with opencart was. The domain name is now redirection to .co.uk

I have looked everywhere to change this path, it turns up to be on all pictures in the description of the categories.

I have flushed every cache there is, believe me, have double checked all paths I could find in the configuration and could not find anything that points to the .scot domain

Hope someone can help me.
thx in advance


texts:
Country and State not show in the checkout page for magento 2.4.2
http://prntscr.com/12kf489
http://prntscr.com/12kf7cc
Someone help me solve this issue?
Thanks!


texts: Magento 2 : Custom column filter with serialize data in UI grid

texts:
I added product name column in my module ui grid. In my database, it's save product id.

I display successfully product name in column by product id. But, filter not working when I search by product name.

I just want to add custom field in collection when I do filter.

Current grid collection array :

Array
(
    [0] => Array
        (
            [id] => 1
            [rule_title] => {"1":"Rule 1","2":"Rule 1"}
            [status] => 1
        )

    [1] => Array
        (
            [id] => 2
            [rule_title] => {"1":"Rule 2","2":"Rule 2"}
            [status] => 1
        )
)

Want array like this :

Array
(
    [0] => Array
        (
            [id] => 1
            [rule_title] => {"1":"Rule 1","2":"Rule 1"}
            [status] => 1
            [rule_name] => Rule 1
        )

    [1] => Array
        (
            [id] => 2
            [rule_title] => {"1":"Rule 2","2":"Rule 2"}
            [status] => 1
            [rule_name] => Rule 2
        )
)

How to do that?

Any help would be appreciated !!

Thanks.


texts: Unable to login in magento admin panel in any browser

texts:
I am unable to login in magento admin panel. Magento ver. 1.9.2.4. Reason is in every minute its calling this:

Error : {ajaxExpired: 1,…}
ajaxExpired
:
1
ajaxRedirect
:    "https://www.gleitsichtbrille.de/index.php/ag_supervista/index/login/key/dc32322811d123b75356a152194991d0/"

I have followed below steps to solve this error:

Clear browser cache, history,etc
Delete cache folder from var.
checked with below code to comment it in app\code\core\Mage\Core\Model\Session\Abstract\Varien.php and remove cache:

// session cookie params
/*$cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path'     => $cookie->getPath(),
    'domain'   => $cookie->getConfigDomain(),
    'secure'   => $cookie->isSecure(),
    'httponly' => $cookie->getHttponly()
);*/

Set Permission 777 to cache and session folder.
Set web configuration "Use HTTP Only" to "No".


texts: I've uninstalled one page checkout now my site is down magento 2.3.4

texts:
When I visit the site I get a 500 error and this in the error log.

[03-May-2020 16:00:57 UTC] PHP Warning:  require(/home/magentos/public_html/vendor/composer/../iwd/opc/registration.php): failed to open stream: No such file or directory in /home/magentos/public_html/vendor/composer/autoload_real.php on line 70
[03-May-2020 16:00:57 UTC] PHP Fatal error:  require(): Failed opening required '/home/magentos/public_html/vendor/composer/../iwd/opc/registration.php' (include_path='/home/magentos/public_html/vendor/magento/zendframework1/library:.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/magentos/public_html/vendor/composer/autoload_real.php on line 70

Please help


texts:
Hi I am adding a js file to get a push slide in menu so I can change the country which is working here http://kaiel.fr/shopnew/kaielf.html

But in magento 2.1 http://kaiel.fr/shopnew/ it does not work. I get in chrome Uncaught ReferenceError: signals is not defined flang.js line 3065 which is

signals: new signals(),

In my requirejs-config.js I put

var config = {
paths: {
        'footerlang': 'js/flang'
            },
shim: {
                    'flang': {
            deps: ['jquery']
        }
}

};

And in my footer.phtml I put

<script type="text/javascript">require(['js/flang']);</script>

Plus I get this error in chrome

require.js:1895 GET http://kaiel.fr/shopnew/pub/static/frontend/Smartwave/porto_child/fr_FR/signals.js

I don't have this file

Please help me


texts: how can i add a function in magento2 success page?

texts:
this is my block/success page. and can you please help me to add a function in this page ?

namespace Magento\Checkout\Block\Onepage;

use Magento\Customer\Model\Context;
use Magento\Sales\Model\Order;

/**
 * One page checkout success page
 */
class Success extends \Magento\Framework\View\Element\Template
{

    /**
     * @var \Magento\Checkout\Model\Session
     */
    protected $_checkoutSession;

    /**
     * @var \Magento\Sales\Model\Order\Config
     */
    protected $_orderConfig;

    /**
     * @var \Magento\Framework\App\Http\Context
     */
    protected $httpContext;

    /**
     * @param \Magento\Framework\View\Element\Template\Context $context
     * @param \Magento\Checkout\Model\Session $checkoutSession
     * @param \Magento\Sales\Model\Order\Config $orderConfig
     * @param \Magento\Framework\App\Http\Context $httpContext
     * @param array $data
     */
    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Checkout\Model\Session $checkoutSession,
        \Magento\Sales\Model\Order\Config $orderConfig,
        \Magento\Framework\App\Http\Context $httpContext,
        array $data = []
    ) {
        parent::__construct($context, $data);
        $this->_checkoutSession = $checkoutSession;
        $this->_orderConfig = $orderConfig;
        $this->_isScopePrivate = true;
        $this->httpContext = $httpContext;
    }

    /**
     * Render additional order information lines and return result html
     *
     * @return string
     */
    public function getAdditionalInfoHtml()
    {

        return $this->_layout->renderElement('order.success.additional.info');
    }

    /**
     * Initialize data and prepare it for output
     *
     * @return string
     */
    protected function _beforeToHtml()
    {
        $this->prepareBlockData();
        return parent::_beforeToHtml();
    }

    /**
     * Prepares block data
     *
     * @return void
     */
    protected function prepareBlockData()
    {
        $order = $this->_checkoutSession->getLastRealOrder();

        $this->addData(
            [
                'is_order_visible' => $this->isVisible($order),
                'view_order_url' => $this->getUrl(
                    'sales/order/view/',
                    ['order_id' => $order->getEntityId()]
                ),
                'print_url' => $this->getUrl(
                    'sales/order/print',
                    ['order_id' => $order->getEntityId()]
                ),
                'can_print_order' => $this->isVisible($order),
                'can_view_order'  => $this->canViewOrder($order),
                'order_id'  => $order->getIncrementId()
            ]
        );

    }

    /**
     * Is order visible
     *
     * @param Order $order
     * @return bool
     */
    protected function isVisible(Order $order)
    {
        return !in_array(
            $order->getStatus(),
            $this->_orderConfig->getInvisibleOnFrontStatuses()
        );
    }

    /**
     * Can view order
     *
     * @param Order $order
     * @return bool
     */
    protected function canViewOrder(Order $order)
    {
        return $this->httpContext->getValue(Context::CONTEXT_AUTH)
            && $this->isVisible($order);
    }

}


texts: Magento 2: Unable to get item_id while event "sales_order_save_after" is trigger

texts:
I need the product item id while sales_order_save_after  event call.
I try the following code. I am not able to get the item_id

$order = $observer->getEvent()->getOrder();
foreach($order->getAllItems() as $orderItem)
{
    $this->logger->info($orderItem->getId()); // Not return anything
    $this->logger->info($orderItem->getData()['item_id']); // Not return anything
}

Nothing provide item_id . how to get the item id while sales_order_save_after calls. I am using Magento 2.2.6

My event is working perfectly. I can get all the remaining details. expect order_id and item_id


texts:
In my magento 1.8 project, I have some URL's which are calling some other sites like blogs, youtube videos etc. I want these URL's to keep in admin so that the client/store owner can change them later if needed to.

Where should I keep these URL's such that the client can change them easily? and how to call them in my magento footer template?


texts: Magento 2: Checking Customer Logged In not work in navigation menu

texts:
I want to add some link to navigation menu in magento 2. Some link will display after checking customer logged in or not. I tried to create a plugin.

namespace AIS\Custom\Plugin;

use Magento\Framework\Data\Tree\NodeFactory;

class Topmenu
{
    protected $nodeFactory;
    protected $customerSession;

    public function __construct(
        \Magento\Customer\Model\Session $customerSession,
        NodeFactory $nodeFactory
    ) {
        $this->customerSession = $customerSession;
        $this->nodeFactory = $nodeFactory;
    }

    public function beforeGetHtml(
        \Magento\Theme\Block\Html\Topmenu $subject,
        $outermostClass = '',
        $childrenWrapClass = '',
        $limit = 0
    ) {
        $node = $this->nodeFactory->create(
            [
                'data' => $this->getProviderNode(),
                'idField' => 'id',
                'tree' => $subject->getMenu()->getTree()
            ]
        );
        $subject->getMenu()->addChild($node);

        if($this->customerSession->isLoggedIn()) {
            $node = $this->nodeFactory->create(
                [
                    'data' => $this->getMyCourseNode(),
                    'idField' => 'id',
                    'tree' => $subject->getMenu()->getTree()
                ]
            );
            $subject->getMenu()->addChild($node);
        }
    }

    protected function getProviderNode()
    {
        return [
            'name' => __('Provider'),
            'id' => 'nav-provider',
            'url' => 'http://www.example.com/',
            'has_active' => false,
            'is_active' => false // (expression to determine if menu item is selected or not)
        ];
    }

    protected function getMyCourseNode()
    {
        return [
            'name' => __('My Course'),
            'id' => 'nav-mycourse',
            'url' => 'http://www.example.com/',
            'has_active' => false,
            'is_active' => false // (expression to determine if menu item is selected or not)
        ];
    }

    protected function getCacheLifetime()
    {
        return 0;
    }
}

All page seems fine but the home page is not following the checking. It will display "My Course" button after customer logout. I try to disable the cache and it cannot fix the problem.


texts: How to add custom css in luma theme in magento 2.1.2

texts:
Hi As Below path i have added code ,

app\design\frontend\Magento\luma\Magento_Theme\layout\default_head_blocks.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">
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <css src="css/styles-m.css"/>
        <css src="css/styles-l.css" media="screen and (min-width: 768px)"/>
        <css src="css/print.css" media="print"/>
        <css src="Magento_Catalog::css/custom.css"/>
        <css src="Magento_Catalog::css/responsive.css"/>
        <css src="Magento_Catalog::css/owl.carousel.css"/>
        <css src="Magento_Catalog::css/owl.carousel.theme.css"/>
        <css src="Magento_Catalog::css/font-awesome.min.css"/>

        <!--<script src="Magento_Catalog::js/jquery-1.12.2.min.js"></script>-->
        <script src="Magento_Catalog::js/owl.carousel.js"></script>
        <script src="Magento_Catalog::js/custom.js"></script>

        <link src="https://fonts.googleapis.com/css?family=Lato:400,700,900" src_type="url" />
    </head>
</page>

Also CSS And JS File As Below Path

app\design\frontend\Magento\luma\web\css

app\design\frontend\Magento\luma\web\js

After run command as

php bin/magento cache:clean
php bin/magento setup:static-content:deploy

Now On frontend no show me file .please help .

Thanks


texts: Magento 2.2.1 404 not found error when switch store on product detail page

texts:
I am working on Magento 2.2.1 and I have configured multiple store view Hungarian and Romanian.

When I switch store from Hungarian to Romanian on product detail page I am getting 404 not found error.

Can anyone tell me how can I resolve this?

My website url
http://storyprint.ro/ro/ftshirt.html


texts: how to change status from pending to processing

texts:
I want to change order status from pending to processing in Magento
1.9, how can I do this?


texts:
Fatal error: Call to undefined method
  Mage_Tm_Googlemap_Helper_Data::__() in
  /home/mypetshop/public_html/app/code/core/Mage/Admin/Model/Roles.php
  on line 160

I get this error when I try to Add new roles in my Magento Admin panel or edit an existing role.


texts: Magento 2 How to change position for buttons on product add/edit form?

texts:
How can I change the position of Save, Save & Close buttons on the product add/edit?

I need to place the "Save & close" button first instead of "Save" button on the product add/edit form.

How can I achieve this?


texts: Error while trying to programatically create flat category

texts:
Using Magento 1.9.0.1 I am trying to programmatically create categories using a data upgrade script with the flat categories option turned on.

This first category I want to create is  a new root category.

My data upgrade script looks something like this

$root_cat = array( ..Root Cat Data.. );

$store = Mage::app()->getStore();

$categories = Mage::getModel('catalog/category')
    ->getCollection()
    ->addAttributeToSelect('*')
    ->addIsActiveFilter();

$all_store_cat = array();

foreach ($categories as $_category)
{
    $all_store_cat[] = $_category->getName();
}

if ( in_array($root_cat['name'], $all_store_cat) )
{
    echo 'Public Catalog already exists';
}
else
{
    echo 'Does not exist, lets create';

    $category = Mage::getModel('catalog/category');
    $category->setStoreId(Mage::app()->getStore()->getId());

        $data['path'] = '1'; // This is the path for root categorys
        // $data['setPosition'] = $root_cat['position'];

        $data['name'] = $root_cat['name'];
        $data['is_active'] = $root_cat['is_active'];

        $data['description'] = $root_cat['description'];

        $data['meta_title'] = $root_cat['meta_title'];
        $data['meta_keywords'] = $root_cat['meta_keywords'];
        $data['meta_description'] = $root_cat['meta_description'];
        $data['include_in_menu'] = $root_cat['include_in_menu'];

        $data['display_mode'] = $root_cat['display_mode'];
        $data['is_anchor'] = $root_cat['is_anchor'];

    $category->addData($data);

    // print_r($category);

    // die();

    $category->save();

    // unset($category);

    echo "created: " . $root_cat['name'] . "<br>";
}

I get the following error

a:5:{i:0;s:479:"Error in file: "......path....../data-upgrade-1.0.1-1.0.2.php" - SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`DBNAME`.`catalog_category_flat_store_1`, CONSTRAINT `FK_CAT_CTGR_FLAT_STORE_1_ENTT_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_category_entity` (`entity_id`) ON)";i:1;s:952:"#0 ......path....../app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 ......path....../app/code/core/Mage/Core/Model/Resource/Setup.php(407): Mage_Core_Model_Resource_Setup->_modifyResourceDb('data-upgrade', '1.0.1', '1.0.2')
#2 ......path....../app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage_Core_Model_Resource_Setup->_upgradeData('1.0.1', '1.0.2')
#3 ......path....../app/code/core/Mage/Core/Model/Resource/Setup.php(269): Mage_Core_Model_Resource_Setup->applyDataUpdates()
#4 ......path....../app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Resource_Setup::applyAllDataUpdates()
#5 ......path....../app/Mage.php(684): Mage_Core_Model_App->run(Array)
#6 ......path....../index.php(87): Mage::run('', 'store')
#7 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

Any help greatly appreciated, pulling my hair out over this one!