diff --git a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php index 9521ad2b6..89ab7fd4d 100644 --- a/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php +++ b/packages/Webkul/Cart/src/Database/Migrations/2018_09_19_093453_create_cart_payment.php @@ -16,6 +16,7 @@ class CreateCartPayment extends Migration Schema::create('cart_payment', function (Blueprint $table) { $table->increments('id'); $table->string('method'); + $table->string('method_title')->nullable(); $table->integer('cart_id')->nullable()->unsigned(); $table->foreign('cart_id')->references('id')->on('cart'); $table->timestamps(); diff --git a/packages/Webkul/Cart/src/Helpers/Checkout.php b/packages/Webkul/Cart/src/Helpers/Checkout.php new file mode 100644 index 000000000..9e695c7db --- /dev/null +++ b/packages/Webkul/Cart/src/Helpers/Checkout.php @@ -0,0 +1,43 @@ +attributeOption = $attributeOption; + } + + /** + * Returns the allowed variants + * + * @param CartItem $item + * @return array + */ + public function getItemOptionDetails($item) + { + $data = []; + + foreach ($item->product->super_attributes as $attribute) { + + } + + return $data; + } +} \ No newline at end of file diff --git a/packages/Webkul/Cart/src/Models/Cart.php b/packages/Webkul/Cart/src/Models/Cart.php index 310d16703..e70421da3 100644 --- a/packages/Webkul/Cart/src/Models/Cart.php +++ b/packages/Webkul/Cart/src/Models/Cart.php @@ -31,7 +31,7 @@ class Cart extends Model /** * Get the biling address for the cart. */ - public function biling_address() + public function billing_address() { return $this->addresses()->where('address_type', 'billing'); } @@ -39,9 +39,9 @@ class Cart extends Model /** * Get all of the attributes for the attribute groups. */ - public function getBilingAddressAttribute() + public function getBillingAddressAttribute() { - return $this->biling_address()->first(); + return $this->billing_address()->first(); } /** diff --git a/packages/Webkul/Cart/src/Models/CartAddress.php b/packages/Webkul/Cart/src/Models/CartAddress.php index 889328d39..935b09eb0 100644 --- a/packages/Webkul/Cart/src/Models/CartAddress.php +++ b/packages/Webkul/Cart/src/Models/CartAddress.php @@ -18,4 +18,12 @@ class CartAddress extends Model { return $this->hasMany(CartShippingRate::class); } + + /** + * Get all of the attributes for the attribute groups. + */ + public function getNameAttribute() + { + return $this->first_name . ' ' . $this->last_name; + } } \ No newline at end of file diff --git a/packages/Webkul/Core/src/Core.php b/packages/Webkul/Core/src/Core.php index 35aa98a5d..2375fc466 100644 --- a/packages/Webkul/Core/src/Core.php +++ b/packages/Webkul/Core/src/Core.php @@ -8,6 +8,7 @@ use Webkul\Core\Models\Locale as LocaleModel; use Webkul\Core\Models\Currency as CurrencyModel; use Webkul\Core\Models\TaxCategory as TaxCategory; use Webkul\Core\Models\TaxRate as TaxRate; +use Illuminate\Support\Facades\Config; class Core { @@ -276,4 +277,21 @@ class Core return $date->format($format); } + + /** + * Retrieve information from payment configuration + * + * @param string $field + * @param int|string|null $channelId + * + * @return mixed + */ + public function getConfigData($field, $channelId = null) + { + if (null === $channelId) { + $channelId = $this->getCurrentChannel()->id; + } + + return Config::get($field); + } } \ No newline at end of file diff --git a/packages/Webkul/Payment/src/Payment.php b/packages/Webkul/Payment/src/Payment.php index ebbd54637..da4d78114 100644 --- a/packages/Webkul/Payment/src/Payment.php +++ b/packages/Webkul/Payment/src/Payment.php @@ -21,7 +21,7 @@ class Payment if($object->isAvailable()) { $paymentMethods[] = [ 'method' => $object->getCode(), - 'title' => $object->getTitle(), + 'method_title' => $object->getTitle(), 'description' => $object->getDescription(), ]; } diff --git a/packages/Webkul/Payment/src/Payment/Payment.php b/packages/Webkul/Payment/src/Payment/Payment.php index 6b4c0a063..4f3f5242c 100644 --- a/packages/Webkul/Payment/src/Payment/Payment.php +++ b/packages/Webkul/Payment/src/Payment/Payment.php @@ -58,14 +58,8 @@ abstract class Payment * * @return mixed */ - public function getConfigData($field, $channelId = null) + public function getConfigData($field) { - if (null === $channelId) { - $channelId = core()->getCurrentChannel()->id; - } - - $paymentConfig = Config::get('paymentmethods.' . $this->getCode()); - - return $paymentConfig[$field]; + return core()->getConfigData('paymentmethods.' . $this->getCode() . '.' . $field); } } \ No newline at end of file diff --git a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php index 55cb97848..53be021ac 100644 --- a/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php +++ b/packages/Webkul/Shipping/src/Carriers/AbstractShipping.php @@ -67,16 +67,9 @@ abstract class AbstractShipping * * @return mixed */ - public function getConfigData($field, $channelId = null) + public function getConfigData($field) { - if (null === $channelId) { - $channelId = core()->getCurrentChannel()->id; - } - - $shippingConfig = Config::get('carriers.' . $this->getCode()); - - return $shippingConfig[$field]; + return core()->getConfigData('carriers.' . $this->getCode() . '.' . $field); } - } ?> \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss index 67c473993..b9b2593e8 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/_variables.scss @@ -1,12 +1,14 @@ //shop variables $font-color: #242424; -$border-color: #E8E8E8; $font-size-base: 16px; -$border-color: #c7c7c7; +$border-color: #E8E8E8; $brand-color: #0031f0; //shop variables ends here + +//=======>Need to be removed //customer variables $profile-content-color: #5e5e5e; $horizontal-rule-color: #E8E8E8; -//customer variables ends here \ No newline at end of file +//customer variables ends here +//<=======Need to be removed \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index 07fbc6dc6..970be8186 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -1,6 +1,4 @@ - @import url("https://fonts.googleapis.com/css?family=Montserrat:400,500"); - @import "icons"; @import "mixins"; @import "variables"; @@ -3189,14 +3187,7 @@ section.cart { .address-card { width: 50%; - - &.left { - float: left; - } - - &.right { - float: right; - } + float: left; .card-title span { font-weight: 600; diff --git a/packages/Webkul/Shop/src/Resources/lang/en/app.php b/packages/Webkul/Shop/src/Resources/lang/en/app.php index 736b6ba5e..d2ccf7be8 100644 --- a/packages/Webkul/Shop/src/Resources/lang/en/app.php +++ b/packages/Webkul/Shop/src/Resources/lang/en/app.php @@ -90,7 +90,11 @@ return [ 'payment-information' => 'Payment Information', 'summary' => 'Summary of Order', 'price' => 'Price', - 'quantity' => 'Quantity' + 'quantity' => 'Quantity', + 'billing-address' => 'Billing Address', + 'shipping-address' => 'Shipping Address', + 'contact' => 'Contact', + 'place-order' => 'Place Order' ], 'total' => [ diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php index 17b2889c8..11de9111c 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage.blade.php @@ -88,7 +88,7 @@
diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php index d5dba6af8..e12395dbf 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/payment.blade.php @@ -13,7 +13,7 @@ - {{ $payment['title'] }} + {{ $payment['method_title'] }} {{ $payment['description'] }} diff --git a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php index 6ca9b95ea..33f4b31d7 100644 --- a/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/checkout/onepage/review.blade.php @@ -5,37 +5,41 @@