texts: Magento 2: How to get discount price for each cart rule in quote

texts:
I need to get all discounted price from each cart rule which is applied on current quote. I am getting applied rule ids from $quote->getAppliedRuleIds() and I am getting total discounted amount but I am not sure how can I get discount price of each rule if multiple rules applied to quote.

For example, in quote 3 cart rules applied and each cart rule has different discount(10+20+30) at the code level I am getting total discount amount 60 which is correct but I need (10+20+30) as separate.

Is there any way to get this?


texts: I want to add video in my home page.I am using my custom theme.Can i add video without any extension.


texts: How to add a read more in description in product page?

texts:
My product's description is too long, because of that, i really want to add something like read more button... the content can be extended only if someone click on the read more button?

I'm using magento2


texts: URL contains "?" mark,the url redirect not working in Magento Enterprise1.13

texts:
I have some issue in URL redirecting. I've created a url redirect (in admin) without quotation and it's working fine. Example: http//www.domain.com/products/wingback-chair/leadimage.position=3

when ever I create a url redirect (in admin) with quotation mark like
http//www.domain.com/products/wingback-chair?leadimage.position=3 the URL redirect does not work.it's shows 404 error.

Please tell me if there any possibilities via htacces convert "?" to "/" or any idea/suggestion. I appreciate your help.


texts: Use of $installer v $this in install scripts

texts:
Ok, using install scripts there seems to be a weird convention to use the following:

$installer = $this;

I really don't understand this as it is completely redundant.

Why not just use $this-> throughout the script?

Any ideas on why this convention exists?


texts:
My main sitemap is created automatically and the images are hard to find on the site so I created a separate image sitemap

As you can see below the image sitemap shows that the were submitted properly and shows that 20 web pages were submitted.

I know for a fact that those 20 web pages are already submitted and indexed due to the main sitemap.xml

Will I run into problems with this second image sitemap submitting pages that are already indexed?


texts:
I have a custom option of product

How can I get value: 20, 30 in .phtml file. Hope anyone helps me. Thank in advance.


texts:
How do we remove additional payment due on Magento if the customer paid outside of Magento?

The case is the customer bought a product online and paid but changed his order and sent an additional payment outside Magento.

After editing the Magento order there was an amount due.

How do we remove this?


texts: Is there admin setting available to apply different "Shipping Methods Depending on weight"?

texts:
I want to implement different Shipping Methods Depending on weight of products in order.

For ex. Configure USPS to be used for packages under 2 lbs
Configure Fedex to be used for packages over 2 lbs


texts:
Sometimes I'm login as one user and in some pages I see the name of other user that I've never used to login in that computer.

this happens in different pages, and don't happens always.

Any idea of what can generate this issue ?


texts: Create membership package to download products

texts:
i need to create for my e-commerce web site some membership package to download documents.

I want to give to my customer the possibility to buy a membership plan and after that they can download everything for free for example:

• bronze access - buy 1 hour full access
• silver access - buy 1 day full access
• gold access - buy 1 week full access
• platinum access - buy 1 month full access
• and so on

So if a customer buy the "silver access" he has a free access to full web site for 1 day, when the day expire he need to buy again the package or other package.

Can you give me some solution on how to do that if by programming or by extension?

Thank you


texts: Magento 2.1: Adding Custom Css to Admin Ui Component Form

texts:
I invested a couple of hours to get a solution to figure out , that how can we customize the M2 admin form - for the sake of clarity please see the below screenshot:

The default admin form fieldsets appear in the following fashion:

My goal is to customize it to the one given below in the image:

by adding custom css to the fieldsets..

I found this item :

    <item name="additionalClasses" xsi:type="string">
    admin__field-wide</item>

Can any one suggest how this can be done or what is the proper way of adding custom css to the admin forms.


texts:
i have these codes to show product attributes on product page:

for drop down attributes:

<?php echo $_product->getAttributeText('stock_status') ?>

for other attributes:

<?php echo $_product->getAttributeName() ?>

i want to change these codes to show an assigned image instead of text.


texts: Magento 2 : Bestseller and most viewed product on homepage

texts:
How to get bestseller and most viewed product in homepage Magento 2?

We have to display bestseller and most viewed product list in homepage slider in magento 2.


texts:
How do I access the price in one of the simple products? The following is the beginning of the array I want to access from my var_dump($_product->debug()); (stackoverflow wouldn't let me post the whole thing). I am working on the issue related to this post: https://stackoverflow.com/questions/16703427/magento-retrieve-simple-product-price-for-configurable-product

["_cache_instance_products"]=>
  array(9) {
    ["0 (Mage_Catalog_Model_Product)"]=>
    array(33) {
      ["entity_id"]=>
      string(2) "69"
      ["entity_type_id"]=>
      string(1) "4"
      ["attribute_set_id"]=>
      string(2) "10"
      ["type_id"]=>
      string(6) "simple"
      ["sku"]=>
      string(13) "1001-blu-ven1"
      ["has_options"]=>
      string(1) "0"
      ["required_options"]=>
      string(1) "0"
      ["created_at"]=>
      string(19) "2013-04-02 22:12:27"
      ["updated_at"]=>
      string(19) "2013-04-02 23:54:41"
      ["parent_id"]=>
      string(2) "78"
      ["color"]=>
      string(1) "6"
      ["vendor"]=>
      string(1) "5"
      ["name"]=>
      string(14) "test_1 blue v1"
      ["url_key"]=>
      string(14) "test-1-blue-v1"
      ["msrp_enabled"]=>
      string(1) "2"
      ["msrp_display_actual_price_type"]=>
      string(1) "4"
      ["image"]=>
      string(12) "no_selection"
      ["small_image"]=>
      string(12) "no_selection"
      ["thumbnail"]=>
      string(12) "no_selection"
      ["options_container"]=>
      string(10) "container2"
      ["url_path"]=>
      string(19) "test-1-blue-v1.html"
      ["weight"]=>
      string(6) "0.0000"
      ["price"]=>
      string(6) "1.0000"
      ["status"]=>
      string(1) "1"
      ["visibility"]=>
      string(1) "1"
      ["enable_googlecheckout"]=>
      string(1) "1"
      ["tax_class_id"]=>
      string(1) "0"
      ["is_recurring"]=>
      string(1) "0"
      ["description"]=>
      string(19) "test_1 blue v1 desc"
      ["short_description"]=>
      string(19) "test_1 blue v1 desc"


texts:
I'm trying to figure out the workflow for my redesign on Magento2. I would like a search by model feature ( year, make, model). But instead of having a disorganized list of products, I would like it to open a category with subcategories filled with specific products. Is it something possible?

Ultimately I would push it a step further and have a "build your own" workflow where the client is pushed through each category one after the other and fill up the shopping cart with goodies.I haven't seen something like that out of the box and I don't even know where to start to do it myself.


texts: Site maps are being generated automatically with /pub/media in the URL giving 404 errors

texts:
Our sitemaps are generated automatically daily and split in to 22 files, https://www.oursite.nl/pub/media/sitemap-1-1.xml - https://www.oursite.nl/pub/media/sitemap-1-22.xml
The issue is the links are generated with /pub in the URL which navigates to a 404.

When we regenerate the xml's VIA Marketing > SEO & Search > Site Map they are generated correctly without the /pub https://www.oursite.nl/media/sitemap-1-1.xml

Has anyone else faced this issue? I'm not sure what other information I can post.


texts:
I have a helper from which to add a product through the id. After the product is added, I save some product data (name, price, and image) into an array and return it. But I'm getting the image directly from the product, but I need to get that same image from the magento cache in my specific case.

Helper Code:

public function addCustom($product_id)
{
    // Get customer session
    $session = Mage::getSingleton('customer/session');
    // Get cart instance
    $cart = Mage::getSingleton('checkout/cart');
    $cart->init();
    // Add a product with custom options
    $product = Mage::getModel('catalog/product')->load($product_id);

    $param = array(
        'product' => $product->getId(),
        'qty' => 1
    );
    $request = new Varien_Object();
    $request->setData($param);
    $cart->addProduct($product, $param);
    // update session
    $session->setCartWasUpdated(true);
    // save the cart
    $cart->save();

    $nome = $product->getName();
    $preco = number_format((float)$product->getPrice(), 2, ',', '');
    $media = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getThumbnail());
    $img = $media;

    $dados['name'] = $nome;
    $dados['price'] = $preco;
    $dados['media'] = $media;
    $dados['imagem'] = $img;

    return $dados;
}

From the code $media = Mage::getModel('catalog/product_media_config')->getMediaUrl($product->getThumbnail());
the magento returns the image in my phtml file as follows by the URL:

/media/catalog/product/u/m/uma-flor-alaranjada-com-mensagem-cart_o-14896928_1_2.jpg

But in my case, I need to bring the same image from the cache for resizing issues, through this URL:

/media/catalog/product/cache/1/thumbnail/50x50/9df78eab33525d08d6e5fb8d27136e95/u/m/uma-flor-alaranjada-com-mensagem-cart_o-14896928_1_2.jpg


texts: Make both discount Special Price + Catalog Price Rule

texts:
I setup Catalog Price rule as discount and it works well

but a product which have already special price can not be discount for my catalog price rule

the product just show the special price

How can I make Catalog Price rule also work as additional discount for product have special price?

e.g.) If original price is $100, special price $80, Catalog price rule is discount %10

I want to show $72 (as special price + catalog price rule)

currently the product show only special price $80


texts:
In my observer for core_layout_block_create_after

I am checking

public function addButtonBlock($observer)
    {
        $block = $observer->getEvent()->getBlock();

        if (($block->getAction()->getFullActionName() == 'catalog_product_view') && ($block->getNameInLayout() == 'product.info')) {
            }}

It's working fine on Product View page , while on review list page with the form its giving an error

  PHP Fatal error:  Call to a member function getFullActionName() on
  string in
  /var/www/html/meemee/app/code/community/Tebet/SocialShare/Model/Observer.php
  on line 15, referer: http://localhost/meemee/asd.html

I am able to get an echo for review_product_list  for $block->getAction()->getFullActionName()
but while using it in if condition it throws error


texts: Magento2 What is the difference between uiCollection and uiComponent

texts:
Refer to the file -

vendor\magento\module-ui\view\base\requirejs-config.js

You will see code in map like -

uiCollection:   'Magento_Ui/js/lib/core/collection',
uiComponent:    'Magento_Ui/js/lib/core/collection',

What is the difference between these two and how are they mapped?


texts: This error while editing my product in the backend

texts:
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '0' for key 'PRIMARY', query was: INSERT INTO index_event (type, entity, entity_pk, created_at, new_data) VALUES (?, ?, ?, '2018-05-07 16:07:15', ?)

i am getting this error whenever i am trying to edit any product description?

how do i resolve and what does it mean
?


texts: Magento 2, install security patch without composer

texts:
I download magento 2 and install on my machine. I didn't use composer.
There is any way to install de security patch without using composer?

Thank you


texts:
I try to Export product through magento back end

System-> Import / Export -> Export --> After that i select Procuct

then it shows this error

Call to a member function getName() on a non-object

 protected function _initCategories()
    {
        $collection = Mage::getResourceModel('catalog/category_collection')->addNameToResult();
        /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */
        foreach ($collection as $category) {
            $structure = preg_split('#/+#', $category->getPath());
            $pathSize  = count($structure);
            if ($pathSize > 1) {
                $path = array();
                for ($i = 1; $i < $pathSize; $i++) {
                    $path[] = $collection->getItemById($structure[$i])->getName();
                }
                $this->_rootCategories[$category->getId()] = array_shift($path);
                if ($pathSize > 2) {
                    $this->_categories[$category->getId()] = implode('/', $path);
                }
            }

        }
        return $this;
    }


texts: Magento 2 - How to override admin page.phtml?

texts:
How do I override \magento-root-dir\vendor\magento\module-backend\view\adminhtml\templates\admin\page.phtml? I have successfully overridden the other files by placing the files under \magento-root-dir\app\design\adminhtml\Company\Theme\Magento_Backend\templates, but page.phtml just doesn't override!

I have even tried to change the core phtml file (just to debug stuffs obviously) and it doesn't show my modification. I have run static-content:deploy as well as setup:upgrade but still the same.

Why do I need it?
I want to change the structure of the admin theme which is a requirement for my current project. Particularly, I want to take the sidebar menu out and put a custom header menu instead.


texts: Magento 2 - Add image to category programmatically

texts:
I'm trying to create a web service rest to add an image to category, but I can't find the Model method that allow to do this.

I'm looking for something like

  addImage of Magento\Catalog\Model\Product\Gallery\Processor

for the category.

Thanks


texts: How to allow customers information to be received by multiple emails

texts:
At present magento allowing only one email id to receive information but now I need information to be received by multiple emails is this possible?I made it possible for CONTACTS section by changing the .php file but I cannot able to find the file related to store email address

I want to allow mulitple recipient emails for all the representatives in Store Email Address in admin section(Sales Representative,General Contact,Customer suport)
please find below image.

Please help me,
Thanks.


texts: What is the significance difference in magento1 and Magento 2 controller?

texts: What is the difference between Magneto1 and Magento2 controller in term of the development ?


texts: Magento 2 : Get custom product attribute in minicart

texts: In my magento 2 store I need to return and print a custom product attribute in mini cart for each product in the cart. But it seems data are load using KO js so I have no idea , how to get attribute value please help me


texts: A list of the possible web api shipping method codes for the salesOrderRepositoryV1 GET?

texts:
I am using Magento 2.1.0 web api system to extract new orders from my Magento store and then place them into a 3rd party accounting system. I would like to know what are all of the possible responses for the shipping method.

One of the fields in the salesOrderRepositoryV1 response gives what the customer's selected shipping method is for their order. For example it would output { ups_3ds } to represent the customer selecting UPS 3 day shipping for their order. What are the other codes for the shipping method field (for example what is the code for UPS ground shipping, UPS Next day shipping, etc)

A link to the response schema of the salesOrderRepositoryV1 can be found here

Edited I am not sure how much more detail I can give you all

"shipping": {
      "address": {
        "address_type": "string",
        "city": "string",
        "company": "string",
        "country_id": "string",
        "customer_address_id": 0,
        "customer_id": 0,
        "email": "string",
        "entity_id": 0,
        "fax": "string",
        "firstname": "string",
        "lastname": "string",
        "middlename": "string",
        "parent_id": 0,
        "postcode": "string",
        "prefix": "string",
        "region": "string",
        "region_code": "string",
        "region_id": 0,
        "street": [
          "string"
        ],
        "suffix": "string",
        "telephone": "string",
        "vat_id": "string",
        "vat_is_valid": 0,
        "vat_request_date": "string",
        "vat_request_id": "string",
        "vat_request_success": 0,
        "extension_attributes": {}
      },
      "method": "string",
      "total": {
        "base_shipping_amount": 0,
        "base_shipping_canceled": 0,
        "base_shipping_discount_amount": 0,
        "base_shipping_discount_tax_compensation_amnt": 0,
        "base_shipping_incl_tax": 0,
        "base_shipping_invoiced": 0,
        "base_shipping_refunded": 0,
        "base_shipping_tax_amount": 0,
        "base_shipping_tax_refunded": 0,
        "shipping_amount": 0,
        "shipping_canceled": 0,
        "shipping_discount_amount": 0,
        "shipping_discount_tax_compensation_amount": 0,
        "shipping_incl_tax": 0,
        "shipping_invoiced": 0,
        "shipping_refunded": 0,
        "shipping_tax_amount": 0,
        "shipping_tax_refunded": 0,
        "extension_attributes": {}
      },


texts: Magento 1.9.4.3 - Run php scripts only once

texts:
I describe my situation:

I created a PHP script in the header.phtml file that allows customers to change the group based on their order total. I put this script inside an if and it works perfectly.

In addition to this function, I added the sending of a personalized email that informs the customer of the group change.

The problem is that this PHP code that saves the client group and sends the email executes it every time the page of the site is loaded. I can't put this code online because otherwise the user will receive an email with a group change every time he loads a page.

This is a piece of the code I put in:

$customer = Mage::getSingleton('customer/session')->getCustomer();
$collectionOrders = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('customer_email',$email)->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate));
foreach($collectionOrders as $orders){
        $subTotal += $orders->getSubtotal();
    }
$localeCode = Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getStoreId());
if($subTotal >= 1000){
    //CHANGE CUSTOMER GROUP
    $customer->setData('group_id',9);
    //SET DATE OF THE CUSTOMER GROUP CHANGE
    $customer->setdatagruppo(date('Y'));
    $customer->save();

    //SEND EMAIL FOR CUSTOMER GROUP
    $localeCode = Mage::getStoreConfig('general/locale/code', Mage::app()->getStore()->getStoreId());
    $emailTemplate = Mage::getModel('core/email_template')->loadDefault('customer_status_template',$localeCode);
    $emailTemplateVariables = array('customer_status' => ''.$titleStatus.'','title_status' => ''.$titleStatus.'','customer_status_year' => ''.$customerStatusYear.'');
    $processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);
    $emailTemplate->setSenderName(Mage::getStoreConfig('trans_email/ident_general/name'));
    $emailTemplate->setSenderEmail(Mage::getStoreConfig('trans_email/ident_general/email'));
    $emailTemplate->send($email, $name, $emailTemplateVariables);
}

I would like the change of the group and the sending of the email to be carried out ONLY ONCE, only when the client group is changed for the first time and not every time I load a page of the site.

How would I go about running my php code just once?


texts:
I get the error 'You did not sign in correctly or your account is temporarily disabled'.

I've already run:

php bin/magento admin:user:unlock vixent

or modified the password in database:

UPDATE admin_user SET password = CONCAT(SHA2('my_pass', 256), ':xxxxx') WHERE username = 'vixent';

The problem occurred when Magento asked me to change the password after login but when I clicked on 'Save' button, I got some errors and magento logs out.


texts: Get sub-categories listing of parent in Magento 2 CMS block

texts:
I want to get a list of a parent categories sub-categories, their name, link and image. An example of what I require is below.

I know this can be done using object manager but I understand that is not recommended.

I need to be able to call this in a CMS static block, so I can apply it only in specific categories I choose.

CURRENT CODE (results in a blank page)

    <?php
        //If there are sub categories
        $categories = $block->getCurrentChildCategories();
        $categoriescount = $block->getCurrentChildCategories()->count();
        if ($categoriescount > 0):  ?>

        <?php
            //Loop through categories
            foreach ($categories as $category): ?>

                    <a href="<?php echo $block->getCategoryUrl($category) ?>" class="cat-link"><?php echo $category->getName()?>

                <?php //get category products
                $categoryProducts = $category->getProductCollection();
                   if(count($categoryProducts) <> 1):?>
                <a href="<?php echo $block->getCategoryUrl($category)?>" class="cat-image">
                <?php else:?>
                <?php $product = $categoryProducts->getFirstItem();?>
                <a href="<?php echo $product->getProductUrl()?>" class="cat-image">
                <?php endif;?>

            <?php endforeach; ?>

        <?php else:?>

product not found...

<?php endif;?>

DESIRED RESULT


texts: Magento newsletter delivery speed for 5000 emails

texts:
How much time will magento take to send 5000 emails ? with the default newsletter functionality.
I will be using a private server so i don't think there will be issues regarding the server performances.


texts:
Currently in magento we upload the tax percentage information using a tax class id. However, we note that the tax class ids are changing between local, staging and live servers. As a result, we are not able to upload the product information(containing the tax information along with other product information) using the same csv.

In this regard, I have two questions

Why do the tax class ids change between local, staging and live servers for the same category ? This creates a problem  using the same csv for upload between different installations
Can we upload the tax percentage (say 10%) directly using the csv instead of giving a tax class id and then assigning a tax %age to that tax class id in two steps ?

Any help much appreciated.


texts: Problem with PNG watermarks (with alpha channel transparency)

texts:
When I use watermarks with alpha transparency, final images always has watermarks without transparency as expected. Sometimes it's just white background, sometimes black background.

How to fix this?


texts: Invalid arguments supplied for foreach() in custom phtml magento2

texts:
What is invalid in the foreach in my custom phtml template?

$filters = $helper->getMyFilter();

<?php foreach ($filters as $key => $filter): ?>

I am getting

  Invalid arguments supplied for foreach()


texts: Layout problems with extension when new theme installed

texts:
I've made an extension that requires some dynamically set .js and .css files.  Using the default theme I added them in through a template set in a block in the head like this:

in ...\app\design\frontend\default\default\layout\myextension.xml

<layout version="0.1.0">
   <...>
    <default>
        <reference name="head">
                    <block type="core/template" name="myextension" template="myextension/mymodule/myincludes.phtml" />
        </reference>
    </default>
    <...>
</layout>

Which calls my file located at ...app\design\frontend\default\default\template\myextension\mymodule\myincludes.phtml and declared it in my extension's config.xml thusly:

<config>
    <...>
    <frontend>
    <...>
        <layout>
            <updates>
                <mymodule>
                    <file>myextension.xml</file>
                </mymodule>
            </updates>
        </layout>
    </frontend>
    <...>
    </default>
    <adminhtml>
    <...>
     <layout>
        <updates>
            <myextension>
                <file>myextension.xml</file>
            </myextension>
        </updates>
    </layout>
    </adminhtml>
</config>

This all works wonderfully on the default theme, my template is added to the theme, and the js and css files it calls work perfectly and make me happy.  When I switch to  the theme "flatastic" my "myincludes.phtml" doesn't seem to get added to the head and everything breaks.

I should add that the other parts of my extension seem to work fine even when the layout changes don't.  For example all my admin config options are fine, a controller is still accessible, etc.

I'm new to magento, and assumed that the theme was just overwriting some of the templates I had changed, but i'm calling a completely custom template in a new block.

Am I doing something wrong in the way I add it?

Does a different theme add considerations I don't know about yet?

What should I look for when a theme breaks my layout changes in an extension?


texts:
Trying to change the footer in my transactional Emails from admin interface in Magento 2.

First I click Marketing then, Email Templates then, I add new template then, I choose footer, then I name the template and subject, then I add content and finally save.

I then go to stores configuration then sales then sales Emails and I can choose what I saved but then if I choose my footer I won't be able to choose the actual Email...it's either one or the other.

Ok, then I go back to the marketing section and say I'll just change the existing footer file.

I almost can do this but it makes me save a new file name so I can't just save...you would think I could just change the footer and press save without changing the file name...the footer "supports" the main email along with header...


texts:
I have added a custom checkbox in shipping address section on checkout page, i have used Plugin to observe the checkbox value but it is not returning the checkbox value rather it is simply showing

  subscribe:on

Can anyone suggest. how to get checkbox value.

. I have used below code for displaying the checkbox,

$jsLayout['components']['checkout']['children']['steps']['children']['shipping-step']['children']
                    ['shippingAddress']['children']['shipping-address-fieldset']['children']['newsletter_subscribe'] = [
                'component' => 'Magento_Ui/js/form/element/abstract',
                'config' => [
                    'customScope' => 'shippingAddress',
                    'template' => 'ui/form/field',
                    'elementTmpl' => 'ui/form/element/checkbox',
                    'options' => [],
                    'id' => 'delivery-date'
                ],
                'dataScope' => 'shippingAddress.newsletter_subscribe',
                'label' => $label,
                'provider' => 'checkoutProvider',
                'visible' => true,
                'checked' => true,
                'value' => 1,
                'validation' => [],
                'sortOrder' => 250,
                'id' => 'nesletter-subscribe'
            ];

Please see below for my Plugin to get the Checkbox value,

class ShippingInformationManagementPlugin
{
    protected $quoteRepository;
    protected $logger;
    public function __construct(
        \Magento\Quote\Model\QuoteRepository $quoteRepository,\Psr\Log\LoggerInterface $logger
    ) {
        $this->quoteRepository = $quoteRepository;
        $this->logger = $logger;
    }
    /**
     * @param \Magento\Checkout\Model\ShippingInformationManagement $subject
     * @param $cartId
     * @param \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
     */
    public function beforeSaveAddressInformation(
        \Magento\Checkout\Model\ShippingInformationManagement $subject,
        $cartId,
        \Magento\Checkout\Api\Data\ShippingInformationInterface $addressInformation
    ) {
        $this->logger->info('Nagamani');

        $extAttributes = $addressInformation->getExtensionAttributes();
        $NewsletterSubscribe = $extAttributes->getSubscribe();

        $quote = $this->quoteRepository->getActive($cartId);
        $quote->setNewsletterSubscribe($NewsletterSubscribe);
    }
}


texts:
I'm wondering if there is a way to monitor the progress of a Magento upgrade?

I see that entries are written to var/log/update.log from time to time, but during an web-base upgrade from 2.1.2 to 2.1.6

I find that I am not getting any feedback for many minutes at a time.

(could be as much as 60 min) Not sure of the exact time because the log entries don't match the system time.

In fact the time stamps appear to be within 2 minutes of each other.

Is there anything else I can check to monitor the progress of the upgrade?


texts: How to know which Magento Connect account was used to buy a particular extension?

texts:
I have taken over running a Magento project and there are several paid extensions that were downloaded at some point. How can I find out which Magento Connect account was used to download them? I need to find out what e-mail address was used to buy them so I can manage the upgrade process.

Normally I would expect to see an XML file somewhere in /downloads or something, that would list the associated account that was used to originally download the extension. Or something like that. But I've been looking and I haven't been able to find anything like that. Ideas?

How do I know what Magento Connect account was used to buy our extensions?

Thanks.


texts:
I have a problem with inserting value to wysiwyg editor when editing item in collection. I have this code, but editor still remain null.

 $content = Mage::getModel('news/news')->load($this->getRequest()->getParam('id'));
                        $fieldset->addField('ContentText', 'editor', array(
                            'name'      => 'content',
                            'label'     => Mage::helper('news')->__('Content'),
                            'title'     => Mage::helper('news')->__('Content'),
                            'style'     => 'height:20em;width:70em;',
                            'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
                            'value'     => $content['content'],
                            'wysiwyg'   => true,
                            'required'  => true,
                        ));

when i call

die($content['content']);

I get my requested value


texts: Unable to connect even after changing the values

texts:
I have downloaded a copy of my website and changed the local.xml, username, password and db value to my mamp local, which is localhost, root, root. Deleted my contents in var folder but still i get ,

There has been an error processing your request

i tracedback the error shown under var/report/..... and it says,*a:4:{i:0;s:87:"SQLSTATE[28000] [1045] Access denied for user '[root'@'localhost' (using password: YES)";i:1;s:2652:"#0 * , my other websites on localhost connect with same credentials really well. what else should i look for to debug and make things working??


texts:
I want to list the options box move from view.phtml to default.phtml. Tried to copy and paste

<?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container1', '', true, true) ?>
<?php endif;?>
<?php if ($_product->isSaleable() && $this->hasOptions()):?>
    <?php echo $this->getChildChildHtml('container2', '', true, true) ?>
<?php endif;?>

into default.phtml. But this does not help to show the options on frontend :(


texts:
I'm trying to set shipment extension attributes with the following XML;
    <extension_attributes for="Magento\Sales\Api\Data\ShipmentInterface">
        <attribute code="order_warehouse" />
    </extension_attributes>

When I post the following to it via;
/rest/V1/order/120493/ship
{
  "items": [
    {
      "order_item_id": 718364,
      "qty": 1
    }
  ],
  "notify": false,
  "arguments": {
      "extension_attributes": {
          "order_warehouse": "WAREHOUSE_STOCK"
      }
  }
}

I'm getting the following error;
"message": "Property \"OrderWarehouse\" does not have accessor method \"getOrderWarehouse\" in class \"Magento\\Sales\\Api\\Data\\ShipmentCreationArgumentsExtensionInterface\".",

Any ideas?
EDIT: This is even after running set:up, s:d:c, etc.


texts: Magento SSL - Fonts makes trouble - Please Help!

texts:
I´ve a problem with the SSL in Magento. Firefox says it blocks some content on the site.

My Blocking Tools says this fonts are blocked:

(click screenshot to enlarge)

But I can´t find these fonts with the links in my code.

These links are not "https", where can I edit that?


texts: Customize shipping rates based on product types/ categories in Magento 1.8?

texts:
I have two types of product in my store - one is wines and another is food/ grocery.

The shipping cost for wine is based table rates, while food/ grocery is based on a flat rate.

So when you order a food from my store, I don't want to show you the table rates.

And when you order a wine, I don't want to show you the flat rate as it is always at a lower rate.

But when you order a wine and a food, then you get the table rates.

So, how can I customize the Magento system to do this? Can this be configured in Magento?

When I create a new product, I choose Simple Product as Product Type for Wines. What about food then?


texts: same thumbnail for two different products having different attributes(id,sku,price, stock level)

texts: I am developing online apparel store. our store has only two type products with different ID, price stock level and other attributes but we want the same thumbnail for both products and it does not repeat in store as thumbnail please tell any solution for this because I am new in Magento.


texts: Magento 2 EE getting error when we try to save order from the backend

texts:
I have tried many solutions to fix this core issue. Whenever I am going to edit the order, update shipping or payment method and click on save. I am getting below error
Fatal error: Uncaught Error: Call to a member function getIsMultiShipping() on null in /var/www/html/project/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php:52 Stack trace: #0 /var/www/html/project/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CustomerBalance\Observer\PaymentDataImportObserver->execute(Object(Magento\Framework\Event\Observer)) #1 /var/www/html/project/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CustomerBalance\Observer\PaymentDataImportObserver), Object(Magento\Framework\Event\Observer)) #2 /var/www/html/project/vendor/magento/module-staging/Model/Event/Manager.php(97): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer)) #3 /var/www/html/project/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): Magento\Staging\Model\Event\Manager->dispatch('sales_quote_pay...', Array) #4 /var/www/ht in /var/www/html/project/vendor/magento/module-customer-balance/Observer/PaymentDataImportObserver.php on line 52

I have debugged and came to know that Quote not generated properly. Due to that, I am getting this error. Please let us know if anyone has its solution to fix this issue.


texts:
For my project i do want to add child block to particular widget. Widget is being added via CMS Page. i want to add child block to that widget.

Is it possible ? Magento 1 or Magento 2 any answer acceptable. I just want the concept.


texts: magento2 decrypt problem not getting real value

texts:
I encrypt code id using below code

$this->_encryptor->encrypt($quote->getId())

when I decrypt with below code

$this->_encryptor->decrypt($quoteId);

It is not getting real value for some problem of special character.


texts: Access JavaScript function in PHTML file

texts:
I want to access javascript function in my phtml file on onchange event of select list.
I don't want to use click or change event of Jquery.
Here's my PHTML code
<form method="post" action="https://www.writemypapers.org/order.html" class="calc-form">

Type :
               <select class="form-control" id="type" onchange="calculate.getValueByType();">
                   <option selected value="">Select Type</option>
               </select>

</form>

Here's my script which is my PHTML file

It's giving me error index:546 Uncaught ReferenceError: calculate is not defined


texts: Cannot detect redirect response in Ajax using Prototype.js in Magento

texts:
I'm using Prototype.js to send a post request to a Magento controller. The controller will response a Json data or a redirect e.g. $this->_redirect('*/*/billing');
The issue that it seems the Ajax cannot detect the redirect response. I need to "catch" it then handle the redirect action in JavaScript by using window.location = redirect_url;
Please help me as I don't want a workaround solution such as modifying response behavior in the controller. Thanks so much!.

new Ajax.Request(orderSaveUrl, {
    method: 'post',
    parameters: params,
    onComplete: function (response) {
        window.console.log('success' + response);
    },
    onFailure: function (response) {
        window.console.log('failure' + response);
    }
});


texts: After onepage checkout how to proceed for selected Payment Method

texts:
All the required values are stored in session for the checkout outside Magento and now need to know how to redirect to the payment page or place order using code that can be used outside the Magento.

There might be some session action or some direct url that can be used to proceed to place order with the values inside the session.


texts: Setup Multi-Region Install by Store or Website

texts:
We are building a Magento CE  website with UK, EU and US regions for a single brand and less than 1000 products that may be available in some or all of the regions.

We want to avoid currency fluctuations so we will have separate EURO, GBP and DOLLAR bank accounts per region rather than converting from base currency at cart to region currency.

Is it best to setup our install with 3 separate "websites" under 1 magento installation? Each website to have a separate base currency and each using separate merchant ID so that there is no currency conversion needed per region from viewing/selecting/adding product to cart up to payment and forwarding of funds to relevant currency bank account.

Or is it an option to do this with 3 "Stores" under 1 "Website" under 1 magento installation using solution here?

This is more applicable to the Sagepay payment method we intend to use but we will also use paypal or stripe for payment.


texts: Magento 2 on checkout page shipping section add new address button not showing

texts:
Magento 2 on checkout page shipping section when I'm add new address than  button not showing can any one have idea, how to avoid that one I need always show add new address button.

first time it showing please check attachment

after adding newaddress

I want show always add new address button any one help on this


texts:
I am having a config.xml file in my module Adept/Wallets/etc as -

<frontend>
        <layout>
            <updates>
                <wallets>
                    <file>wallets.xml</file>
                </wallets>
            </updates>
        </layout>
</frontend>

...

    <global>
            <blocks>
                <wallets>
                    <class>Adept_Wallets_Block_Walletrequest</class>
                </wallets>
            </blocks>
    </global>

my layout file wallets.xml  is -

<wallets_index_wallethistory>
        <update handle="customer_account" />
        <reference name="content">
            <block type="page/html" name="walletrequest" template="wallets/wallethistory.phtml" />
        </reference>
    </wallets_index_wallethistory>

I have created block class in  Adept/Wallets/Block/Walletrequest.php

<?php
class Adept_Wallets_Block_Walletrequest extends Mage_Core_Block_Template
{
    public function __construct()
    {  echo "here2"; die;
        parent::__construct();
        $collection = Mage::getModel('wallets/sellerrequest')->getCollection();
        $this->setCollection($collection);
    }

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

            $pager = $this->getLayout()->createBlock('page/html_pager', 'custom.pager');
            $pager->setAvailableLimit(array(5=>5,10=>10,20=>20,'all'=>'all'));
            $pager->setCollection($this->getCollection());
            $this->setChild('pager', $pager);
            $this->getCollection()->load();
            return $this;
    }

    public function getPagerHtml()
    {
            return $this->getChildHtml('pager');
    }
}

I expect to execute this and display message and die when page loads, but it doesn't.
I am not getting what went wrong.

Any help is appreciated.
Thanks.


texts: I don't have My Cart link anymore in the header

texts:
my header looks like this:
My Account     My Wishlist     Log In
Plus: I can't see my cart contents anymore on the right side bar after adding products.

I lately upgraded from 1.6 to 1.8.1 with hellowired.
That theme isn't compatible with 1.8.1 as it seems but I reckon with a few small changes it would work as well.

Does anybody know where to tweak what so that the Shopping Cart links show up?

Thanks


texts: How to reinstall module without any downtime or trigger InstallSchema.php on already installed module?

texts:
I am trying to reinstall a module on Magento ver. 2.2.8 to trigger the InstallSchema.php of a module without any downtime.

My question: Is there a way of reinstalling the module or at least running the install scripts of a module WITHOUT any down-time?

What I tried already:

Attempt 1:

Removed the module reference in the setup_module table by running:

 DELETE FROM `setup_module` WHERE `setup_module`.`module` = 'Dotdigitalgroup_Email'

This caused downtime. Fixed after I ran php bin/magento setup:upgrade to upgrade DB data (run the install scripts).

DOWNTIME with Error (1)

Attempt 2:

Disabled the module first:

php bin/magento module:disable Dotdigitalgroup_Email

And ran php bin/magento setup:upgrade to upgrade DB data (run the install scripts).

Removed the module reference in the setup_module table by running:

 DELETE FROM `setup_module` WHERE `setup_module`.`module` = 'Dotdigitalgroup_Email'

And ran php bin/magento setup:upgrade to upgrade DB data (run the install scripts).

That didn't trigger the install scripts because the module is disabled

After enabling the module:

php bin/magento module:enable Dotdigitalgroup_Email

DOWNTIME with Error (1)

Error (1):

  There has been an error processing your request

  Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.

  The following modules are outdated:

  Dotdigitalgroup_Email schema: current version - none, required version - 2.7.1

  Dotdigitalgroup_Email data: current version - none, required version - 2.7.1


texts:
How to edit custom css In Magento 2 and we using porto theme ?

I'm using this code base theme working

app/design/frontend/vendor_name/theme_name

run below command to set developer mode

php bin/magento deploy:mode:set developer

and clear cache and deploy static-content

php bin/magento cache:clean

php bin/magento setup:static-content:deploy

But porto theme not working


texts:
I'm running into an issue with my product search. When a customer does a search, then clicks on an item, I wind up getting a 522 error. I'm currently using varnish, magento cache, and a CDN.

If I try to open the item from the category page, it opens just fine. But if I try to open it from a search results page, then it errors out.

I get this error using either Like or Fulltext.


texts:
I have a question. If full page is enable and If I  do not metioned below code in my block declareation layout xml file
<arguments>
   <argument name="cache_lifetime" xsi:type="number">3600</argument>
</arguments>

So my custom block will be added in full page cache automatically?


texts: How can I Hide or Show Payment Methods depending upon Shipping Methods?

texts:
Please note that I am using IWD Onepage checkout extension it gives all available Shipping Methods and Payment Methods on one page so I cant use $_POST to fetch shipping methods in this case.

What else can I do to show selective Payment Method based upon a certain Shipping Method?


texts: Magento2 - How to change Product Images?

texts:
I would like to change the images of the Products in Magento2 but since I am new to magento I don't know in which file I should put my images.
Is there a php file to edit or directory where I can put my photos.
Thank you for your answers


texts: Hide simple product on product list page Magento 2

texts:
I have simple products and configurable products on my M2 and i would like to hide child of configurable on product list page but still getting them on the filters part.
If i set 'Not visible individually', i can get them if i go to the configurable product page, but they are remove from the filters, i tried 'catalog' and 'search' visibility but still not conclusive
Is it achievable by a native way or i need to do some customization ?
I have 'Improved configurable products' extension by firebear but i don't think i can achieve that with it.
Thanks for help
Cheers


texts:
After upgrading to Magento 1.9.3 from 1.9.2.4 the product image Uploade button is not working.

When I choose the image and clicks OK the browser just freezes and crashes.
I tried again on Firefox, and gets the message that a script in js/lib/uploader/flow.min.js:2 is not responding.

I run PHP 5.6.27-1 on Ubuntu (So I cant install the html5 upload button from Magento Connect as this does not support over 5.6.25)

EDIT:
It seems that the function can not get the max filesize
(this.file.size / this.flowObj.opts.chunkSize) in this part of the function the chunkSize is 0 and I believe that is the reason for the crashing


texts:
I have a TTFB problem when I access a category where there are configurable products.
How can I minimize that loading time? It is a very powerful server with 32 cores and 64 GB RAM.
The rest of the pages, where there are no configurable products, load correctly (<2sec)


texts: manage products grid doesn't show up(1.12 to 1.14 upgrade)

texts:
I updated magento 1.12 to magento 1.14
here is what I did:

-create new database
-import old 1.12 database into this new database
-install magento 1.14 by using this database
-run the script of url migration
-run re indexing all the data
-remove cache
-remove sessions

I can see grid of attributes but I cannot see the grid of products:
I disabled all modules to see if it is a module conflict but when I did that I hadn't the manage product grid anymore so I think it is a module and a bulit in for magento


texts: Show attribute value which applies to all items in a category

texts:
Let's say I have a shop which  is specialized in organic food but still offers non-organic food. All items have the attribute "organic" with the options "yes", "partially" and "no".

There is a category "coffee". All coffee in my shop is organic. When a user selects the coffee category, the value "yes" for the "organic" filter will not be shown because all items use this value.

I'd like to show this "yes" value because I want to emphasize for the users that all coffee is organic.

Is there a solution for this? Can this configured via the UI? If not, where in the source code can I change this behaviour?


texts:
I'm pretty new to magento, so I've been in the process of adding a custom text box in the admin panel that has to query the mysql db to retrieve a specific value.

So I'm thinking that ajax would pretty much do the job with that, however for some reason when i do the ajax call, and step through the code using the debugger,
i notice that the value being sent through never shows up in the function of the block class.

phtml code:

new Ajax.Request('<?php echo $this->ajaxCheck(); ?>', {
    method:'get',
    parameters:{test_attrib:val},
    onSuccess: function(transport){
        retval = transport.responseText;
   }
});

Block class code:

public function ajaxCheck()
{
    try {
        $tval = $this->getRequest()->getParam("test_attrib");

        if (empty($tval)) {
            Mage::throwException($this->__('Invalid val('.$tval.'). Please check & resubmit.'));
        }
        ....do something with $tval.
        print_r($tval);
    }catch(Exception $e) {
             echo $e->getMessage();
    }
}

If anyone could help with this please.

Thanks for the quick reply guys!

@Raphael at Digital Pianism

As you advised, I made the following changes:

Controller:

class Ctest_Mydev_AjaxControl extends Mage_Adminhtml_Controller_Action
 {
public function AjaxAction(){

    $tval = $this->getRequest()->getParam("test_attrib");

      ..do something with tval.

    $result['retval'] = $tval;
      $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));
}}

in phtml file function:

  var url = '<? echo Mage::helper('adminhtml')->getUrl('ctest/mydev/ajaxcontrol/AjaxAction'); ?>';

 new Ajax.Request(url, {
                method:'get',
           parameters:{test_attrib:val},
           onSuccess: function(transport){

        var response = transport.responseText.evalJSON();
        retval = response.retval;
           }
        });

like I've mentioned in the comment,when I run it through the debugger, I notice that a key value is assigned at the end of the url: ctest/mydev/ajaxcontrol/AjaxAction

and after that nothing appears to happen.
I'm am unsure what it is that I could be missing


texts:
I've written an extension for a customer, who now wishes it to be transferred to their Magento developer account. Have looked around and nothing comes up readily in Google; anyone give me some pointers on how to do this?

Thanks.


texts: Get custom attribute in CatalogInventory module

texts:
So far I have created custom attribute my_custom_attribute and I want to pass this attribute inside Magento/CatalogInventory/Model/StockStateProvider.php and call it like $stockItem->getIsInStock() but I want to get it like $stockItem-getMyAttribute(). Can someone explain me how to do it? Can't really understand how to set this data to get my attribute there

Thank you a lot!


texts: Magento 2 addFieldToFilter check for NULL not working

texts:
What i am doing

->addFieldToFilter('value', array(['eq' => '', array('isnull' => true)]))

What i want in the query - '((value = '' )is NULL)`

Can anyone help me on this

Thanks.


texts: How to get names, IDs and details of my categories without falling in to bad practice?

texts:
It's been commonly accepted you should never use \Magento\Framework\App\ObjectManager::getInstance() I can link sources explaining why if needed. Given this how would I go about getting the names of my categories if I should never use \Magento\Framework\App\ObjectManager::getInstance()? Thanks.

EDIT: I don't just want category names I'd like IDs and various other bits of information for each but names is a good start


texts: How to load less products on the mobile/tablet front page?

texts:
Magento CE 1.9.1
Porto theme

We have way too many products on the front page (it works well for us on the desktop) which is not so good for Mobile users (including mobile phones and tablets).

Is there an easy way to detect a mobile user and load less products for them ?

This is very important for speed and overall mobile user experience.

(it seems now that 70% of customers place orders via a mobile device)


texts: Customer Reset Password not working in magento 2.3

texts:
I am trying to reset my password as a customer. After going to the link received from email when i try to reset my password i am getting this error. See https://prnt.sc/p7ksmr.

Can any one help me in this.

namespace Smartwave\Porto\Model;

class AccountManagement extends \Magento\Customer\Model\AccountManagement
{

private function matchCustomerByRpToken(string $rpToken):CustomerInterface
{
    $this->searchCriteriaBuilder->addFilter(
        'rp_token',
        $rpToken
    );
    $this->searchCriteriaBuilder->setPageSize(1);
    $found = $this->customerRepository->getList(
        $this->searchCriteriaBuilder->create()
    );
    if ($found->getTotalCount() > 1) {
        //Failed to generated unique RP token
        throw new ExpiredException(
            new Phrase('Reset password token expired.')
        );
    }
    if ($found->getTotalCount() === 0) {
        //Customer with such token not found.
        throw NoSuchEntityException::singleField(
            'rp_token',
            $rpToken
        );
    }
    //Unique customer found.
    return $found->getItems()[0];
}

public function resetPassword($email, $resetToken, $newPassword)
{
    if (!$email) {
        $customer = $this->matchCustomerByRpToken($resetToken);
        $email = $customer->getEmail();
    } else {
        $customer = $this->customerRepository->get($email);
    }
    //Validate Token and new password strength
    $this->validateResetPasswordToken($customer->getId(), $resetToken);
    $this->credentialsValidator->checkPasswordDifferentFromEmail(
        $email,
        $newPassword
    );
    $this->checkPasswordStrength($newPassword);
    //Update secure data
    $customerSecure = $this->customerRegistry->retrieveSecureData($customer->getId());
    $customerSecure->setRpToken(null);
    $customerSecure->setRpTokenCreatedAt(null);
    $customerSecure->setPasswordHash($this->createPasswordHash($newPassword));
    /*$this->sessionManager->destroy();
    $this->destroyCustomerSessions($customer->getId());
    $this->customerRepository->save($customer); */
$this->destroyCustomerSessions($customer->getId());
$this->sessionManager->destroy();
$this->customerRepository->save($customer);

    return true;
}

}


texts: What is the use of pagebuilder.widget.initializer on frontend

texts:
vendor/magento/module-page-builder/view/frontend/layout/default.xml

I have checked the above file and see

  <referenceContainer name="after.body.start">
        <block class="Magento\PageBuilder\Block\GoogleMapsApi" name="google.maps.api" template="Magento_PageBuilder::googlemaps.phtml" />
    </referenceContainer>
    <referenceBlock name="head.components">
        <block class="Magento\PageBuilder\Block\WidgetInitializer" name="pagebuilder.widget.initializer" template="Magento_PageBuilder::widget_initializer.phtml" />
    </referenceBlock>


texts: SSL Connect Error on Magento Connect after upgrading to 1.9.2.4

texts:
I'm having problems with Magento Connect again. I'm using Magento 1.9.2.4.

Last year, when using Magento 1.9.2.2, I previously had the "Unknown cipher in list: TLSv1" error when using Magento Connect to install extensions. I used this solution to solve it:

/* $this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1'); */
$this->curlOption(CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);

However, I have since upgraded to 1.9.2.4 (directly from 1.9.2.2), and now I get the error message "SSL connect error" when trying to install any extensions via Magento Connect.

Does anyone have a solution to this problem?


texts: Add additional information to product list item in widget

texts:
I was able to add some additional information to the products in the category and the search-result page with a plugin.
Unfortunately it doesn't work for the widgets (product list widgets, related products etc.).
My di.xml:
<?xml version="1.0"?>
<config>
    <type name="Magento\Catalog\Block\Product\ListProduct">
      <plugin name="add_custom_block" type="MyVendor\MyModule\Plugin\FreeShipping" sortOrder="1" disabled="false" />
    </type>
</config>

My Plugin/FreeShipping.php:
<?php
namespace MyVendor\MyModule\Plugin;

class FreeShipping
{
    public function afterGetProductPrice(
        \Magento\Catalog\Block\Product\ListProduct $subject,
        $result,
        \Magento\Catalog\Model\Product $_product
    ) {
        $shippingperitem=$_product->getShippingPeritem();
        $freeshipping=false;
        $storpickuponly=$_product->getStorepickupOnly();
        if (floatval($shippingperitem)<=0.000001) {
            $freeshipping=true;
        }
        $productId = $_product->getId(); //parent product id..
        $_configChild = $_product->getTypeInstance()->getUsedProducts($_product);
        $getChildId = [];

        foreach ($_configChild as $child) {
            if (floatval($child->getShippingPeritem())>0.000001) {
                $freeshipping=false;
            }
            if ($child->getStorepickupOnly()==true) {
                $storpickuponly==true;
            }
        }
        $shippinginfo="";
        if ($freeshipping==true && $storpickuponly==false) {
            $shippinginfo = "
";
            $shippinginfo .= __("Free shipping");
            $shippinginfo .= "
";
        } else {
            $shippinginfo = "
";
            $shippinginfo .= "
";
        }
        return $result.$shippinginfo;
    }
}

Do I need to specify another plugin for another class?


texts:
How to get Orderd product Sku

$actparterprocost=$totalamount-$commision;
                $collectionsave=Mage::getModel('marketplace/saleslist');
                $collectionsave->setmageproid($item->getProductId());
                $collectionsave->setmageorderid($lastOrderId);
                $collectionsave->setmagerealorderid($order->getIncrementId());
                $collectionsave->setmagequantity($qty);
                $collectionsave->setmageproownerid($seller_id);
                $collectionsave->setcpprostatus(0);
                $collectionsave->setmagebuyerid(Mage::getSingleton('customer/session')->getCustomer()->getId());
                $collectionsave->setmageproprice($price);
                $collectionsave->setmageproname($item->getName());
                if($totalamount!=0){
                $collectionsave->settotalamount($totalamount);
                }
                else{
                $collectionsave->settotalamount($price);
                }
                $collectionsave->setTotaltax($taxamount);
                if(Mage::getStoreConfig('marketplace/marketplace_options/taxmanage')){
                    $actparterprocost=$actparterprocost+$taxamount;
                }
                $collectionsave->settotalcommision($commision);
                $collectionsave->setactualparterprocost($actparterprocost);
                $collectionsave->setcleared_at(date('Y-m-d H:i:s'));
                $collectionsave->save();
                $qty='';

foreach ($collection as $record) {
        $i++;
            if($i<=5){
                if(count($gropoid) && $record->getmagerealorderid()==$gropoid[$i-1]){
                    $i--;
                    $productid=$productid.",".$record->getmageproid();
                    $productname=$productname.",".$record->getmageproname()." X ".$record->getmagequantity();
                    $pprice=$pprice+$record->getactualparterprocost();
                    $userorder[$i]=array('mageproid'=>$productid,
                                            'mageorderid'=>$record->getmageorderid(),
                                            'magerealorderid'=>$record->getmagerealorderid(),
                                            'mageproname'=>$productname,
                                            'actualparterprocost'=>$pprice,
                                            'cleared_at'=>$record->getcleared_at()
                                            );
                }
                else{
                    $productname=$record->getmageproname()." X ".$record->getmagequantity();
                    $productid=$record->getmageproid();
                    $pprice=$record->getactualparterprocost();
                    $groporderid[$i]=$record->getmageorderid();
                    $gropoid[$i]=$record->getmagerealorderid();
                    $userorder[$i]=array('mageproid'=>$record->getmageproid(),
                                        'mageorderid'=>$record->getmageorderid(),
                                        'magerealorderid'=>$record->getmagerealorderid(),
                                        'mageproname'=>$productname,
                                        'actualparterprocost'=>$pprice,
                                        'cleared_at'=>$record->getcleared_at()
                                        );
                }
            }
        }

foreach($_collection as $res){
            $products = Mage::getModel('catalog/product')->load($res['mageproid']);
            $name = $name."
getUrlPath())."' target='blank'>".$res['mageproname']." X ".intval($res['magequantity'])."&nbsp;
";
}


texts: Magento 2: Uncaught Error: Mismatched anonymous define() module

texts:
The error occurred in the require([.

<script type="text/javascript" xml="space">
    // <![CDATA[
        require([  <-- The Error occured here
            'jquery',
            'owlcarousel',
        ], function ($) {
            $(document).ready(function () {
                $("#recent-slider").owlCarousel({
                    loop: false,
                    margin: 17,
                    responsiveClass: true,
                    nav: true,
                    dots: false,
                    responsive:{
                        0:{
                            items: 1,
                            nav: true
                        },
                        1024:{
                            items: 3,
                            nav: true
                        },
                        668:{
                            items: 2,
                            nav: true,
                            loop: false
                        }
                    }
                });
            });
        });
    // ]]>
    </script>

Error: Mismatched anonymous define() module: function(){return function Q(a,o,s){function l(n,e){if(!o[n]){if(!a[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(d)return d(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=o[n]={exports:{}};a[n][0].call(i.exports,function(e){var t=a[n][1][e];return l(t||e)},i,i.exports,Q,a,o,s)}return o[n].exports}for(var d="function"==typeof require&&require,e=0;e


texts: Magento 2: How do I check If custom options exists for product?

texts:
I am inserting custom options programmatically for multiple products from some template where I add options and assign them to products But when I edit those options and assigned it to more products then it double added for previously assigned products.
How can I check if that custom option is already assigned or exists for any product so it will only edit for that product.

I can't add whole code here and yes, I am referring below link but my options are dynamic.
    https://webkul.com/blog/create-custom-option-programmatically-in-magento2/


texts: Magento 2 how to redirect to checkout on ajax submit?

texts:
I'm trying to redirect a form to checkout after clicking ajax submit request.
I'm able to reach the controller, but I can't redirect to checkout.
Here is my code:
 public function execute(){
        $post = $this->getRequest()->getPostValue();
        if($post){
            $this->logger->info(print_r($post));
            $cartUrl = $this->_url->getUrl('checkout/cart/index');
            $this->_responseFactory->create()->setRedirect($cartUrl)->sendResponse();
            exit;
        }
         else{
            $this->logger->info("No data");
         }

    }

It's not redirecting to checkout
I'm using  \Magento\Framework\UrlInterface $url


texts:
http://computercity.com/cryorig-c7-40-5-cfm-cpu-cooler.html

How would I go about moving all the product ordering details:

(availability, quantity, price, submit button)

to the right hand column within the "col-right sidebar col-sm-3" class DIV?

I've attempted editing the template files but have had no success.


texts:
Problem I'm having;

I'm trying to add a Left sidebar navigation but everytime I install an addon to do this it always ends up the top of the page and not the left (as in, under the menu but ABOVE the slideshow I have there). I've tried looking for a layout.xml and cannot find it in my directory anywhere. Very odd.

Thanks,
Stephen


texts: Magento2: How to add multiple fields in single row in magento edit form

texts:
Help me to add the multiple fields in single row of magento 2 edit form backend/admin..

for example:

I have two fields First name & Last Name which I want in same row.


texts: How do I prevent admin changes from getting lost?

texts:
This has happened to me numerous times and it makes me want to dump Magento forever.

I'll be editing a product in the Admin backend, and I spend a good 30 minutes writing up a nice long description. Then I hit save, and it takes me to the page that asks for my username and password. (Evidently my session timed out.) So I enter that info and submit the form.

Now I am taken to my default admin page and all of the changes I made to the product description do not actually get saved but instead get lost forever, costing me tons of work.

For example just now I created a whole new product and filled out all the requisite blanks and when I went to save it, I had to log back in and it retained none of my changes. I cannot work this way. It's infuriating, to say the least.

Please let me know how to lengthen the amount of time sessions last for, or turn on some kind of auto-save feature.


texts:
Is it possible to show the varnish 'Age:' header in production mode. I want to be able to monitor how long our pages are staying in Varnish cache for.

This header is only visible in developer mode on our site at the moment

Thanks


texts: In admin panel on the particular order page (below of page) I have seen this messages mentioned in the screenshot. How can I fix this issue?


texts: Admin UI anomalies when using Chrome browser

texts:
I've used Chrome for years but recently I'm experiencing anomalies that prevent me from using it (or Firefox), I can only effectively administer through IE.

A few examples of the problems in Chrome and Firefox...

The Manage Products list doesn't show the mouse-over highlighting as
I scroll-over the list of products
I cannot click on a row in the list to edit a product, I can only open the product by clicking on the edit link
when I edit a product the details are not shown, when I click on a 'tab' on the left, it doesn't display the form on the right
I see the same behavior for other lists (Customer, Orders, etc.)

Again, Internet Explorer (11.0.28) works fine, but both Chrome (49.0.2623.87) and FireFox(38.6.1) exhibit this behavior.


texts: Echo SKU to product page (from Mageworx Advanced Product Options Suite) M2.3

texts:
Not sure if anyone can help, but basically I am trying to find a way to echo the SKU of the selected custom option (using Mageworx Advanced Product Options Suite) to the product page, either in the current SKU position or underneath the last custom option.

Just wondering if anyone has any solutions?

Any help would be greatly appreciated.

we are using Magento 2.3

Many thanks
Richard


texts: Update prices of all simple products via their configurable product in Magento 2

texts:
I'm new to Magento 2, and understand this is a change from Magento 1.

Example: I have a T-Shirt as a configurable product with colour options as Simple Products. These Simple Products all require the same price.

If I want to update the price of the configurable product (and thus the Simple Product variations) how do I easily do this?
Same question with regards to applying a special price
How would I apply tiered pricing to all Simple Product variants?

As far as I can see, this is only possible via the product catalogue screen: find a way to select all the Simple Product variations of that configurable product then apply a bulk action to change the price / special price. This seems very long-winded and tricky - say I had 50 variations on a product all with different SKUs: even filtering then selecting all of those in the Product Catalogue would be a task.

Therefore, I'm assuming I'm missing something! I'd guess a huge portion (majority?) of users who create configurable products will want to apply a single price to all variations (Simple Products). Simple Products should have the option of inheriting the price from their configurable product.

I believe Magento 1 handled this differently and did use the configurable product's price until explicitly overridden via a Simple Product variation. This seems far more sensible to me... though happy to be educated here!


texts: how to fetch items from varien_db_select to collection

texts:
What is the proper way to fetch items from custom made flat model, from varien_db_select instance?

Like this:

    $col = Mage::getModel('Module/contact_request')->getCollection()
                ->addFieldToSelect(array('entity_id', 'update', 'status'))
                ->addFieldToFilter('product_id', $productId)
                ->getSelect()
                ->order('update DESC'); // $col is varien_db_select instance

All model and resourceModel init files are plain simply with _constructs

Company_Model_Model_Resource_Contact_Request extends Mage_Core_Model_Resource_Db_Abstract so it is basic flat model as it is.

I found basic solution as:

 $rawQuery = $col->__toString();
        $connection = Mage::getResourceModel('core/resource')->getReadConnection('core_read');
        $requestContact = $connection->fetchAll($rawQuery);

But is it how it should be ?

UPDATE

That was simply enough but a bit tricky for me, according to Marius answer it was just required to separate getSelect()->order() from collection as following:

    $col = Mage::getModel('Module/contact_request')->getCollection()
                ->addFieldToSelect(array('entity_id', 'update', 'status'))
                ->addFieldToFilter('product_id', $productId);

    $col =      ->getSelect()
                ->order('update DESC');

and then $col will be collection object instead of varien_db_select


texts:
Magento comes with the Mage_Dataflow_Model_Batch_Abstract class, which has this method:

/**
 * Set batch data
 * automatic convert to serialize data
 *
 * @param mixed $data
 * @return Mage_Dataflow_Model_Batch_Abstract
 */
public function setBatchData($data)
{
    if ('"libiconv"' == ICONV_IMPL) {
        foreach ($data as &$value) {
            $value = iconv('utf-8', 'utf-8//IGNORE', $value);
        }
    }

    $this->setData('batch_data', serialize($data));

    return $this;
}

This abstract class is extended by Mage_Dataflow_Model_Batch_Import (but this method is not changed in that class.)

The problem that I'm having, is that I'm importing from a CSV which is encoded as MS-ANSI. So I have extended Mage_Dataflow_Model_Batch_Import and replaced the setBatchData class to this:

/**
 * Set batch data
 * automatic convert to serialize data
 *
 * @param mixed $data
 * @return Mage_Dataflow_Model_Batch_Abstract
 */
public function setBatchData($data) {
    /*
     * This allows parser classes to explicitly set an input encoding
     * The default is utf-8
     */
    $inputEncoding = $this->getCustomInputEncoding();

    if (!empty($inputEncoding)) {
        if (ICONV_IMPL == '"libiconv"' || ICONV_IMPL == 'glibc') {
            foreach ($data as &$value) {
                $value = iconv($inputEncoding, 'utf-8//IGNORE', $value);
            }
        }

        $this->setData('batch_data', serialize($data));

        return $this;
    }

    return parent::setBatchData($data);
}

The custom input encoding is assigned by the parser class, like this:

$inputEncoding = Mage::getStoreConfig('erp/dataflow_general/input_encoding');
$batchImportModel = $this->getBatchImportModel()
    ->setId(null)
    ->setBatchId($this->getBatchModel()->getId())
    ->setCustomInputEncoding($inputEncoding)
    ->setBatchData($itemData)
    ->setStatus(1)
    ->save();

This seems to do the trick. The problem is that I'm not sure what all is going on under the hood here. For instance, why is ICONV_IMPL set to '"libiconv"' on my Windows test machine, but set to 'glibc' on my Linux server?

The PHP documentation states that Writing implementation-dependent scripts with these constants is strongly discouraged. Should I not be checking ICONV_IMPL here at all then? Why does Magento check ICONV_IMPL?

Edit: I'm using the system's available encodings to select which encoding it can try to convert from, through a system config setting. The options for that config setting are as follows:

public function toOptionArray() {
        if (empty($this->_options)) {
            $this->_options = array('utf-8' => 'utf-8');

            $charSets = trim(shell_exec('iconv -l | grep -i ansi'));
            if (!empty($charSets)) {
                $charSets = explode("\n", $charSets);
                $charSets = str_replace("//", '', $charSets);

                foreach ($charSets as $charSet) {
                    $this->_options[ $charSet ] = $charSet;
                }
            }

            asort($this->_options);
        }

        return $this->_options;
    }


texts: Not showing newly added products in magento

texts: I have import products through magmi, products is imported successfully, but the products are not showing in frontend, please help me.


texts: Modifying the order summary table in the review step of onepage checkout?

texts:
I'm using the default onepage checkout in Magento 1.9.  My application has a customized checkout UI which requires me to "shrink" the order summary table.  Where it the file for this table stored?  Unfortunately, CSS won't do the trick because I need to remove 2 columns and adjust the colspan of the rows in the footer.  Tracing billing.save() after saving the billing form, I followed the code to Mage/Checkout/controllers/OnepageController.php which contains:

 protected function _getReviewHtml()
    {
        return $this->getLayout()->getBlock('root')->toHtml();
    }

But I don't understand how _getReviewHtml() gets the review order summary by grabbing the root block. Can somebody please explain how this results in the html for the order summary table in the review step of onepage checkout and how can I modify the structure of the table?


texts: Authorize only Authorizing Transaction instead of Authorizing & Capturing

texts:
On a fresh 2.3.3 install,

I am having an issue where despite setting "Authorize & Capture" under the Authorize Payment method (not Directpost), only the "Authorize" step is being executed; no invoice is being created and so we have to capture funds by hand. Obviously with a large store, this is not sustainable.

Indeed, when looking at the request in our payment log, we see authOnlyTransaction as our transactionType.

Is this a known bug in 2.3.3 or is there something about the products or our configuration that appears to be incorrect?


texts:
I purchased a theme off of TemplateMonster the install instructions are pretty straight forward - move app folder into your store root directory and enable the theme.  So I did that and the theme showed fine in the design configuration settings the issue I'm having is I'm unable to see the "TemplateMonster"  heading under store configuration that has options for things like the megamenu and other plugins that come with the theme.  The documentation doesn't really have any kind of FAQ/Troubleshooting I've logged a ticket with the developer however just wanted to see if anyone else has a quick fix for this.

After moving the theme files to root directory 2 new themes show in my design config - "TemplateMonster Theme"  and "TemplateMonster Framework"  my guess is that the framework stores all the plugins etc. however not sure where to go from here.

Thanks,
Max


texts: Variations- Creating A Unique URL for Variations

texts:
I'm trying to get variation products to Google Shopping and per their requirement, I need either static URLs for the child sku's or have the variation attribute preselected in the parent page.  How do I do this?

Thank you for your help!


texts: Magento2.3 - Many Magento core modules are disabled when deploying on test sites

texts:
I recently upgraded my site from Magento2.2.3 to 2.3.3.

As everyone knows, when upgrading, Inventory module will be disabled, but when I checked, many other modules are disabled, even though I use config.php.dist to enable the module, but I did not disabled them.  Has anyone ever encountered this case?

List Module:

Magento_AdminAnalytics
Magento_AmqpStore
Magento_AuthorizenetGraphQl
Magento_BraintreeGraphQl
Magento_GraphQl
Magento_EavGraphQl
Magento_CatalogInventoryGraphQl
Magento_CatalogPageBuilderAnalytics
Magento_CatalogPageBuilderAnalyticsStaging
Magento_StoreGraphQl
Magento_CardinalCommerce
Magento_CheckoutAddressSearch
Magento_CheckoutAgreementsGraphQl
Magento_CmsGraphQl
Magento_CmsPageBuilderAnalytics
Magento_CmsPageBuilderAnalyticsStaging
Magento_CmsUrlRewriteGraphQl
Magento_CatalogGraphQl
Magento_CustomerBalanceGraphQl
Magento_CustomerGraphQl
Magento_DirectoryGraphQl
Magento_DownloadableGraphQl
Magento_BundleGraphQl
Magento_QuoteGraphQl
Magento_GiftCardGraphQl
Magento_GoogleShoppingAds
Magento_UrlRewriteGraphQl
Magento_GraphQlCache
Magento_GroupedCatalogInventory
Magento_GroupedProductGraphQl
Magento_AuthorizenetAcceptjs
Magento_MsrpConfigurableProduct
Magento_MsrpGroupedProduct
Magento_PaypalGraphQl
Magento_BannerPageBuilderAnalytics
Magento_GiftCardAccountGraphQl
Magento_RelatedProductGraphQl
Magento_RewardGraphQl
Magento_RmaGraphQl
Magento_SalesGraphQl
Magento_BannerPageBuilder
Magento_Elasticsearch6
Magento_SendFriendGraphQl
Magento_StagingPageBuilder
Magento_ConfigurableProductGraphQl
Magento_SwaggerWebapi
Magento_SwaggerWebapiAsync
Magento_SwatchesGraphQl
Magento_CatalogStagingPageBuilder
Magento_TaxGraphQl
Magento_CheckoutAddressSearchGiftRegistry
Magento_ThemeGraphQl
Magento_Tinymce3
Magento_Tinymce3Banner
Magento_CatalogUrlRewriteGraphQl
Magento_AuthorizenetCardinal
Magento_VaultGraphQl
Magento_WebapiAsync
Magento_ElasticsearchCatalogPermissions
Magento_WeeeGraphQl
Magento_PageBuilderAnalytics
Magento_WishlistGraphQl


texts: How to place order through rest API magento 1

texts: I want to place an order as a guest user through rest API in Magento 1.Can anyone help me on this?


texts: Magento 2.2: Order, Invoice, and Shipment do not display in admin grid

texts:
I added a product to the cart and create order. It displays properly on the front side in "My Order" tab.

But, when I checked in admin side order grid, then records not updated in order grid.

I have also do reindexing and flush cache and also async indexing is disabled. But, there is no any luck working.

  Note: When I create invoice or shipment of the previous order, then it's also not created in admin side. But, it's recorded in the database table is already available. Only not display in order grid.

admin/sales/order/view/order_id/`<previous_order_id>`/key

If direct change by order_id, then it'll display. But, record not display in order grid.

The same issue occurred in invoice and shipment.

How to solve it?

Please help me.


texts: Want to add field in group price table in magento 1.9.0.1

texts:
I need to add new field in group price table (catalog_product_entity_group_price) currently I am in

app/design/adminhtml/default/default/template/catalog/product/edit/price/group.phtml

I have done all related work here but not sure what I need next.
in above mentioned table i have created the field name: percent with same price type.
added field in form

+ '<input class="<?php echo $_htmlClass; ?> " type="text" name="<?php echo $_htmlName; ?>[{{index}}][percent]" value="{{percent}}" id="group_price_row_{{index}}_percent" onblur="update_percent(group_price_row_{{index}}_price, group_price_row_{{index}}_percent, Pro_Price)"/>	'

plus

var groupPriceControl = {
    ......

        <?php if ($_readonly): ?>
        if (arguments.length < 3) {
            return;
        }
        <?php endif; ?>
        var data = {
            website_id: '<?php echo $this->getDefaultWebsite(); ?>',
            group: '<?php echo $this->getDefaultCustomerGroup(); ?>',
            price: '',
            percent: '',
            readOnly: false,
            index: this.itemsCount++
        };

        if(arguments.length >= 3) {
            data.website_id = arguments[0];
            data.group = arguments[1];
            data.price = arguments[2];
            data.percent = arguments[3];
        }
        if (arguments.length == 5) {
            data.readOnly = arguments[4];
        }

        ........

        $('group_price_row_' + data.index + '_percent').value    = data.percent;
        ........

};

also

<?php foreach ($this->getValues() as $_item) : ?>
groupPriceControl.addItem('<?php echo $_item['website_id']; ?>', '<?php echo $_item['cust_group']; ?>', '<?php echo sprintf('%.2f', $_item['price']); ?>', '<?php echo sprintf('%.2f', $_item['percent']); ?>', <?php echo (int)!empty($_item['readonly']); ?>);
<?php endforeach; ?>

all other feature working fine and if i give fixed value of percent in above then it show but nothing save any value of percent in database all other working is fine for group price.Please guide someone what i need next show percent value save in database and also i can read from database?
Thanks


texts:
I am trying to upgrade magento 1.5.0.1 to 1.9.3.10 but I am getting the following error every time. I tried going to 1.6.2 as a test but having the same issue:

Error in file: "/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php" -
SQLSTATE[42000]: Syntax error or access violation: 1171
All parts of a PRIMARY KEY must be NOT NULL;
if you need NULL in a key, use UNIQUE instead

I've run the DB repair script against a vanilla 1.5.0.1 and all is fine.

Has anyone come across this issue before?


texts: I have developed a custom script to place orders in Magento. How can I apply a gift card to cart (quote) programatically? I can't see any related code.


texts: How to align the ul li perfectly columnwise?

texts:
My menu is like this:

Here is my css code:

 .nav-primary {
    position: absolute;
    display: block;
    margin-top: -85px;
}
.nav-primary li.level0, .nav-primary a.level0 {
    display: inline-block;
}
.nav-primary li {
    position: relative;
}
.nav-primary li.level0 > a {
    color: #70583a;
    margin-top: -5px;
    padding-top: 5px;
    font-family: trebuchet MS;
    font-size: 15px;
}
.nav-primary a {
    position: relative;
    display: block;
    line-height: 30px;
}
.nav-primary li.level0 ul {
    position: absolute;
    display: none;
}
.nav-primary li.level1 {
    padding: 10px;
    float: left;
    font-size: 15px;
    border-right: 1px solid #eae4da;
}
.nav-primary li.level0 li.parent > a {
    position: relative;
}
.nav-primary li.level1 ul {
    display: block;
    position: relative;
}
.nav-primary li.level0 ul {
    position: absolute;
    left: 0;
    z-index: 10;
    display: none;
}
.nav-primary li.level0 li.parent > a {
    position: relative;
}
.nav-primary .menu-active > ul.level0 {
    width: 655px;
    max-width: 740px;
}
.nav-primary .menu-active > ul.level0, .nav-primary li.level0 li.sub-menu-active > ul {
    display: block;
}

I want the submenu8 to be exactly aligned under submenu1.I need that kind of alignment. How to do that Please help.


texts: How do i add new order statuses in the dropdown other then "Pending"

texts:
I tried going through these steps here but it didn't seem to work. I want Check / Money order to have a default status as processing instead of pending.

Enterprise/Commerce 2.2.6

STEP 1

Go to System -> Order Statuses

Click - Create New Status

Status code enter 'pendingcheque'

Status Label enter 'Pending Cheque Payment' (Or whatever you want it to say)

Save the Status

STEP 2

Go to System -> Order Statuses

Click - Assign status to the state

Select your new created status from the drop down

Select 'New' from the Order State drop down

STEP 3

Go to System -> Configuration

Click Payment Methods on left

Select Check/Money Order

Your new Order Status should now be available in the New Order status Drop Down.

The above steps were from this post: "Pending Payment" status for Check/Money Order payment method

When i change it "new" in the DB it creates processing in the dropdown like so:

Unfortunately, i believe that's going to make every order go straight to processing which is not the desired outcome. Also there is only one status now which is processing. There has to be a way to append more than one status and be able to select which one you want. Otherwise why would they of created these as dropdowns.


texts: Magento 2 : About us page is not displaying on front end

texts:
I added about us page using content -> pages option, Page has been created but in front end I can't able find any link to access that page.

I directly access through the url (localhost/home/about-us) it works well.

Can anyone help me to fix that issue.


texts:
I am trying to save form submitted details to database in magento2 but it is not working. i have tried different options that given by stackoverflow answers but none of them works for me.
my controller file is given below

<?php
/**
 *
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
namespace Suyati\Scontact\Controller\Index;

class Post extends \Suyati\Scontact\Controller\Index
{
    /**
     * Post user question
     *
     * @return void
     * @throws \Exception
     */
    public function execute()
    {
        $post = $this->getRequest()->getPostValue();
        if (!$post) {
            $this->_redirect('*/*/');
            return;
        }

        $this->inlineTranslation->suspend();
        try {
            $postObject = new \Magento\Framework\DataObject();
            $postObject->setData($post);

            $error = false;

            if (!\Zend_Validate::is(trim($post['name']), 'NotEmpty')) {
                $error = true;
            }
            if (!\Zend_Validate::is(trim($post['comment']), 'NotEmpty')) {
                $error = true;
            }
            if (!\Zend_Validate::is(trim($post['email']), 'EmailAddress')) {
                $error = true;
            }
            if (\Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) {
                $error = true;
            }
            if ($error) {
                throw new \Exception();
            }

            /*$objectManager = \Magento\Framework\App\ObjectManager::getInstance();

            $Format = $objectManager->create('Suyati\Scontact\Model\Contacts');
            $Format->setName(trim($post['name']));
            $Format->setEmail(trim($post['Email']));
            $Format->save();*/

            $model = $this->_objectManager->create('Suyati\Scontact\Model\Contacts');
            $model->setData($post);
            $model->save();
            $storeScope = \Magento\Store\Model\ScopeInterface::SCOPE_STORE;
            $transport = $this->_transportBuilder
                ->setTemplateIdentifier($this->scopeConfig->getValue(self::XML_PATH_EMAIL_TEMPLATE, $storeScope))
                ->setTemplateOptions(
                    [
                        'area' => \Magento\Backend\App\Area\FrontNameResolver::AREA_CODE,
                        'store' => \Magento\Store\Model\Store::DEFAULT_STORE_ID,
                    ]
                )
                ->setTemplateVars(['data' => $postObject])
                ->setFrom($this->scopeConfig->getValue(self::XML_PATH_EMAIL_SENDER, $storeScope))
                ->addTo($this->scopeConfig->getValue(self::XML_PATH_EMAIL_RECIPIENT, $storeScope))
                ->setReplyTo($post['email'])
                ->getTransport();

            $transport->sendMessage();
            $this->inlineTranslation->resume();
            $this->messageManager->addSuccess(
                __('Thanks for contacting us with your comments and questions. We\'ll respond to you very soon.')
            );
            $this->_redirect('scontact/index');
            return;
        } catch (\Exception $e) {
            $this->inlineTranslation->resume();
            $this->messageManager->addError(
                __('We can\'t process your request right now. Sorry, that\'s all we know.')
            );
            $this->_redirect('scontact/index');
            return;
        }
    }
}

Resource model

<?php

namespace Suyati\Scontact\Model\Resource;

class Contacts extends \Magento\Framework\Model\Resource\Db\AbstractDb
{
public function _construct()
{
    $this->_init('suyati_contacts', 'contacts_id');
}
}

Resource collection

<?php

namespace Suyati\Scontact\Model\Resource\Contacts;

class Collection extends \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection
{
public function _construct()
{
    $this->_init('Suyati\Scontact\Model\Contacts', 'Suyati\Scontact\Model\Resource\Contacts');
}
}


texts: Magento 2 Website Payments Pro Hosted Solution - "Pending Payment" order is created before completing the checkout process

texts:
I have a big issue with the PayPal Pro Hosted Solution on my Magento 2 store regarding the PayPal Pro Hosted Solution. Order is being created as soon as user clicks on "Continue" in the checkout process and not after the payment is complete.

Apparently, this is the desired behaviour, however, I do not want to accept this behaviour.

Preconditions:
Magento 2.2.8
PHP 7.0
Website Payments Pro Hosted Solution

Steps to reproduce:
Add item to cart
Go to checkout
Select PayPal Pro Hosted payment method
Click on "Continue" button

(My) Expected result:
The order is NOT created at this stage until the payment is complete.

Actual result:
Order with status of "Pending Payment" is created and if the user refreshes the page or goes back to catalog, the cart is empty (because the order is already created)

Anyone has a same problem or know how to fix this issue? I want the order to be created AFTER the payment was made and I want the user to be able to go back to catalog with their items remaining in their cart.


texts: Magento catalog price rules discount doesn't work with products with custom options

texts: We have added several catalog price rules in our magento stores, but it seems that they don't get applied with additional costs that we set inside products with custom options, but they only work with standard product price, is there a way to fix this? thanks


texts: Checkout Page List Item Add Custom Attribute

texts:
We have a custom product level attribute created in the Catalog. Whenever product added to the Cart, using events/Observer, I could bring down the custom attribute value to Quote.item. Now I need to display that value (if present) in the Checkout Page List View.  Any idea how to do that ?

**

  our Custom Attribute/Div needs to apprear right after Size:

**


texts: How to show the download link in grid in backend (without ui component ) in magento 2

texts:
I have custom grid and front end form in my module.

The form is submitted via frontend and saved in DB.

I am showing all the records in backend grid.

One of its field is file uploder field.

While submitting the form , I have save the uploded files in below folder path

**pub/media/myfolder/example.pdf**

And i also saved the path of the file in DB.

Now i wish to show the download link of the pdf file in admin grid.

Please provide me a solution how to add download link in admin grid

The below one is a resume uploder field

$this->addColumn(
            'resume', [
                'header' => __('Resume'),
                'index' => 'resume'
            ]
        );


texts: Magento 2: How to track list of event generated in checkout order placed?

texts:
How to get list of all events are executed where magento place order in checkout page?
Get the list of all events step by steps.
Any tools we can observe which event fire first and which events are used at that steps?


texts: How to get the applied custom discount amount in observer?

texts:
I followed the steps in the below link to apply custom discount

[https://magento.stackexchange.com/a/93349/21007][1].

But I need to get the applied custom discount amount in the observer
event of checkout_onepage_controller_success_action.

how to achieve this?


texts:
In file html i write

...

In file js i have
checkPaymentPage: function(){
    console.log(1);
}

But when i call and reload it not console.log(1). How can i call it? Please help me!


texts: How to remove header from the curl response

texts:
Is that any way to remove headers from the cURL response..

My code is,

$curl = new Varien_Http_Adapter_Curl();
$curl->setConfig(array('timeout' => 30));
$url = "http://example.com/";
$curl->write(Zend_Http_Client::GET, $url, '1.0');
$data = $curl->read();
if($data == false)
{
    echo false;
}else{
    $data = preg_split('/^r?$/m', $data,2);
    print_r($data);
}
$curl->close();

And my output is,

Array ( [0] => HTTP/1.1 200 OK Date: Wed, 24 Jun 2015 09:33:56 GMT Server: Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.19 X-Powered-By: PHP/5.5.19 Set-Cookie: ci_session=a%3A5%3A%7Bs%3A10%3A%22session_id%22%3Bs%3A32%3A%227d93b2c24eaeb72c3c449d3e953dd81e%22%3Bs%3A10%3A%22ip_address%22%3Bs%3A9%3A%22127.0.0.1%22%3Bs%3A10%3A%22user_agent%22%3Bb%3A0%3Bs%3A13%3A%22last_activity%22%3Bi%3A1435138436%3Bs%3A9%3A%22user_data%22%3Bs%3A0%3A%22%22%3B%7Db4227a2043de07a5fb1417f9014db30720c8c928; expires=Wed, 24-Jun-2015 11:33:56 GMT; Max-Age=7200; path=/ Content-Length: 1053 Content-Type: text/html Array ( [0] => stdClass Object ( [id] => 1 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [1] => [1] => stdClass Object ( [id] => 2 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [2] => stdClass Object ( [id] => 3 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [3] => stdClass Object ( [id] => 4 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [4] => stdClass Object ( [id] => 5 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [5] => stdClass Object ( [id] => 6 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) [6] => stdClass Object ( [id] => 7 [mobile_image] => ./admin_styles/image/mobile_app/accomodation.jpg ) ) )

And I want to remove the headers in the output..
is that any default function  to remove curl headers in magento like CURLOPT_HEADER in php

Thanks


texts: Notify user with email if order has been pending for 2 days

texts:
What i need to do is this:
I need to send an email to the customer

if his order has been pending (or some other custom status) for two days and

cancel the order if this time becomes 3 days.

The email has to have the order and a custom message.

I have found this http://inchoo.net/magento/cancel-pending-orders/ but need some help with the email sending part.

Any help is appreciated.


texts: Refresh time stamp on product view (Magento)

texts:
I need to reload the data within a DIV, I am using a time stamp for testing purposes.

The code I have appears to work outside of Magento So I cannot see why it is not working on my Magento Site.

I am trying to achieve this using jQuery using the following:

jQuery(document).ready(function(){
  setInterval(function(){
    jQuery('#bopa').load();
  },3000);
});

The HTML is:

<div id="bopa">
<?php $datee = new DateTime(); echo $datee->format('H:i:s') . "\n";?>
</div>

Does anyone know why this isn't working?


texts: I'm developing the magento2 plugin(I'm kinda new in magento2), and I ran into a problem with validation the field in system.xml. I've been searching for a long time and did not find the answer. I added a new field but I need to validate this field using the regex. I saw that there is a some default validation but I need custom one, is there any way to add a new validation rule to validator?


texts: Magento 2 - Visual Merchandiser rebuild automatically

texts:
I'm using Magento Visual Merchandiser to create smart categories. I created conditions to add products into my smart categories, but if I update product attributes value, the products didn't add automatically into my smart categories. I should go in the specific smart category and save it. It's possibile to "rebuild" these categories automatically? I thought that with indexes this behavior was as default :(

I also tried to create a dependency between catalog_category_product (Category Products) and catalog_product_attribute (Product EAV), but not working:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
    <indexer id="catalog_category_product">
        <dependencies>
            <indexer id="catalog_product_attribute"/>
        </dependencies>
    </indexer>
    <indexer id="amasty_xsearch_category_fulltext">
        <dependencies>
            <indexer id="catalog_product_attribute"/>
        </dependencies>
    </indexer>
</config>