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
Development

Redux state change does not rerenders datatable

**Here is the cart imports and state const Cart = ({ cart, setActiveTab, removeFromCart, updateQuantity }) => { const [selectedRows , setSelectedRows] = useState([]); const [toggleCleared, setToggleCleared] = useState(false); const [products, setProducts] = useState(cart.products) } const columns = [ { name: ‘Product Name’, selector: ‘name’, sortable: true, }, { name: ‘Product Price’, selector: ‘price’, sortable: […]

Categories
Development

Switching text in each cell of a b-table to input box and back

New to vue and so far I’m loving it. Basically trying use BV tables to create a excel like table layout. When I click on the cell text, I want it to be replaced with an input box and revert back to text on blur. Sorting doesn’t work on input fields, from what I understand, […]

Categories
Development

Angular ag-grid passing data to another component

I’m stuck! I can’t seem to pass the data to the (grand)child component. I am able to pass the id in routes, and it shows up in the URL, but I can’t seem to access any of the data. I’m adding the code below. I’ve tried everything! is it because the data is passed from […]

Categories
Bootstrap Development Vue

Cannot refresh vue bootstrap table when emitting data from child to parent

I am using vue-bootstrap https://bootstrap-vue.js.org/docs/components/table/ and have implemented a slot for the header so I can have a show and hide button in each column header that contains a search box. The header is in a slot. In the fields data I have added a showFilter property that is boolean. So the idea was that […]

Categories
Development

Angular Slickgrid- how to update or replace particular cell value with the option selected in context-menu

I’m refereeing this example of slickgrid for context-menu In the image given below I’m using angular-slickgrid along with ngx-contextmenu, where I’m displaying my context menu only when a particular cell is clicked in status column, Based on particular cell value different option has been displayed in context-menu. My problem is I want to update or […]

Categories
Development

jqGrid tree grid version 4.5.2 having trouble getting the tree to work

I’m using jqGrid 4.5.2 and jquery 2.2.2. As it is it still displays the grid like normal but no trees. Digging in the browser debugger I found that it was setting a style of left:NaNpx;. I’m not sure why it’s setting the NaN. If I manually change that to 15px, the arrow appears, but the […]

Categories
Development

ag-grid: color cells if nearing expiration date

Trying to color cells if the dates on the grid are expiring soon i.e. ‘Survey Exp – 1/1/2020’ and I want the cell to turn red when today’s date is 5 months within supplier expiration. Pls help var today = new Date(); var curr_date = today.getDate(); var curr_month = today.getMonth() + 1; var curr_year = […]