Search found 10 matches

by bar_on
19 Jan 2025, 10:50
Forum: Help
Topic: How to customize default values in add form (admin backend)?
Replies: 1
Views: 175

How to customize default values in add form (admin backend)?

When creating new product, I want the tax rate in all new price to be 0 by default, also currency to be EUD. Is there a way I can achieve this easily?

Version:
"aimeos/aimeos-laravel": "~2023.10",
"php": "^8.1.0",
by bar_on
13 Nov 2024, 07:34
Forum: Help
Topic: How do I customize the context.php in vendor folder?
Replies: 7
Views: 103146

Re: How do I customize the context.php in vendor folder?

You can change the guard in the ./config/shop.php using the "guards" key: https://github.com/aimeos/aimeos-laravel/blob/master/src/Base/Context.php#L281 It works now! Thank you very much. For anyone using jsonapi with laravel passport, the setup in shop.php is 'guards' => ['jsonapi' => 'y...
by bar_on
11 Nov 2024, 06:05
Forum: Help
Topic: How do I customize the context.php in vendor folder?
Replies: 7
Views: 103146

Re: How do I customize the context.php in vendor folder?

From another post I read that the user function works if Auth::id() returns the correct user id. However, Laravel by default uses guard 'web' instead of 'api'. If I change the default guard to api, the aimeos backend wouldn't login. How do I configure aimeos to use guard 'api' instead? (ie. auth('a...
by bar_on
07 Nov 2024, 06:47
Forum: Help
Topic: How do I customize the context.php in vendor folder?
Replies: 7
Views: 103146

Re: How do I customize the context.php in vendor folder?

From another post I read that the user function works if Auth::id() returns the correct user id. However, Laravel by default uses guard 'web' instead of 'api'. If I change the default guard to api, the aimeos backend wouldn't login. How do I configure aimeos to use guard 'api' instead? (ie. auth('ap...
by bar_on
07 Nov 2024, 06:34
Forum: Help
Topic: How do I customize the context.php in vendor folder?
Replies: 7
Views: 103146

Re: How do I customize the context.php in vendor folder?

Thanks for the reply. I couldn't get the customer get self jsonapi to work (ie. returning everything null when logged in), except changing the user function (in context.php of vendor folder) to return the laravel auth user id instead. I'm using laravel passport for user auth. Hence I'd like to know:...
by bar_on
30 Oct 2024, 08:24
Forum: Help
Topic: How do I customize the context.php in vendor folder?
Replies: 7
Views: 103146

How do I customize the context.php in vendor folder?

In vendor/aimeos/aimeos-core/src/MShop/Context.php, there is a function about retrieving user, public function user() : ?string { if( $this->user instanceof \Closure ) { $fcn = $this->user; $this->user = $fcn(); } return $this->user; } I want it to return auth()->id() instead, is there anyway I can ...
by bar_on
08 Aug 2024, 08:25
Forum: Help
Topic: Problem on adding product to basket
Replies: 1
Views: 4786

Problem on adding product to basket

I have problem retrieving session from previous api calls. The get basket api call after adding product to basket returns empty basket. I found that in local environment the response header of jsonapi changes after adding products. basket api local header.png jsonapi loca header.png This does not ha...
by bar_on
03 Aug 2024, 04:48
Forum: Help
Topic: Jsonapi basket add product
Replies: 3
Views: 6897

Re: Jsonapi basket add product

I'm not using laravel frontend so I don't have the laravel session. I already included the csrf token in the parameter, and enabled withCredentials (true) for cookies but it's not working. I also realized that in postman I don't have to pass _token as parameter but the function still works (basket i...
by bar_on
02 Aug 2024, 17:45
Forum: Help
Topic: Jsonapi basket add product
Replies: 3
Views: 6897

Jsonapi basket add product

I have a customized frontend built in Vue that connects the aimeos laravel package through jsonapi. I am trying to add 2 different products to the basket (through calling apis 2 times), and the result shows a basket only with the latest added product. I can see that the csrf token in meta changes ev...
by bar_on
28 Jul 2024, 01:48
Forum: Help
Topic: Coupon decorator display problem
Replies: 1
Views: 4937

Coupon decorator display problem

Admin-coupon-add-limit.png This is the intended behaviour for json input of decorator value. Screenshot 2024-07-27 at 6.43.37 PM.png This is what I got [object Object]. It affects when I try to save/modify the data. Is there anything I can do to fix this? Version: "php": "^8.1.0"...