Input field one – delivery date has a datepicker attached. This fills in the required date by client. This field determines the delivery time options that are populated in the select field next to it. However the options are based on some rules Time slots are 30 mins intervals from 11am to 4pm. If the d…
Tag: php
Laravel polymorphic with custom foreign key
I have problem with custom shipmentable_type. My structure looks like this: Now I have in my Transfer model realtion like this: The problem is, that to table shipmentable, to column shipmentable_type is going sth like this now: App/Models/Transfer, but I would like to force to be there ‘transfer’ …
Unset Payment Method for downloadable items only and a specific shipping country [closed]
My e-commerce site sells 99% to South Africans, and we use “BACS” “EFT” & Credit Card as payment options. We do accept international orders, but can not calculate the shipping cost for …
Can’t get value from Summernote textarea using Javascript AJAX send post data
I’ve been checking summernote API, and there is my code …
Get the selected variation attributes from orders in Woocommerce 3
In Woocommerce, I have a report in the admin area that tallies up products sold.There are only 5 products sold on the site but there are 1 or 2 variations on some. The report works great but ignores the variations. I need to retrieve the attribute value from items ordered to display the data accurately. How d…
Renaming files with random string after upload and storing the name in array
I’m trying to process multiple files upload with foreach then rename the files with random string and store the file names in an array, here’s my current code: I can’t find where the problem is, should I use foreach for every generated file name then use move_uploaded_file inside the foreach…
Save files to OneDrive using PHP same as FTP without show login page
I’m wondering if I can use OneDrive for saving integration files between two web apps, so I have to create file and save it to OneDrive on specific folder but this process should be in background using username and password for OneDrive account, so the end user should not see the Microsoft login page or…
Retrieving facebook user access token with socialite on laravel 5.4
I am trying to get user access token so I can send CURL request through Guzzle to Facebook’s Graph API to get user’s friends that are using the app. But I can’t seem to be able to obtain it. Here’s my controller: Answer A couple of things to note. First of all, the following part of yo…
Migrations in Laravel 5.5: Cannot declare class because the name is already in use
While running a migration in Laravel I got an error: PHP Fatal error: Cannot declare class UpdateEnquiriesTable, because the name is already in use in /var/www/project/database/migrations/2018_01_17_160335_update_enquiries_table.php on line 33 Having done a bit of research, I see that each migration file need…
how to set Bootstrap navbar active class in one page website in Laravel 5.5
I am looking for solutions, but can’t really understand. I’m new in Laravel and I want a simple instruction on how to set the active class in the bootstrap navbar on a one-page website. Here’s what I’ve done so far, but can’t get it done: Answer You can try like this using jQuery…