Days
Hours
Minutes
Seconds

Super Black Friday Sale!

0
No products in the cart.

Forum Replies Created

Viewing 15 posts - 31 through 45 (of 741 total)
  • Author
    Posts
  • blankabctest483
    Member

    Try running following command:

    php bin/magento catalog:images:resize
    

    Hope it helps and solve your issue..

    blankabctest483
    Member

    You upload your JS to Assets in Shopify. That then lets you reference them in your code. You can assure yourself that no matter what you did in Magento, there exists an equivalent in Shopify. I think once you carefully and closely examine how Shopify templates render, you’ll quickly drop Magento and wonder how you lasted so long with that clunker.

    in reply to: Update magento 2.4.3 to 2.4.6 with composer #9894
    blankabctest483
    Member

    Try Your composer.json as below line , I solved this way

    "require-dev": {
     "pdepend/pdepend": "~2.7.1", to ==> "pdepend/pdepend": "^2.10",
    }
    
    blankabctest483
    Member

    Specific Case and Solution

    • Good answers above. Especially Matt Woodward (https://stackoverflow.com/a/53166416/3502900). Will be sharing a specific case and solution.
    • WordPress is prompting you for your FTP credentials because the file permissions are incorrect for your WordPress setup.

    PROBLEM = MANUALLY COPYING WORDPRESS FILES

    I used rsync to copy over wordpress files from one cpanel with wordpress to another.

    As I executed the rsync as "root" user, the copied files (but not directories!) got assigned to user "root".

    FIX YOUR FILE PERMISSIONS

    This will find all incorrectly assigned files. Check the list. If wordpress php files are among them, you have your problem.

    find /home/yourcpanel/www -user root -printf "type="%Y/"depth="%d\ \ %u\:%g\ \ %p\\n
    

    Now assign files to the correct user and group. In this case the cpanel name "yourcpanel" was the correct user. It might be different in your case. Check your SSH user, for example.

    find /home/yourcpanel/www -type f -user root -group root -printf "type="%Y/"depth="%d\ \ %u\:%g\ \ %p\\n -exec chown yourcpanel:yourcpanel {} \;
    
    blankabctest483
    Member

    Attention, before performing these actions, please save your changes so that you can later copy them to the Magento 2 files folder.

    To make Magento 2 files visible, you need to change the path to the ‘magento_data’ folder to:

    volumes:
    - './magento_data:/bitnami/magento'
    

    To do this, please edit the ‘docker-compose.yml’ file

        version: '2'
    services:
      mariadb:
        image: docker.io/bitnami/mariadb:10.4
        environment:
          # ALLOW_EMPTY_PASSWORD is recommended only for development.
          - ALLOW_EMPTY_PASSWORD=yes
          - MARIADB_USER=bn_magento
          - MARIADB_DATABASE=bitnami_magento
        volumes:
          - 'mariadb_data:/bitnami/mariadb'
      magento:
        image: docker.io/bitnami/magento:2
        ports:
          - '80:8080'
          - '443:8443'
        environment:
          - MAGENTO_HOST=localhost
          - MAGENTO_DATABASE_HOST=mariadb
          - MAGENTO_DATABASE_PORT_NUMBER=3306
          - MAGENTO_DATABASE_USER=bn_magento
          - MAGENTO_DATABASE_NAME=bitnami_magento
          - ELASTICSEARCH_HOST=elasticsearch
          - ELASTICSEARCH_PORT_NUMBER=9200
          # ALLOW_EMPTY_PASSWORD is recommended only for development.
          - ALLOW_EMPTY_PASSWORD=yes
        volumes:
          - './magento_data:/bitnami/magento'
        depends_on:
          - mariadb
          - elasticsearch
      elasticsearch:
        image: docker.io/bitnami/elasticsearch:7
        volumes:
          - 'elasticsearch_data:/bitnami/elasticsearch/data'
    volumes:
      mariadb_data:
        driver: local
      magento_data:
        driver: local
      elasticsearch_data:
        driver: local
    

    Changes in docker-compose.yml compared to the original:

    blank

    After modifying the path in the docker-compose.yml file, rebuild the containers using the following command:

    docker-compose up -d --build
    

    A folder named "magento_data" has appeared next to the docker-compose.yml file, where the files for Magento 2 are stored:

    blank

    in reply to: Woocommerce template overriding not working #9444
    blankabctest483
    Member

    I had this issue too.

    Clear cache, then just swap/activate themes to a wordpress standard theme, then swap back to yours. Happy Days!

    in reply to: Update magento 2.4.3 to 2.4.6 with composer #9895
    blankabctest483
    Member

    That package might be part of Magento’s own repository. Add it to your composer.json like this:

    {
        "repositories": [
            {
                "type": "composer",
                "url": "https://repo.magento.com/"
            }
        ]
    }
    

    Have a look at their documentation if you have more questions about this repository

    in reply to: How to prevent line breaks in list items using CSS #10095
    blankabctest483
    Member

    <nobr>your text</nobr> (not css but easier in some cases)

    blankabctest483
    Member

    In Addition

    For large .sql files, I recommend using HeidiSQL (a free and open-source database tool) and pressing Ctrl+O to load the file by browsing from the folder.

    After that press Ctrl+f and replace the "utf8mb4_unicode_520_ci" (in my case) with "utf8mb4_unicode_520_ci" and save the file by pressing Ctrl+s.

    Finally, rerun the DB upload process, and cheers.

    in reply to: How to render an enabled CMS block in phtml file in magento 2? #9898
    blankabctest483
    Member

    Override form.phtml file in your child theme and then Call your static block in that override form.phtml file:

    <?php 
    echo $this->getLayout()
    ->createBlock('Magento\Cms\Block\Block')
    ->setBlockId('your_block_identifier')
    ->toHtml();
    ?>
    
    blankabctest483
    Member

    Go to the API documentation, and find "invoices".

    The request should look something like this:

    /V1/invoices
    searchCriteria[filterGroups][0][filters][0][eq]
    searchCriteria[filterGroups][0][filters][0][id]
    searchCriteria[filterGroups][0][filters][0][invoice_id]
    

    Invoices Screen Grab

    in reply to: How to render an enabled CMS block in phtml file in magento 2? #9897
    blankabctest483
    Member

    To render an enabled CMS block in a phtml file in Magento 2, you can use the following code:

    <?php
    $blockId = 'your_block_identifier'; // Replace with your block identifier
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $block = $objectManager->create('Magento\Cms\Block\Block')->setBlockId($blockId);
    if ($block->getIsActive()) {
        echo $block->toHtml();
    }
    ?>
    

    Here’s a breakdown of the code:

    Define the identifier of the CMS block you want to render. This can be found in the CMS block list in the Magento admin panel.

    $blockId = 'your_block_identifier';
    

    Create an instance of the CMS block using the ObjectManager

    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $block = $objectManager->create('Magento\Cms\Block\Block')->setBlockId($blockId);
    

    Check if the block is active (enabled)

    if ($block->getIsActive()) {
    

    If the block is active, render the block’s HTML using the toHtml() method.

    echo $block->toHtml();
    

    Note that using the ObjectManager directly is not best practice, and it is recommended to use dependency injection instead. Additionally, you should make sure to sanitize the $blockId input to avoid security vulnerabilities.

    blankabctest483
    Member

    According to my experience, the destination’s MySQL server is an older version than the source. The required database collation is not present on the destination server.

    To fix this, we can make a small change to the backup file. Replace "utf8mb4 0900 ai ci" with "utf8mb4 general ci" and "CHARSET=utf8mb4" with "CHARSET=utf8" in the database backup file.

    Replace the below string:

    ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
    

    with:

    ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
    

    Save your file and restore the database.

    in reply to: How To Include CSS and jQuery in my WordPress plugin? #9997
    blankabctest483
    Member

    Did you mean the js and css files or code? If you have very little scripts or styling used, you can simply use them inline. But it’s recommended to use following wordpress plugin functions if you want to include files.

    wp_register_script()
    wp_enqueue_style()

    Hope it helps.

    blankabctest483
    Member

    As you mentioned in your question you only want to get the order info based on a certain sales rep. To do that you need to somehow find a unique identify for the currently logged in sales rep and add a filter for that .

    For example:

    $collection = $this->_itemCollectionFactory->create()->getCollection();
     $collection->getSelect()->columns(array('total_orders' => new \Zend_Db_Expr('COUNT(order_id)')))
            ->columns(array('total_qty' => new \Zend_Db_Expr('ROUND(SUM(qty_ordered))')))
            ->group('sku');
        $collection->getSelect()->limit(3);
        $collection->addFieldToFilter('store_id', 2);
        $collection->addFieldToFilter('sales_rep_identifier', $loggedInSalesRepIdentifier);
    

    The label sales_rep_identifier and the value $loggedInSalesRepIdentifier are just examples, you may have to adjust the format in which the data is stored if it doesn’t currently have a field to check natively what sales rep did it, and adjust the values there accordingly

    If you’re using some kind of prebuilt system then maybe there are other labels for the identifier you could use, without more information on the specific database structure it’s impossible to answer exactly, but essentially you need to filter by the unique sales rep identifier, and if that doesn’t exist now in the database it should somehow but added

Viewing 15 posts - 31 through 45 (of 741 total)