/** * Show the form for creating a new user addresses. * * @return \Illuminate\Http\Response */ public function create() { $user = Auth::user(); $countries = Country::all(); $defaultCountry = Configuration::getConfiguration('mage2_address_default_country'); return view('address.my-account.create-address')->with('user', $user)->with('countries', $countries)->with('defaultCountry', $defaultCountry); }
public function view($slug) { $productsOnCategoryPage = Configuration::getConfiguration('mage2_catalog_no_of_product_category_page'); $category = Category::where('slug', '=', $slug)->get()->first(); $products = $category->products()->paginate($productsOnCategoryPage); return view('catalog.category.view')->with('category', $category)->with('products', $products); }
public function getTaxAmount() { $taxPercentage = Configuration::getConfiguration('mage2_tax_class_percentage_of_tax'); $price = $this->price; $taxAmount = $taxPercentage * $price / 100; return $taxAmount; }
public function getCountryIdAttribute() { if (isset($this->attributes['country_id']) && $this->attributes['country_id'] > 0) { return $this->attributes['country_id']; } $defaultCountry = Configuration::getConfiguration('mage2_address_default_country'); if (isset($defaultCountry)) { return $defaultCountry; } return ""; }
/** * Display a listing of the theme. * * @return \Illuminate\Http\Response */ public function index() { $themes = config('theme'); $activeTheme = Configuration::getConfiguration('active_theme_identifier'); return view('admin.theme.index')->with('themes', $themes)->with('activeTheme', $activeTheme); }
public function setApiContext($clientId = null, $clientSecret = null, $requestId = null) { if (null === $clientId) { //$clientId = config('paypal.api-client-d'); $clientId = Configuration::getConfiguration('paypal_client_id'); } if (null === $clientSecret) { //$clientSecret = config('paypal.api-client-secret'); $clientSecret = Configuration::getConfiguration('paypal_client_secret'); } $credentials = new OAuthTokenCredential($clientId, $clientSecret); $this->_apiContext = new ApiContext($credentials, $requestId); return $this; }