texts: Magento2 - admin price input's are rounding value to 2 decimals

texts:
This is a Magento CE 2.3.2 project

In this project we need to work with 4 decimals for prices. We have tried this https://github.com/lillik/magento2-price-decimal which works fine, all prices are printed with 4 decimals in frontend, calculations are fine, and values are registered with 4 decimals in database tables when updating data through import/export functionality, or saving a product in admin, if we enter 4 decimal values

We have only 1 problem, but a big problem. In admin, in product edit page the html price input's are showing the value rounded to 2 decimals. So if we have a product with a price 1000.9555 €, if some admin user changes just one single letter in product's description then the rounded price value which is shown in the input (1000.96) is sent to form & saved, overwriting it to 1000.9600 in database

We have spent some days trying to find which template / js is responsible to print that form element, with no success. Any tips?


texts:
I just made new magento2 project. I got this:

  Magento\Framework\Exception\NoSuchEntityException: The store that was
  requested wasn't found. Verify the store and try again.

I copied nginx config file from another project. I suppose problem is here:

map $request_uri $MAGE_RUN_CODE {
     default uk_view;
    ~^/ger/.* test_view;
}

These are wrong stores for this project.
I've deleted it , but still same error.
What should be default map $request_uri $MAGE_RUN_CODE {}


texts: Add Custom field in Only Billing Address form not in Shipping Address form

texts:
I want to create an attribute only for billing address form, I was study the following tutorial

http://www.magentocommerce.com/wiki/5_-_modules_and_development/how_to_add_custom_field_in_billing_and_shipping_address_in_frontend_and_backend

In the above link I have successfully create an attribute name as jobtitle ,  when I try to remove jobtitle from shipping address form, the form are not save. Please anyone help me. How to solve this?? Please guide me.


texts: Magento 2 : Sales Order Grid table is empty but data exist in sales_order

texts:
Magento 2.3.3 CE

Sales Order Grid table is empty but data exist in sales_order and sales_order_item.

Earlier I have thought that some module issue so I have disabled all but still after running reindex and clear cache its empty.

It seems order details are not added to the sales_order_grid table. Does anyone faced this issue ?

Tried these commands already.

bin/magento indexer:reindex
bin/magento c:f

Any help appreciated.


texts:
I want to add static text above the price. I tried to add as explained in the thread (Magento 2: How to add text within container via XML) but it didn't work for me.

<referenceContainer name="product.info.main">
    <block class="Magento\Catalog\Pricing\Render" name="product.price.final" before="product.price.tier">
        <arguments>
            <argument translate="true" name="text" xsi:type="string">Mytext</argument>
            <argument name="price_render" xsi:type="string">product.price.render.default</argument>
            <argument name="price_type_code" xsi:type="string">final_price</argument>
            <argument name="zone" xsi:type="string">item_view</argument>
        </arguments>
    </block>
</referenceContainer>


texts: Magento 2 Check if Shipping Method title is abc add some Text

texts:
I am working On Shipping Methods where I want to display text as per the shipping method Title. I got the file methods.html file and there are display shipping methods by Knockout js.

Now I want to check if the shipping title is ABC then it displays some text else some other text but I don't have an idea how to check shipping title with knockout js.

Please let me know if anyone has idea about it.


texts: Where does the data node inside the API method catalogProductLinkAssign get extracted?

texts:
I am trying to find out where the "data" array, specifically the "position" value inside the "data" array gets extracted from a catalogProductLinkAssign Magento SOAP API V2 web service call and subsequently saved inside magento.

The relevant documentation indicating the node I am talking about is here:  http://devdocs.magento.com/guides/m1x/api/soap/catalog/catalogProductLink/catalog_product_link.assign.html

You can see reference to a node called catalogProductLinkEntity which contains a array called "data".  Inside this array is the string value called "position".

Where in the magento source code tree is this value extracted?
The closest I have been able to get is to this file (\app\code\core\Mage\Catalog\Model\Product\Link\Api\V2.php)  but can't see where the position value itself is extracted, just a value called code.


texts:
I have managed to install the AOE Scheduler through ftp, although when I go to Scheduler under System it is completely blank. I have also cleared all the caches but that did not work either.

Can someone please assist me in the right direction.

I really appreciate any response or help. Thanks a lot in advance.


texts: Display line in transactional e-mail if payment method is

texts:
I want to display a line only when the customer selects payment method checkout money order.
When a customer select money order as payment method, I want to display a
 additional line to the transaction e-mail.

If the customer selects an other payment method, the additional
 should be hidden.

I tried this code, but that does not work:

{{depend order.getPayment().getMethod() == "checkmo"}}

payment check

{{/depend}}

How can I achieve that?


texts: Changing Magento 2 Page Builder Images to use  and srcset

texts:
I am trying to change the magento2 page builder image to include picture and source set tag.
I made a module
app/code/[Vendor]/PageBuilder/view/adminhtml/web/template/content-type/image/full-width/master.html

I want to changed this code:

        <ifnot args="data.link.attributes().href">

        </ifnot>

to this:

    <picture>

            <source media="(max-width:767px)"
                    srcset=" "  >

        <ifnot args="data.link.attributes().href">
            <source media="(max-width:767px)"  srcset=" " >

        </ifnot>
    </picture>

How can I set it up so that srcset pull in the mobile image url?


texts: I checkout from version SVn and i tried to run setup upgrade but it show me this error


texts:
I need to create multilingual static block. So far I have created static block with id 'delivery_returns'.

I'm calling it in catalog\product\view.phtml like this:

$deliveryBlock = Mage::getModel('cms/block')->load('delivery_returns');
echo $deliveryBlock->getTitle();
echo $deliveryBlock->getContent();

I understand that to translate this block:

I should just create another one.
Choose my desired language from store_view field
and keep the static block identifier same as original.

This method works with 'footer_links' and also with another static block I made, called 'header_links', but apparently it is not working with 'delivery_returns' block.
Changing store language does not load corresponding translated 'delivery_returns' block

What am I missing?
Is there a better way to achieve this?


texts:
How to get latest 5 Seller id's.
Let us assume i am A Seller in backend i have option other seller block show my profile. In above mention image i update seller id it will display but now i want to automatically get latest 5 seller id Check this url This is my seller method

public function updateOtherSellersAction() {

        $fieldId = (int) $this->getRequest()->getParam('id');
        $otherSellerIds = $this->getRequest()->getParam('include_in_othersellers');
        try {
            if ($fieldId) {
                $model = Mage::getModel('marketplace/sellerprofile')->load($fieldId, 'seller_id');
                $model->setData ( 'include_in_othersellers', $otherSellerIds)->save ();
            }
        }
        catch ( Exception $e ) {
                Mage::getSingleton ( 'adminhtml/session' )->addError ( $e->getMessage () );
        }

    }

Here i want to show my other seller id

.phtml

<script type="text/javascript">
function updateOtherSellersField(button, fieldId)
{
    new Ajax.Request('<?php echo Mage::helper('adminhtml')->getUrl('*/*/updateOtherSellers') ?>', {
        method: 'post',
        parameters: { id: fieldId, include_in_othersellers: $(button).previous('input').getValue() },
        complete : alert("Other Sellers Block list has been updated successfully.")
    });
}
</script>

Admin grid

$this->addColumn('include_in_othersellers', array(
                'header'           => Mage::helper('marketplace')->__('Include in Other Sellers Block'),
                'align'            => 'center',
                'renderer'         => 'marketplace/adminhtml_widget_grid_column_renderer_inline',
                'index'            => 'include_in_othersellers',
        ));

<?php
class Apptha_Marketplace_Block_Adminhtml_Widget_Grid_Column_Renderer_Inline
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input
{
    public function render(Varien_Object $row)
    {
        $list = $this->OtherSellerList($row);
        $html .= '<input type="text" name="'.$row->getId().'" value = "'.$list.'"/>';
        $html .= '<button onclick="updateOtherSellersField(this, '. $row->getId() .'); return false">' . Mage::helper('marketplace')->__('Update') . '</button>';

        return $html;
    }

    public function OtherSellerList(Varien_Object $row)
    {
        $id = $row->getData();
        foreach ($id as $_id) {
            $sellerProduct = Mage::helper('marketplace/marketplace')->getSellerCollection($_id);
            return $sellerProduct['include_in_othersellers'];

        }

    }

}


texts: Magento 2 - Removing Tax with VAT Validation on Prices that Include Tax

texts:
We have our catalogue set up so that prices entered in the admin include tax, for example:

£75.00 (excl tax: £62.50)

During the checkout we also allow people to enter their VAT number which removes tax from the totals.

Expected:

Customer pays £62.50

Actual:

Customer pays £75.00 still (but tax is considered £0.00)

The only way around this that I can think of is that catalog prices are entered excluding tax. Is there any way this can be done with catalog prices including tax?


texts: when trying to access pages or blocks i get Attention something went wrong

texts:
When I am trying to access pages or blocks I get Attention something went wrong and looked at all other options that may be related or close to this issue but none will resolve my problem

I can access widgets, here is no error log to view either.

I have a option to add a new page or block but when I save it, same issue Attention something happens.

Also now if I go to Stores Configuration I can not access web design etc they are not there only
GENERAL
CATALOG
CUSTOMERS
SALES
SERVICES
ADVANCED

but now expand when clicked on?

Suggestions please as my backup has the same issue.


texts: I have integrated magento products to eBay using M2E pro but now we have to integrated eBay product in to magento(reverse process). Is there any way to do this.


texts: Override the customer login response message in json format in magento 2

texts:
I am using below url to generate token for customers

http://example.com/rest/V1/integration/customer/token

by passing username and password in json format

For Success response:

{
   "token": "u1ruwadnq3l3x1f00gwl3ivjkl5ssmrc",
   "status": 200,
   "success": true,
   "message": "Token has been successfully generated"
}

For failure response:

{
   "token": "null",
   "status": 401,
   "success": false,
   "message": "Please check credentials"
}

I have google a lot but i didnt find apt solution to satisfy my requirement as i am working on magento since one week


texts: validate customer custom attribute file upload extenssion

texts:
I have created one file customer custom  attribute using below code.
Currently it allow all extenssion to upload. I would like to only allow .pdf or .jpeg only.
It is used to upload on both frontend as well as backend.
How can i validate this.
    <?php

namespace Vendor\Module\Setup;

use Magento\Customer\Setup\CustomerSetupFactory;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
{
    /**
     * EAV setup factory
     *
     * @var \Magento\Eav\Setup\EavSetupFactory
     */
    private $eavSetupFactory;

    /**
     * Customer setup factory
     *
     * @var CustomerSetupFactory
     */
    private $customerSetupFactory;

    /**
     * Constructor
     *
     * @param EavSetupFactory $eavSetupFactory
     * @param CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(
        EavSetupFactory $eavSetupFactory,
        CustomerSetupFactory $customerSetupFactory
    ) {
        $this->eavSetupFactory = $eavSetupFactory;
        $this->customerSetupFactory = $customerSetupFactory;
    }

    /**
     * {@inheritdoc}
     */
    public function install(
        ModuleDataSetupInterface $setup,
        ModuleContextInterface $context
    ) {
        $setup->startSetup();

        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        /**
         * Create a file type attribute
         * For File or Image Upload
         */
        $attributeCode = 'customer_attachment';

        $customerSetup->addAttribute(
            \Magento\Customer\Model\Customer::ENTITY,
            $attributeCode,
            [
                'type' => 'text',
                'label' => 'Customer Attachment',
                'input' => 'file',
                'source' => '',
                'required' => false,
                'visible' => true,
                'position' => 200,
                'system' => false,
                'backend' => ''
            ]
        );

        // show the attribute in the following forms
        $attribute = $customerSetup
            ->getEavConfig()
            ->getAttribute(
                \Magento\Customer\Model\Customer::ENTITY,
                $attributeCode
            )
            ->addData(
                ['used_in_forms' => [
                    'adminhtml_customer',
                    'customer_account_edit'
                ]
                ]
            );

        $attribute->save();
        $attributeCodeapproved = 'customer_approved';

        $customerSetup->addAttribute(
            \Magento\Customer\Model\Customer::ENTITY,
            $attributeCodeapproved,
            [
                'label' => 'Customer Approved',
                'system' => 0,
                'position' => 100,
                'sort_order' => 100,
                'visible' => true,
                'note' => '',
                'type' => 'int',
                'input' => 'boolean',
                'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',

            ]
        );

        // show the attribute in the following forms
        $attribute = $customerSetup
            ->getEavConfig()
            ->getAttribute(
                \Magento\Customer\Model\Customer::ENTITY,
                $attributeCodeapproved
            )
            ->addData(
                ['used_in_forms' => [
                    'adminhtml_customer',
                    'customer_account_edit'
                ]
                ]
            );

        $attribute->save();

        $setup->endSetup();
    }
}


texts: Sales Order On Order Create Custom attribute - Admin Page

texts:
On the

Sales > Order > Create Order

I would like to add a serial number of a product.

Anyone any idea how to achieve this?


texts: How the payment system works ? ( new with Magento )

texts:
So, I come to you because I have just started on Magento, my concern right now is that I still can not understand how the payment system on this CMS works.
I would like to know after the customer has chosen a payment method what happens, then how we are supposed to retrieve hispayment on the site. for example, we choose to use PayPal or bank transfer.

If anyone could enlighten me on the subject it would be really cool of him.

Thank you


texts: 'Yes/No Attribute' in magento - how to get text value

texts:
$attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $code);
         $options = $attribute_details->getSource()->getAllOptions(false);
       foreach($options as $option){
          echo '

';
          echo '<input type="radio" id="'.$code.$option["value"].'" value="' . $option["value"] .'"  class="styled" name=" '.  $code . ' " />';
          echo '';
          echo $option["label"];
          echo '';
         }

Is there a way to get question front end label ? $option[value] is 1/0 and $option[label] is Yes/No - i need to get the "question text"


texts: Getting the shipping method code in transactional emails

texts:
We’re currently calling the variable "{{var shippingMethod}}” but it’s  retrieving the description “fedex_STANDARD_OVERNIGHT”.

Is there a way to grab the code in place of the description.

For the one above it would just be FG (Example: FG).

I figure I could manually change this in the database but that's probably not the preferred method.

Should i assign/map it the value i'm looking for?? Do i need to edit or create a custom phtml file to include a block with custom variables?


texts: display longer product name in 2 lines in magento

texts:
please visit this link :

on bottom you can see " Latest Product Added " under that first product is

"longer product name need to display in 2 lines "

as like in products list page, how to display above product name in 2 lines.

product_bestseller_block.phtml = >

please help me to find solution.

Thanks in advance.


texts: Database dates get stored in local timezone

texts:
I'm having trouble with a timezone issue and I'm looking for confirmation.

Do dates get stored in the database in UTC. This seems to be th consensus I have found in other posts.

  For example: If an order is made on our website at 14:00:00 (UTC +13)
  it will that be stored in the database -> created_at as 01:00:00?

I ask this as all my dates in the database (viewed through phpmyadmin) seem to be stored in our local time (UTC +13). Is this correct?


texts:
I am trying to set up a Buy 1 Get 1 50% off promotion only for one brand that we sell - New Balance. I can get it to apply the discount but it does it to all New Balance products in the cart. I need it to apply only to one of them - preferably the lower value of the two.

Should I use (in actions) "Buy X get Y free" and set Y to the discount amount?

Or should I use "Percent of product price discount"?

The other issue is how to have it apply to only one of the two products in the cart.


texts: M2 | Why we need to execute cron:run twice executing first time?

texts:
I created a custom cron job and tested on local server, where it needs to run

  bin/magento cron:run

two times simultaneously and then that custom job is created and scheduled.

why is it like that ?


texts:
Js file

qtyOptions: ko.observableArray([]),
initialize: function () {
this._super();
for (var i = 1; i <= 4; i++) {
    this.qtyOptions.push(i);
}
return this;

template file

<!-- ko if: stockQty > 10 -->
<select data-bind="attr: {
     id: 'cart-item-'+item_id+'-qty',
     'data-cart-item': item_id,
     'data-item-qty': qty,
     'data-cart-item-id': product_sku
     }, value: qty, options: $parent.qtyOptions"></select>
<!-- /ko -->

How to get template stockQty value into js file like this

for (var i = 1; i <= stockQty; i++) {
    this.qtyOptions.push(i);
}


texts: Magento2 How to Display Product Custom Attribute Value In List Page

texts:
i have created one product custom attribute  name -> 'is-buynowbutton-show'
and i want to get that attribute value in product list page to show buy now based on product setting.
Does anyone suggest me how i can get product custom attributes value in product list page?


texts: FREE SHIPPING configuration not working for diffrent products in cart

texts: Magento2 experts. I need a help. I need FREE SHIPPING on 3 or 3+ products. I set in cart price rule. in Action- "Quantity in cart equals or greater than 3" When I add same 3 products to the cart, it works. but, If I add separate 3 products in the cart, It doesn't work. How?


texts: If an order having multiple products, how can the shipment of each product be tracked in Magento 2?

texts: For an Order there will be multiple products. It is not necessary that all the products will be received to the customer in a single day. So in such a situation how can the customer get to know their products tracking details. Can any one say relation of how these Order-Shipment-multiple products related.


texts:
I am trying to get products using soap api. But I am getting below error:

  Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing
  WSDL: Couldn't load from
  'https://example.com/index.php/api/v2_soap/?wsdl=1' : failed to load
  external entity "https://example.com/index.php/api/v2_soap/?wsdl=1"
  in /var/www/example/soap.php:36 Stack trace: #0
  /var/www/example/soap.php(36):
  SoapClient->SoapClient('https://example...') #1 {main} thrown in
  /var/www/example/soap.php on line 36

I am using below code:

$client = new SoapClient('https://example.com/index.php/api/v2_soap/?wsdl=1');

var_dump($client); die('test');

Also, I have reinstalled openssl and ca-certificates on the server.

Can anyone help please?


texts: Magento 2 Check-out issue | An error occurred on the server. Please try to place the order again

texts:
When trying to place a order I get "An error occurred on the server. Please try to place the order again."

In the console I get this:

POST https://www.mydomain.co.uk/rest/default/V1/carts/mine/payment-information 400 (Bad Request)

I use Magento ver 2.1.8 and World Pay as payment gateway. It was working fine in "Test" mode and when switched World Pay to "Live" it gave me that error. Now even when I change back to "Test" it gives me the same error.


texts: Magento2: Cannot get the attribute value with cache enabled

texts:
I want to show the Product price and Add to Cart in product listing page when only we set custom attribute value as Approved. So, I have overridden the ListProduct block and written a function for getting the attribute value but in frontend the changes is not visible with cache enabled.
I tried make the cache disabled by cacheable="false" for a block but its not working too.
Can you anyone please guide?


texts: Add to Cart via URL/Query String in CE 1.7

texts:
I'm having an issue creating a query string that will allow me to add a product to the users cart. I've followed the steps mentioned in this exchange and still can't get it to work. I've been using this link to try and add the configurable product:

http://example.com/checkout/cart/add/product/6184?super_attribute[179]=7927

The configurable product ID is 6184, the supper attribute (format) is 179 and the product ID 7927.

I just want to have a link in an email blast that, once clicked, the customer will automatically have the item added to their cart. Am I doing something wrong? I've read in some places that Magento no longer supports this standard query any more. Is that the case?


texts: Magento admin: Sales / Tax menu disappeared

texts:
Tax settings from the Sales menu have disappeared. It appears this is a conflict with a certain module, when I disable this module from app/etc/modules the tax menu reappears.

No menu items from the module are visible.

However, I have not been able to find out the root cause for the problem. All module XML-files seem to be in order. This module and taxes were working before and no changes to the XML-files have been made.

Also I have a local test env, where the module is working. Code is an exact copy in both locations.

I have checked the Magento roles and permissions, everything OK there.

What could possibly cause this behaviour? Could it be some configuration or other setting. If so, what?


texts: Fatal error "Allowed memory size" while run setup:static-content:deploy

texts:
I am trying to setup Magento 2.0 (community) in a WAMP server and I am getting the error below all the time while I run the command for deploy the assets static due to symlink issues at Windows environments:

php bin/magento setup:static-content:deploy

  Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in C:\wamp\www\magento\vendor\oyejorge\less.php\lib\Less\Visitor\processExtends.php on line 445

I have setup memory_limit as -1 (no limit) but this takes no changes. I don't know what else to do in this case since the issue goes beyond my PHP knowledge and setting that value to no limit should do the job unless I need to install something else to get this working. Any advices? Any workaround?


texts: How to create Tax rule programmatically in controller magento 2

texts:
I have try with this code make tax rule programmatically. but it's not working infact model not loaded. you can see this code :

$objectManagers = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
$fixtureTaxRule = $objectManagers->create('Magento\Tax\Model\Calculation\Rule');

i have get this error :

Class 'Magento\TestFramework\Helper\Bootstrap' not found

can you please suggest how can i create tax rule ?


texts: Coupon code is not working for specific product in magento1.9

texts:
I have added a coupon code for a specific product using product SKU.But it's not applying in front end it shows this is not a valid coupon code.I checked in Core my coupon code is not adding in quote remaining coupons added correctly but this only specific coupon based on SKU is not adding tell me any solution.

$this->_getQuote()->getShippingAddress()->setCollectShippingRates(true);
        $this->_getQuote()->setCouponCode($isCodeLengthValid ? $couponCode : '')
            ->collectTotals()
            ->save();


texts: Magento 2.3 Change product status to out-of-stock when qty is less than 'Minimum Qty Allowed in Shopping Cart'

texts:
I'm running Magento 2.3.5.
Some of my products have Minimum Qty Allowed in Shopping Cart set to greater than one.
For example, product A has Minimum Qty Allowed: 7.
Currently, the QTY of A is: 10.
Now a customer bought 7 of A and now QTY become: 3.
At this moment the status of this item is still In Stock, however, customers can't add it to the cart and the error will pop up saying the qty if greater than the stock.
This is very annoying and this affects the user experience.
If I want to write a plugin of override, which class should I start with?
Thank you!
Edit:
So I wanted to make the product 'out of stock' programmatically when qty is less than the 'Minimum Qty Allowed in Shopping Cart'. I tried to set the out of stock threshold to 6 to achieve this, but then it only allows people to buy 4 even though I have 10.  I am not sure which block(s) controls this?


texts: SUPEE-9767 issue : Add to cart issue (Magento 1.9.0.1)

texts:
Right after applying the SUPEE-9767 patch on our Magento 1.9.0.1 site, every time when I try to put a product to cart by clicking the Add to cart button on the product page, I get the following errors (partavaahto.html is the product url):

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Mage is undefined

partavaahto.html (line 40, col 1)

TypeError: Translate is not a constructor

partavaahto.html (line 52, col 26)

TypeError: element.attachEvent is not a function

bf802dc...e879.js (line 5653, col 9)

TypeError: Product is undefined

partavaahto.html (line 221, col 9)

ReferenceError: VarienForm is not defined

partavaahto.html (line 347, col 17)

TypeError: Mage is undefined

partavaahto.html (line 431, col 9)

TypeError: element.dispatchEvent is not a function

bf802dc...e879.js (line 5734, col 7) 4

detailed error: TypeError: productAddToCartForm is undefined

Strangely, on the category listing page Add to cart button still works fine.

I have applied all the previous security patches and they have worked without errors.

Any idea what could cause this and how could it be fixed?


texts: How to disable any specific cronjob in magento 2.3.4?

texts: Sometimes indexing cron process went away and a similar thing happens for the consumers_runner and yotpo_yotpo_orders_sync cron job so I want to disable the consumers_runner and yotpo_yotpo_orders_sync cron job.


texts: Is it possible to create an order without shipping method?

texts:
I would like to know if it's possible to create an order without any shipping method?

The project I'm working on requires orders without shipping method for specific products.
I first thought about creating virtual products but for now it's not an option...

Once inside the cart if there is only this specific product shipping methods would be hidden and the user could go to the next step. But I don't know if it's possible to have a quote and an order without any shipping method (and any shipping address).

This specific product is a giftcard but it can't be a virtual product (don't have a choice on this at the moment). That's why I don't want a shipping method because it will be sent by email.

Thanks in advance.


texts:
Module 'Mageplaza_Blog':
[ERROR] Magento\Framework\Exception\LocalizedException: Area code is not set in C:\XAMPP7.3211\htdocs\magento2-koistore\vendor\magento\framework\App\State.php:153 Stack trace: #0 C:\XAMPP7.3211\htdocs\magento2-koistore\generated\code\Magento\Framework\App\State\Interceptor.php(63): Magento\Framework\App\State->getAreaCode() #1 C:\XAMPP7.3211\htdocs\magento2-koistore\vendor\magento\framework\Session\SessionManager.php(185):
And it gets stuck at 24%


texts:
I'm wondering which tables can be truncated in Magento 2 to stop the database from increasing in size?

I also have a table called 'customer_visitor' which is sitting at 1025058 rows and I'm wondering if this is the new session save path and if it can be truncated?


texts: Magento 2 phtml file not called in email template file

texts:
I am trying to call phtml file in my email template using following code but it's generate error

Error Log :

[2017-02-13 08:45:18] main.CRITICAL: Invalid template file: 'Company_Module::abc.phtml' in module: '' block's name: 'magento\framework\view\element\template_0' [] []

Code I used in email template file

{{block class='Magento\\Framework\\View\\Element\\Template' area='frontend' template='Company_Module::abc.phtml'}}

Phtml template file path

app/code/Company/Module/view/frontend/template/abc.phtml


texts:
In the Magento 2 CLI, the command to run cron jobs is cron:run --group="[cron group]"

However, I was not able to find how this translates into actual PHP code, i.e. where cron:run is mapped to.

Is it possible to execute cron:run programmatically from within my module? Something like:

function run() {
    Cron::execute(CRON_GROUP);
}


texts: How to call a phtml file after content (after form tag) on product details page

texts:
I want to call a phtml file after content (form tag) on product details page. See the screenshot.

After this form I want to call a phtml file.


texts: How to get Checkout page Json data in PaymentInformationManagement.php file?

texts:
I have added 1 custom field to the payment step on checkout page.

To set this custom field data to quote posted at checkout time I am writing code in the file

Plugin/Model/Checkout/GuestPaymentInformationManagement.php

Plugin/Model/Checkout/PaymentInformationManagement.php

I am not understanding that how to get this json posted data in above two files.

https://www.screencast.com/t/Xk5CZHpt


texts: Magento 2 Hide usps shipping method in frontend

texts:
I've done it fine in Magento 1, and in the offline shipping methods, but I can't figure out how to hide usps and ups.  Not sure which model to even modify to do it currently trying the following:

namespace MasonStedman\PaymentRestriction\Model;

use Magento\Customer\Model\Session as CustomerSession;
use Magento\Backend\Model\Auth\Session as BackendSession;
use Magento\OfflinePayments\Model\Cashondelivery;
use Magento\Quote\Model\Quote\Address\RateRequest;
use Magento\Shipping\Helper\Carrier as CarrierHelper;
use Magento\Shipping\Model\Carrier\AbstractCarrierOnline;
use Magento\Shipping\Model\Rate\Result;
use Magento\Framework\Xml\Security;

class Carrier extends \Magento\Usps\Model\Carrier
{

    public function collectRates(RateRequest $request)
    {
        if (!$this->canCollectRates()) {
            return $this->getErrorMessage();
        }
        $this->customerSession = $customerSession;
        $this->backendSession = $backendSession;
        $this->setRequest($request);
        $this->_result = $this->_getQuotes();
        $this->_updateFreeMethodQuote($request);

        if ($this->backendSession->isLoggedIn()) {
        return $this->getResult();
        }

        $isLogged = $this->customerSession->isLoggedIn();
        if (!$isLogged) {
            return false;
        }
        return false;
    }
}


texts:
i'm new in Magento world and a few minutes ago i had an error.
I'm trying to apply a modify in catalog.xml file: move the block of compare products from right to footer page.
For test i trying to move the line:

<block type="catalog/product_compare_sidebar" before="cart_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>

in footer section of page.xml file (this is stupid, but i wanted to try :) );
and after this, the frontend is disappear, page white.
I enabled the log in backend and the log file report this:

Warning: simplexml_load_string(): &quot; as =&quot;global_cookie_notice&quot; template=&quot;page/html/cookienotice.phtml&quot; before=&quot;-&quot;   in /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450

and this:

Warning: simplexml_load_string(): Entity: line 112: parser error : Couldn't find end of Start Tag block line 112  in /opt/lampp/htdocs/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450

Someone can i help me?
Thank you! :) :)


texts:
I have just started using PHPStorm and had installed the Magento module on it. When I open my project now I get an error that There are duplicated rewrites for: Blocks: adminhtml/catalog_product_edit_tab_super_config

Looking in the code I think this is because two extensions I use, CJM Swatches and QS Quick Configurables both in their config.xml reference :

CJM:

<adminhtml>
 <rewrite>
  <catalog_product_edit_tab_super_config>CJM_ColorSelectorPlus_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config</catalog_product_edit_tab_super_config>
 </rewrite>
</adminhtml>

QS Quick Configurables

<adminhtml>
 <rewrite>
  <catalog_product_edit_tab_super_config>QS_Quickconfigurables_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config</catalog_product_edit_tab_super_config>
 </rewrite>
</adminhtml>

Not having the greatest understanding of the inner workings of Magento I am a bit stuck how to fix this, I thought maybe deleting the QS rewrite rule, then in the relevant Config.php change

class QS_Quickconfigurables_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config implements Mage_Adminhtml_Block_Widget_Tab_Interface

to

class QS_Quickconfigurables_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config extends CJM_ColorSelectorPlus_Block_Adminhtml_Catalog_Product_Edit_Tab_Super_Config implements Mage_Adminhtml_Block_Widget_Tab_Interface

But have no idea if this is the right thing to do?


texts: Front end displays 'Only 1 left'... would like it to display 'One of a kind piece' but only for items that have custom attribute one_of_a_kind = Yes

texts:
I have already create the one_of_a_kind custom attribute

I think I need edit the code in

app/design/frontend/base/default/template/cataloginventory/stockqty/default.phtml

I think I could add an if/else statement that would decide (based on whether one_of_a_kind = yes or = no) whether to type 'Only %s left' or simply 'One of a kind piece!'

<span class="v-center"
            title="<?php echo $this->__('Only %s left', ($this->getStockQty())) ?>"><?php echo $this->__('Only %s left', "{$this->getStockQty()}") ?>

However... I don't really know how to refer to the attribute... I don't think the system creates a isOneOfAKind() method or anything, I'm guessing I need to create this method? Where would that method need to be?

I am new to PHP and even newer to Magento and am not really familiar with how it all works but I think I can pull off adding this feature with a point in the right direction. Thanks


texts:
I want to get a list of items which customers left in their shopping cart (abandoned cart) from my store using the Magento API

I can't find any API call in the below documentation, to get such list

http://devdocs.magento.com/swagger/#/


texts: User registration across multiple websites

texts: I have three separate magento installations linked up in such a way that one site behaves as the main website and the other two sites can be accessed from the main site by selecting from a drop down list in the main website. I would like users/customers to register for the other two sites through the main website. Can somebody kindly tell me how I can do that?


texts: magento2 update cart title in chekcout after update section cart

texts:
In checkout I have custom ajax request, script to remove a product in checkout. After that update cart section, all works, but I can't update cart qty title "1 item in cart".

How can I update it?


texts: Downloading backup TGZ from adminhtml fails

texts:
After I make a backup from adminhtml, it shows up in the list and it shows up in the backend too. I have an option to download the backup TGZ file, as shown here:

When I click it though, the download fails. Chrome says "Failed - Network error":

This happened after I accidentally deleted the entire var/ folder under my Magento root directory.

How do I fix this?


texts: Magento2.3.1 - After install theme :can't use bin/magento CLI

texts:
Try to install theme name:"UB Trex" for Magento 2.3.1
so I have followed the instruction to download the zip, and extract it to
localhost,copy app and pub folder to serve magento root by mobaxterm.
After cover the folder,got a problem :can't use CLI!


texts: Can't modify style in custom theme using Grunt

texts:
I have custom theme Hiddentechies/bentriz

theme.js

bentriz: {
    area: 'frontend',
    name: 'Hiddentechies/bentriz',
    locale: 'ja_JP',
    files: [
      'css/source/custom',
      'css/source/extends',
      'css/source/navigation',
      'css/source/theme'
    ],
    dsl: 'less'
}

I run the following command:

grunt exec:bentriz

grunt less:bentriz

grunt watch

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/css-guide/css_quick_guide_mode.html

There's an error when I run the grunt exec: and grunt less:

and when I run grunt watch then modify the _custom.less,nothing happened so I can't see the changes in the theme. Where did I go wrong?


texts: Magento 2.3 - How to call html file instead of exception?

texts:
I want to call the HTML file in this function. Currently, it is showing exception but I want custom HTML design to display.

Magento/vendor/magento/framework/app/bootstrap.php

   if ($isOn && !$isExpected) {
      $this->errorCode = self::ERR_MAINTENANCE;
      echo "<h1>Hello<h1/>";
                throw new \Exception('Unable to proceed: the maintenance mode is enabled. ');
            }


texts:
How can i change the position of a category in another way then the traditional save method?
Because now, when i change the position of a category it takes around 10 min. I assume that it updates the other categories aswell. Isn't there another way to do it. Like i did with product where i used something like
$table = $this->categoryResource->getCategoryProductTable();
$connection->insertOnDuplicate($table, $data, ['position']);


texts: How to add top link in via custom module

texts:
How to Add top link after "My Wishlist". The link should be visible on activating my custom module.I'm using Magento 1.9. I added the following

   <reference name="top.links">
      <action method="addLink" translate="label title" module="mymodule">
           <label>My Link</label>
           <url helper="mymodule/quote/history/"/>
           <title>My Link</title>
           <prepare>true<prepare/>
           <position>2</position>
       </action>
   </reference>


texts:
I am using Magento 2.3.4 and MFTF 2.6.3. I have setup the MFTF by

setting environment credentials in dev/test/acceptance/.env
running vendor/bin/mftf build:project
running vendor/bin/mftf generate:tests

When I execute vendor/bin mftf run:test AdminLoginTest I am getting the following error:

PHP Fatal error: Uncaught Error: Class 'Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesser' not found in root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php:76
Stack trace:
/root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php(43): Magento\FunctionalTestingFramework\Allure\Event\AddUniqueAttachmentEvent-guessFileMimeType('/tmp/allure-att...')
/root/html/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Event/AddAttachmentEvent.php(35): Magento\FunctionalTestingFramework\Allure\Event\AddUniqueAttachmentEvent-getAttachmentFileName(Object(PHPUnit\Framework\ExceptionWrapper), NULL)
/root/vendor/allure-framework/allure-php-api/src/Yandex/Allure/Adapter/Allure.php(116): Yandex\Allure\Adapter\Event\AddAttachmentEvent->process(Object(Ya in
/root/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Allure/Event/AddUniqueAttachmentEvent.php:76


texts: Magento2 - why header& footer is missing from checkout page?

texts:
Can anyone tell why header & footer is missing from checkout page.

I have searched this on google, but didn't find anything useful except some folks saying that- For user experience, its not there.


texts: Toolbar is not displaying in category list and search result page Magento 2

texts:
Toolbar is not displaying in list page. There is no any changes in layout file catalog_category_view.xml and phtml file toolbar.phtml, these files are unchange. And there is no any module that removing toolbar for list page. Here is one scenario, when toolbar is working. When i change my magento link db with older one then toolbar is displaying.
But i need to link magento with new db (in which toolbar is not working).
How can i find the exact issue in which case toolbar is hidding.


texts:
I have the below file that prepares shipping labels for FedEx from Magento:
http://pastebin.com/pWTvAaM1

You can see that on 481 it outputs the order value.  The problem is the value it outputs is in the currency the customer used when checking and not the value in the stores base currency.

How can I make it output the value in the stores base currency (GBP)?


texts: Change header label "sign in" to "log in" in magento 2

texts: Can anyone help how to change header's "sign-in" label to "log-in" in Magento 2.


texts:
In Magento ,add one step checkout extension.Its works fine but top menu Checkout link is redirect to mydomain/checkout/onepage.Actually what I need is Checkout link is redirect to mydomain/onestepcheckout
Thanks


texts:
Hi this is my code in view.phtml,

<script type="text/javascript">
    var optionsPrice = new Product.OptionsPrice(<?php echo $this->getJsonConfig() ?>);
    var assocIMG =  // Added  - Removed { here, causes issues with other scripts when not working with a configurable product.
<?php
    if ($_product->getTypeId() == "configurable") {
        echo "{";
        $associated_products = $_product->loadByAttribute('sku', $_product->getSku())->getTypeInstance()->getUsedProducts();
        foreach ($associated_products as $assoc)
            $dados[] = $assoc->getId().":'".($assoc->image == "no_selection" || $assoc->image == "" ? $this->helper('catalog/image')->init($_product, 'image', $_product->image)->resize(365,400) : $this->helper('catalog/image')->init($assoc, 'image', $assoc->image)->resize(365,400))."'";
    } else {
        $dados[] =  "''";
    }
    echo implode(',', $dados );
    if ($_product->getTypeId() == "configurable") {
        echo "}";
    }
    ?>
</script>

And i'n my configurable.js,

var productNo = intersect(selectedAssocProducts) || selectedAssocProducts[attributeId][0];
alert(assocIMG[productNo]);

Giving me http://localhost/vinoth/liveinnew/media/catalog/product/cache/1/image/365x400/9df78eab33525d08d6e5fb8d27136e95/S/L/SLP-DB-1_24.jpg

IS there any way to get full image of the product instead of resized ?

I've tried removing resizing condition in view.phtml but it's affetcing all.

Did anyone know how to solve this ?


texts:
for some reason, I have to delete this record from the table, (it is stuck, cannot download or delete)
anyone know this record belongs to which table? so I can delete it by sql query

Thanks


texts: Magento 2 - Fastest Way to Update Tier Prices Programmatically

texts:
I have below snippet which I am using to update tier prices programaticaly:

$tierPricenew[0] = array('website_id' => 2,'cust_group' => $groupId, 'price_qty' => 1 , 'price' => floatval($price) );
$productObj->setTierPrice($tierPricenew);
$prices = $productObj->getTierPrice();
$productObj->unsetData('media_gallery');
$productObj->save();

This however takes very long with lots of products and so want to just update the tier_price attribute alone as suggested elsewhere on stack exchange to quicken the whole process rather than saving the whole product object.

I have tried below methods saveAttribute:

$tierPricenew[0] = array('website_id' => 2,'cust_group' => $groupId, 'price_qty' => 1 , 'price' => floatval($price) );
$productObj->setTierPrice($tierPricenew);
$prices = $productObj->getTierPrice();
$productObj->setData('tier_price', $prices);
$this->productResource->saveAttribute($productObj, 'tier_price');

And this method updateAttributes:

$tierPricenew[0] = array('website_id' => 2,'cust_group' => $groupId, 'price_qty' => 1 , 'price' => floatval($price) );
$productObj->setTierPrice($tierPricenew);
$prices = $productObj->getTierPrice();
$this->productResourceModel->updateAttributes([$productObj->getId()], ['tier_price' => $prices]);

None of the above however seem to work for me. No errors are thrown however tier prices are not set. They work with other attributes like name etc but not tier_prices. Is there a way to update these quickly with methods like above?

I have looked into the Magento\Catalog\Api\ProductTierPriceManagementInterface class and tried with the remove method here however looking at this just seems to do very similar to my first method and saves the complete product object.

$this->tierPrice->remove($product->getSku(), $groupId, '1');

Import seems to do this so fast so feel there must be a quicker method to use here.


texts: Redirecting URLs when switching over from Volusion

texts:
We have a site which we are switching over from Volusion to Magento.

This site has around 1500 products, and the url's for each of these product pages is going to be different from the current url on Magento. (The Volusion url's are extremely ugly. The Magento ones will just be site.com/product-name)

I want to 301 redirect the old urls to the new ones so we keep our search engine rankings.

Is there a better way to do this than to manually go one by one, and lining up all of the old urls with the new ones? Doing this will take hours and hours, and I'm looking for a faster solution.


texts: How to redirect a link to another link 2 in magento

texts:
I have a blog page on this URL: http://159.203.70.155/index.php/blog/ and another page that have the same contents but different URL  as this http://159.203.70.155/index.php/education-center.

Now i want to redirect /blog page to the new LINk /education-center

I have tried it with HTACCESS but it is not working please check if i am doing anything wrong:

    <IfModule mod_rewrite.c>

      ############################################
      ## enable rewrites

       Options +FollowSymLinks
       RewriteEngine on

      ############################################
      ## you can put here your magento root folder
      ## path relative to web root

      #RewriteBase /magento/
      Redirect permanent /blog http://159.203.70.155/index.php/education-center
      </IfModule>


texts:
I want to add custom.js file in Magento 2. I have installed comeback theme.
custom.js file location: \app\design\frontend\Emthemes\comeback\default\web\js\custom.js

Please tell me how to add this custom.js file in magento


texts: Video Not found while add Vimeo video in magento 2

texts:
When I am trying to add video using Vimeo URL that time alert message comes.
so please give me a better solution.


texts: Render column based on another column's value

texts:
I'm making a custom grid that shows the ID and the status of specific orders. It is currently like this:

I wanna make column Order ID background color change, depending on Status column value. How can I make that?

This are both my renderers:

ID:

public function render(Varien_Object $row)
{
    $value =  $row->getData($this->getColumn()->getIndex());
    if ($value || !empty($value)) {
        return ''.$value.'';
    }
}

and Status:

public function render(Varien_Object $row)
{
    $value =  $row->getData($this->getColumn()->getIndex());
    if ($value || !empty($value)) {
        if ($value == '1') {
            return '
' . $value . '
';
        } elseif ($value == '2') {
            return '
' . $value . '
';
        } elseif ($value == '3') {
            return '
' . $value . '
';
        } elseif ($value == '4') {
            return '
' . $value . '
';
        }
    } else {
        return '
Sem Informações
';
    }
}


texts: "Product chooser" field for UI Component form

texts:
I've searched everywhere but I'm unable to find a field that can be inserted into a UI Component form that allows the user to select a product.

It can be achieved easily for categories with the following code:

<field name="pick_a_category">
  <argument name="data" xsi:type="array">
    <item name="options" xsi:type="object">Magento\Catalog\Ui\Component\Product\Form\Categories\Options</item>
      <item name="config" xsi:type="array">
      ...
      </item>
    </item>
  </argument>
</field>

Is there an equivalent approach for products?


texts:
I have a module that creates orders and it can use different types of payment methods, like authorize.net, PayPal or SagePay. But if 3D Secure is active, the order cannot be created. And I cannot disable 3DS in general, because it will also affect the frontend.
I thought of disabling it like this before creating the order programmatically and activate it back afterwards, like this:

$paymentPath = 'payment/authorizenet/centinel';
$storeConfig->saveConfig($paymentPath, '0');
Mage::app()->getCacheInstance()->cleanType('config');

But this method does not work, it disables the 3D Secure, but it still fails to create the order. I also tried of disabling it at the beginning of the order or just before saving the quote.

$quote->setTotalsCollectedFlag(false)
        ->collectTotals()
        ->save();

So when (in what step of creating the order) / how should I disable the 3D Secure (if there is a better way than I did)?

Thanks


texts: Magento 2.2.2 Javascript bundle file size only 1Mb

texts:
I enabled bundle javascript file, but i saw in my local js file is 3.7Mb and my dev site just 1.0Mb. Here is my config

'dev' =>
  array (
    'js' =>
    array (
      'merge_files' => '1',
      'minify_files' => '1',
      'enable_js_bundling' => '1',
    ),
    'css' =>
    array (
      'minify_files' => '1',
      'merge_css_files' => '1',
    ),
    'static' =>
    array (
      'sign' => '1',
    ),
  )

here is the result between my local vs dev site:

Code and config are same. File etc/view.xml inherit from Blank theme.

I dont know why file size is too different between 2 sites.

Could someone help me out to understand it?

As my understanding like Mageto 2.1.x, i will have bundle1.min.js bundle2.min.js... if my js file is big.


texts: How to create table and field using db_schema.xml in magento 2

texts: I want to create table and fields using db_schema.xml rather than InstallSchema in custom module. Can anyone help please?


texts:
I have used checkout_onepage_controller_success_action in two extension.
But even call one at a time. Can anyone have an idea why this happens? And how I can call both extension observer function.

Detail code:
1st extension at app\code\local\Adit\Appaccess\etc\config.xml

<events>
  <checkout_onepage_controller_success_action>
    <observers>
      <checkout_onepage_controller_success_action_handler>
        <type>model</type>
        <class>appaccess/observer</class>
        <method>ordersuccessafter</method>
        <args></args>
      </checkout_onepage_controller_success_action_handler>
    </observers>
  </checkout_onepage_controller_success_action>
</events>

C:\xampp\htdocs\d8\app\code\local\Adit\Appaccess\Model\Observer.php

class Adit_Appaccess_Model_Observer{
public function ordersuccessafter(Varien_Event_Observer $observer)
{
    $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
    echo '<pre>';print_r($order->getId());exit;
}}

2nd extension at \app\code\local\Adit\Bundlepromo\etc\config.xml

<events>
  <checkout_onepage_controller_success_action>
    <observers>
      <checkout_onepage_controller_success_action_handler>
        <type>model</type>
        <class>bundlepromo/observer</class>
        <method>salesordersaveafter</method>
        <args></args>
      </checkout_onepage_controller_success_action_handler>
    </observers>
  </checkout_onepage_controller_success_action>
</events>

\app\code\local\Adit\Bundlepromo\Model\Observer.php

class Adit_Bundlepromo_Model_Observer{
public function salesordersaveafter(Varien_Event_Observer $observer)
{   $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());
    echo '<pre>';print_r($order->getId());exit;
}}

In above case Only Bundlepromo\Model\Observer.php will processed.


texts: Magento 1.9.1 issue payment system dont work

texts:
i use to have magento version 1.7 and afer recieving so many emails i decided to upgrade to Magento ver. 1.9.1.0. Now my customers can't pay and payment system does not work at all. It does all the step but when it get on onepage checkout then after clicking button "Place Order" it just stays there and do not redirect to paypal. Same with sage pay customers told its not working.

I install new version 1.9.1 from magento admin control panel.

does some one have similar issue. i am stuck from good few hours and cant find answer anywhere. Replaces id in one file still not working. can someone tell me real solution thanks.


texts: How to add sub categories to Magento Blog

texts:
I have searched lot in google i have not found any extension for the Magento blog with functionality of parent category and child category.
Currently I am using this blog extension
https://www.magentocommerce.com/magento-connect/blog-6.html.
I don't know how to add the child category to parent category in magento blog.
Can any pls help me for the implemention.


texts:
I downloaded database of my Magento 1.9.8.3 and imported .sql file in Database of my localhost . Then I tried to install Magento 1.9.8.3 code . But I am getting below error.

I got below code in 436346350574 file.

    a:5:{i:0;s:545:"Error in file: "/var/www/html/magento1final/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_assert' already exists, query was: CREATE TABLE `admin_assert` (
  `assert_id` int UNSIGNED NOT NULL auto_increment COMMENT 'Assert ID' ,
  `assert_type` varchar(20) NULL default NULL COMMENT 'Assert Type' ,
  `assert_data` text NULL COMMENT 'Assert Data' ,
  PRIMARY KEY (`assert_id`)
) COMMENT='Admin Assert Table' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci";i:1;s:976:"#0 /var/www/html/magento1final/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /var/www/html/magento1final/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.1.2')
#2 /var/www/html/magento1final/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.1.2')
#3 /var/www/html/magento1final/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /var/www/html/magento1final/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /var/www/html/magento1final/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules()
#6 /var/www/html/magento1final/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /var/www/html/magento1final/index.php(83): Mage::run('', 'store')
#8 {main}";s:3:"url";s:50:"/magento1final/index.php/install/wizard/installDb/";s:11:"script_name";s:24:"/magento1final/index.php";s:4:"skin";s:7:"default";}

What is the solution ?


texts: Categories are not showing as sort order in front-end - Magento 2

texts:
I set categories to sort order like in Catalog - Categories on admin
A B C D E
but in the front-end, it shows like
B C E D A
I have tried to reindex all and clear caches


texts: Allow Another Free Payment Method Magento 2.1.0

texts:
I create a payment module for Magento 2.1.0. My module works very well. But I need to give another free paid method with the same module... This is possible?

Thanks for all.


texts:
Most of category issued are about product not showing.
But I got a different issue here.
After I'm trying to solve some problem with the Porto theme.
Every category in my site start showing all the products.
I have tried virtual category, the filter shows correct result in backend.
But still, front end category keep showing every product in any category.
Search function work properly though.

I thought it was a compatible issue, so I upgrade from 2.2.4 to 2.2.6.
Checked the luma theme in 2.2.6, the issue is still there.
I forgot to test luma in 2.2.4.
The only thing I edited is Porto theme file because of the parameter name seems not match with magento and make it unable to install.
maybe it is because of other module that is with Porto theme?

I have found a similar issue in the Porto thread, but the site has fixed without mention the reason.
Is there any advice?

Thank you guys so much.


texts:
After installing magento2 followed these steps to configure migration tool and then tried to migrate data using this link. At the end tried to execute the following command

Run the settings migration command:

bin/magento migrate:settings [-r|--reset] {<path to config.xml>}

in my case it is:

php mage22\bin\magento migrate:data [-r|--reset] E:\wamp\www\mage22\vendor\magento\data-migration-tool\etc\config.xml

I got this error in commamd prompt '--reset]' is not recognized as an internal or external command, operable program or batch file.

What was wrong and How to solve this.


texts: Dedicated server setup error "not supported" what am i missing here

texts: http://66.147.230.65/~freedomperform/  trying to install magento page simply states not supported?


texts: Magento 1.9- Order not placed using SagePay

texts:
I am getting an error while try to place order using Sagepay payment method. When I click Order Place button, an alert message is showing. Like:

Can't load serializer adapter "Phpserialize".


texts: Magento 1.9 touch screen problem on windows 8 (chrome & firefox)

texts:
I have a Magento 1.9 installation and I have problem with menu of new responsive theme of Magento.
The problem is with a windows 8 laptop with touch screen display and only with Chrome & Firefox. IE does not have any problem.
By mouse over on Menu the drop down does not work.
I have disabled the touch screen option on Chrome by using chrome://flags. That will solve the problem.
Does have anyone have a solution for this problem without disabling the browser touch screen option.
I should also mention it is not possible to scroll the screen with the browser bar.


texts: Magento 2 Component Manager Won't Load componentGrid/components Times Out

texts:
Magento is version 2.1.2 the issue is on the system > web setup wizard > component manager the page loads forever (ajax loading icon spins). My server is:

Litespeed 5.0.9

PHP version 7.0.12 (all magento 2 requirements met)

Using suPHP in Litespeed

The error is:

Fatal error:  Maximum execution time of 60 seconds exceeded in /home/rentinst/public_html/vendor/composer/composer/src/Composer/Repository/ComposerRepository.php on line 539

on the ajax call:
http://testinst.rent-manager.com/setup/index.php/componentGrid/components

The code that the error refers to is:

$includedData = json_decode($this->cache->read($cacheKey), true);

I have already tried the things listed on these 2 pages:
https://github.com/magento/magento2/issues/4756
https://community.magento.com/t5/Technical-Issues/Magento-2-Component-manager-won-t-sync-Continuos-quot-please/td-p/37204

actually maybe others have the same issue: https://github.com/magento/magento2/issues/4546

but any ideas?

I have:

1) Checked and reset all folder permissions, they are all ok. I use:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
and made sure that my public_html is also 755

2) Cleared out var/di, var/cache, var/generation

3) Made sure and re-verified that the Magento public and private access keys are ok they are in system > web setup wizard > system config (they are also stored in var/composer_home/auth.json)

Just a guess but perhaps it is timing out with one of the "providers"? Any debugging or guesses on how to fix this?

Ok so I did a fresh Magento 2 install and the component manager is working, so it is for sure one of the packages/modules I have installed, does anyone know how to correct the package so the component manager doesn't timeout?


texts:
on Magento 2.2.5 I want to move the related products via xml . I have a div with a class of "yotpo yotpo-main-widget yotpo-small" and I want the related products in side this div at the top before any of the divs/content inside this div is loaded.

In the

app/design/frontend/luma/Magento_Catalog/layout/catalog_product_view.xml

I have the below in my xml

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <move element="page.main.title" destination="product.info.main" before="-"/>
    <move element="prev_next_products" destination="product.info.main" before="-"/>
    <move element="product.info.stock.sku" destination="product.info.price" after="product.price.final"/>
    <move element="product.info.review" destination="product.info.main" before="product.info.price"/>
    <move element="product.special.price" destination="product.info.main" after="product.info.price"/>

    <move element="product_view_try_on" destination="product.info.media" before="-"/>
    <referenceBlock name="product.attributes" remove="true" />
    <referenceContainer name="content">
          <block class="Magento\Catalog\Block\Product\View" name="product_custom_name" template="Magento_Catalog::product/view/product_custom_name.phtml" before="-"/>
          <block class="Magento\Framework\View\Element\Template" name="product_view_try_on" before="product.info.media" template="Magento_Catalog::product/view/try_on.phtml"/>
    </referenceContainer>
    <move element="product_custom_name" destination="product.info.main" before="-"/>
    <referenceBlock name="page.main.title" display="false"/>
    <move element="product_related" destination="yotpo-main-widget" before="-"/>
</body>


texts:
For 45.000+ products I want to update a specific date attribute.

I use this custom attribute "new_stock", that all needs the value of "01-01-2000".

How can I easily update this attribute for all these products?

I tried this code, inside a custom .php file and run it by browser.
But that did not work

<?php
$products = Mage::getModel('catalog/product')->getCollection()
->addAttributeToFilter('entity_id', array('in' => $productIds));

foreach($products as $product)
{
$product->setNewStock('2000-01-01');
// below code use for time format
$product->setNewStockIsFormated(true);
$product->getResource()->saveAttribute($product, 'new_stock');

}?>


texts:
is it possible to add words CST or VAT in invoices along with the word “Tax” in the invoice.

Eg :- If a purchase is made from a specific state , lets say within Mumbai state is “VAT” and any purchases outside Mumbai state will be "CST". Can we configure the same?


texts: I had moved Magento from old server to Newser and Export products my old server to import my new server

texts:
Move to a media file old server to new server but product image not showing.
Please help me


texts: Magento 2.4.2: Where to configure to allow shipping to a new country?

texts:
We are as of now shipping only within the US. Since we decided to ship also to Canada, where in Magento admin do we need to configure shipping to new countries?
The screenshot below shows only US without any other country. I don't see where to set this. Could you please suggest?


texts: Does upgrading Magento 1.x replace all core files?

texts:
I would just like to know if ALL core files are replaced with a Magento 1.x upgrade via Magento Connect? Or are there certain files that are ignored?

I never edit core files, but it's just something I'd be interested in understanding.


texts:
I have installed the Magento community edition 1.8 as my hosting company refuses to upgrade the MySQL version to 5.6

I have installed the site properly, but i missed sample data, so i can understand how it all works.

Could anyone please tell me or give a link to sample data, along with any information on how to install this.


texts: How to automate currency rates in Magento 2?

texts:
Hey guys I'm having problem in magento 2 currency rate. I have a question is it also possible to automate magento 2 currency for example euro, gbp and usd? can you show me the process on how to do it.

Thanks


texts: Magento 2.3.5-p2 - Howto add company to customer adress information and billing address information in checkout?

texts:
How can i add the company to these Blocks on checkout Page?

I ve tried to add these Information to:

But it will not be displayed. Example given:
<if args="visible()">
<text args="address().company"/>
<text args="address().prefix"/> <text args="address().firstname"/> <text args="address().middlename"/>
<text args="address().lastname"/> <text args="address().suffix"/>

<text args="_.values(address().street).join(', ')"/>

<text args="address().city "/>,  <text args="address().postcode"/>

<text args="getCountryName(address().countryId)"/>

<each args="data: address().customAttributes, as: 'element'">
    <text args="$parent.getCustomAttributeLabel(element)"/>

</each>

Please Help...
Other Shops are working:


texts: Tier 'savePercent' Calculation Based on 'Manufacturer's Suggested Retail Price'

texts:
By default, on a simple product with tier pricing, each tier price 'percent saved' is calculated based on the 'Item Price'.

I want to recalculate the 'percent saved' to display/calculate the percent saved based on the 'Manufacturer's Suggested Retail Price'

On this file:
app\design\frontend\base\default\template\catalog\product\view\tierprices.phtml
This is the line of code that displays the tier price percent saved:

<span class="percent tier-<?php echo $_index;?>"><?php echo $_price['savePercent']?>

NEW FOUND INFO:

I found this file: app\code\core\Mage\Catalog\Block\Product

Which shows the formula which calculates the 'savePercent':

$price['savePercent'] = ceil(100 - ((100 / $productPrice) * $price['price']));

I have been trying to add:

$_msrpPrice = $this->helper('core')->currency($_product->getMsrp(),true,true)

Then replace 'productPrice' with '_msrpPrice' or 'msrpPrice' but it breaks the page.

Can anyone point me to:

1) Where can I modify this formula to display the % save off of the 'Manufacturer's Suggested Retail Price'

2) Hopefully give me the variable to replace or even a script I can add?

Thank you in advance.


texts: Overriding core layout XML located in "base" not in "frontend"

texts:
I want to remove tier_price from vendor/magento/module-configurable-product/view/base/layout/catalog_product_prices.xml:

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/layout_generic.xsd">
<referenceBlock name="render.product.prices">
    <arguments>
        <argument name="configurable" xsi:type="array">
            <item name="prices" xsi:type="array">
                <item name="tier_price" xsi:type="array">
                    <item name="render_class" xsi:type="string">Magento\ConfigurableProduct\Pricing\Render\TierPriceBox</item>
                    <item name="render_template" xsi:type="string">Magento_ConfigurableProduct::product/price/tier_price.phtml</item>
                </item>
                <item name="final_price" xsi:type="array">
                    <item name="render_class" xsi:type="string">Magento\ConfigurableProduct\Pricing\Render\FinalPriceBox</item>
                    <item name="render_template" xsi:type="string">Magento_ConfigurableProduct::product/price/final_price.phtml</item>
                </item>
            </item>
        </argument>
    </arguments>
</referenceBlock>

Since the <remove> layout instruction doesn't work on elements other than blocks or containers, I have no choice but to override the whole layout file in my theme.

Documentation says:

  Override base layouts

  To add an overriding base layout file (to override a base layout provided by the module):

  Put a layout file with the same name in the following location:

  <theme_dir>/Namespace_Module/layout/override/base/<layout1>.xml

  This file override the following layouts:

  /view/frontend/layout/<layout1>.xml

The above assumes the layout file to override is in the frontend folder. Mine is not. Where do I put my override layout? I could not find anything in the documentation.

I tried app/design/frontend/<theme_name>/default/Magento_ConfigurableProduct/layout/override/base/catalog_product_prices.xml that returns an error of course, as it tries to find the original in frontend:

Exception #0 (LogicException): Overriding view file '/var/www/vhosts/sitename/local/app/design/frontend//default/Magento_ConfigurableProduct/layout/override/base/catalog_product_prices.xml' does not match to any of the files.


texts: Magento 2.3: How to hide only free shipping methods based on postal code

texts:
In the below code, I am hiding all shipping methods based on postal code 2nd value is 0. In this case, all shipping methods are removing. but I want to remove only free shipping. Can you explain how I can do this?

require(['mage/url', 'jquery','domReady!' ,'jquery/ui'],function(url , $)  {
$("[name='postcode']").live('change',function(){
    postCode = $("[name='postcode']").val();
    // console.log(postCode);
    postCode = postCode.slice(1,2);
    console.log(postCode);

            if(postCode == 0){
                    $('.checkout-shipping-method').hide();
                    message = $('#message').length;
                    if(message == 0){
                        $(.checkout-shipping-address').append("<b id=message><a href=mailto:websales@productioncase.com>Contact </a>&nbsp;Production Case for Rural Shipping<b/>");
                        $("#message").css("color","red");
                        $("#message").show();
                    }
                    else if(message){
                        ("#message").show();
                    }
                }
                else{
                    $('.checkout-shipping-method').show();
                    $("#message").hide();
                }
    });
});


texts:
On a magento 1.9 site (latest version), the database crashed.  Looking at the server stats, the IO Wait spiked rapidly, and then it crashed.

I have some stuff that will upload photos.  Anybody ever heard of anything like this?


texts: Magento 2 : Reformatting Luma Product Page

texts:
So I'm attempting to make my product detail page look nicer.

As you can see it's a mess. I need to rearrange order and spacing. I've switched on template path and block hints in developer mode, but that doesn't help. I'm not worried about CSS right now, just positioning. Every tutorial I can find applies to a different Magento version where directory structure is totally different.

If anyone can point me in a direction for a good tutorial or give me some info I'd appreciate it.

This is a child theme based on Luma, Magento V 2.0.13

I'm a newb - Thanks


texts: magento child category showing parent category showing left or right

texts:
The bottom php code is my website side navigation code(drop down)..and i am hoping after as look showing image !!! . this is possible ? i'm very short english skill please help me !

navigation

<?php $_categories = $this->getStoreCategories() ?>
<?php if(count($_categories)): ?>

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

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

        <?php endif ?>

          <?php $m=0; ?>
         <?php $n=0; ?>
        <?php foreach ($_categories as $_category): ?>
            <?php $m++;
            if($m<11){   ?>
            <?php echo $this->drawAdvancedMenuItem($_category) ?>
            <?php }else{ ?>

               <?php foreach ($_categories as $_category): ?>
                <?php $n++;
                if($n<11){}else{ ?>
                 <?php echo $this->drawAdvancedMenuItem($_category) ?>
                 <?php } ?>
               <?php endforeach ?>

            <?php break;    }?>
        <?php endforeach ?>

        <?php if ($this->isActivecustomBlock()) :
            $custom_block_name =  Mage::getStoreConfig('advanced_menu/customblock/menucustomblock_name');
            $custom_block_identifier =  Mage::getStoreConfig('advanced_menu/customblock/customblock_identifier');
            $custom_topoffset = Mage::getStoreConfig('advanced_menu/popup/top_offset') + 0;
        ?>

                <?php echo $custom_block_name; ?>
            <div class="customblock_inner megnor-advanced-menu-popup" style="top:<?php echo $custom_topoffset; ?>px">

                    <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId($custom_block_identifier)->toHtml() ?>

        <?php  endif;?>

<?php endif ?>


texts:
I'm currently looking into a way to be able to print a sales order (from admin) before being placed with just the product details (Sku, Description, Qty).

The idea is that this could be used as a form of picking list before any payment is made to confirm with customers the items ordered before any payment or processing has been completed.

Any help greatly appreciated.


texts: Magento 2.3: Uncaught SyntaxError: Unexpected end of JSON input

texts:
I have an error in my admin configuration when viewing Payment Methods section which only appears when I enable the Amazon_Core module which prevents me from being able to save settings for my payment methods:

Uncaught SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at getData (main.js:58)
    at Array.map (<anonymous>)
    at Object.apply (main.js:74)
    at HTMLDocument.bootstrap (bootstrap.js:106)
    at fire (jquery.js:3232)
    at Object.add [as done] (jquery.js:3291)
    at jQuery.fn.init.jQuery.fn.ready (jquery.js:3542)
    at jQuery.fn.init (jquery.js:2967)
    at new jQuery.fn.init (jquery-migrate.js:241)

If I disable the Amazon_Core module, this error goes away and the admin payment method section works as expected.

Any ideas how to trouble shoot this error?

Ultimately, we're needing to be able to use the Amazon Login & Payment modules.  What's odd is this error is not present in our local environment, only on our live server.


texts: Magento 2 place order in custom controller (difference between placeOrder and submit)

texts:
In How to create order programmatically in Magento 2? it shows two methods on how to place a quote as an order. The first method uses

$order = $this->quoteManagement->submit($quote);

via \Magento\Quote\Model\QuoteManagement. This returns an \Magento\Sales\Model\Order object.

The second method is using

$cart = $this->cartRepositoryInterface->get($cart->getId());
$order_id = $this->cartManagementInterface->placeOrder($cart->getId());

This method uses both the \Magento\Quote\Api\CartRepositoryInterface $cartRepositoryInterface and the \Magento\Quote\Api\CartManagementInterface $cartManagementInterface.

Another approach I found is basically the first one, but using \Magento\Quote\Api\CartManagementInterface instead...

What are the differences between those approaches?


texts:
When I click input field to give email, and password cursor is going down.

Please find the below screen-shot.
Please let me know how to fix this issue.

Thanks!


texts: magento2 overcome circular dependency in model class for using create()

texts:
How to solve the following circular dependency error?

This is my class:

class QueueFactory extends \Magento\Framework\Model\AbstractModel
{
   protected $syncQueueFactory;

   public function __construct(
    QueueFactory $syncQueueFactory,
   array $data = []
   ) {
      $this->syncQueueFactory = $syncQueueFactory;
      $this->_queue = $this->syncQueueFactory->create();
  ...

Here, I want to declare syncQueueFactory of the model class QueueFactory

But if i give the same class in constructor naturally i get dependency error.

What is the alternate to use create()?


texts:
I have created a custom attribute in magento (code 'discount_int'). Now I wish to update this attribute across all my products (all 17000) of them. I need this value to reflect the percentage discount difference. Now from reading I believe I can do this via a script. Having gone backwards and forwards from various points of information. I have created a .php script (as seen below) now as far as my knowledge goes I thought that I could just run it from a browser and update the attributes. I must be going wrong somewhere. Can someone shed some light on why this isnt working?

<?php
define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/../app/Mage.php';

umask(0);
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$count = 0;
$write = Mage::getSingleton('core/resource')->getConnection('core_write');
$updateParents = array();

$products = Mage::getModel("catalog/product")->getCollection()
    ->addAttributeToSelect('*')
    ->addMinimalPrice()
    ->addFinalPrice()
    ->addTaxPercents();
foreach ($products as $product) {
    if($product->getFinalPrice() < $product->getPrice()){
        $diffAmt = $product->getPrice() - $product->getFinalPrice();
        $discountPer = ($diffAmt/ $product->getPrice()) * 100;
        Mage::getSingleton('catalog/product_action')->updateAttributes(
             array($product->getId()), //products to update
             array('discount_int' => $discountPer), //attributes to update
             0 //store to update. 0 means global values
        );
    }
}

?>


texts: How to add extra fields in products ordered report

texts:
We want to show extra fields in products ordered report. Extra fields are sku, cost_price(new attribute) and sold price(price)

I have found following class which handle this.

Mage_Adminhtml_Block_Report_Product_Sold_Grid

And also I found following controller class which handle this.

Mage_Adminhtml_Report_ProductController

I was failed to full fill this requirement. Can anyone help me on this?
Thanks.


texts: Images not showing in admin Product Information page for some admin users

texts:
I have a situation where two admin users can go into a Product Information page and see the product images in the Images tab - when rolling over the image - but two other users can't see them.

For the users who see them the record in the Images table is visible. For the other two users, it looks like the image record is not there.

Here are screenshots for the same product for the two different users.

No Images:

Images:

They all have the message "Image type and information need to be specified for each store view" on screen. Whether or not that is an issue I don't know.

The only other difference for the two user types is that the ones that can't see the images have a reduced permissions role - taking out the dashboard, reports & config. However I have bumped them up to full admin rights and flushed the cache and still, they can't see the images.

Does anyone have any idea?


texts:
I am trying to insert a Catalog Category Link widget in my Home Page. But it is not working. I am sharing the code below.

{{widget type="Magento\Catalog\Block\Category\Widget\Link" template="category/widget/link/link_block.phtml" id_path="category/9"}}


texts: How Magento 2 loads and manipulates configuration information?

texts:
In Magento 1.X We know how the configuration is loading.

If we trace the code performance starting from index.php, we’ll get the following key points ( The exact order may be differ ).

For example

Index.php
Mage::run()
self::$_app    = new Mage_Core_Model_App();
self::$_app->run(…);
Mage::app()
self::$_app-> init (…);

// Initialization of core configuration
$this->loadBase();
$this->loadModules();
$this->loadDb();
$this->saveCache();
$this->_loadDeclaredModules();
$this->loadModulesConfiguration(array('config.xml',$resourceConfig), $this);

How does Magento2 operate all these files and find proper settings for each particular extension ?

Clear answer will help more.


texts:
I have done a basic product import (sku, name, etc) but now when I go to add more details to the product page and then click save I get this error.

I also keep getting this error randomly when clicking buttons, I can't personally work out a pattern to it. (2nd image is behind the pop-up box)

To get the error that time I pressed back on a product page, which replicates the issue each time but isn't the only time it happens.

The database is surely connected because I wouldn't be able to import products without it?

Anyway im at a loss and couldn't find anyone having the same issue as me online.

Any help would be greatly appreciated.

P.S some server info.

Ubuntu 16.04

PHP 7.0.22

MySQL 5.7.21

Another Update:

I have another instance of Magento 2.2.2 running on an i dentical server and it lets me save products fine.


texts:
I am trying to install an extension for my Magento store. My version of is
Magento ver. 2.1.15. Now when i install the extension, it is not visible at Stores->Configuration->Advanced->Advanced

This is the steps i followed to install the extension

 1.Extracted my extension folder into my root
 2.php bin/magento setup:upgrade
 3.php bin/magento setup:di:compile
 4.php bin/magento cache:clean

But i still cannot find the extension in my store. What could be causing this as i am not seeing any error anywhere ?

PS: I just started working on Magento.

Acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="GlobalSms_Notify::sms" title="GlobalSms" sortOrder="100">
                    <resource id="GlobalSms_Notify::config" title="Config" sortOrder="10" />
                </resource>
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="GlobalSms_Notify::sms_config" title="Configuration" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Config/etc/system_file.xsd">
    <system>
        <tab id="globalsms_notify" sortOrder="2000">
            GlobalSms
        </tab>

            Basic Configuration
            <tab>globalsms_notify</tab>
            <resource>GlobalSms_Notify::sms</resource>
            <group id="basic_configuration" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                <![CDATA[Basic Configuration&nbsp;&nbsp;Setting API Account]]>
                <field id="notify_username" type="text" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enter GlobalSms Username
                    <comment>Enter your GlobalSms SMS API Username</comment>
                    <tooltip>Your username must be the same as your GloablSms api username</tooltip>
                    <validate>required-entry</validate>
                </field>
                <field id="notify_password" type="password" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    Enter GlobalSms Password
                    <comment>Enter your GlobalSms SMS API Password</comment>
                    <tooltip>Your password must be the same as your GlobalSms api password</tooltip>
                    <validate>required-entry</validate>
                </field>
            </group>

    </system>
</config>


texts: Why do my modules not work after transferring my magento site to another server?

texts:
I'm trying to move my magento site to another server.

I do this transfer multiple archives: theme files (app.tar skin.tar), images (media.tar), module` s files (local.tar, community.tar) and local.xml, bitnami_magento.sql

I almost succeeded. But I have a problem. Modules are not installed. Please see the screenshot: http://i.imgur.com/SlZ0hJ8.png

So my site has no localization (through translation module), a blog (via AW Blog), One Page Checkout, and still does not work the other modules.

Maybe someone faced with this problem?

Need any advice or decision.
Thanks


texts: Payment method not display in admin order detail

texts:
Magento Version 2.3.2
After Migration authorise.net payment method did not displays in Admin Order.


texts: SOLVED Including comment in programmatically sent out Shipment Email

texts:
I have some code which programmatically sends out a shipment email to a customer. A shipment comment is added using addComment.

$shipment = Mage::getModel('sales/service_order', $order)->prepareShipment($itemsToShip);

if($shipment) {
    try {

        $shipment->register();
        $shipment->getOrder()->setIsInProcess(true);
        // without this line below the shipment is created (above) but the order line is not shown as 'Shipped' on the main order view
        $transactionSave = Mage::getModel('core/resource_transaction')->addObject($shipment)->addObject($shipment->getOrder())->save();

        if (!empty($carrier)) {
            $comment = $this->getShipmentComment($carrier['id'],$carrier['reference']);
            if ($comment) {
                $shipment->addComment($comment, true);
            }
        }

        $shipment->sendEmail(true)->setEmailSent(true)->save();
        return true;

    }

    catch (Exception $e) {
        Mage::logException($e);
    }
}

The shipment is created, comment added, and email sent. The only issue is that, while the comment is added and visible in the backend, the comment is not included in the email sent out. I have got {{var comments}} included in my shipment email template.

        {{if comment}}

                {{var comment}}

        {{/if}}

An example of the comment added is:

Your parcel is being shipped by DPD with reference number XXXXXX. You can track your shipment using this link: http://www.dpd.co.uk/search.jsp?q=XXXXXX

In the backend it says against the Comment 'Customer notified' which I believe relates to the second parameter of the addComment function being true.

I'm thinking there may be a parameter in the sendEmail function which relates to the backend "Append Comments" function. I can't find any documentation for these functions, though, I've put this code together from various sources.


texts:
how to empty .log file in Magento 2 from Terminal ?

system.log
exceptional.log
debug.log


texts: I want to remove create an account link and add custom modal pop up link

texts:
I have tried below code but its not working. I am using default luma theme.I have added code in app/design/frontend/Magento/layout/default.xml.

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="register-link" remove="true" />
</body>
</page>


texts:
Will product model numbers change based on product variants/attributes like size,color.

As in an early discussion , I understand every product will have a unique SKU to identify the product
So how is product model number( as in different product types), SKU , product names related .
Will product model number remain same across multiple variants of a product


texts:
I have the following error when clicking on bundled tab in product back office :

prototype.js:612 Uncaught SyntaxError: Unexpected identifier
at path/js/prototype/prototype.js:612:69
at path/js/prototype/prototype.js:865:29
at path/js/prototype/prototype.js:825:18
at Array.forEach (native)
at Array.each (path/js/prototype/prototype.js:824:12)
at Array.collect (path/js/prototype/prototype.js:864:10)
at String.evalScripts (path/js/prototype/prototype.js:612:34)
at Function.<anonymous> (path/js/prototype/prototype.js:391:23)
at path/js/prototype/prototype.js:416:23

More precisely Chrome underline this part : script) });

function evalScripts() {
    return this.extractScripts().map(function(script) { return eval(script) });
  }

But I can't get what's goes wrong.

And I have also the following one when clicking on add an option

(index):1 Uncaught ReferenceError: bOption is not defined
    at HTMLButtonElement.onclick ((index):1)
onclick @   (index):1

Which I suppose come from the previous error.


texts: Magento 2 Upgrade error Backend is not opening

texts:
After upgrading Magento to 2.3, My website's frontend is working fine with complete CSS. however, I am unable to open admin-backend when I hit the admin URL. it is only loading but the admin-login page is not opening in the End 500 error is displaying on the browser.
do anyone know why it is occurring.


texts: Magento 2 : Alternate Logo for Page Layout

texts:
I'm developing Magento 2.1 application with two logos:

Light logo on the home page.
Dark logo for all other pages.

By default, theme uses dark logo. I've created a custom page layout for home page. In this layout, I attempted to override logo's logo_file argument. After flushing cache and all static assets, home page does not show logo defined in page layout.

Magento_Theme/layout/default.xml

...
<referenceContainer name="header-wrapper" htmlClass="bmg-header-container bmg-header-inverse container">
            <!-- logo -->
            <container name="header-logo-container" htmlTag="div" htmlClass="header-logo-container">
                <referenceBlock name="logo">
                    <arguments>
                        <argument name="logo_file" xsi:type="string">images/logo_dark_sm.png</argument>
                        <argument name="logo_img_width" xsi:type="number">164</argument>
                        <argument name="logo_img_height" xsi:type="number">59</argument>
                    </arguments>
                </referenceBlock>
            </container>
            <!-- /logo -->
            ...
</referenceContainer>
...

Attempt 1 - Magento_Theme/page_layout/custom_home.xml

...
<referenceContainer name="header-wrapper">
    <referenceContainer name="header-logo-container">
        <referenceBlock name="logo">
            <arguments>
                <argument name="logo_file" xsi:type="string">images/logo_light_sm.png</argument>
            </arguments>
        </referenceBlock>
    </referenceContainer>
</referenceContainer>
...

Attempt 2 - Magento_Theme/page_layout/custom_home.xml

...
<referenceContainer name="header-logo-container">
    <referenceBlock name="logo">
        <arguments>
            <argument name="logo_file" xsi:type="string">images/logo_light_sm.png</argument>
        </arguments>
    </referenceBlock>
</referenceContainer>
...

Any guidance would be much appreciated!


texts: Magento 1.9 : How can I add a button in admin role edit form?

texts:
I need a custom functionality "Duplicate Role" in

  Admin > System > Permissions > Roles > Edit.

How can I add an extra button in this form?
Any help will be appreciated.
Thanks in advance.


texts: Observer (checkout_cart_product_add_after) Not Firing

texts:
I cannot seem to figure out why this observer is not firing. Any help is appreciated!

config.xml

<config>
<modules>
    <JP_OrderWaveIntegration>
        <version>1.0.0</version>
    </JP_OrderWaveIntegration>
</modules>
<global>
     <models>
        <JP_OrderWaveIntegration_Model>
             <class>JP_OrderWaveIntegration_Model</class>
        </JP_OrderWaveIntegration_Model>
    </models>
    <events>
        <checkout_cart_product_add_after>
            <observers>
                <JP_OrderWaveIntegration_Model>
                    <class>JP_OrderWaveIntegration/observer</class>
                    <method>addSale</method>
                </JP_OrderWaveIntegration_Model>
            </observers>
        </checkout_cart_product_add_after>
    </events>
</global>

Observer.php

<?php
class JP_OrderWaveIntegration_Sales_Model {

    public function addSale($observer) {
        Mage::log('My log entry', null, 'sales_observer.log');
        die('test');
    }
}


texts:
In my controller BVZ\Customer\Controller\Index I'm doing a redirect using

return $this->_redirect('customer/index/firstAccess');

When the code execute, the request are made (see the print below)
below

but the url in browser stay in the same place.

how can i make the page redirect to 'customer/index/firstAccess' and not just make the request?

all code of my controller

<?php

namespace BVZ\Customer\Controller\Index;

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

  public function __construct(
        \Magento\Framework\App\Action\Context $context,
        \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
        \Magento\Customer\Api\AccountManagementInterface $customerAccountManagement
  ) {
        parent::__construct($context);
            $this->resultJsonFactory = $resultJsonFactory;
            $this->customerAccountManagement = $customerAccountManagement;
  }

  public function execute() {
    $cpfcpnj = $this->getRequest()->getParam('cpfcpnj');

    $vowels = array("-", ".","/");
    $cpfcpnj = str_replace($vowels, "", $cpfcpnj);

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $customerObj = $objectManager->create('Magento\Customer\Model\ResourceModel\Customer\Collection');
    $collection = $customerObj
                  ->addAttributeToSelect('*')
                  ->addAttributeToFilter('taxvat',$cpfcpnj)
                  ->load()
                  ->getFirstItem();

  if($collection->getId()) {

      if($collection->getData('firstAccess')!=0){

          //email reset
          return $this->_redirect('customer/account/ResetPasswordPost');
          $return = "first";
      } else {
          $return = "exists";
      }

  } else {
      $return = "new";
  }

  $result = $this->resultJsonFactory->create();
  return $result->setData($return);


texts: Magento : Fastest way to update a product attribute

texts:
I'm looking for the fastest and reliable method for mass attribute update.
Below are the methods am aware of but I don't know with which I should go.

$store_id = 0;
Mage::getSingleton('catalog/product_action')->updateAttributes(
    array($product_id),
    array('attribute_code' => $attribute_code),
    $store_id
);

or

$product->setData($attribute_code, 1234);
$product->getResource()->saveAttribute($product, $attribute_code);