This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API code: | |
<?php | |
$hostname = "localhost"; | |
$username = "id21145254_devjas"; | |
$password = "Peter@007"; | |
$database = "id21145254_devjas"; | |
$mysqli = new mysqli($hostname, $username, $password, $database); | |
if ($mysqli->connect_error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from date to date restrictions | |
$("#from_date").datepicker({ | |
format: 'dd-mm-yyyy', | |
//minDate: new Date('02-09-2021'), | |
//maxDate: new Date(), | |
autoClose: true, | |
onSelect: function(dateText) { | |
var dateMin = $('#from_date').datepicker("getDate"); | |
//var datee = new Date($("#from_date").val());console.log(datee); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://blog.cloudboost.io/creating-your-first-mern-stack-application-b6604d12e4d3 | |
https://medium.com/swlh/how-to-create-your-first-mern-mongodb-express-js-react-js-and-node-js-stack-7e8b20463e66 | |
https://www.freecodecamp.org/news/npm-vs-npx-whats-the-difference/ | |
npm (node package manager) is the dependency/package manager | |
http://localhost:3000/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST["submit"])) | |
{ | |
$url='localhost'; | |
$username='root'; | |
$password=''; | |
//$conn=mysqli_connect($url,$username,$password,"location"); | |
$conn=mysqli_connect("localhost", "euodias_dev1", "euodias_dev1@321!", "euodias_redrope"); | |
if(!$conn){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dowload install node | |
install angular CLI | |
ng new 'project name' | |
ng serve --port 4300 | |
ng generate component 'component name' | |
https://jasonwatmore.com/post/2019/06/10/angular-8-user-registration-and-login-example-tutorial#login-component-html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Mini-cart | |
* | |
* Contains the markup for the mini-cart, used by the cart widget. | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/cart/mini-cart.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Custom script to import order from a different database to WooCommerce | |
*/ | |
function custom_import_order_shortcode_fun2(){ | |
ob_start(); | |
global $wpdb; | |
// | |
// $old_orders = $wpdb->get_results( "SELECT * FROM `orders` WHERE orderid BETWEEN 68980 AND 69005"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Custom import script for products (simple/variable) from different database to woocommerce | |
* custom-import-script.php | |
*/ | |
//create product | |
function custom_import_product_shortcode_fun(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you want the URL rewriting as in Wordpress then PHP is the way. Here is simple example to begin with. | |
Folder structure | |
There are two files that are needed in the root folder, .htaccess and index.php, and it would be good to place the rest of the .php files in separate folder, like inc/. | |
root/ | |
inc/ | |
.htaccess | |
index.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'http://api.resmush.it/ws.php?qlty=80&img=http://freetouse.com.dev.ceptiv.net/track-cover/thumb/Vlad-Gluschenko-Lean-On.jpg'); | |
curl_setopt($ch, CURLOPT_POST,1); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); | |
//curl_setopt($ch, CURLOPT_POSTFIELDS, $data); | |
$result = curl_exec($ch); | |
if (curl_errno($ch)) { | |
$result = curl_error($ch); | |
} |
NewerOlder