texts: Show Attribute selection upon button click only when prior attribute selected

texts:
The following is edited code from the configurable products block on the detail page of each configurable product. It is the block that populates with the select drop downs such as "color". I am working on a unique project where there will be a specific vendor attached to each simple product.

<?php
$_product    = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
?>

<?php if ($_product->isSaleable() && count($_attributes)):?>

    <?php foreach($_attributes as $_attribute){ ?>
                <div id="<?php echo $_attribute->getLabel() ?>Box" class="attributeBox">

*<?php echo $_attribute->getLabel() ?>

                    <dd<?php if ($_attribute->decoratedIsLast){?> class="last"<?php }?>>

                            <select name="super_attribute[<?php echo $_attribute->getAttributeId() ?>]" id="attribute<?php echo $_attribute->getAttributeId() ?>" class="required-entry super-attribute-select">
                                <option><?php echo $this->__('Choose an Option...') ?></option>
                              </select>

    <?php }?>
    Show Vendors

    <?php

    $product_id = $_product->getId();
    $attrValue = Mage::getModel('catalog/product')->load($product_id)->getAttributeText('color');  ?>

<?php endif;?>

I have the vendor select options hidden until "Show Vendors" is selected. I do NOT want "Show Vendors" to be clickable until the last option is selected.
Therefore, what I am having trouble with currently is retrieving the value of the selected option. I am trying to retrieve it here:

<?php

        $product_id = $_product->getId();
        $attrValue = Mage::getModel('catalog/product')->load($product_id)->getAttributeText('color');  ?>

I am then sending it to a javascript function to print to console. I am only getting the value "false". Any ideas?


texts: Magento 2.3.4 - Configurable products auto select first option

texts:
On my clothing store, when I enter on product page of a configurable item, I need to auto-select the first option for color (swatch attribute).
I found this solution:
How to make auto select first child product of configurable product in magento2?
BUT don't works on Magento 2.3.4 because this file was removed!
--> module-swatches/view/frontend/web/js/SwatchRenderer.js
Anyone can help me?


texts: All code intelligence in Block and nothing in Controller?

texts: Is it a good practice in Magento CE 2.1 to put all code intelligence of a module in Blocks and leave the Controller almost empty ?


texts:
I have faced some connection issue "Synchronisation mit Webshop nicht möglich" with Magento connector module (https://github.com/jtl-software/connector-magento1). Also, I have configured the shop URL with JTL customer center too.
So, could anyone please suggest to resolve the issue with Magento connector module.

Thanks in advance.


texts: Magento 1.9 does not render Google Maps Api in template

texts:
I am trying to render Google Map on my custom page. I have template that renders smth but it does not render map.

But I've discovered strange thing (for me) if echo smth in controller between

$this->loadLayout(); echo 'asd'; $this->renderLayout();

IndexController.php

class Stas_Offices_IndexController extends Mage_Core_Controller_Front_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        echo 'asd';
        $this->renderLayout();
    }
}

Template:
officesmap.phtml (MY_API_KEY = my google api key)

asd

Layout:
app/design/frontend/base/default/layout/stasoffices.xml

<layout version="0.1.0">
<offices_index_index>
    <reference name="content">
        <block type="stasoffices/officesmap" name="stas.offices.officesmap" template="stas/offices/officesmap.phtml"></block>
    </reference>
</offices_index_index>

This is what I see when I echo'123'; in Controller

And this is when there is no echo'123'; in Controller

The only difference I understood that scripts with API include earlier when echo'123'; in Controller

Could anyone please explain me why this happens and how to render map without this ugly "echo" in controller! Thank you.


texts:
Iam geting the following error:

  PHP Fatal error:  Call to a member function getFullActionName() on
  null in
  /app/code/community/MageWorx/CustomOptions/Model/Catalog/Product/Option.php
  on line 1627

And the Line#1627 is :

$action = Mage::app()->getFrontController()->getAction()->getFullActionName();

Would be great if anyone can provide me the solution to this error.
Thanks


texts: Magento 2 magmi Column not found: 1054 Unknown column 'curw.product_id' in 'on clause' -

texts: Facing issue in product import when using   On the fly indexer v0.2 plugin:


texts: region Id error on updating address using address Id in magneto2

texts:
I followed below link to update address using address id

Update customer address using address id in magento 2

I am getting this error upon executing this code

protected $addressRepository;

public function __construct(
\Magento\Customer\Api\AddressRepositoryInterface $addressRepository
 ) {
$this->addressRepository = $addressRepository;
}

public function changeAddress($addressId)
{
  $AddressId = 381993;

if(isset($AddressId) && $AddressId !=''){
            try{
                $address = $this->addressRepository->getById($AddressId);
                $address->setFirstname('test');
                $address->setLastname('test');
                $address->setCountryId('GB');
                $address->setRegion()->setData(array('region' => 'test'));
                $address->setPostcode('t9 1rd');
                $address->setCity('test');
                $this->addressRepository->save($address);
             }catch(\Exception $e){
               print_r($e->getMessage());
             }

            }
   }

I am getting this error upon using this code

  "message": "Invalid value of \"1\" provided for the regionId field.",

I tried

   $address->setRegion(); also same error again

What is the mistake in above code? Please anyone help me.


texts: Magento 2 : change layout of catalogsearch module in design section

texts:
Magento 2.1.7

Just only want to change layout structure of a catalogsearch/result/index module, from 2columns-left to 1column.

For which i copied layout file and made necessary changes and put it into the below location -

/app/design/frontend/<Namespace>/<ThemeName>/Magento_CatalogSearch/layout/catalogsearch_result_index.xml

Let me know please if i am doing any thing wrong

Thanks in advance


texts: How can create upload Grid/ form in admin in magento 2

texts: I want to upload folder of Product images through admin, so how can I create Upload option in admin?


texts:
I did a sort for product by price through API:

  http://domain.com/index.php/rest/V1/search?searchCriteria[requestName]=quick_search_container&searchCriteria[filterGroups][0][filters][0][field]=search_term&searchCriteria[filterGroups][0][filters][0][value]=%25life%25&searchCritseria[sortOrders][1][field]=price&searchCriteria[sortOrders][1][direction]=DESC&searchCriteria[currentPage]=1&searchCriteria[pageSize]=100

But there is no sort any help?


texts: Magento2: extension import products .xml file

texts:
I am looking for extension which I can import products to website via .xml file feed and live update by cron.

Any suggestion ?


texts: Override footer content with custom cms blocks?

texts:
Is there a way to "delete" all current footer content, and put a single cms block in there?

I want to manage all its content in a simple cms block.
Designing a custom footer seems to be very complicated when using the regular xml.


texts: How to display layout for static block pages for magento1.9.1?

texts: i created static block pages like about us, contact us and banner. But the storeview can not display, So please help me how to add layout for all static block pages...how to display storeview tab in static block page creation


texts: Different layout for different action controller

texts:
I created a module that add a link inside customer account navigation. My controller is like this

public function indexAction() {
    $this->loadLayout();
    $this->renderLayout();
}

public function testAction() {
    $this->loadLayout();
    $this->renderLayout();
}

If I go to /customer/mymodule/index I can see correctly the layout with my own .phtml specified inside the .xml.

Now I would like to assign to customer/mymodule/test another file .phtml with always the left account customer navigation as inside the index action.

Thanks


texts:
Creating (or say extending) an API where customer can login by Facebook/Google so I want get the same token which magento generates (same as if we login normally).

Reason is that if I will get that token then same I can use to access the other APIs (which magento has already developed)..

Is there anybody having idea ??
except Password I can give all the customer information..


texts: Move products and attributes from 1.4 db dump

texts:
I have a db dump from an old magento installation.

From this I would like to move all products and attributes.

The db dump was taked from a 1.4 instllation and it will be going to a 1.7

This is not an upgrade, i want to move the data between databases.

Can anyone offer advice on how to do this.


texts:
I want to call my observer after the adminhtml_cache_refresh_type event and specifically after full_page
This method does not work, is there a way to do this in observer?
<event name="adminhtml_cache_refresh_type" type="full_page">


texts: How to submit form using other controller in Magento 2

texts:
I have a form in phtml file. There are 2 fields in that username and password. I want to set that username and password value from other controller and submit that form.
I tried using this below way :
$this->request->setPostValue('username','admin');
$this->request->setPostValue('password','admin@123');

But, Still I can't receive value in $this->getRequest()->getPost('username');
How can i do that?
Any help would be appreciated.
Thanks.


texts:
I want to get parameters from my page to the second. My values are submitted in the first page, but I can't achieve to get data on my second page (where I want to display theses data). I'm trying this from one controller to another.

Here's history.php (first controller)

public function execute()
    {

        if ('POST' == $this->getRequest()->getMethod()) {

            $detailCommande = $this->getRequest()->getPost('detailCommande');
//            var_dump($detailCommande);

            if ($detailCommande != '') {
                $this->_redirect('recapitulatif/order/recapitulatif', array('_secured' => true, 'detailCommande' => $detailCommande));
            }

        }

        /** @var \Magento\Framework\View\Result\Page $resultPage */
        $resultPage = $this->resultPageFactory->create();
        $resultPage->getConfig()->getTitle()->set(__('My Orders'));

        $block = $resultPage->getLayout()->getBlock('customer.account.link.back');
        if ($block) {
            $block->setRefererUrl($this->_redirect->getRefererUrl());
        }
        return $resultPage;
    }

The second controller (where I want to display)

public function execute() {

$post = $this->getRequest()->getPostValue();

echo "<pre>";
print_r($post);
exit;

$this->_view->loadLayout();
$this->_view->renderLayout();
}

I have 2 more questions, is that possible pass an array as data in magento (data = my $_POST values) ? and is it possible to hide parameters in the url during a post request ?

Thanks !


texts: How to get Magento 2 phpstorm namespace and code suggestions

texts:
Namespace suggestions: the code dir is marked as Sources Root but I don't get any. I just can't find any info about it. Looks like everyone in video tutorials just have it and nobody pays attention.

Code suggestions: I get them sometimes, but not always. I think it's because sometimes classes are not mapped and cannot be mapped by default php standards. Are there any extensions to help with this?


texts: what does the  node mean in config.xml of a payment module?

texts:
I'm trying to learn custom payment modules creation, but I can't really understand what does the node:

    <fieldsets>
        <sales_convert_quote_payment>
            <custom_field_one>
                <to_order_payment>*</to_order_payment>
            </custom_field_one>
            <custom_field_two>
                <to_order_payment>*</to_order_payment>
            </custom_field_two>
        </sales_convert_quote_payment>
    </fieldsets>

mean.. can anyone explain this please?

The descriptions says:

save custom fields related to our custom payment method during the order creation.

But need tag by tag description if possible.


texts:
I have created plugin of class 'Magento\Framework\View\Page\Config\Renderer' and method of renderTitle() but it is showing error "Exception #0 (InvalidArgumentException): Plugin class doesn't exist".

Here is my files like :
di.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Framework\View\Page\Config\Renderer">
        <plugin name="update_page_title" type="Namespace\Module\Plugin\Page\UpdateTitle" sortOrder="1" />
    </type>
</config>

and plugin class

<?php
namespace Namespace\Module\Plugin\Page;

class UpdateTitle
{
    public function afterRenderTitle(\Magento\Framework\View\Page\Config\Renderer $subject, $result){
        return $result;
    }
}
?>

Any one faced this type of issue any solution ..?
I have tried everything like delete generated folder run setup:upgrade commands etc..

Thanks


texts: customer is logged in from external file but on magento appear logged off

texts:
Hi i am trying to login customer from external site which is on the same domain...just integrating the main site with magento....so both the main site and magento have common accounts

here is the code i am running...this does get a new customer created and if already exist logged in but when i go to Magento home page I still get the login and signup buttons....the user does not shows up to be logged in

Please let me know what i am doing wrong or what modification i have to do with magento

require_once ("magento/app/Mage.php");
umask(0);
$websiteId = Mage::app()->getWebsite()->getId();
$store = Mage::app()->getStore();

$customer = Mage::getModel("customer/customer");
$customer->setWebsiteId($websiteId);
$customer->loadByEmail($db2->f('mem_email'));
$customer->setStore($store);

$mageRunCode = isset ( $_SERVER ['MAGE_RUN_CODE'] ) ? $_SERVER ['MAGE_RUN_CODE'] : '';
$mageRunType = isset ( $_SERVER ['MAGE_RUN_TYPE'] ) ? $_SERVER ['MAGE_RUN_TYPE'] : 'store';

$app = Mage::app ( $mageRunCode, $mageRunType );

try {

    $customer->email = $db2->f('mem_email');
    $customer->password_hash = md5($password);
    if($customer->save()){
        //echo $customer->firstname." ".$customer->lastname." information is saved!";
    }else{
        echo "An error occured while saving customer";
    }
}catch(Exception $e){
    // If customer already exists, initiate login

    if(preg_match('/This customer email already exists/', $e)){
        $customer->loadByEmail($db2->f('mem_email'));
        $session =Mage::getSingleton('customer/session');
        $session->start();
        $session->login($db2->f('mem_email'), $password);
        $session->setCustomerAsLoggedIn($customer);
        $session->isLoggedIn() ? $session->getCustomer()->getName().' is online!' : 'not logged in';
    }
}


texts: Where is the source code repo for Magento 1? I want to post PHP7 incompatibility fix for the latest version (1.9.2.4).


texts: why all the products are displayed with same description value?

texts: When I entered value in the description attribute to get displayed in product details page, same description of one particular product is getting displayed for all the products.Am stuck here figuring out what the problem may be. Someone kindly Help to resolve this priority issue.


texts: Get frontend category URL in admin area with correct base URL

texts:
I try to load categories in the admin area with store specific values.

$this->categoryCollectionFactory->create()
    ->setStoreId($storeId)
    ->addAttributeToSelect(['name', 'url_key']);

This works so far, but I don't get the right base URL with $category->getUrl() if the given store has a different base URL than the admin store.

I checked the Category::getUrl() method and found out that the store ID is used to determine the correct URL rewrite, but when it's found,

$this->setData('url', $this->getUrlInstance()->getDirectUrl($rewrite->getRequestPath()));

The second argument $params of getDirectUrl() should receive the scope somehow but it doesn't. So when the base URL is determined, there is no informtion about the current store.

This looks like a bug to me, but is there any way to work around this?

bugfix attempt 1

I traced down the location where the base URL is determined and it's in
Magento\Framework\Url::getRouteUrl:

return $this->getBaseUrl() . $routeParams['_direct'];

getBaseUrl() takes a $params argument where the store id can be passed with the _scope key, but here the argument is empty, so adding '_scope' => $storeId to the $params argument in the line from the category model above, would not help either.

bugfix attempt 2

I tried to pass the parameters along to getBaseUrl() in the line above:

return $this->getBaseUrl($routeParams) . $routeParams['_direct'];

And now getBaseUrl() sets its scope to the given store id:

$this->setScope($params['_scope']);

This loads the correct store model and assigns it to $this->data['scope']

But to my surprise, a few lines later in $this->_getScope()->getBaseUrl(), the scope was the admin store again. Why? _getScope() does not access $this->data['scope'] but $this->_scope ... this is special behavior of Magento\Backend\Model\Url because there is only one scope for backend URLs.

So here's the next problem: the category should not have been associated with a Backend URL model in the first place. But this apparently happens for any object that receives a \Magento\Framework\UrlInterface as constructor argument when created in admin area context.

bugfix attempt 3

I tried Magento\Framework\App\State::emulateAreaCode() around the category loading, but still the backend model is used. Found a similar question, Magento 2 get frontend store url for a path in admin, but the recommended solution is to inject a concrete frontend URL instance via preferences or constructor parameter. I don't know if this is a good idea for the core category model.

I tried it anyways, with the following in my module's etc/adminhtml/di.xml:

<type name="Magento\Catalog\Model\Category">
    <arguments>
        <argument name="url" xsi:type="object">Magento\Framework\Url</argument>
    </arguments>
</type>

And together with the two core hacks bugfixes from before, I'm getting the correct URLs.

So far, so good. Now I need a real solution :)


texts: How can i add button next to Zip/Postal Code in admin Billing and Shipping Magento2 order create form?

texts: I want to add button next to Zip/Postal Code in Billing and Shipping Address section area inside adminside of Magento2 order create form because i want to create address finder on click for that button.


texts:
I am using Magento 2.

During Product Import from csv each time stops at 68th or 69th row with following error.

Imported resource (image) could not be downloaded from external resource due to timeout or access permissions in row(s): 68

-product images are imported from url. like
   http://shoptrips.co.in/wp-content/uploads/2019/01/V11PRO-1134.jpg

first 67th images names  include uppercase,- or numeric still imported fine. so it seems naming is not a problem.
I changed my php.ini with
  memory_limit 2048M
  max_execution_time: 36000
still not worked.

Want to upload 300 rows at same time but only uploading first 68th and then gives error.

i am using godaddy server with 2GB memory


texts: Magento 2: Not loading CSS and JS after successful installation in windows

texts:
CSS and JS not loading after installation of Magento 2 default template

OS: Windows 10
Xampp Control panel V3.2.2
PHP version: 5.6.28
Server: Apache/2.4.23 (Win32)
phpmyadmin Version information: 4.5.1


texts: Database Unnecessary log Table - Magento2

texts:
To keep the DB optimized and clean, do we need to set up a cron to truncate the following tables?

customer_log;
customer_visitor;
report_compared_product_index;
report_event;
report_event_types;
report_viewed_product_aggregated_daily;
report_viewed_product_aggregated_monthly;
report_viewed_product_aggregated_yearly;
report_viewed_product_index;
product_alert_stock;
search_query;
catalogsearch_fulltext_scope1;
sales_bestsellers_aggregated_yearly;
sales_bestsellers_aggregated_monthly;
sales_bestsellers_aggregated_daily;

Do empty tables at any level in live get affected?


texts: Calling a Static-Block in a CMS-Page is not working

texts:
I want to call a Static-block (Identifier* name isstatic-block-to-use-in-cms-page in a CMS Page.

In CMS-Page's Content (Left Navigation Tab) field I called that static block by using this code

{{block type="cms/block" block_id="static-block-to-use-in-cms-page"}}.


texts: Wysiwyg images are not displaying in Emails

texts:
I have added an editor field in one of the custom forms by following code.

//Editor configuration
$wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array(
    'add_variables' => false,
    'add_widgets' => false,
    'add_images' => false,
    'files_browser_window_url' => Mage::getSingleton('adminhtml/url')->getUrl('adminhtml/cms_wysiwyg_images/index')
 ));

//Editor field
$fieldset->addField('text', 'editor', array(
    'label'     => Mage::helper('masters')->__('Template Content'),
    'class'     => 'required-entry',
    'required'  => true,
    'name'      => 'text',
    'config'    => $wysiwygConfig,
    'wysiwyg'   => true
));

It displays images correctly in admin. But when I email content of editor field, images are not displayed. I tried to inspect image URL in email window and I got

http://localhost/magento/index.php/admin/cms_wysiwyg/directive/___directive/ef3tftZWfRpYSfBf1cffmw9Ind3eWcvdGf,/key/512fg8a4e56b1e6/

What am I doing wrong?


texts: Magento 2 Filter Product Collection by Multiple Attributes

texts:
In Magento 2.2.2, How Can Filter Product Collection by Multiple Attributes.

I have the attribute_code with array values.

attribute_code: my_attribute_code

attribute_code values:

Array
(
  [0] => 12
  [1] => 10
);


texts: i want to print all queries on plp and pdp page in my magento1 how i can achieved this.


texts: Magento 2 - LiveReload is connected, but changes are only visible after manual reload

texts:
I try to use grunt watch in combination with livereload. But there is almost no documentation on the topic.

I installed livereload like this:

npm install -g livereload

Then I added the following line to "THEME\Magento_Theme\layout\default_head_blocks.xml":

<head>
    ...
    <script src="http://www.example.com:35729/livereload.js" src_type="url"></script>
    ...
</head>

  NOTE: Of course replace www.example.com with your domain

Then I flushed the cache.

Now I executed grunt watch.

If I reload the site and hover over the icon I get:

"LiveReload is connected, click to disable"

If I change a .less file, then the files are successfully recompiled by grunt watch, but the changes are not shown in the browser, only after I reload manually.

If I call "http://enter_ip_of_your_server_here:35729/livereload.js" in the browser directly, then I get "website not reachable".


texts:
I have overridden Luma theme and created a custom theme for our store. We have made the website live also. I need to know what are modes as i searched there are 3 modes default, Developer and Production. I checked with below command

php bin/magento deploy:mode:show

I am getting result as Default like below

Current application mode: default.

Do i need to set it to Production if so please explain What is the difference in each. Does it cause any problem if it is Default mode?


texts: Where does Magento get its value for sales_flat_invoice.increment_id?

texts:
I've been digging around in the database and the web trying to determine how this numbering system works.

I see that sales_flat_invoice.increment_id has the following information:

`increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment Id',

It is stored as a string and has no auto_increment value applied to it. I'm trying to determine how Magento really determines what value goes into this field. There were some articles stating that the value comes from eav_entity_store.increment_last_id but that doesn't line up with my current numbering sequence. increment_last_id matches my current orders but does not match the most recent sfi.increment_id.


texts: how to add footer on invoice pdf magento 2

texts:
I am using magento 2.1.
I want to add some "term & condition" at the bottom of customer invoice.
How can I add a Custom footer on PDF invoice that is generated in Magento2?

Can anyone explain me how to do that.


texts: Magento2 How to disable Price Filter/ Price Navigation

texts: There is this block of layered-filter-block where it shows price filter on the right side of the category page. How can I remove it? For the time being i hid it with css.


texts: Adding custom Image attribute for category in magento 2

texts:
I have tried below code for adding thumbnail image in category.
When i upload image in custom field i get below error.
Error

Attention
The file was not uploaded.
error: "The file was not uploaded." errorcode: 666

category_form.xml
<field name="thumbnail_image">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="dataType" xsi:type="string">string</item>
                    <item name="source" xsi:type="string">category</item>
                    <item name="label" xsi:type="string" translate="true">Category Image</item>
                    <item name="visible" xsi:type="boolean">true</item>
                    <item name="formElement" xsi:type="string">fileUploader</item>
                    <item name="elementTmpl" xsi:type="string">ui/form/element/uploader/uploader</item>
                    <item name="previewTmpl" xsi:type="string">Magento_Catalog/image-preview</item>
                    <item name="required" xsi:type="boolean">false</item>
                    <item name="sortOrder" xsi:type="number">40</item>
                    <item name="uploaderConfig" xsi:type="array">
                        <item name="url" xsi:type="url" path="catalog/category_image/upload"/>
                    </item>
                    <item name="label" xsi:type="string" translate="true">Thumbnail Image</item>
                </item>
            </argument>
        </field>

InstallData.php
$eavSetup->addAttribute('catalog_category', 'thumbnail_image', array(
    'input'   => 'image',
    'type'    => 'varchar',
    'backend' => 'catalog/category_attribute_backend_image',
    'group' => 'General',
    'label'         => 'Thumbnail Image',
    'visible'       => 1,
    'required'      => 0,
    'user_defined' => 1,
    'frontend_input' =>'',
    'global'        => \Magento\Catalog\Model\ResourceModel\Eav\Attribute::SCOPE_GLOBAL,
    'visible_on_front'  => 1,
));

di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/di.xsd">
<type name="Namespace\Module\Controller\Adminhtml\Category\Image">
    <arguments>
        <argument name="imageUploader" xsi:type="object">Magento\Catalog\CategoryImageUpload</argument>
    </arguments>
</type>
</config>


texts: How can i programatically send contact us mail in magento 2?

texts:
i have tried using the below code but didn't get the solution.

public function contactUs()
  {
     //$params = $this->getRequest()->getParams();

     //$mail = new Zend_Mail();
     $this->mail->setTemplateVars('hHai ywyywn.');
     $this->mail->setFrom('testfrom@test.in', 'fayis');
     $this->mail->addTo('testto@test.in', 'Some Recipient');
     $this->mail->setSubject('Test contact us');
       try {
         $this->mail->send();
       }
       catch(Exception $ex) {
          Mage::getSingleton('core/session')->addError('Unable to send email. Sample of a custom notification error from Inchoo_SimpleContact.');
       }


texts: get product id from quote id - Magento 1.9

texts:
Hi need toget the product id of in a quote item.i have the qoute id with me and tried the below code but product id does not seem to display from the quote.

$quoteId=784;
$quote = Mage::getModel('sales/quote')->getCollection()
->addFieldToFilter('entity_id', $quoteId)
->getFirstItem();
echo $pid = $quote[product_id] ;

Please help to get product id from quote id .

Thanks.


texts:
I'm trying to remove the Sample Data from my M2 instance.

The sample data was installed at version 2.0.7, but the site has since been upgraded to version 2.1.

When I try to run php bin/magento sampledata:remove, I am just greeted with a blank prompt, but when I look at the PHP logs, I see this:

[06-Sep-2016 07:53:13 UTC] PHP Fatal error:  Uncaught TypeError: Argument 1 passed to Magento\Framework\Config\Composer\Package::__construct() must be an instance of stdClass, null given, called in /Applications/MAMP/htdocs/Site/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /Applications/MAMP/htdocs/Site/vendor/magento/framework/Config/Composer/Package.php:26
Stack trace:
#0 /Applications/MAMP/htdocs/Site/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(93): Magento\Framework\Config\Composer\Package->__construct(NULL)
#1 /Applications/MAMP/htdocs/Site/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(89): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\\Framewo...', Array)
#2 /Applications/MAMP/htdocs/Site/vendor/magento/framework/ObjectManager/ObjectManager.php(57): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...', Array)
#3 /Applications/MAMP/htdocs/Site in /Applications/MAMP/htdocs/Site/vendor/magento/framework/Config/Composer/Package.php on line 26

Does anyone know how to manually remove the sample data, and can you pass that glimmer of hope my way?


texts: Why my admin route is showing 404 and URLs include server.php?

texts:
I already checked everything, my remote server is working properly by my local showed up this issue, as you can see in this image below.

I don't know if it's related to my local environment using Valet+ or if it's something related with my Magento configuration.

How could I figure it out?


texts: Error on Container inside referenceContainer checkout.cart.methods

texts:
I have a problem with a custom block inside the container Checkout Cart methods.

I have add this code on checkout_cart_index.xml on my theme.

<referenceContainer name="checkout.cart.methods">
     <container name="cart-ship" htmlTag="div" htmlClass="info" output="1">
      ( ... block cms ...)
     </container>
  </referenceContainer>

This code generate a error:

Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid Method: cart-ship

There are a reason for this error? If i declare a block directly on referenceContainer work correctly..


texts: Magento 2 how to get attribute value of child configurable products?

texts:
I have this situation:

I have many configurable products with child products(the same product but with different variations).
Here are the variations that I mean

What I need to do is just to get the dimensions of the variations (weight, length, height and width).
If I do this I get 0, because the main product has no height in it's attributes, and also the attribute height is not showing in the main product, so I cannot set a height.

$height += $product->getData('ts_dimensions_height');

How can I set dimensions to the main product, or how can I get the attributes of the variation products?

Note: I cannot do a foreach array in the variations of the configurable product, because I'm adding up all dimensions depending on the amount of the products. For example If I have Product A with child product 2 and Product B with child product 1 I need to add up the dimensions, just like this:

foreach ($orderItems as $item) {

             $product = $item->getProduct();

                $weight += (float) ($product->getData('weight')*$item->getQty());
                $height += (float) ($product->getData('ts_dimensions_height')*$item->getQty());
                $length += (float) $product->getData('ts_dimensions_length');
                $width += (float) $product->getData('ts_dimensions_width');

         }

Greetings!


texts: Magento 2 - Add JS to specific admin page

texts:
My custom module can add JS to all admin pages, but I only want to add the JS to product pages I am editing.

I have my XML: view/adminhtml/layout/default.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
   <head>
     <script src="module_namespace::js/priceChange.js"/>
   </head>
</page>

and my JS: view/adminhtml/web/js/priceChange.js

Wondering if I need to change the path, the XML or both?


texts:
I want to get Product id in this file:-

vendor\magento\module-catalog\view\frontend\templates\product\image_with_borders.phtml

Magento version 2.2.3


texts: Magento 2 : Can not add method/class in __construct()

texts:
I have a collection.php file. I am adding some function into that which calls other models.As per Magento 2 first we have to add object managerger interface. And then we can call other model.like below :

$this->_objectManger('\Namespace\Module\Model\Customfile')->functionName();

To use $this->_objectManger we have to define in __Construct first.
Now I am doing same thing in __Construct method of Collection.php file. But it is not working and creating issues.

Please check code :
Collection.php

<?php
namespace \Namespace\Module\Model\ResourceModel\Testfile;

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{

 public function __construct(
    **\Magento\Framework\ObjectManagerInterface $objectManager,**
    \Magento\Framework\Data\Collection\EntityFactory $entityFactory,
    \Psr\Log\LoggerInterface $logger,
    \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
    \Magento\Framework\Event\ManagerInterface $eventManager,
    \Magento\Catalog\Model\ResourceModel\Product\Option\Value\CollectionFactory $optionValueCollectionFactory,
    \Magento\Store\Model\StoreManagerInterface $storeManager,
    \Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
    \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
) {
    $this->_optionValueCollectionFactory = $optionValueCollectionFactory;
    $this->_storeManager = $storeManager;
    parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
    $this->logger = $logger;
    $this->_objectManager = $objectManager;
 }

How to add extra classes in this ? Please explain where I am wrong and why.


texts: want to hide payment option and directly redirect to payment page (cc avanue page)

texts: I don't want last step because I only have one payment option how to go to payment page from shipping information


texts: Edit Customer Address Form's Name Fields

texts:
I am editing the layout of my edit.phtml in template/customer/address/, i have edited the layout and labels of some fields there, no problem.

Except, i have 3 fields in the code which i can't edit because they are being called on the following way:

Begin of the code:
$this->getBlockHtml('formkey') in address magento
Later in the code:
<?php echo $this->getNameBlockHtml() ?>

I have no idea where to edit the layout/label names, etc. of this fields.
All evening i tried to find out where to do, but searching other questions is leading me to .php files, but not, for example to the  tag of the field.

How can i accomplish this?


texts: getUrl('frontname/controller') doesn't work with custom router?

texts:
So, I've written a custom router, in as much as I've extended Mage_Core_Controller_Varien_Router_Standard and created my own match() function. This part works beautifully, mapping the differently formatted URLs I'm using for a specific section of the site to the typical frontname/controller/action pattern.

The only issue is I now cannot use getUrl() in the normal way.

For example, the frontName in the modules config.xml is lookfor, and the extension name is Customsearch. Usually, using Mage::getUrl('customsearch/action') would return me a url of lookfor/action. But, with the custom router, I simply get back customsearch/action. If I switch back to the standard router in the config.xml, voila, it works.

You might ask why I want this when my URLs are different - handily some functionality through this module will still be accessed the normal way. I've got this to work as expected (by placing my custom code between the normal controller/action finding code, and the noRoute stuff), its simply the URL lookup thats failing.

I've done some digging, and noticed that in the below function, from Mage_Core_Model_Url, the $this->_getData('route_front_name') has the wrong frontName (customsearch, rather than lookfor), but I can't spot where this is set.

public function getRouteFrontName()
    {
        if (!$this->hasData('route_front_name')) {
            $routeName = $this->getRouteName();
            $route = Mage::app()->getFrontController()->getRouterByRoute($routeName);
            $frontName = $route->getFrontNameByRoute($routeName);

            $this->setRouteFrontName($frontName);
        }
        return $this->_getData('route_front_name');
    }

Here're the relevant sections from the modules config.xml...

<frontend>
   <routers>
      <customsearch>
         <use>namespace_customsearch</use>
         <args>
            <module>Namespace_Customsearch</module>
            <frontName>lookfor</frontName>
         </args>
      </customsearch>
   </routers>
   ...
</frontend>
...
<default>
   <web>
      <routers>
         <namespace_customsearch>
            <area>frontend</area>
            <class>Namespace_Customsearch_Controller_Router</class>
         </namespace_customsearch>
      </routers>
   </web>
</default>


texts:
How to add custom css file in magento2.2.6?

I am in Production mode, using Luma Magento 2.2.6.

Do I have to be in Developer mode to make the solution in the above link work?

Before switching to Developer I have to clear the contents of :

var/cache
generated/metadata
generated/code
var/view_preprocessed
pub/static

But my file structure is different I can never seem to find the correct folders.

I know this is a beginner question but I really appreciate your professional expertise and guidance on this 7 month long obstacle I keep running into.

Thank you in advance!


texts:
We've recently migrated from Magento 1 to Magento 2 and it seems that there is a large amount of information in our database files.

We'd like to try to mitigate this by clearing the log files but unlike Magento 1, there does not seem to be a built in facility to do this in Magento 2.

Is there a way to clean out the log files in the database in Magento 2 so that we can hopefully free up some space.

Our database is accessible through phpmyadmin if that helps.


texts: Magento 2: showing error when running command setup:di:compile

texts:
I am getting this error when running setup:di:compile command, Plese help this is the error in SSH showing

    Compilation was started.
Area configuration aggregation... 5/7 [====================>-------]  71% 22 secs 218.0 MiB

  [ReflectionException]
  Class Magento\GiftCardAccount\Helper\Data does not exist

  [ReflectionException]
  Class Magento\GiftCardAccount\Helper\Data does not exist

setup:di:compile

I also run this command to no more about issue setup:di:compile -vvv

and it is showing

  Exception trace:
   () at /data/websites/devtbl2.wddemo.net/public_html/vendor/magento/framework/Code/Reader/ClassReader.php:37
   Magento\Framework\Code\Reader\ClassReader->getConstructor() at /data/websites/devtbl2.wddemo.net/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassReaderDecorator.php:35
   Magento\Setup\Module\Di\Code\Reader\ClassReaderDecorator->getConstructor() at /data/websites/devtbl2.wddemo.net/public_html/setup/src/Magento/Setup/Module/Di/Code/Reader/Decorator/Area.php:53
   Magento\Setup\Module\Di\Code\Reader\Decorator\Area->getList() at /data/websites/devtbl2.wddemo.net/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:109
   Magento\Setup\Module\Di\App\Task\Operation\Area->getDefinitionsCollection() at /data/websites/devtbl2.wddemo.net/public_html/setup/src/Magento/Setup/Module/Di/App/Task/Operation/Area.php:84


texts: Search is not working by product attributes

texts:
We have added couple of products on our Magento 2 site. In the home page of the site, we have a search form and there we have put input boxes as product name, from, to and location. We want to display the results as per the selected criteria in the form but its not working as expected.

Code:

                    <form method="GET" action="<?php echo $block->getUrl('catalogsearch/result/');?>">
                        <fieldset class="search-forms-fieldset" id="date-range-1">
                        <legend class="legend"><?= /* @escapeNotVerified */ __('Search Settings') ?></legend>

                            Select

                                <input type="text" name="q" placeholder="<?= /* @escapeNotVerified */ __('What are you looking for?') ?>" />
                                <?php /*?><select name="looking" id="looking">
                                    <option value="">Please select</option>
                                    <option value="5">5</option>
                                    <option value="10">10</option>
                                    <option value="15">15</option>
                                    <option value="20">20</option>
                                </select><?php */?>

                            <?= /* @escapeNotVerified */ __('Location') ?>

                                <input type="text" name="location" placeholder="<?= /* @escapeNotVerified */ __('Location') ?>" />

                            <?= /* @escapeNotVerified */ __('Available From') ?>

                                <input type="text" name="available_from" placeholder="<?= /* @escapeNotVerified */ __('Available From') ?>" id="date-from-1" />

                            <?= /* @escapeNotVerified */ __('Location') ?>

                                <input type="text" name="available_to" placeholder="<?= /* @escapeNotVerified */ __('Available To') ?>" id="date-to-1"/>

                        </fieldset>

                            <button type="submit"
                                    class="action search primary"
                                    title="<?= $block->escapeHtml(__('Search')) ?>">
                                <?= /* @escapeNotVerified */ __('Search') ?>
                            </button>

                    </form>

Please see the below screenshot for your reference:


texts:
I'm still pretty new to Magento (1.9 EE) so some of my terminology may be incorrect, apologies if so.

Anyway, in one of my layout XML files, I have a custom block which I can include using the update tag, something like

<custom_block>
    <block name="...">
        ...
    </block>
</custom_block>

<another_block_1>
    <update handle="custom_block" />
</another_block_1>

This all works fine. However, when I try to call the update from within a block tag, it doesn't work, something like:

<another_block_2>
    <block name="sub_another_block_2" ...>
        <update handle="custom_block" />
    </block>
</another_block_2>

Is what I'm trying to do possible? A colleague mentioned that update might not be the correct tag.


texts: How to change data email of invoice during place new order?

texts:
I have to change label from email of invoice. But I am not getting how to do it? Can you please suggest me way.

I have attach image. And mark as yellow color, which I want to change label.

As I research, I have find this string "{{var order.shipping_description}}" in invoice_new.html as an email template. Anyone tell me how can I change "{{var order.shipping_description}}" value in invoice_new.html.
Please help me asap.
Thank you


texts: Adding a new order state and status in magento

texts:
I have followed this guide :

http://islamic-posters.aceph.me/post/19049000412/magento-custom-order-state

and created a new order state and status called "delivered" in my admin. Basically these are used to track which shipments are getting delivered and which are returned. As the shipments get delivered I want to mark them as delivered in the system so that I can keep track. This happens after the order has been invoiced and shipped.

Now the problem is when I try to set the state as "delivered" it keeps going back to "complete". How do I fix this ? How do I change the state to delivered after it has been completed.

I am attaching a screenshot of what happens : http://awesomescreenshot.com/0913gf6981


texts: import product title + category into Meta Title

texts:
is there some SQL query to import Product Title - Category into Meta Title?

So example: I have Products and these products have parts.  I want to import product titles - part titles - categories into Meta Title.

So if i have:
product 1 - electric showers
Part 1 -  product 1 -  electric showers

Is there some SQL query to make this?


texts: Define columns shown in "products in category" grid?

texts:
Magento 2.2.3

The columns in 2.2.3 are very limited, I need the SKU and the status and maybe some more columns. Is there a way to add columns to the "products in category" grid in a category?

Thanks!


texts: How to convert Magento 2 Sort By Dropdown to Horizontal List

texts:
I was trying to Convert Magento 2 Drop down to Horizontal list.

Code Path:

  /app/design/frontend/Vendor/Theme/Magento_Catalog/templates/product/list/toolbar/sorter.phtml

Actual Code:

<?= /* @escapeNotVerified */ __('Sort By') ?>
<select id="sorter" data-role="sorter" class="sorter-options">
        <?php foreach ($block->getAvailableOrders() as $_key => $_order): ?>
            <option value="<? /* @escapeNotVerified */ $_key ?>"
                <?php if ($block->isOrderCurrent($_key)): ?>
                    selected="selected"
                <?php endif; ?>
                >
                <?php $block->escapeHtml(__($_order)) ?>
            </option>
        <?php endforeach; ?>
    </select>

What I tried :

        <?php foreach ($block->getAvailableOrders() as $_key => $_order): ?>
           <a href="<?= /* @escapeNotVerified */ $_key?>"
                <?php if ($block->isOrderCurrent($_key)): ?>
                class="active"<?php endif; ?>
                >
                <?= $block->escapeHtml(__($_order)) ?>

        <?php endforeach; ?>

Did some research on this and found this LINK

But Couldn’t able to find the Solution. Please help me on this.

Actual Display

Expected Result : On Click Products should sort according to the selection

Sorter.phtml File

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

?>
<?php
/**
 * Product list toolbar
 *
 * @var $block \Magento\Catalog\Block\Product\ProductList\Toolbar
 */
use Magento\Catalog\Model\Product\ProductList\Toolbar;
?>

    <?= /* @escapeNotVerified */ __('Sort By') ?>

        <?php foreach ($block->getAvailableOrders() as $_key => $_order): ?>
        <a href="<?php echo $block->getPagerUrl("product_list_order=".$_key) ?>"
            <?php if ($block->isOrderCurrent($_key)): ?>
                class="selected"
            <?php endif; ?>
            >
            <?php echo $block->escapeHtml(__($_order)) ?>

    <?php endforeach; ?>

    <?php if ($block->getCurrentDirection() == 'desc'): ?>
        <a title="<?= /* @escapeNotVerified */ __('Set Ascending Direction') ?>" href="#" class="action sorter-action sort-desc" data-role="direction-switcher" data-value="asc">
            <?= /* @escapeNotVerified */ __('Set Ascending Direction') ?>

    <?php else: ?>
        <a title="<?= /* @escapeNotVerified */ __('Set Descending Direction') ?>" href="#" class="action sorter-action sort-asc" data-role="direction-switcher" data-value="desc">
            <?= /* @escapeNotVerified */ __('Set Descending Direction') ?>

    <?php endif; ?>


texts: Retrieve product url with category in the graphQL

texts:
I've enabled at backoffice the usage of the category inside the product url by setting this option:

When I access the magento frontend, I can now access the product with the url <category>/<product>. However, when I call the graphQL API:
query {
    products(filter: {
        sku: {
            eq: "1"
        }
    }) {
        items {
            sku
            canonical_url
            url_path
            url_key
        }
    }
}

I get this response:
{
    "data": {
        "products": {
            "items": [
                {
                    "sku": "1",
                    "canonical_url": "tire-black",
                    "url_path": null,
                    "url_key": "tire-black"
                }
            ]
        }
    }
}

In other words, I get the path url with the product name only,(i.e. without the category). In the example, the product tire-black belongs to the category tires. In the url_rewrite table the associated url with the category is: tires/tire-black, which is what I want to retrieve using the graphQL.
Do you know if there's another field I should use to get the url comprehensive of the category (i.e. tires/tire-black)?
If not, what should I do to get it in the graphql response?
Thank you.


texts: Push notifiation in magento2 for android?

texts: How do I implement server side so that I can send push notification in Magento based mobile application ?


texts: Billing name order in billing_name column in sales_flat_order_grid table

texts:
Can someone please tell me when a record is pushed into the "sales_flat_order_grid" table?

How can I switch first name and last name in "billing_name" column of this table?


texts: The local installation magento2 ran over 66 and got stuck at 71


texts: I need xml tag that work like not ifconfig (!ifconfig)

texts:
<reference name="top.links">
            <action method="addLink" translate="label title" module="support">
            Support
            <url ifconfig="support_options/support_data/support_pop" ><![CDATA[javascript:div_show();]]></url>
            <title>Support</title>
            <prepare/><urlParams/>
            <position>100</position>
            </action>
            <action method="addLink" ifconfig="support_options/support_setting/support_set" translate="label title" module="support">
            Support
            <url>support</url>
            <title>Support</title>
            <prepare/><urlParams/>
            <position>100</position>
            </action>
        </reference>

I want to pass 2 url at one link and put validation on it


texts: Import sales_flat_order table from one db to another db

texts:
Is it possible to import the data of sales_flat_order table to existing database from another database. Can anyone kindly guide me. Thanks in adv.

PS: By mistake I deleted all my orders at the back end. I require all the orders back. It is present in another db. However do I have to replace the entire db or just the sales_flat_order table alone can be replaced.


texts: When I add a configurable product the category is deconfigured, could someone please help me

texts: if you notice there is nothing in the head in the footer, did anyone have the same problem?


texts:
I am trying to insert test product into database with the following code -

    $product = Mage::getModel("catalog/product");
            $product
            ->setStoreId(0)
            ->setWebsiteIds(array(1))
            ->setAttributeSetId(9)
            ->setTypeId('simple')
            ->setCreatedAt(strtotime('now'))
            ->setSku('82394444')
            ->setName('product21')
            ->setWeight(4.0000)
            ->setStatus(1)
            ->setTaxClassId(4)
            ->setVisibility(Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH)
            ->setManufacturer(28)
            ->setColor(24)
            ->setNewsFromDate('06/26/2014')
            ->setNewsToDate('06/30/2016')
            ->setCountryOfManufacture('AF')
            ->setPrice(11.22)
            ->setCost(22.33)
            ->setSpecialPrice(00.44)
            ->setSpecialFromDate('06/1/2015')
            ->setSpecialToDate('06/30/2016')
            ->setMsrpEnabled(1)
            ->setMsrpDisplayActualPriceType(1)
            ->setMsrp(99.99)
            ->setMetaTitle('test meta title 2')
            ->setMetaKeyword('test meta keyword 2')
            ->setMetaDescription('test meta description 2')
            ->setDescription('This is a long description')
            ->setShortDescription('This is a short description')

            ->setMediaGallery (array('images'=>array (), 'values'=>array ()))
            ->addImageToMediaGallery('media/catalog/product/1/0/10243-1.png', array('image','thumbnail','small_image'), false, false)

            ->setStockData(array(
                               'use_config_manage_stock' => 0,
                               'manage_stock'=>1,
                               'min_sale_qty'=>1,
                               'max_sale_qty'=>2,
                               'is_in_stock' => 1,
                               'qty' => 999
                           )
            )

            ->setCategoryIds(array(3, 7));
            $product->save();

But when I run this code, product does not appears in product list. I checked the database catalog tables, I found that catalog_product_entity_varchar table stores wrong value in value field. It inserts each time value like -5.html, -6.html when I run the code. Is that the reason for not showing product in admin grid or in frontend?

Any comments appreciated.

Thanks.


texts: How to create invoices for more than one order via mass action?

texts:
for creating an invoice normally you have to open the order an create the invoice for that one order.

But is it possible to select more than one order in the overview grid and create the invoices for the selected orders in one mass action. Like you can do for e.g. printing invoices?

Or do we have to use an extension for such a mass action? Can you recommend any extension for that problem?


texts:
I am creating a custom admin theme for Magento 2 and followed the Magento 2 documentation.  My problem is that all styles are removed on the backend and I do not understand why it is not defaulting to Magento/backend theme parent. Here is my theme.xml

<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>MyTheme</title>
<parent>Magento/backend</parent>
<media>
    <preview_image>media/preview.png</preview_image>
</media>

Here is my module.xml:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Vendor_MenuItem" setup_version="1.0.0" />
</config>

and my added di.xml to my module:

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

<!-- Admin theme. Start -->
<type name="Magento\Theme\Model\View\Design">
    <arguments>
        <argument name="themes" xsi:type="array">
            <item name="adminhtml" xsi:type="string">Vendor/MyTheme</item> <!-- Example: "Magento/backend" -->
        </argument>
    </arguments>
</type>
<!-- Admin theme. End -->
</config>

The logo works just fine but I lost all previous styling and all adminhtml looks like basic html.  Any insight would be appreciated.


texts:
I trying this url http://192.168.1.67/isac/swagger but I got this error below

 500 : {"message":"Internal Error. Details are available in Magento log file.
    Report ID: webapi-5bfe5e3ac4100"} http://192.168.1.67/isac/rest/default/schema?services=all

When I checked exception log file I got this below information.

[2018-11-28 09:24:07] main.CRITICAL: LogicException: Class "array" does not exist. Please note that namespace must be specified. in /var/www/html/isac/vendor/magento/framework/Reflection/TypeProcessor.php:156
Stack trace:
#0 /var/www/html/isac/vendor/magento/module-webapi/Model/Config/ClassReflector.php(103): Magento\Framework\Reflection\TypeProcessor->register('array')
#1 /var/www/html/isac/vendor/magento/module-webapi/Model/Config/ClassReflector.php(72): Magento\Webapi\Model\Config\ClassReflector->extractMethodData(Object(Zend\Code\Reflection\MethodReflection))
#2 /var/www/html/isac/vendor/magento/module-webapi/Model/ServiceMetadata.php(119): Magento\Webapi\Model\Config\ClassReflector->reflectClassMethods('Altius\\Customap...', Array)
#3 /var/www/html/isac/vendor/magento/module-webapi/Model/ServiceMetadata.php(148): Magento\Webapi\Model\ServiceMetadata->initServicesMetadata()
#4 /var/www/html/isac/vendor/magento/module-webapi/Model/Rest/Swagger/Generator.php(913): Magento\Webapi\Model\ServiceMetadata->getServicesConfig()
#5 /var/www/html/isac/vendor/magento/module-webapi/Controller/Rest.php(278): Magento\Webapi\Model\Rest\Swagger\Generator->getListOfServices()
#6 /var/www/html/isac/vendor/magento/module-webapi/Controller/Rest.php(214): Magento\Webapi\Controller\Rest->processSchemaRequest()
#7 /var/www/html/isac/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#8 /var/www/html/isac/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#9 /var/www/html/isac/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#10 /var/www/html/isac/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#11 /var/www/html/isac/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#12 {main}

Next Exception: Report ID: webapi-5bfe5eb799b72; Message: Class "array" does not exist. Please note that namespace must be specified. in /var/www/html/isac/vendor/magento/framework/Webapi/ErrorProcessor.php:195
Stack trace:
#0 /var/www/html/isac/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(LogicException))
#1 /var/www/html/isac/vendor/magento/module-webapi/Controller/Rest.php(219): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(LogicException))
#2 /var/www/html/isac/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /var/www/html/isac/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)
#4 /var/www/html/isac/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#5 /var/www/html/isac/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#6 /var/www/html/isac/index.php(40): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#7 {main} [] []

It's very confusing and like toughest puzzle game. How to resolve this and get api from swagger?


texts: Magento 2: Custom theme extending Blank Theme and custom module?

texts:
First post on here, I've started developing a custom theme extending the blank theme and I'm just curious about making a module.

I've started on a module and I've made some blocks & templates, and it all works well, however I'm not sure if I've done everything right.

My module is 100% for the custom theme and nothing else, the module is in:

app/code/VendorName_ModuleName

And I have my theme in:

app/design/frontend/VendorName_ModuleName

Is this correct? Or should I have my module inside my theme? So it'd be like:

app/design/frontend/VendorName_ModuleName/VendorName_ModuleName

I think I'm doing everything right so far, however I'm not sure. I've named the theme & the module the same names (as the module will just provide everything for the theme and nothing else, so I figured this works the best).

Thanks


texts: magento 2 how to call any block function in phtml

texts: How can I call any block function in any phtml? For example if I want to call my custom block function in product list.phtml?


texts: Magento 2 - Grunt watch not detecting changes of _extend.less

texts:
I have these files:

  THEME = app\design\frontend\company\base

THEME\web\css\source\lib\extend\variables\_typography.less
THEME\web\css\source\lib\extend\variables\_colors.less
THEME\web\css\source\_extend.less

This is my THEME\web\css\source\_extend.less:

@import 'lib/extend/variables/_colors';
@import 'lib/extend/variables/_typography';

a { color: @theme__color__primary-alt; }

If I make changes in THEME\web\css\source\lib\extend\variables\_colors.less or THEME\web\css\source\lib\extend\variables\_colors.less then they are detected by "grunt watch", but if I modify _extend.less then "grunt watch" does not react at all.

What might be the cause?


texts: How to Add Owl carousel slider to homepage in Magento 2.1

texts:
I have a issue related to owl slider
I make a slider into phtml file slider.php
And call into default.xml file.but the problem it is not take a slider to homepage..
Thanks


texts: how to fix "Direct use of $_SERVER Superglobal detected' in Magento 2

texts:
I am having problem with module approval. and magento connect validation report generates following message

  Direct use of $_SERVER Superglobal detected

how can i use alternate for

  $_SERVER['REMOTE_ADDR']

in Magento 2.


texts: Display Subtotal, Shipping & Handling and Grand Total on Ship Notification Email

texts:
When a customer places an order they receive an order confirmation email. In that email - below where the line items are displayed - the Subtotal, Shipping & Handling and Grand Total are outputted.

What I'm trying to do is show that same thing on the shipping notification email. I'm a magento newb, so what I typically do is find the core template that handles this and copy it into my local folder to make the changes.

So I copied : app/design/frontend/base/default/template/email/order/shipment/items.phtml

to: app/design/frontend/default/mytheme/template/email/order/shipment/items.phtml

Here's what that file looks like (with some of my customizations already):

<?php $_shipment = $this->getShipment() ?>
<?php $_order    = $this->getOrder() ?>
<?php if ($_shipment && $_order): ?>

            Item #
            <?php echo $this->__('Item Name') ?>
            Unit
Price
            Shipped
Quantity
            UOM

    <?php $i=0; foreach ($_shipment->getAllItems() as $_item): ?>
    <?php if($_item->getOrderItem()->getParentItem()) continue; else $i++; ?>
    <tbody<?php echo $i%2 ? ' bgcolor="#F6F6F6"' : '' ?>>
        <?php echo $this->getItemHtml($_item) ?>

    <?php endforeach; ?>

<?php endif; ?>

When I look in the file app/design/frontend/base/default/template/email/order/invoice/items.phtml which has the totals I want to display on the shipping template, it looks like the portion of code that controls it is here:

    <?php echo $this->getChildHtml('invoice_totals')?>

So I've pasted that into my shipping items.phtml but the totals are not displaying. Can anyone point me in the right direction? I feel like I'm close but am still missing something.


texts: How to remove index.php in product view page?

texts:
For some reason i kept index.php in url but i want to remove index.php in Product individual page only.

My current url : https://domain.com/index.php/category-names/product-name.html

i want to this way : https://domain.com/category-names/product-name.html


texts: After I did bulk status changed like disable all products, after enable all products, after go to see website there is no products display at website.


texts: Refund/return to stock free transactions - Order loses property

texts:
I enter formatted text here in Mage_Sales_Model_Order::canCreditMemo() on line 632 Magento calls a function hasForcedCanCreditmemo().

I observe an event that happens before this function and want to make sure that hasForcedCanCreditmemo() returns true.

In my observer I set i order->setForcedCanCreditmemo(true);, however in the canCreditMemo() that function still returns false.

My observer looks as follows:

<?php
class Custom_Sales_Model_Observer
{
    public function forceCreditMemoForFreeTransactions(Varien_Event_Observer $observer)
    {
        $orderId = $observer->getControllerAction()->getRequest()->getParam('order_id');
        $order = Mage::getModel('sales/order')->load($orderId);
        $order->setForcedCanCreditmemo(true);
        $order->save();
    }
}

and the first few lines of the canCreditMemo() function in Mage_Sales_Model_Order look like this:

public function canCreditmemo()
{
    if ($this->hasForcedCanCreditmemo()) {
        return $this->getForcedCanCreditmemo();
    }

When I add debug, I can see that my observer's code runs through before the canCreditMemo() function, but once I get to the canCreditMemo() function, the order no longer has a forced_can_creditmemo property that I assigned in my oberver.

Is there some other way I need to set that property other than setForcedCanCreditmemo()?

EDIT - I have found that setting an existing property to a different value in the observer will carry through to the canCreditMemo() function, although any new properties I set on the order get discarded somewhere along the way.


texts: Magento rest api getting error Request does not match any route

texts:
How can i create the base url for magento.

I have this error when i hit the url to get the order can some help me to find out the solution. I am using oauth authentication

{
  "message": "Request does not match any route.",
  "trace": null
}

url : http://sca.followthetiger.com/api/rest/order
and pass the consumer key and all in header.


texts: Hide Product without Disabling or putting product out of stock

texts:
I have a product that I want to hide on the front-end but if you have the direct URL I want the product to be accessible and have stock.

What is the best way to achieve this?

I was thinking of wrapping an IF statement around the product content in category grid etc and checking if the product has a custom attribute that says hidden. Is this a crazy way of doing this?


texts: Magento EE SQL to get customers who purchased and newsletter subscribed

texts:
I have a Magento EE 1.14.0.1 and I have access to mysql. What I am trying to do is write a query in SQL that will give me a listing of all customers first name, last name, email address AND the website ID that they created an account on (this magento install has two website stores on it) from the last 30 days who not only made a purchase on the site but also created an account AND signed up to the newsletter.

I have the current query (below) which I believe is giving me a listing of every ones email address who made a purchase. however I do not know how to alter the sql

SELECT email
FROM customer_entity as ce
JOIN newsletter_subscriber as ns ON ns.subscriber_email = ce.email AND ns.subscriber_status = 1
JOIN sales_flat_order as sfo ON sfo.customer_id = ce.entity_id
JOIN sales_flat_order_item as sfoi ON sfo.entity_id = sfoi.order_id
JOIN catalog_product_entity as cpe ON cpe.entity_id = sfoi.product_id
WHERE cpe.sku !='' group by ce.email;


texts: How do I filter categoryIds or categoryId with only existing in current store?

texts:
we generate a list of $categoryIds like below. The problem is that it also returns some Ids that do not exist in the current store.

$categoryIds = Mage::registry('current_product')->getCategoryIds();

if (!empty($categoryIds)) {
  $categoryId = current($categoryIds);

Question: Now how can I solve this with low overhead. To me it seems like there are two methods.

Filter the complete $categoryIds collection and keep only members of current store? (something like: getting all categories from the store and sift out the ones that exisst on both stores)
Check the single categoryId from current, and shift to the next value if it does not exist? (something like: check if it can be loaded with a store_id and if not continue)

Reference, not completely similar

https://stackoverflow.com/questions/15505221/how-do-i-get-the-category-ids-that-a-product-is-in-with-respect-to-the-store-tha


texts: Issues with deplyoing static files command and frontend loses css and js

texts:
I have a serious issue which is ongoing with running

php bin/magento setup:static-content:deploy

First, I installed Magento 2.1.3  by uploading the files and run the setup wizard, all went fine, installed my theme and created a custom theme and all went fine whilst using the command etc.

But at some point, for whatever reason, the command ends up throwing many errors. The frontend has also lost functionality too.

The errors are are as follows in the console and sytemm.log, too many related to all themes active such as blank and luma:

I have checked a few resources and followed the instructions but no luck, some followed are:

1) https://github.com/magento/magento2/issues/2273

2) Static content deploy issue

3) https://stackoverflow.com/questions/37964713/not-able-to-deploy-static-content-magento2-0

4) How to fix the problem of loading css and javascript files?
Login to ssh, go to magento directory for instance I'm

cd /var/www/html/magento

1: Removed follwoing folders via running

rm -rf var/di/*
var/generation/*
var/cache/*
var/page_cache/*
var/view_preprocessed/*
var/composer_home/cache/*

2: sudo chmod 777 var -R
3: sudo chmod 777 pub -R
4: sudo php bin/magento setup:static-content:deploy
5: Repeat step 2 & 3.

And some others I found on google but no resolution to the issue.

Please help me, as it is urgent for me to resolve this.

Thank you in advance.


texts: Display different data according to category

texts:
I am displaying data on my front end on configurable products. But I am getting the same data for all products. Can anyone tell me how to change data according to the specific category?

Suppose for Men's, one thing should be displayed for Women other.

Can anyone suggest me anything good???
 I am using Magento 2.2.5


texts: Divide orders based on order number and items ordered

texts:
I'm trying to figure out a way to do this:
Compare order if it has multiple items with this same SKU it will be given a different status.
for instance order :
555 has 3 items all with sku 565 < single
556 has 3 items all with different SKU's < multiple

i understand that logic isn't sophisticated, get items ordered if items 1 sku equals item2 sku ... and so on .

is there a way to place within magento2?

best solution would be an order export single . order export multiple.
where only orders containing single sku orders would be exported and another one where only orders that have varied items would be exported .
Any idea where to start ?
thanks ,


texts: Uploading Image via Magento 1 SOAP API throws errors in 1.9.3 release

texts:
We are using SOAP API to upload the image files to our Magento server.

These image files are stored in our backend ERP system. Is this know issue of Magento 1.9.3.1?

Error is Cannot Create Image.


texts: How to show bundle products on custom module admin grid in magento 2

texts: How to show only bundle products on custom module admin grid (not in admin form tabs) in magento 2.Can you please anyone help me in this.


texts: Resources to create grouped product programmatically?

texts:
I searched the web. But was unable to find any proper guide to create grouped product programmatically.

Can anyone provide proper guide for this?

Links to web posts, books, pdf and any other online guides are highly appreciated.

Thanks in advance


texts: trying to figure out the Layout Update XML

texts:
I am using magento 1.9.2.4, I am trying to edit the home page and update the homepage, had to add parallax video but when I open the homepage, its content was empty and design tab had this. I can't find these static blocks in the admin panel. Could someone let me know how to find these and if I have to add the parallax video, how do I add it in the same manner?

<reference name="pt_home_deals">
<block type="carousel/carousel" name="home.deals">
    <action method="setBlockTitle"><string>Daily Deal</string></action>
    <action method="setTemplate"><template>pt/carousel/default_deals.phtml</template></action>
    <action method="setConfig">
        <values>
            <data_source>catalog_category</data_source>
                            <block_des>wysiwyg/icon-deals.jpg</block_des>
                            <is_special_filter>1</is_special_filter>
                            <product_count>6</product_count>
                            <order_by>top_views</order_by>
            <col_xs>1</col_xs>
            <col_sm>2</col_sm>
            <col_md>2</col_md>
            <col_lg>3</col_lg>
        </values>
    </action>
</block>

<reference name="pt_home_slider">
<block type="slider/slider" name="home.slider">
 <action method="setTemplate"><path>pt/slider/default.phtml</path></action>
 <action method="setGroupId"><group_id>1</group_id></action>
 </block>
</reference>


texts:
I want to merge two Model results in a variable to use it in the register. There's a way to do this?

  $commercial = Mage::getModel('thorleif/commercial')->load(1);
  $lcat = Mage::getModel('thorleif/mapping')->load(1);
  //$mergedresult = $commercial + $lcat
  Mage::register('commerciaux_data', $mergedresult);


texts: Modifying user customer grid backend by default

texts:
We would like to modify the fields of the customer grid in the backend by default for all users. We know each user can change this themselves, but we need to implement this change for all users.

We have seen this question, but the question is about the product grid, which we don't need.

We would like to get rid of some of the columns and if possible order them.

Can we achieve this by modifying the DB or is there any backend configuration?

I have try:

  <column name="website_id" class="Magento\Customer\Ui\Component\Listing\Column\Websites" component="Magento_Ui/js/grid/columns/select" sortOrder="110">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">true</item>
            </item>
        </argument>
    </column>

And:

    <column name="website_id" class="Magento\Customer\Ui\Component\Listing\Column\Websites" component="Magento_Ui/js/grid/columns/select" sortOrder="110">
        <settings>
            <filter>select</filter>
            <editor>
                <editorType>select</editorType>
            </editor>
            <dataType>select</dataType>
            <label translate="true">Web Site</label>
            <visible>false</visible>
        </settings>
    </column>


texts: Create shipping Label using USPS on magento order

texts:
When we are going to create shipment from admin->orders->Ship->Create Shipping Label. It gives following errors.

  Insufficient information to create shipping label(s). Please verify your Store Information and Shipping Settings.


texts: Magento 2: How to upgrade specific module?

texts: Upgrading all module using php bin/magento setup:upgrade require time to complete. I have a local module which I upgraded always so I want to execute update only this module. How do we achieve this?


texts: Magento 2: How to work with minified JS and CSS files

texts:
I don't understand how minification is supposed to work for JS/CSS. My version is Magento 2.1.0

I found the setting in the configuration under Stores -> Configuration -> Advanced -> Developer where I can turn on minification. It tells me that this only works in production mode, so I turned on production mode and redeployed static content and compiled DI, and now my site is completely broken and most JS and CSS files are not found (404).

This is not surprising to me since the filenames are now different! What used to be myscript.js is now myscript.min.js in my pub/static folder, so no wonder that when the frontend tries to load myscript.js the file is not found.

What's the idea here? How am I supposed to be able to turn this on without breaking anything? Do I need to develop my modules and themes in a different way to account for this name change? How?


texts: Magento 2.3.5 script to change attribute set groups name

texts:
We have a lot of attribute sets in our store 100+. And by default the general group name inside a attribute set is called "Product Details" we want to change/translate this text.
We already tried this by adding it into the i18n file, but that does not seem to work.
So now I am looking for a script to change the group name of the "Product Details" into a new phrase.
How can I achieve this?


texts: Getting Error in admin Configuration while Clear Browser Cache

texts:
Getting Error in admin Configuration after clearing Browser Cache & History. I am getting the below error on refresh.

  Fatal error: Call to a member function getUsername() on a non-object
  in
  /var/www/app/design/adminhtml/default/default/template/page/header.phtml
  on line 33

Below is my file code on line number 33

<?php echo $this->__("Logged in as %s", $this->escapeHtml($this->getUser()->getUsername())) ?>|<?php echo $this->formatDate(null, 'full') ?>|<a href="<?php echo $this->getLogoutLink() ?>" class="link-logout"><?php echo $this->__('Log Out') ?>


texts: Installed extensions disappear after a while of itself

texts:
In Magento2 version 2.2.7, installed extensions will disappear after a while of itself.
These are different modules like:

honl/magento2-nl-nl (Translation to Dutch)
myparcelnl/magento (Shipping module of a transport company)
mollie/magento2 (Molly Payments, speaks for itself)

I can reinstall and set it up, then everything will work again. but to a period this has to happen again.
Unfortunately, I have not yet found out what time period this is.


texts: Custom Layout Update XML on Product page

texts:
I have simple question about custom layout update. I would like to add static block on product page using Product custom layout update but it doesn't work for me.

I've tried to use this code:

<reference name="product.info">
   <block type="cms/block" name="slider" as="slider" before="-">
      <action method="setBlockId">
         <block_id>slider</block_id>
      </action>
   </block>
</reference>


texts: Magento2: Can't access less variables from another file

texts:
Current File Structure:

web
|-css
   |-custom-variables.less
   |-header.less
   |-main.less

In header.less

a{
    color: @primary-color;
}

In custom-variables.less

@primary-color: #004e99;

In main.less

@import 'custom-variables';
@import 'header';

When I compile the Less files using Grunt, it is working properly. But when I switch to production mode or use php bin/magento setup:static-content:deploy, I get this error:

[Magento\Framework\View\Asset\ContentProcessorException]
  Compilation from source:
  frontend/Custom/Theme/en_AU/css/header.less
  variable @primary-color is undefined in file ..../var/view_preprocessed/css/frontend/Custom/Theme/en_AU/css/header.less in header.less on line 10, column 10
  08|   }
  09|   a{
  10|       color: @primary-color;
  11|   }
  12| }

Am I doing something wrong? Or there another way of importing less variables from another file?


texts: How to override the controller AccountController

texts:
I need to override a method Controller

Core/Mage/Customer/controllers/AccountController.php

and add a new method. Since this controller to edit is wrong - it should be overridden.

According to the project requirements override the controller must be at

local/New/Mage/Customer/controllers/AccountController.php

To do this, create a file config, but addresses customer/account/test, customer/account /ajax did not respond, and customer/account/login It is not overridden. Please help in this implementation.

app/app/etc/modules/New_Mage_Customer.xml

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

app/code/local/New/Mage/Customer/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <New_Mage_Customer>
            <version>0.0.1</version>
        </New_Mage_Customer>
    </modules>
    <frontend>
        <routers>
            <customer>
                <args>
                    <modules>
                        <new_customer before="Mage_Customer">New_Mage_Customer</new_customer>
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>
</config>

app/code/local/New/Mage/Customer/controllers/AccountController.php

<?php

/**
 * Customer account controller
 */
require_once 'Mage/Customer/controllers/AccountController.php';

class New_Mage_Customer_AccountController extends Mage_Customer_AccountController {

    public function ajaxAction() {
        echo 'ajax!!';
    }

    public function testAction() {
        echo 'test222';
    }

    public function loginAction() {
        echo 'index';
    }

}

Thanks!


texts:
I like to change some styles in my website, so i edited .less and CSS files

for example:  app/design/frontend/Templatemonster/theme/web/css/styles-l.less

I used "flush Magento cache" from backend still my modified files not updated.
What can I use to solve this problem?


texts:
I am trying to override the default email font with the one from my theme. For instance, if I want to change the font for New Order email (sales), where and how should I make this change?

Thanks


texts: How to change the total title on cart page in Magento 2?

texts:
I tried:

In vendor folder

 <item name="grand-total" xsi:type="array">
      <item name="component"  xsi:type="string">Magento_Tax/js/view/checkout/cart/totals/grand-total</item>
           <item name="config" xsi:type="array">
            <item name="template" xsi:type="string">Magento_Tax/checkout/cart/totals/grand-total</item>
                 <item name="exclTaxLabel" xsi:type="string" translate="true">Order Total Excl. Tax</item>
                 <item name="inclTaxLabel" xsi:type="string" translate="true">Order Total Incl. Tax</item>
            <item name="title" xsi:type="string" translate="true">Order Total </item>
      </item>
     </item>

In my module Test\MyAccount\view\frontend\layout\checkout_cart_index.xml

  <?xml version="1.0"?>

  <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
    <referenceBlock name="checkout.cart.totals">
        <arguments>
            <argument name="jsLayout" xsi:type="array">
                <item name="components" xsi:type="array">
                    <item name="block-totals" xsi:type="array">
                        <item name="children" xsi:type="array">
                            <item name="grand-total" xsi:type="array">
                                <item name="config" xsi:type="array">
                                    <item name="title" xsi:type="string" translate="true">You Pay</item>
                                </item>
                            </item>
                        </item>
                    </item>
                </item>
            </argument>
        </arguments>
    </referenceBlock>
</body>
</page>


texts:
Is there any way to get to an image uploader/manger type screen for the wysiwig images? There seems to be some sort of manager in place that the wysiwig editor uses to allow you to browse, upload and link images back into the editor (which appears to be broken btw, in v2.2.x) but I can't seem to find any direct way to just go view this manager by itself.

As we are setting up a new website, occasionally a third party or partner site (such as google, facebook, etc) needs a url to things like logo images and the like. If they need it at a specific size that is different from other logos we already use in content pages, we need to create a modified version and upload it somewhere that is accessible by the third-party in question or whatever mechanism they are using to display it.

Thus far, we have had to open up some kind of content page, pretend to be linking an image into some document, then not save the change in order to upload an image into the wysiwig file space. Isn't there any direct way to just open this image manager/uploader?

SW


texts: Tiered discount to take into account the quantity of other products

texts:
Let's say I have 2 products, within each product I have tier prices for quantity.

eg.

Product A

Price: £10/each

Qty 2: £8/each

Qty 3: £6/each

Qty 4+: £3/each

Product B

Price: £12/each

Qty 2: £9/each

Qty 3: £5/each

Qty 4+: £2/each

What I want to achieve is if I have 1 of Product A and 1 of Product B in the cart, then I would like their respective tiered discounts to take effect.

Product A + Product B would need to equal a total of £17

3 X Product A +  1 X Product B would need to equal a total of £11

The prices I have chosen here are not going to be the real ones they are just to demonstrate.

Is this something I can achieve with cart rules? As I can only see it allowing fixed discount out of the box.


texts:
When clicking on a configurable product in the category view I'm redirected to a blank white page with the following error:

string(59) "http://www.smashingcases.co.uk/configurable-iphone-product1"

What I've noticed is that the URL above in quotes is missing the category. It's strange because the category appears in the URL in the browser:

http://www.smashingcases.co.uk/personalised-cases/configurable-iphone-product1

This is the first time I've attempted to build a configurable product so it could be something really simple but I can't for the life of me figure out what this string error is and why it's showing a URL with no category?

I've also tried making configurable products in different categories (but using the same attribute set) and I still have the same problem..

Could it be something to do with the attribute set up?

I'm using Magento 1.8 Milano theme.


texts:
In Magento 2 what is the difference between order Id and order increment_id?

For example  getAllIds() returns order ids and the results of say $collection->getColumnValues('increment_id') returns increment_ids

Also when I view an order on the dashboard, it looks to be the increment_id


texts:
I have built an observer event that fires on catalog_product_save_before to parse the price of associated products and set another attribute to yes/no based on the result:

public function catalog_product_save_before($observer)
{
    $onsale = false;
    $product = $observer->getProduct();
    if ($product->getTypeId() == 'grouped'){
        $associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
    }  else if ($product->getTypeId() == 'configurable') {
        $associatedProducts = $product->getTypeInstance(true)->getUsedProducts($product);
    };
    if (isset($associatedProducts)) {
        foreach ($associatedProducts as $simple) {
            if ($simple->getPrice() > $simple->getSpecialPrice()) {
                $onsale = true;
                //no point wasting time if we find something, break the loop and return a true
                break;
            }
        }
        //set attribute to true or false depending on above.
        $product->setchildren_on_sale($onsale);
    }
}

My config xml:

<?xml version="1.0"?>
<config>
  <global>
    <helpers>
      <name_module>
        <class>name_module_Helper</class>
      </name_module>
    </helpers>
    <events>
        <catalog_product_save_before>
            <observers>
                <module>
                    <type>singleton</type>
                    <class>name_module_model_observer</class>
                    <method>catalog_product_save_before</method>
                </module>
            </observers>
        </catalog_product_save_before>
    </events>
  </global>
</config>

The above works fine when i save the product in the backend as normal.

However, I need this attribute to be calculated for all products, and then whenever they change / the price changes.

The event is not fired for all products during a complete reindex, even when I change the attributes of all products using the mass modification tool on the product grid.

Is there something else I need to do to ensure this event will fire whenever the product changed?


texts: How to add new div at the bottom of product details page using catalog_product_view.xml in magento 2

texts:
I want to show my custom block at bottom of product details page (after tab section) in Magento 2.3. How can I do this?

    <referenceContainer name="content">
        <block class="Vendor\CatalogProduct\Block\Custom" name="custom" template="Vendor_CatalogProduct::product/view/custom.phtml" after="-"/>
    </referenceContainer>


texts: How to Resolve Duplicate Query String Generated Urls

texts:
My website generated Query string generated urls and just because of it google penalize my website.Please let me know how to resolve that duplicate url issue.

http://www.ritukumar.com/lehenga/bridal

after query string :

http://www.ritukumar.com/lehenga/bridal?mode=list

Please let me know the best possible way to resolve that issue


texts: How to remove "Have no fear, help is near!" from 404 error page?

texts: I am newbie in Magento development. I want to remove "Have no fear, help is near! There are many ways you can get back on track with Magento Demo Store." from 404 error page in my site. How can I remove the line from the site and adding custom content to that page ?


texts:
i'm unable to compile in magento2 if i run the Compile command always give the result like below

[dsdfsd@srv2 www]$ php bin/magento setup:di:compile
Compilation was started.
Proxies code generation... 0/7 [>---------------------------]   0% < 1
sec 52.0 MiB
[dsdfsd@srv2 www]$

Struck in Proxies code Generation. Anyone please help me solve this... thanks in Advance


texts: Unable to view Admin Catalog after data migration in magento 2

texts:
Magento 2 install and migrated data from Magento 1.9.0.2 store. When I attempt to navigate to the Admin > Products > Catalog I get the following error message:

SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was:

SELECT COUNT(DISTINCT main_table.attribute_id) FROM `eav_attribute` AS `main_table`
 INNER JOIN `eav_entity_type` AS `entity_type` ON main_table.entity_type_id = entity_type.entity_type_id
 INNER JOIN `eav_entity_attribute` ON main_table.attribute_id = eav_entity_attribute.attribute_id
 INNER JOIN `` AS `additional_table` ON main_table.attribute_id = additional_table.attribute_id WHERE (`entity_type_code` = 'catalog_product') AND (`additional_table`.`is_used_in_grid` = 1)


texts:
Insert Query working:

$data = array('title'=>'hello there','content'=>'how are you? i am fine over    here.','status'=>1);
$model = Mage::getModel('mynews/mynews')->setData($data);
try {
    $insertId = $model->save()->getId();
    echo "Data successfully inserted. Insert ID: ".$insertId;
} catch (Exception $e){
 echo $e->getMessage();
}

update query having issue:

$id = 2;
$data = array('title'=>'hello test','content'=>'test how are you?','status'=>0);
$model = Mage::getModel('mynews/mynews')->load($id)->addData($data);
try {
    $model->setId($id)->save();
    echo "Data updated successfully.";

} catch (Exception $e){
    echo $e->getMessage();
}

a:5:{i:0;s:234:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'webhive_manageurl.id_webhive_manageurl' in 'where clause', query was: SELECT `webhive_manageurl`.* FROM `webhive_manageurl` WHERE (`webhive_manageurl`.`id_webhive_manageurl`='4')";i:1;s:1878:"#0 C:\wamp\www\majento\lib\Varien\Db\Statement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 C:\wamp\www\majento\app\code\core\Zend\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 C:\wamp\www\majento\lib\Zend\Db\Adapter\Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 C:\wamp\www\majento\lib\Zend\Db\Adapter\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `webhive...', Array)
#4 C:\wamp\www\majento\lib\Varien\Db\Adapter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `webhive...', Array)
#5 C:\wamp\www\majento\lib\Zend\Db\Adapter\Abstract.php(756): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 C:\wamp\www\majento\app\code\core\Mage\Core\Model\Resource\Db\Abstract.php(380): Zend_Db_Adapter_Abstract->fetchRow(Object(Varien_Db_Select))
#7 C:\wamp\www\majento\app\code\core\Mage\Core\Model\Abstract.php(225): Mage_Core_Model_Resource_Db_Abstract->load(Object(webhive_ManageUrl_Model_ManageUrl), '4', NULL)
#8 C:\wamp\www\majento\app\code\local\webhive\ManageUrl\controllers\Adminhtml\MyformController.php(17): Mage_Core_Model_Abstract->load('4')
#9 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Action.php(418): webhive_ManageUrl_Adminhtml_MyformController->postAction()
#10 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('post')
#11 C:\wamp\www\majento\app\code\core\Mage\Core\Controller\Varien\Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 C:\wamp\www\majento\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#13 C:\wamp\www\majento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#14 C:\wamp\www\majento\index.php(87): Mage::run('', 'store')
#15 {main}";s:3:"url";s:88:"/majento/index.php/manageurl/adminhtml_myform/post/key/141f405aa915852340dd4b97d47e8d3a/";s:11:"script_name";s:18:"/majento/index.php";s:4:"skin";s:5:"admin";}


texts: I have problem with my website. On main site I got theme's head and I want to delete it. Which files should I delate to get clean website with my content only?


texts: What is the purpose of sorting items by priority when computing \Magento\SalesRule\Model\Quote\Discount::collect()

texts:
In Discount::collect() at a certain point this executes \Magento\SalesRule\Model\Validator::sortItemsByPriority($items, $address)
What is the purpose of this, why is necessary to sort the items in the given way?
I'm not asking what the Validator::sortItemsByPriority() method is doing but rather why is this needed in the Discount::collect() execution flow


texts: Footer links are not properly aligned in the footer section.


texts: M2: After updating products from code, thumbnails are not showing in catalog and on backend

texts:
Magento issue tracker sent me here, because they think its not a bug. so...

Preconditions

M2 v2.2.1
Mysql 5.7
PHP 7
Ubuntu

Steps to reproduce

Updated product stock and price using this code: https://pastebin.com/eytSENau

Cleared cache, reindexed

Thumbnails missing in product listing (category page) and in admin area too. Images on product_view page are visible and correct, images in product edit page in admin are also visible and correct.

Tried to re-size images from command line, reindex, refresh cache.

Still not visible

Expected result

Images should be generated / loaded / recognized

Actual result

Thumbnails on product listings are placeholders.

Color swatches and other images works, just the thumbnails not on product listings.

Any idea what can be the issue? It worked until i did not updated the products form code. Thank you


texts:
Here is my code.

<global>
    <fieldsets>
        <customer_account>
          <customeattribute>
            <create>1</create>
            <update>1</update>
            <name>1</name>
          </customattribute>
        </customer_account>
    </fieldsets>
</global>


texts: Discount for category and its subcategories

texts:
For example I have:

  Mobile -> Apple
  Mobile -> HTC
  Mobile -> Nokia

I want to give 5% discount for all product in these categories.

Is there any way to do it without creating a catalog price rule for each of them without explicit list?


texts: HTML/CSS formating within the description?

texts:
I understand you can use html within the product description, but is it possible to add full HtML/CSS formating similar to Amazon product description

(example: http://www.amazon.co.uk/gp/product/B008UAAE44/ref=famstripe_kt)


texts: I am trying to convert DIV to Image without HTML2CANVAS

texts: I am recently trying to convert html to image in magento 1.9.2.4. so i have used Html2canvas.js. But It conflict with Magento Default prototype.js. So now i need to convert div to image without canvas. any idea about this.


texts:
In this cron I want to do the following things:

cron should fetch products which has been created in the last 3 days.
and also I have created some categories in the backend and I want to assign those products to that particular category but the condition should be there for each category can contain only 10 products at a time.

so can anyone have an idea of this please help me.
Thank you in Advance.