Adding items to the basket

Hello
I don't add 1 to 10 elements to the only basket more than that how to write code for this logic?
If someone know just to share data.

You can customize the CartModifierFormhandler.addItemToOrder () method to search for the number of items in the basket and throw an exception

The list of commerceItems = getCurrent () .getCommerceItems ();
If (commerceItems.Size () > 10)
addFormException()

(Or)

You can also set a variable in cart.jsp which counts the number of items in the basket while showing the items of trade.
Whenever the user adds point basket, write onclick java script function from the size set in the upper part. The javascript function will check if value > 10 and throws an error.

-Kiss

Tags: Oracle Applications

Similar Questions

  • Add the item to the basket problem on SCC 11

    Hello

    We have customized shippingGroups, with only an additional property and it works very well in the app store application of trade, but, when I try to add an item to your cart via CSC, I get an error and the item is not added. This problem occurs only on the CSC.

    It's on OrderTools:

    beanNameToItemDescriptorMap-=.

    atg.commerce.order.HardgoodShippingGroup = hardgoodShippingGroup

    & beanNameToItemDescriptorMap =.

    com.my.order.MyHardgoodShippingGroup = hardgoodShippingGroup

    shippingTypeClassMap-=.

    hardgoodShippingGroup = atg.commerce.order.HardgoodShippingGroup

    & shippingTypeClassMap =.

    hardgoodShippingGroup = com.my.order.MyHardgoodShippingGroup

    And this is the error I get when trying to add an item to the basket:

    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler caused by (#2):atg.repository.RepositoryException: descriptor invalid name: 'atg.commerce.order.HardgoodShippingGroup'
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.adapter.gsa.GSARepository.getValidItemDescriptor(GSARepository.java:6622)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.adapter.gsa.GSARepository.createItem(GSARepository.java:710)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.OrderTools.createShippingGroup(OrderTools.java:1397)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.OrderTools.createShippingGroup(OrderTools.java:1344)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.ShippingGroupManager.createShippingGroup(ShippingGroupManager.java:651)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.ShippingGroupManager.createShippingGroup(ShippingGroupManager.java:627)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.getShippingGroupForItem(PurchaseProcessHelper.java:1881)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.addItemToOrder(PurchaseProcessHelper.java:1027)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.PurchaseProcessHelper.addItemsToOrder(PurchaseProcessHelper.java:957)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.doAddItemsToOrder(CartModifierFormHandler.java:3800)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.addItemToOrder(CartModifierFormHandler.java:3420)
    Error 13 Mon Oct 14:40:37 BRT 2014 1413222037461/atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-58/atg/commerce/custsvc/order/CartModifierFormHandler to atg.commerce.order.purchase.CartModifierFormHandler.handleAddItemToOrder(CartModifierFormHandler.java:3367)

    What I'm doing wrong here? Any ideas?

    Kind regards

    Lucas

    Look at the configuration rolled upward to OrderTools.shippingTypeClassMap in/dyn/admin or CCA.  My theory is that there is a table entry with something like the key and atg.commerce.order.HardgoodShippingGroup as the value.  OrderTools.createShippingGroup takes a group expedition (string) as input type and who looks up in shippingTypeClassMap.  If there is no entry, you will get an exception.  You do not get an exception.  Later, createShippingGroup takes the output of shippingTypeClassMap and upward resembling beanNameToItemDescriptorMap.  If there is no entry, the input string is returned by the search and used as input for createItem.  This is the exception you get.  If CSC must have configured the form Manager with a group type of delivery of the first card that has a class name (atg.commerce.order.HardgoodShippingGroup), which is no longer in the second plan.

    There are two oddities of = and += who could you be shifted upward.  One is that they are not necessarily be applied in the order that you will see in your properties file.  The Java properties class based implementation of the map and does not preserve the order of the text file.  The second oddity is that deleting via = requires that the text exactly.  If you have a space located right at the end of your line of =, for example, the kernel does not match and will not erase what you want to delete.

  • Can not put the item in the basket on the Amazon site

    In Firefox (15), Safari, but not Opera I can't put an article in the basket on the Amazon website. This problem occurs ONLY when you purchase an article in clothing and accessories, where it is necessary to specify a size. If I search for and select that item, like a pair of pants, the section where the item is put in the basket is dimmed, and there is a statement to select a size. I selects a size, and then move the cursor to the point where I can add it to the cart. But this section remains dim instead of shiny. I can't add the item to the basket. UNLESS I order a belt! A belt has a size, you must specify, and you can put it in the basket. I DIDN'T HAVE THIS PROBLEM until ABOUT a WEEK AGO, after downloading a software update that contains a HP printer driver. That the problem got solved by a technician HP working remotely. I talked to Apple several times, he cannot understand what is the problem with the Amazon site. I don't have this problem on a MacBookPro running 10.6.8. I have it only on a MacPro 10.6.8 also running desktop machine. I reinstalled 10.6.3 on the desktop Mac since the Snow Leopard DVD and updated to 10.6.8 (not including the HP driver on the chance that could have triggered it. Unable to move items "sizes" to cart persists, as described. Note once again, that I have the same problem in Safari, but not a problem at the opera. I encouraged cookies and third party cookies. I tried to restart with disabled modules. I have deleted cookies from Amazon, and Amazon to re - install then allowed them. There is no firewall to the top. The desktop machine is about 6-8 years. Even if I only have 1 GB of RAM, there is no apparent hardware problem. This could be a firmware issue? Of course, I have the workaround to use Opera or the laptop if I want to buy socks, but it's annoying to have this inconsistency. Any advice would be appreciated. Thank you. Gene

    If clearing cookies doesn't work, then it is possible that the cookies.sqlite file that stores the cookies is corrupted.

    Rename (or delete) cookies.sqlite (cookies.sqlite.old) and delete other files to present as cookie cookies.sqlite - journal in the profile folder of Firefox in the case where the cookies.sqlite file has been corrupted.

  • put an item into the basket, made an empty recycle bin, need return the item, please help, I did nothing since the drain, so the machine is in the same condition as when I emptied

    put an item into the basket, made an empty recycle bin, need return the item, please help, I did nothing since the drain, so the machine is in the same condition as when I emptied

    If you have xp, you can do system restore

  • Call for ensureIndexIsVisible after adding items to the dataProvider

    Hello

    I have a strange behavior where call ensureIndexIsVisible does not show the correct item.

    Did I miss the correct event to listen to after adding items to the list data provider?

    Description:

    I use spark.components.List with a HorizontalLayout to display my data.

    My data is displayed using the ItemRenderer.

    After the addition of new elements to the dataProvider, I register the Event.RENDER and within this handler, I call ensureIndexIsVisible and cancel the registration to this event.

    Add some data to dataProvider - some elements of thousnd

    list.dataProvider.add (...)

    list.addEventListener (Event.RENDER,

    function renderHandler(e:Event):void

    {

    show index

    list.ensureIndexIsVisible (indexToShow);

    list.removeEventListener (Event.RENDER, renderHandler);

    });

    I made the debug:

    1. If I comment removeEventListener, it will eventually work after some time the event fires.

    2. the original location that I see is a few points behind so if I scroll a bit I can find the desired article

    Thank you

    Roy.

    This blog can be useful: http://flexponential.com/2011/02/13/scrolling-to-the-bottom-of-a-spark-list/

  • Adding items to the tree in an effective way

    Hello

    I am trying to add items in the tree.

    The problem I am facing is, I have to update the tree constantly and add elments.

    To add first items bit it takes less time, but as the tree grows the accumlated gets.

    Demo Vi is attached for reference.

    Any HELP WILL BE GREATFUL. (vi ATTACHED IS in 2009 version)

    First of all, 1% for calibration of time Windows is 'no difference '.

    But indeed, the update of the front panel is not the factor limiting here: this is the number of children-entries that create problems. So with zero children (as I did in my first test), to postpone the updates done grant you a huge performance increase as is the one and only overhead.

    In your case (100 children), defer updates is disabled the relevance as the method 'Add items' takes awhile.

    I agree that the performance impact is huge, maybe too big, to increase the number of children. But on the other hand, you must understand that you are dealing with arrays of cluster... is in fact a big effort for the memory manager to allocate enough memory, copy of things around and (internally) the deallocation of memory. It's the more data, the most important, this will create. Therefore, it will get slower the more data that you add. But certainly, the measure is surprisingly high.

    But nothing you can change.

    To the last comment: why do you need a tree that changes many times during execution while maintaining several 100ths of elements in any combination of parent/child?

    Norbert

  • When the site of JohnLewis I add items to the basket but can't see the basket or check?

    I bought on JohnLewis.com years, but recently, I add stuff to the cart and then can't see basket or case. I just received message awaits Johnlewis etc. I can move on OK in Internet Explorer on the same PC, but it's so slow.

    Make sure that your Java (not JavaScript) is up to date
    Check out Java and find obsolete Versions {web link}

    Release date of version 65 update 8 October 20, 2015

    Use this link to make sure your plugins are up-to-date.
    If all are listed as unknown or research, don't worry to their topic.

  • Adding items to the QNX list without scrolling

    Is it possible to update the items in a list of qnx without scrolling of the list in article 1?

    I have a list of qnx that retrieves its list items in a stream, and if the list item has been scrolled, beyond every time that I update the dataprovider, it automatically reloads the list with 1 point on the screen.

    HM sounds quite interesting. what I would do is to find something to defines a set of data apart from others and makes every single tweet. There is probably an ID of the API or something. then id have a separate table, keep track of all the IDS in your current list. from there whenever u 'referesh' you can check if you got the identifiers in the new list differ from your current table of ID. If they are separately add each individual tweet of the new incoming list using the addItem() method instead of reset your entire dataprovider. hope that helps some. Good luck!

  • Adding items to the ArrayCollection problem collection

    Hi all

    I have an ArrayCollection collection, I want to add items through a function that looks like this:


    public void addBodyShapePoint(sh:String,_sc:Number):void {}
    bodyShapePoints.addItem ({shape: sh, score: sc});
    }

    I want to be able to access the items using bodyShapePoints [i] .shape etc.

    However the syntax I use does not work. I don't get an error message, it's just that the application crashes when it gets to this point.

    If I remove the line 'bodyShapePoints.addItem ({shape: shape, score: score});"everything works fine.

    I checked that values are passed correctly and come to the service and as such, is that this line is not working.

    What I am doing wrong?

    Hi CCJA,.

    You must add the object you need like this:

    This works because the object class is dynamic and can add your properties required in this way.

    public void addBodyShapePoint(sh:String,_sc:Number):void {}

    var: myObj:Object;

    myObj.shape = sh;

    myObj.score = sc;

    bodyShapePoints.addItem (myObj);

    }

  • How can I remove item from the basket that says it's in use

    I'm trying to empty my trash and 3 elements that are screenshots are here. When I try delete them they say that they are currently in use and cannot be deleted. Please does anyone know how to find them wherever they are used, and close them.

    Click on the Apple and to force them to leave.

    Leave everything except the Finder. If it still won't let you delete the files, try to restart the computer and empty the trash as soon as the computer starts

  • Adding items to the multicolumn listbox and its headers

    How can I addEMS in multicolumn listbox and its headers?

    I don't see changes in CS4 is how to change the number of columns and headers to display.

    Thank you.

    Hi kingkai101,

    To configure headers, the columnTitles of the list box Properties attribute value an array of strings. To add a line, use the add() method of the ListBox to add 'something' for the first column of the row value, then the following columns are set using the value of the text of the element table [] subitems.

    I have attached a sample script. Hope it is informative.

    Jeff

  • Can not add the item to your basket with FireFox 8.0

    I can't add items to the basket with Firefox 8.0. Switch to IE everything works then.

    This information is stored in a cookie, so make sure that you do not block cookies on this site.

    • Tools > Page Info > permissions

    You can control and manage permissions for all areas on the Subject: authorizations page via the address bar.

  • InDesign - how to re-enable the button "create a new item of the Index.

    When I was creating topics for my index finger, I saved the document after doing a subject - (because I had created topics yesterday and is not saved and lost all of my work) - when I tried to create a new item of the Index, the button wasn't dark - not active, so I was not able to add more topics to my Index. I rebooted my MacBook Pro (Mac OS X Version 10.6.8) and reopened my InDesign (Version 3.0.1) document and the palette Index box still lacks a button "Create a new item of the Index" assets to allow the action. I do not know how to do this - does anyone have any suggestions?

    I worked on the range of the Index of reference - adding items to the Index with a subject that I had already entered and when I went back to fashion topic, I noticed that the 'Create a new item of the Index' button is enabled - so I think everything is good now. Thanks for the forum.

  • Remove the item from the shopping cart

    OK I tried of it worked for hours and it drives me crazy.

    I have a function that removes items from your cart:
    public void RemoveFromBasket(Key:int):void {}
    document. RemoveShoppingBasketItems.url = "" http://localhost/Flex/Personalised%20Palettes-debug/ShoppingBasket.php?Remove= " "
    document. RemoveShoppingBasketItems.url += key.
    document. RemoveShoppingBasketItems.send ();
    document. ShoppingBasketCount.url = "" http://localhost/Flex/Personalised%20Palettes-debug/Header.php "; "
    document. ShoppingBasketCount.send ();
    ViewShoppingBasket();
    }

    In my MXML I have a label that displays the number of items is in the basket, which is populated by the ShoppingBasketCount HTTPService. I call the setTotal function whenever the label is updated.

    < mx:Label
    x = '640' y = '4 '.
    Text = "Your Shopping Basket contains {ShoppingBasketRepeater.currentItem.@Total} Item (s).
    Color = "#FFFFFF".
    ID = "ShoppingBasketLabel".
    updateComplete = "SetTotal (event.currentTarget.getRepeaterItem () .@total)" / >

    And the setTotal function sets the Variable Total number of items in the basket:

    public void SetTotal(Number:int):void {}
    Total = number;
    document. TestLabel.text = Total;
    }

    Once the item has been removed from the shopping cart and the ShoppingBasketCount has to be transmitted, the RemoveFromBasket function is called:
    public void ViewShoppingBasket (): void {}
    document. TestLabel.text = Total;
    If (text). TestLabel.text == 0)
    {
    document. ShoppingBasket.visible = true;
    document. ShoppingBasketGrid.visible = false;
    document. ShoppingBasketHeader.text = "your cart is empty";
    document. ProceedToCheckoutButton.visible = false;
    } else {}
    document. ShoppingBasketItems.url = "" http://localhost/Flex/Personalised%20Palettes-debug/ShoppingBasket.php "; "
    document. ShoppingBasketItems.send ();
    document. ShoppingBasket.visible = true;
    document. ShoppingBasketGrid.visible = true;
    document. ShoppingBasketHeader.text = "shopping cart";
    document. ProceedToCheckoutButton.visible = true;
    }
    ToggleMenu (0);
    }

    However when I remove the last item in the basket so that there is no more items in the basket the basket displays an empty grid. The poster 0 ShoppingBasketLabel and the TestLabel 0. If I click on the link see the Shopping Cart it will show the shopping cart is empty. Why it shows me an empty grid and not your cart is empty message when I delete the last item in the basket?

    Any help would be great!
    Thank you
    Katy

    Yes, this value of 1 is what I was afraid of.

    According to your logic the updateComplete where you call SetTotal() I will try:

    public void SetTotal(TotalCount:int):void {}
    Total = TotalCount;
    ViewShoppingBasket();
    }

    in other words, if the Total is correctly updated it.

  • How can I remove an item in the toolbar that I added

    I added a few items in my toolbar and now I want to delete them, but I can't figure out how to do this. My mouse doesn't have a left and right button

    On Mac, you might be able to simulate a "right-click" holding the key Ctrl key while clicking. In other cases a long-press can simulate a right-click.

    If none of those that suits you, you can use the Customize and drag the items on the toolbar on the menu or in the box with the other unused icons. This article should help you get started: Customize Firefox commands, buttons, and toolbars.

    If one of these methods work for you?

Maybe you are looking for

  • What the * arrived at my Inernet Radio after the upgrade to the latest version of iTunes! ???

    I installed iTunes and my Mac OS X to the latest version and now my internet radio option is missing in iTunes? Seriously * offshore. Everyone know the loss of their favorite channels FREE!

  • Pavilion 17-e112dx: make the system restore media is too slow

    I put out my system recovery media creating... and now I want to install windows 10. However, the software HP tells me that I need these DVD media to create... so I decided to do it now. It takes more than an hour by DVD and must be 5 of them... it's

  • How to install 4 Expressions on my computer?

    I had used the cover Page for my website.  Just realize that it is no longer supported.  Last night after a conversation with Microsoft, I was informed that I qualified for the upgrade 4 Expressions.  I downloaded it, but it will not be installed.  I

  • Update from my computer

    I'm unable to update windows as well as microsoft security essential & get msg error code: 0 x 80070424. Also firewall status is not displayed when checked. I think that something prevents connecting to microsoft update website.pl.help.

  • Change the default value of the program when opening a file?

    Somehow, I changed something in my settings and everytime I try to open a file it will automatically try to open in microsoftword as default. It's a lot of time when I try to open a PDF file. Anyone know how to change my settings back so that when I