Categories
CMS Magento Mastering Development

How to create functional of selecting products on admin category page

I’m trying to create selecting products on category page, I make: ui_component (category_form.xml) <form xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:noNamespaceSchemaLocation=”urn:magento:module:Magento_Ui:etc/ui_configuration.xsd”> <fieldset name=”select_products” sortOrder=”40″> <settings> <collapsible>true</collapsible> <label translate=”true”>Select Products</label> </settings> <container name=”select_products_container” sortOrder=”160″> <htmlContent name=”html_content”> <block name=”gallery” class=”Vendor\Module\Block\Adminhtml\Category\AddProducts”/> </htmlContent> </container> </fieldset> </form> AddProduct class: class AddProducts extends \Magento\Backend\Block\Template { /** * Block template * * @var string */ protected $_template […]

Categories
CMS Magento Mastering Development

Product grid checkbox input at sales rule form Magento 2 not working

I’m using Magento 2.3.4 and want to add product grid with checkbox as an input for sales rule form (shopping cart price rule), i follow the instruction to add product grid input from here but when I print the $_POST value the input data does not exist. Here’s my code: app/code/Becom/Freegift/Block/Adminhtml/Products/Edit/Tab/Product.php namespace Becom\Freegift\Block\Adminhtml\Products\Edit\Tab; use Magento\Backend\Block\Widget\Grid; […]

Categories
CMS Magento Mastering Development

Product grid checkbox input at sales rule form Magento 2 not working

I’m using Magento 2.3.4 and want to add product grid with checkbox as an input for sales rule form (shopping cart price rule), i follow the instruction to add product grid input from here but when I print the $_POST value the input data does not exist. Here’s my code: app/code/Becom/Freegift/Block/Adminhtml/Products/Edit/Tab/Product.php namespace Becom\Freegift\Block\Adminhtml\Products\Edit\Tab; use Magento\Backend\Block\Widget\Grid; […]

Categories
CMS Development Wordpress

Oder status not updating after sucessful payment on woocommerce paymoney payment gateway

it could be error of old function used in this gateway can anyone help me to sort out this ? class WC_Gateway_Payu_In extends WC_Payment_Gateway { /** * __construct function. * * @since 1.0.0 * @access public * @return void */ public function __construct() { global $woocommerce; $this->id = ‘payu_in’; $this->method_title = __( ‘PayUmoney’, ‘woocommerce_payu_in’ ); […]

Categories
CMS Development Wordpress

Why do my custom post types stop displaying over time?

I have a skill development project I am working on here: https://blog.unicornpoint.net/wp/safe-foods-meal-generator-diet-assistant/ . This is a custom template page. I am using Custom Posts UI for custom post type meals and ACF for some custom fields. Over time, some of the meals stop displaying on the page. I have meals listed at the bottom depending […]

Categories
CMS Development Wordpress

Creating a Woocommerce custom shipping method as a select field

I’m working with thw WooCommerce plugin for WordPress. My main goal right now is to create a custom shipping method. So far I’ve managed to create this method and display the same in my billing form. The problem is that this shipping methods are checkbox by default and I want an extra funcionality: Display a […]

Categories
Development

Modify some arrays inside another arrays that I get from a JSON file in angular

I want to or add some arrays in questionnaire I could reach what’s inside section but don’t know how to reach inside the question array so I can delete it or add something in it. { “questionnaire”: [ { “id”: 1, “questionnaireName”: “Inscription”, “section”: [ { “sectionName”: “section”, “question”: [ { “questionName”: “votre moyenne?”, “type”: […]

Categories
CMS Development Magento

Magneto 1 Want to show some products same as Related products in catalog product edit

I have created custom tab with products in Catalog >> Product >> Edit But want to apply same grid functionality like related products including remove products. Tabs.php (Vendor/ModuleName/Block/Adminhtml/Catalog/Product/Tabs.php) <?php /** * Class N98_ARA_Block_Adminhtml_Catalog_Product_Tabs */ class N98_ARA_Block_Adminhtml_Catalog_Product_Tabs extends Mage_Adminhtml_Block_Widget_Grid implements Mage_Adminhtml_Block_Widget_Tab_Interface { /** * Set the template for the block * */ public function _construct() { […]

Categories
Development

How can I access nested arrays in laravel

I’m using jquery nested form repeater. When I submit form I get these values. { “options”: [ { “name”: “Color”, “type”: “dropdown”, “is_required”: [ “on” ], “values”: [ { “label”: “Red”, “price”: “100”, “price_type”: “fixed” } ] }, { “name”: “Size”, “type”: “checkbox”, “values”: [ { “label”: “12”, “price”: “100”, “price_type”: “percent” } ] } […]

Categories
CMS Development Drupal

Custom Checkbox not reflecting state in database

I’m trying to define a custom field (checkbox). Everything’s working but when I check it, save, then edit the page again it appears unchecked. Looking the database shows that the value is checked it’s just not reflected in the form. What am I doing wrong? Here’s my FieldWidget — or do I need to handle […]