Categories
CMS Mastering Development

Freeform form throws error on submitting hidden field with JSON

I’ve been running into a strange error with the Freeform plugin. I have made a form that has a hidden input field which gets occupied with JSON. This JSON data then is decoded in the e-mail notification for correct displaying. A little more info for clarification: The user can select multiple products from different product […]

Categories
Mastering Development

TypeError: Cannot read property ‘qty’ of undefined. React Native Redux

I try to build an application called Cake Shop to sell and make Cakes, I have a problem reducing the number of cakes in my State, Here is my initial State import { SELL_ONE_CAKE } from "./types"; const initialState = { cakes: [ { id: 1, title: "Classic Cake", qty: 40, price: 15, }, { […]

Categories
Database Development

CPU for SQL Server

We want to buy a new server for SQL server, We have around 10 DB, and heavy jobs every 10 minutes to process millions of records, Also, we have around 20 end users, We want to know what is the best CPU for this server, and what is the advantage/disadvantage of option2 vs option1 (is […]

Categories
Mastering Development

how to output data in hbs file

index.hbs code: This is index.hbs file where i pass data from index.js file. “` <div class="row"> <div class="col-sm-6 col-md-4"> <div class="thumbnail"> <img src="" alt="…" class="img-responsive"> <div class="caption"> <h3></h3> <p class="description"></p> <div class="clearfix"> <div class="price pull-left"></div> <a href="#" class="btn btn-success pull-right" role="button">Button</a> </div> </div> </div> </div> </div> “` index.js code: var products=Product.find(function(err,docs){ res.render(‘shop/index’, { title: ‘Shopping […]

Categories
Mastering Development

Bind Array Data with the Reactive Form

While learning Angular, I am stuck on a problem. I have a form that uses the reactive method. I have an array “models” with the “price” of each “model” I would like that when I choose the “model”, it gives me its “price”, and when I validate the form, I receive the chosen model and […]

Categories
CMS Magento Mastering Development

How to set data for my extension attribute Magento 2.3

I can’t set the value for my extension attribute , how to set the value for extension attribute using json array swagger. And i can’t show the data in the order grid. The below attribute and value can’t set. My attribute : customer_feedback Value : Hello My Module that created for extension attribute Sm\OrderFeedback\etc\di.xml <?xml […]

Categories
Development

Mongodb request by name renders the wrong data

I want to set a GET by name request but instead of having the entry wanted, I get the last one on the list Here is my data on mongo : { number: 1, _id: “5df7f816d64d8dcd8e48bd48”, name: “INFRA-“, author: “Rebecca Topakian”, format: “A4”, pages: 40, paper: “Papier Serio Nero”, printing: “Impression off set argent HUV”, […]

Categories
Development

UNIQUE constraint failed: auth_user.username integrityError

im getting this error when i want that the username not be repeated in my django form. i saw a lot of this situations here in stackoverflow but it seems that every situation is unique. every time that i want to create a new user the error pops out and i dont know why i […]

Categories
Development Vue

Sort filter in vue.js

Basically what am I doing wrong? This is a chained filter under computed. Error is ‘product.topic.sort’ is not a function. I am trying to use ‘select’ to have a sort option of ascending, descending, price high & price low. V-model binds value to the js. Under filters I’m trying to add a filter that does […]

Categories
Development

Use Ramda to Multiply and transform objects of an array based on a key name pattern. Return all in new flat array

I have an array of objects where each object has like duplicated ‘translated’ keys with the translated values for different languages, but also normal generic values like a price. [ {name_de: ‘foo 1 de’, name_it: ‘foo 1 it’, price: 10 }, {name_de: ‘foo 2 de’, name_it: ‘foo 2 it’, price: 20 }, {name_de: ‘foo 3 […]