How to clear current commerce item in the shopping cart in ATG? - atg

I tried to clear the current commerce item in ATG. I am getting clearing commerceItems in the cart but when I click it twice the "clear cart button" its clearing. I don't know how to rectify this. I have tried the following:
<dsp:input bean="ShoppingCart.deleteAll" value="clearcart" type="submit"/>
I used this bean only but it only works after clicking the clear button twice.
Please help me out.
Thanks in advance.

Related

Disable add to cart button before modal confirmation is shown in prestashop 1.7

On my prestashop 1.7.6.8 I am noticing a very slow timing to add the product to the cart and then to show the modal popup of confirmation.
Is it possible to avoid users click on button during this latency?
Thank you
Hi I done it like that:
$(document).ajaxStart(function(){
$( '.add-to-cart' ).addClass("sending");
});
$(document).ajaxStop(function(){
$( '.add-to-cart' ).removeClass("sending");
});

how to change virtuemart 2 add to cart pop up text

Basically as above,
I have a Virtuemart 2 online site with Add to Cart pop up enabled when it pops up all is well apart form the
View Cart and Continue Browsing links they have no separator in between them, I would like to have
View Cart | Continue Browsing
Ive looked at vmprices.js but have no clue :(
Can some one shed some light please?
Thank you!
Nick
You have to look into these files to customize that popup:
com_virtuemart/controllers/cart.php
components/com_virtuemart/assets/js/vmprices.js
Thanks
Jafer Balti
The actual text that is shown to the visitor is located in:
mysite.com/languages/en-GB.com_virtuemart.ini
Which can be changed, but should ideally be overridden.
This is harder to find than it should be because Dreamweaver does not search .ini files. Use the OS to search.
Additionally, the link for the "continue shopping" button can be changed by overriding the:
components/com_virtuemart/views/cart/tmpl/padded.php
file.

WWW::Selenium to capture component refresh

I am writing a perl script using WWW::Selenium module to automate a website.
I am not at all a web development guy and have no idea about web technologies.
Let me try to explain the issue in layman terms.
I am dealing with a webpage, which has an order form with a button.
When I click the button, there is no page submit, but the button label changes.
Say for eg, the button goes through these changes when clicked multiple times.
Get Quote --> Order --> Confirm Order
Each time I click the button, there is no page refresh, but the button label keeps changing as above.
The id of the button is the same throughout, only the class changes.
How can I do this in WWW::Selenium?
Presently I am using wait_for_page_to_load(5000) after each click.
But the click is not having any effect on the label and I get error that timed out after 5000s.
Should I be using some other function to wait?
You could do something like this
$sel->wait_for_text_present_ok("Your text","time to wait","The message to display if this fails");
and an example below-
$sel->wait_for_text_present_ok("Order Confirmed","9000","The order was successfully placed");
Seems like you could use
$class = $sel->get_attribute($attribute_locator)
where the $attribute_locator is the button#class with button being the element locator that you clicked. Check if $class is the class you expect.

Does Pinterest button have a callback?

I need to unlock content when someone shares the post with pinterest, and I can't find a callback function on pinterest button. Is there any way to do this?
You could wrap the pinterest link with a span and add a jQuery click event to the span to at least know that the pinit button was clicked. That's about the best you can do until they release a real callback so you can know that an item was actually pinned.
<span id="pin-container"><a data-pin-config="beside" href="http://pinterest.com/pin/create/button/?url=[your_url]&media=[your_image]&description=[your_desc]" data-pin-do="buttonPin" ><img src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a></span>
$('#pin-container').click(function () {
alert('clicked pin button');
});
A workaround is posted here:
http://www.lunametrics.com/blog/2012/03/12/tracking-pinterest-event-tracking/
Until Pinterest opens up a public API and a non-iFrame tracking button, this is about as good as you'll get.
As said before, the API is not public yet. The best workaround (I just tested it, and it works in my scenario) that I've found so far is http://www.seomoves.org/blog/tools/tracking-pins-with-the-pinterest-button-2595/
That link only lets you determine if the Pin Button was clicked, not if they actually made the share. Hope that helps a little!

Onclick open new window and reload previous page

I trying to have a new window pop up to checkout at Paypal, OK. Problem is that if user goes back to add or take away items and click "checkout" again, the pop up does not work. The only solution I can think of is when customer submits form to check out, the action opens up a new window and reloads the page they were just on. Can this be done or is there another way?
checkoutPayment: ' {payment}',
paypal: '<form target="_blank" id="rcCartForm" action="https://www.paypal.com/cgi-bin/webscr;" method="post">' +