Skip to content
Advertisement

Getting different weeks for my two january orders

I am just facing issue with getting right week for my orders which I want put the numbers of orders in different weeks it into graph. The issue is that the order made in 2022-01-02 is week 52.. but order made in 2022-01-03 is week 1.. how can i achieve that the both orders will be in the same week

Can’t find an reason for illegal string offset when trying to access data from array

It might be something very small that I miss but I have error of Illegal string offset ‘Time’ in … when I try to access it. Here is the array Here is the code how I try to access the `[‘Obs’][‘Time’] Any idea what is happening here? Update: When I try $series[‘Obs’][‘Time’] instead of $obs_element[“Time”] in the second foreach, it

How to display html tag with css using esc_html?

I am editing the woocommerce orders.php template and ran into a problem. The template shows to user the orders he has placed. There are now several variables that I think need to be coded for security, such as $date_created or $view_order which contains the order link. So I’m trying to add esc_html to these and other variables but when I

Error while adding Eloquent class to User in Laravel

I want to make an eloquent model out of two table, pekerjaan and user. User hasMany pekerjaan and pekerjaan belongsTo User. How do I add eloquent’s method to the User class in Laravel? I have an error that shows: Cannot declare class AppModelsUser, because the name is already in use Here is my User.php model code: And here is my

Best way to do a traversal on a hierarchy array

Need suggestion on the best way to do a traversal on my hierarchy array (at this point I think it’s a tree) A snippet of my array is this: So on that snippet, a quick explanation is that ‘Main’ node is root and it has 2 children “Two” and “Three” then “Three” has a child namely “Four”. The actual data

Date range loop into bbdd

I want to make different tables from 2 variables: start date and end date. Example: input start= 05/07/2022 input end= 07/07/2022 so, when I submit the form I want this result: ddbb: id:01 05/07/2022 id:02 06/07/2022 id:03 07/07/2022 I tried this but I got the dates displace, like this: id:01 06/07/2022 id:02 07/07/2022 id:03 08/07/2022 This is the code: Answer

does not extend MagentoFrameworkDataObject

I have exception when I ceate model.Here is that exception: Magento version is 2.4.4 Training4VendorModelTraining4_Vendor2Product Training4VendorModelResourceModelTraining4_Vendor2Product Training4VendorModelResourceModelTraining4_Vendor2ProductCollection in Training4VendorModelTraining4_Vendor2Product,I have already extends MagentoFrameworkModelAbstractModel,I don’t know why that exception occur Answer did you add dependency in di.xml

Advertisement