Jump to content

When buying from cart, item not get removed and balance not updated

Closed 2.1.3 2.1.6

SenorCerveza
  • in Shop
SenorCerveza

Posted

When using the Shop trough the Server Panel and putting items into the cart and then buying them, the cart still remains and the balance not getting updated. That looks like nothing happens to the player even the item get buyed and balance withdraw.

It would be good if the balance would get updated and the cart emptied when buying. Or even the config option to close the shop when buying from cart.

 

Also, there is a bug when items in cart are buyed and categorie switched, items get behind the cart.

2024-10-18 18_02_09-Rust.png

Mevent

Posted

Hi! can u send a video?

Mevent

Posted

2 minutes ago, SenorCerveza said:

Also, there is a bug when items in cart are buyed and categorie switched, items get behind the cart.

2024-10-18 18_02_09-Rust.png

 

 

You need to change the template in the Shop plugin

 

Regarding the Shop plugin:

  1. You need to reset the template: shop.reset template
    IMPORTANT: use only TEMPLATE so that you don't accidentally reset the config or list of items
  2. use the command: shop.install

You can do this through the game, you can do it through the server console. Through the game you can clearly see which templates you will install

Mevent

Posted

Also, are you sure you're using the latest version of the Shop plugin?

SenorCerveza

Posted

On 10/18/2024 at 6:05 PM, Mevent said:

Hi! can u send a video?


Sure.

 

 

SenorCerveza

Posted

On 10/18/2024 at 6:07 PM, Mevent said:

 

 

You need to change the template in the Shop plugin

 

Regarding the Shop plugin:

  1. You need to reset the template: shop.reset template
    IMPORTANT: use only TEMPLATE so that you don't accidentally reset the config or list of items
  2. use the command: shop.install

You can do this through the game, you can do it through the server console. Through the game you can clearly see which templates you will install

I've done this and it's the same behavior.

And yes everything is up to date.

SenorCerveza

Posted (edited)

As an addition. The main issue seems that the ServerPanel doesn't close after buying or selling from the integrated ServePanel UI Shop. It seems the global variable _enabledServerPanel is not true in any case.

 

I just changed

if (_enabledServerPanel) ServerPanel?.Call("API_OnServerPanelCallClose", player);

 

To

ServerPanel?.Call("API_OnServerPanelCallClose", player);


And also added this under         private void CmdConsoleShop(ConsoleSystem.Arg arg) in case "sellitem"

 

						ServerPanel?.Call("API_OnServerPanelCallClose", player);
						_config?.Notifications?.ShowNotify(player, SellNotify, 0, totalAmount, item.GetPublicTitle(player));

 

Edited by SenorCerveza
Mevent

Posted

The point is that it should call this method anyway. Most likely, the “if (_enabledServerPanel)” check fails. Do you have this bug after a server restart?

SenorCerveza

Posted

1 hour ago, Mevent said:

The point is that it should call this method anyway. Most likely, the “if (_enabledServerPanel)” check fails. Do you have this bug after a server restart?

_enabledServerPanel is never true. Even i manualy load ServerPanel. Also after a restart. I'm on Carbon btw.

Also, the line to close is also missing when selling items. It is correctly implemented on your other plugins like Kits oder DailyRewards where you also only call ServerPanel?.Call("API_OnServerPanelCallClose", player); without a variable. It is fine from my point of view since the line contents a ifnotnull.

Mevent

Posted

Changed Status from Pending to Work in Progress

Changed Fixed In to Next Version

SenorCerveza

Posted

Thanks a lot for the quick support and response 🙂

  • Love 1
Mevent

Posted

Changed Status from Work in Progress to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.4k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.