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.

Tags: Flex

Similar Questions

  • Check the contents of the shopping cart by using liquid

    With the help of liquid is it possible to check which elements are in the shopping cart? Can if so someone point me in the right direction?

    Basically what I want to achieve, it is when a page loads to check to see if some items in the shopping cart. If they are in the basket I do something if I do something else. If I can verify the quantities, even better.

    I always work to capture all the liquid. = >

    Hi Lynda,

    Take a look at this guide - guide reference - e-Commerce partner - it also supports the update basket 'on-the-fly"mentioned Robert.

    Let me know how it works.

    Thank you

    Mihai

    PS: On the page cart.html you can insert

    {{cart | json}}

    to see this other properties of carriage, you can access (as individual products and so on).

    At the moment but there are some areas which are 'digital', so this means that you cannot apply mathematical operations to most of them. This will be corrected in the future, see Bug: math liquid filters do not work with the data of the module

  • How to remove the shop at home toolbar

    How to remove the shop at home toolbar?

    Please disable all extensions Safari and test. If the problem is resolved, re - activate the extensions one or a few at a time until you find the culprit.

  • liquid tags not made in the shopping cart?

    I shall preface this by saying that I am so frustrated that I am about to necking.

    For some reason, I have completely failed to understand the basic principles of operation between the basket and the basket of purchase as well as pages. I need to be able to target the innerHTML, failed completely to be able to do by using the model of module and the module basket (with js), so turned to liquid, which, as I understand it, should make the name of a product with {{name}}. Only it doesn't, it will display the text just as raw. {{This | json}} however works fine. I don't understand. I'm really not. So please, for the love of God, for the sake of this piece of you that feels good when you help someone else, if there is something obvious that I may have missed or miss me understand the process here, please help me.

    EDIT: I will add, I tried to add liquid tags to the shopping cart module model, and it is there that they seem not to function. It is also part of the model module purchases that I could not target the innerHTML using js. And once again, please, if you can just help me understand how it needs to operate, I can do the rest, but it's just a nightmare at the moment.

    The basic thing it is that say you the name. Name of what and where is the issue?

    If your in the basket name presentation does not return product names, it's fair for one. You need to loop through the elements of products in the basket and then convert the names into a loop for example.

    -What are you trying to do?

  • I'm paying for telephone folios and the 1800 number that is advertised on the shopping cart is not correct - what number I ring in Sydney, Australia

    I'm paying for telephone folios and the 1800 number that is advertised on the shopping cart is not correct - what number I ring in Sydney, Australia

    Do you mean you want to buy downloads additional folio? If so you are a Pro user or company, connect to your DPS dashboard and click on the "Contact Support" link at the bottom left

  • billing and shipping information on the shopping cart page

    Hello

    Can someone tell me if I can put the shipping and billing forms that usually go on the page of payment in British Colombia on the shopping cart page. What is the best way to impliment this. I can think of several ways, but they seem like wrapper work. BC this easily.

    At soon Daniel

    Hi Daniel, you can't.

  • How to remove an item from my desk top which I no longer use

    How to remove an item from my counter top who no longer need. I have windows vista home premium and internet exployer 9

    Hi elsie,

    Right-click on the shortcut, the program, or folder, then click on remove.  That's all.  If this does not work, try to use one of the following free products to remove the file/folder/shortcut: Unlocker to: http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtml or file Assassin http://www.malwarebytes.org/fileassassin.php these programs often work when the functions of removing normal do not work correctly.

    If it still does not work, try a clean boot (Vista and W7) http://support.microsoft.com/kb/929135. If you delete the file, then the problem was that there was a conflict or it cannot be deleted because it is run.  Once don't forget to reset your system back to the normal state, as described in the procedures. If the problem occurs in clean mode then just restore the system to normal and reboot - this solution will not work. If you are using XP, see http://support.microsoft.com/kb/310353 and http://support.microsoft.com/kb/316434.

    If this does not work, then start safe mode and try to delete the component of office from there (assuming it to be displayed).  If this does not work, you will need to log in as an administrator and try to delete the item in Windows Explorer in the C:\Users\\Desktop folder for this user and perhaps also any user originally installed the software (perhaps the administrator account).  It may be necessary to do both clean or Safe Mode boot mode (and using the extraordinary remove programs mentioned above as well).

    I believe one of the above will work (and hope the answer is one of the simplest at the top rather than the more complicated to those who follow).

    If you want to remove the underlying program that applies an executable or shortcut icon, go to Control Panel / programs and features.  Find the program is no longer you want, right-click on it and select delete or uninstall or delete (all that appears) and that should also remove the program and probably/possibly the icon at the same time.  Be careful here if - because if you upgrade the program, remove the program related to the icon or folder, if he got somehow placed on the desktop instead of Program Files (unless completely separate program updated as shown in programs and features - so you see both an old and a new version) could cause problems with the new program.  In essence, don't forget when you delete what you really want to delete and it removes this and nothing else.  I recommend the creation of a system restore point before you do.

    I hope this helps.

    Good luck!

  • Remove an item from PC (Media Encoder)

    How can I remove an item from the computer media encoder?

    Hi Avex of misfortune,

    How can I remove an item from the computer media encoder?

    Are you still facing this problem? If so, please contact support: http://bit.ly/PPro-support

    Thank you

    Kevin

  • How can I remove an item from the death of the select icons and notifications appear in the taskbar?

    When I open "Select icons and notifications appear in the task bar" one of the things it lists is "GLBD565.tmp" which seems to be left by the installation of a software product.  The icon is not active and I doubt if it still exists, but it appears in the list.  That list is maintained and how to remove the dead of her spots?

    The entries to Customize Notifications cannot be removed selectively. You can, however, clear the set lists by using the following registry change.

    1. Click Start, type regedit in the Search box and press ENTER.

    2. Locate and then click the following registry subkey:
      Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify HKEY_CURRENT_USER
    3. In the Details pane, click the IconStreams registry entry.
    4. On the Edit menu, click delete, and then click Yes.
    5. In the Details pane, click the PastIconsStream registry entry.
    6. On the Edit menu, click delete, and then click Yes.
    7. Exit Registry Editor.
    8. Restart the Explorer.exe process. To do this, follow these steps:
    9. Press CTRL + SHIFT + ESC.
    10. On the process in the Task Manager tab, click the process explorer.exe and then double click on end process .
    11. On the file menu, click new task (run), type Explorer and click OK.
    12. Exit Task Manager.

    (c) Microsoft Corporation

    -or-

    Download and run a VBScript script that automates the steps above.
    How to delete items from the Notification area in Windows 7/Vista/XP

    Ramesh Srinivasan, Microsoft MVP [Windows Desktop Experience]

  • How to remove an item from the contextual menu orphan?

    I had a workflow that I added in context menu of Clusters.  I forgot to remove it from the context menu before you delete the workflow, so now it is visible as a choice, but naturally does not start.  Any suggestions on how to get off the context menu now?

    If you have a copy of the workflow on another instance of vRO, the easiest way would be to export from, import it on vRO instance that you use with the Web Client and remove the link of action in the context of the user interface.

    If you don't have a copy of the workflow, you can try the following:

    • SSH for vSphere Web Client device stop vsphere-customer service
    • Delete the /storage/vsphere-client/SerenityDB/serenity/ALL/applications/vco-plugin/context.menu.actions file (you can make a copy of it to the case where)
    • Start service vsphere client (or reboot the power of vSphere Web Client)

    After these steps, all custom context action mappings should have disappeared, including orphans.

  • How to customize the received email that the buyer receives the purchase to the shopping cart?

    Hello

    I've just set up a shopping cart at: http://www.themesformuse.com.
    When a command passes by, the buyer receives a receipt by e-mail.

    This receipt is very generic at the moment.
    The response email is set to "[email protected]".
    And I need to add some text to it.

    Where can I change this? I can't find it!
    Any help would be appreciated. Thank you!

    Jason

    I'm not link building! Has been a real question lol.

    In fact, I received a response from the Adobe Support:

    You can find this under Site Manager email template > system Emails > online store: invoice

  • How to align {tag_productquantity} in the shopping cart layout table?

    I inserted the {tag_productimage} tag in our shopping cart layout table. In accordance with the instructions in the following article http://kb.worldsecuresystems.com/654/bc_654.html? bc-partner I adjusted the height of .productitemcell in the Style sheet to be able to see the whole picture. However I have tried many elements of setting and nothing seems to align the {tag_productquantity} to sit in the iddle m of the cell as the rest of the information in the same row. Please see a screen shot here http://mychristmas.businesscatalyst.com/test This is a website, we are currently building http://mychristmas.businesscatalyst.com/

    Is someone can you please tell me what it is I have to settle for not having this field amount to sit at the top of the cell?

    Thanks in advance!

    Hello Erin,.

    Looks like if you give the .productitemcell a row height of 109px and then give 'input.cartInputText' high-margin of 44px all items in your shopping basket very well online.

    Hope this helps,

    Chad Smith | http://bcgurus.com/Business-Catalyst-Templates for only $7

  • When I click on add to cart, and then on the shopping cart page I show quantity 2 even I select 1 .so wha

    Hi all

    in the list of products or the details of the product page when I selct 1 quantity and click on add to cart, and then page Shopping cart in the quantity text box shows even 2, I enter quantity 1. what question would you please tell me.

    Thank you

    Hello

    When you add to cart, you can see the quantity is added two times (for example if I add 3 the wagon goes to 3 then 6) and looking at your code it seems that you have onclick action

    for example (onclick =AddToCart(275761,5662250,'',3,true))

    attached to the time the tag and the tag where it adds the amount twice more that one tag and image tags are clicked.  Remove the onclick of one of them - I did it in Firebug for a tag and it worked.

    Hope that helps

    Steve

  • How to make a checkbox I accept in the shopping cart

    I added an exchange policy to my shopping cart.

    1. I would like to add a checkbox that musbe be checked so that the extraction process can begin.
    2. I want an error window to explain that the box should be checked if it has not been verified and that the customer tried to verify.

    Can you tell me how can I do this?

    Here is a picture of what I want to do.  I need is the code in the box and the error code, and the code to prevent the Fund to start until the box is checked. I'm not very handy javascript but can cut and past.

    Thank you!

    agree.jpg

    Will be much easier and not messed with BC script if you on the payment form. Given that the form on the next page is a web form, you can add the checkbox field and all that manually and easily add that in so that the form may not be submitted without agreeing.

  • Is there a tutorial showing how to integrate a PayPal add to cart and set up the shopping cart

    Looking for an easy to follow tutorial on how to add, complete and integrate a button Add to cart and buy now button for PayPal. Preferably a step by step instruction.

    Hello

    Please check these posts for a similar description:

    Re: Add a shopping cart on a Muse site

    Re: Paypal add to cart

    Kind regards

    Aish

Maybe you are looking for

  • Qosmio F30 - how to get started using the external CD/DVD drive?

    Hello Mr President I have a Qosmio F30. My CD/DVD drive does not work. I have the USB CD/DVD drive, but I think that F30 does not support external USB CD/DVD drive to boot to the top. Please help me. Now, how can I boot Windows XP CD?

  • Sequencing of power through individual PXI-4110

    Hi all I have a hardware device that requires a sequence of power-up/power-down very specific in order to work properly and not be damaged.  According to the data sheet for the PXI-4110, he is able to meet the requirements of power, but I use Labview

  • HP Officejet 4500 print cartridge problem

    After you install the new black ink cartridge, error message came: 'print cartridge problem [Black]. Refer to the documentation for the device to get out of trouble. » I removed the cartridge and reinsert. Same message. Unplug the printer, then turn

  • Game compatibility

    Why your list of games that are windows 7 is compatible if small and with games that I have ever heard.  What is the list of incompatible biggest games? and why don't you show it. If you do not provide a list of popular games that are compatible, how

  • Unable to save the photos in the mail. Windows Live

    I have many emails in my Inbox that haven't attached photos photos are rather directly with the post office. So I am able to see the preview in the mail, but when I try to save the image it records the image with the named zip file: GETINLINE.aspx So