Loading...
 
ESA > Join & Share > Forums > SSE Forum > Add more than 5 items to shopping basket

SSE Forum

Help

Show posts:
Jump to forum:

Add more than 5 items to shopping basket

Hi,
today I tried to add more than 5 search results into the shopping basket but an error message will be returned and no items are added to basket:

You have selected too many items (maximum is5). Please, limit the size of your current selection or remove some items from your Shopping Basket.


Our service ( here) use the JavaScript function getMaxNumberOfSelectedItems() with the return value set to 25.

function getMaxNumberOfSelectedItems() { return 25; }


A workaround is to add 5 items to basket, perform another search or use "Next" button, add other 5 items to basket, etc. until the maximum of 25 items (for our case) is reached. For each "add", the above error message is displayed, but all the items are added. Now I can order 25 items..

There is a method to change this limit from 5 to N (where N is 25 for our case)?

Thanks and regards

Marco


Re: Add more than 5 items to shopping basket

Hi Marco.

The incoherency in this issue has been fixed and now the SSE works as follows:

- At any time, the shopping basket can only contain a maximum of N items.
- By default, N is equal to a configurable parameter at SSE level (typically 10). However, if the getMaxNumberOfSelectedItems() function is defined, then N is equal to that value.

We will still try to improve some error messages that are shown which could be clearer.

Paulo


Re: Re: Add more than 5 items to shopping basket

Hi Paulo,
I've just made a check on the ICD 1.6 and Infocenter and noticed this function seems not documented, the only reference to it being in the ICD, in a template:

<xsl:template name="mass:getMaxNbrOfItemsTemplate">
<script language="JavaScript">
function getMaxNumberOfSelectedItems() {return 2;}
</script>
</xsl:template>

Besides documentation updates, I have a consideration on the semantics of that parameter:

As service provider, I would use it to enforce an upper limit to the number of items in orders directed to my service but, from the user perspective, even if I am limited to only, let's say, three images to order, it would still be useful to add several images to the basket, then later select the best three to order among those already in the shopping basket.

Wouldn't a shopping basket limit of maxNumber + portalLimit (i.e. 10 items) be a better option to let the user do a second step selection from the shopping basket, while still enforcing the max items sent to the provider backend?

By the way, did you also add the mirror getMinNbrOfItemsTemplate to enforce at least a minimum of items are selected for the order, to the system or will it be included in a future upgrade?

Regards,
Alan


> Hi Marco.
>
> The incoherency in this issue has been fixed and now the SSE works as follows:
>
> - At any time, the shopping basket can only contain a maximum of N items.
> - By default, N is equal to a configurable parameter at SSE level (typically 10). However, if the getMaxNumberOfSelectedItems() function is defined, then N is equal to that value.
>
> We will still try to improve some error messages that are shown which could be clearer.
>
> Paulo


Re: Re: Re: Add more than 5 items to shopping basket

Hi Alan.

All of that is on our pipeline.

We are aware that the documentation is not updated and there is an open action for that. There is a comment about the function on the template at http://services.eoportal.org/wsdl/sse_service_template/ServiceStylesheetTemplate.xsl but it still does not reflect the current implementation and besides this template is not referred to anywhere as far as I know.

Your consideration about the semantics of the parameter has also been done internally by Alessandro and so we will push to have it implemented. The first concern here was to address the inconsistency in the usage of the parameter, which led to erroneous messages and behaviour, and this has been done. Now we have this limitation, which is less serious but will be taken into consideration.

The getMinNbrOfItemsTemplate function has been written down as a future enhancement. It is under development, has not been delivered.

Paulo



Re: Add more than 5 items to shopping basket

Hello Marco.

We have a few updates on this.

First of all, the purpose of the getMaxNumberOfSelectedItems() function is not the one you were assuming. This function is used in two different scenarios:

- when the service has a shopping basket, it is not used on the search page. It is used when the user is looking at the shopping basket and needs to select items from it to actually perform an order/rfq. The function's return value limits the number of items that can be selected out of the shopping basket.

- when the service skips the shopping basket (Step 4 configuration), it is used on the search page, to limit the number of items that can be selected to proceed to the order/rfq.

This means that in your specific case, the function is not used at the moment you expected. It also means that the limit of 5 items at that moment is not controllable by the Service Provider, i.e. it's fixed.

Now we have installed a patch on the Test Portal that makes this limit configurable by us, and on the Test Portal it has now been set to 10. However, there is at least one more thing that needs to be fixed:

The Portal is not being coherent regarding the meaning of this limit, because when you perform an "add" operation, it does not perform the check against what the user has selected, but rather against what the shopping basket already contains. So, considering a limit of 10 items, if you perform a search and add 5 items to the basket and then perform another search and add 6 items to the basket, you will get an error saying that the limit of items is 10 but the items will be added to the basket successfully (you explained this behavior in your initial post).

The limit of 10 is being used as the limit of items a user can select, and in this case it works as expected, even if it's fixed (i.e. items are not added to the basket), but it is also being used as the limit of items that the shopping basket may contain, and in this case it is not working, because an error message is displayed but items are added to the basket.

This last issue we still need to fix.

Paulo



Re: Add more than 5 items to shopping basket

Resolved. Now you could perform any search.
You could search above the Germany between the 2000 and 2002

Regards


Re: Re: Add more than 5 items to shopping basket

Thanks.

For investigating the problem this was not necessary in the end. By looking at another service I understood why this happens and found out where the 5 item limit is coming from.

It looks like a bug, so I'll report it and let you know.

Paulo



Re: Add more than 5 items to shopping basket

Hello Marco,

I'm unable to perform any successful searches. Yesterday there was a problem with the TOOLBOX on the meeo-card-stor host, but I think Alan solved it. Today I get a different error, the service seems to be able to contact the TOOLBOX but the search fails and a statusId 511 is returned. I tried with different start and end dates, different collections and different AOIs but I never get any results.

Can you see if something is wrong and tell me more or less the date ranges and regions for which there is data on your catalogues?

In the meantime I will debug this on other services, because we have seen similar behavior there.

Paulo



Re: Add more than 5 items to shopping basket

Done!

Regards

Marco



Re: Add more than 5 items to shopping basket

Hi Marco.

Could you give user "testuser" access to the service? I placed this access request yesterday.

I would like to debug the javascript, I don't understand where this limit of 5 elements is coming from (I don't see it anywhere on the base SSE javascript).

Thanks,

Paulo



Show posts:
Jump to forum: