收藏多语言
This commit is contained in:
parent
6fd0fb353b
commit
529640cbf6
|
|
@ -33,7 +33,7 @@ class WishlistController extends Controller
|
|||
$productId = $request->get('product_id');
|
||||
$wishlist = CustomerRepo::addToWishlist(current_customer(), $productId);
|
||||
|
||||
return json_success('加入收藏成功', $wishlist);
|
||||
return json_success(trans('shop/wishlist.add_wishlist_success'), $wishlist);
|
||||
}
|
||||
|
||||
public function remove(Request $request): array
|
||||
|
|
@ -41,7 +41,7 @@ class WishlistController extends Controller
|
|||
$id = $request->id;
|
||||
CustomerRepo::removeFromWishlist(current_customer(), $id);
|
||||
|
||||
return json_success('移除收藏成功');
|
||||
return json_success(trans('shop/wishlist.remove_wishlist_success'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* wishlist.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-08-22 20:20:37
|
||||
* @modified 2022-08-22 20:20:37
|
||||
*/
|
||||
|
||||
return [
|
||||
'add_wishlist_success' => 'Add to wishlist successfully',
|
||||
'remove_wishlist_success' => 'Remove to wishlist successfully',
|
||||
];
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
/**
|
||||
* wishlist.php
|
||||
*
|
||||
* @copyright 2022 opencart.cn - All Rights Reserved
|
||||
* @link http://www.guangdawangluo.com
|
||||
* @author Edward Yang <yangjin@opencart.cn>
|
||||
* @created 2022-08-22 20:20:37
|
||||
* @modified 2022-08-22 20:20:37
|
||||
*/
|
||||
|
||||
return [
|
||||
'add_wishlist_success' => '加入收藏成功',
|
||||
'remove_wishlist_success' => '移除收藏成功',
|
||||
];
|
||||
Loading…
Reference in New Issue