👋 Hi! I'm Victor, a Web and Android Developer with passion in ecommerce and have specialized in building custom software to enable entrepreneurs launch and grow their online business
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
customer: { | |
"firstname":"firstname", | |
"lastname":"lastname", | |
"email":"email", | |
"phone":"phone", | |
}, | |
seller_id:17, | |
delivery_type:"sendy default" | |
delivery_cost: 34.90, |
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 | |
public function actionBulk() { | |
$model = new Records(); | |
//import excel sheet with 5k records | |
if ($model->customImport()) { | |
//trigger the send email event | |
$model->trigger(Records::EVENT_SEND_EMAIL_UPDATE); | |
} | |
} |
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 | |
class Records extends \yii\db\ActiveRecord | |
{ | |
const EVENT_SEND_EMAIL_UPDATE = 'send-email-to-users'; | |
public function init() { | |
$this->on(self::EVENT_SEND_EMAIL_UPDATE, [$this, 'sendMail']); | |
//use this if you want to add custom data to your events |
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 | |
class Records extends \yii\db\ActiveRecord | |
{ | |
const EVENT_SEND_EMAIL_UPDATE = 'send-email-to-users'; | |
public function init() | |
{ | |
// first parameter is the name of the event and second is the handler. | |
// sendMail method from $this class. | |
$this->on(self::EVENT_SEND_EMAIL_UPDATE, [$this, 'sendMail']); | |
parent::init(); // DON'T Forget to call the parent method. |
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 | |
class Records extends \yii\db\ActiveRecord | |
{ | |
//create the event name | |
const EVENT_SEND_EMAIL_UPDATE = ‘send-email-to-users’; | |
} |
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
/** | |
_____ _____ _ | |
| __ \ / ____| | | | |
| | | | ___| | _ __ _ _ _ __ | |_ ___ _ __ | |
| | | |/ _ \ | | '__| | | | '_ \| __/ _ \| '__| | |
| |__| | __/ |____| | | |_| | |_) | || (_) | | | |
|_____/ \___|\_____|_| \__, | .__/ \__\___/|_| | |
__/ | | | |
|___/|_| | |
*/ |
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
public class RetrofitHelper { | |
private Retrofit.Builder retrofit; | |
public RetrofitHelper() { | |
retrofit = new Retrofit.Builder() | |
.baseUrl(RetrofitApi.BASE_URL) | |
.addConverterFactory(GsonConverterFactory.create()) | |
.client(new OkHttpClient() | |
.newBuilder() | |
.addNetworkInterceptor( |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
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
2019-05-19 11:06:51.590 14508-15246/one.block.androidexampleapp W/System.err: one.block.eosiojava.error.session.TransactionSignAndBroadCastError: one.block.eosiojava.error.session.TransactionCreateSignatureRequestRpcError: Error happened on calling getRequiredKeys RPC call. | |
2019-05-19 11:06:51.590 14508-15246/one.block.androidexampleapp W/System.err: at one.block.eosiojava.session.TransactionProcessor.signAndBroadcast(TransactionProcessor.java:483) | |
2019-05-19 11:06:51.591 14508-15246/one.block.androidexampleapp W/System.err: at one.block.androidexampleapp.TransactionTask.doInBackground(TransactionTask.java:140) | |
2019-05-19 11:06:51.591 14508-15246/one.block.androidexampleapp W/System.err: at one.block.androidexampleapp.TransactionTask.doInBackground(TransactionTask.java:34) | |
2019-05-19 11:06:51.591 14508-15246/one.block.androidexampleapp W/System.err: at android.os.AsyncTask$2.call(AsyncTask.java:345) | |
2019-05-19 11:06:51.591 14508-15246/one.block.androidexampleapp W/System.err: at java.util. |
NewerOlder