Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store checkout and validation updates #3213

Merged
merged 54 commits into from May 18, 2018

Conversation

notbakaneko
Copy link
Collaborator

Some of the view parts and styles need consolidating but that's a different mess to be done separately.

}

if ($item->quantity > $item->product->max_quantity) {
$messages[] = [trans_choice('model_validation/store/product.too_many', $item->product->max_quantity)];

This comment was marked as off-topic.

}

foreach ($messages as $array) {
// merge with existing errors, if any.

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -1,65 +0,0 @@
<?php

This comment was marked as off-topic.

This comment was marked as off-topic.

switch ($order->status) {
case 'checkout':
case 'processing':
return 'You cannot modify your order while it is being processed.';

This comment was marked as off-topic.

@@ -78,7 +78,7 @@ public function show()

// using $errors will conflict with laravel's default magic MessageBag/ViewErrorBag that doesn't act like
// an array and will cause issues in shared views.
$flash = session('checkout.error.errors') ?? [];
$flash = session('checkout.error.errors') ?? $checkout->validate();

This comment was marked as off-topic.

This comment was marked as off-topic.

padding: 10px;
margin: 0 0 5px;

// flex-wrap: wrap;

This comment was marked as off-topic.

@@ -587,6 +528,7 @@ private function newOrderItem(array $params)
}

$item = new OrderItem();
$item->order_id = $this->order_id;

This comment was marked as off-topic.

return $this->order;
}

private static function buildMessage(Order $order)

This comment was marked as off-topic.

@@ -464,27 +421,11 @@ public function switchItems($orderItem, $newProduct)

public static function cart($user)
{
$cart = static::query()
return static::query()

This comment was marked as off-topic.

@@ -23,11 +23,29 @@
'warehouse' => 'Warehouse',
],

'cart' => [
'errors_no_checkout' => [

This comment was marked as off-topic.

@peppy peppy added this to the May 2018 milestone May 18, 2018
@peppy peppy removed this from the May 2018 milestone May 18, 2018
@peppy peppy removed the area:store label May 18, 2018
@nanaya nanaya merged commit d60fef1 into ppy:master May 18, 2018
@notbakaneko notbakaneko deleted the feature/store-cart-validation-update branch June 13, 2018 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notify user if items in cart are no longer valid
3 participants