This file contains hidden or 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
(function() { | |
var customer = { | |
customer: [], | |
init: function() { | |
this.cacheDOM(); | |
this.bindEvents(); | |
this.render(); | |
}, | |
cacheDOM: function() { | |
this.$el = $('#customerModule'); |
This file contains hidden or 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
var Component1 = React.createClass({ | |
render: function() { | |
var txt = this.props.txt; | |
return( | |
<div> | |
<button onClick={this.handleClick().bind(this)}> | |
Toggle {txt} | |
</button> | |
</div> | |
); |
This file contains hidden or 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
import React from 'react'; | |
export default class AddForm extends React.Component { | |
state = { | |
txt: '' | |
} | |
render() { | |
return( | |
<div> |
This file contains hidden or 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
import { | |
// imports here | |
} from '../constants/ActionTypes'; | |
import axios from 'axios'; | |
Number 1: | |
export default { | |
getComments() { |
This file contains hidden or 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 | |
//ini_set('max_execution_time', 1000); //300 seconds = 5 minutes | |
$serverName = $_SERVER['SERVER_NAME']; | |
$isOneSuper = strpos($serverName, 'onesupershop') !== false; | |
$isOneLife = strpos($serverName, 'onelifepremium') !== false; | |
$isOneSuperMart = strpos($serverName, 'onesupermart') !== false; | |
$isLocal = strpos($serverName, 'localhost') !== false; | |
if ($isOneSuper) { |
This file contains hidden or 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 LoginClass | |
{ | |
public function loginUser($params) | |
{ | |
$loginParams = [ | |
'username' => $params['username'], | |
'password' => $params['password'], | |
'grant_type' => 'password', | |
'client_id' => 'test', |
This file contains hidden or 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 | |
/* | |
ini_set('session.save_handler', 'memcache'); | |
ini_set('session.save_path', 'phpsessions.wzcirm.cfg.usw2.cache.amazonaws.com:11211'); | |
*/ | |
define('INCLUDES', 'includes'); | |
define('CONFIG', 'config'); | |
$serverName = $_SERVER['SERVER_NAME']; | |
define('SITE_URL', preg_replace('/(business[.])|(api[.])|(onex[.])|(cart[.])|(www[.])/', '', $serverName)); | |
$isOneLife = strpos($serverName, 'onelifepremium') !== false; |
This file contains hidden or 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
var MyPurchases = function() { | |
var handlePurchases = function(api,userid,pageNum) { | |
$('#datatable_mypurchase').DataTable({ | |
"ajax": api+"/users/"+userid+"/purchases?page="+pageNum, | |
"columns": [ | |
{ "data": "id" }, | |
{ "data": "net_amount" }, | |
{ "data": "created_at" }, |
This file contains hidden or 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 | |
//ini_set('max_execution_time', 1000); //300 seconds = 5 minutes | |
$serverName = $_SERVER['SERVER_NAME']; | |
$isOneSuper = strpos($serverName, 'onesupershop') !== false; | |
$isOneLife = strpos($serverName, 'onelifepremium') !== false; | |
$isOneSuperMart = strpos($serverName, 'onesupermart') !== false; | |
$isLocal = strpos($serverName, 'localhost') !== false; | |
if ($isOneSuper) { | |
define('HostRead', 'haproxy.onesupershop.com'); |
This file contains hidden or 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
handleLimit(elem) { | |
const { product } = this.props; | |
const qtyOrdered = cartItem ? cartItem.qty_ordered : 0; | |
// Checks the difference of the Inventory and Quantity Ordered | |
const inventoryOrderDifference = product.quantity - qtyOrdered; | |
const max_chars = inventoryOrderDifference.toString().length; | |
if(this.state.qty.toString().length > max_chars) { | |
elem = elem.value.substr(0, max_chars); | |
} |
OlderNewer