logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to forums.ablecommerce.com. Please use your AbleCommerce username and password to Login. Forums Registration.

Notification

Icon
Error

Options
Go to last post Go to first unread
SteveFeher  
#1 Posted : Friday, December 6, 2019 12:50:28 PM(UTC)
SteveFeher

Rank: Member

Groups: Developers, HelpDesk
Joined: 11/1/2018(UTC)
Posts: 25

The store is using SweetAlert to display a popup window when you attempt to delete a product from the cart.
The language in the default alert is rather foreboding -- "You will not recover!" doesn't seem like the right message to send.

AC_sweet_alert_text.jpg (24kb) downloaded 1 time(s).

Where is the code for this template so that we can edit this to a more gentle statement?

TIA!

Steve

Edited by user Friday, December 6, 2019 12:52:21 PM(UTC)  | Reason: Added screen capture

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. Forums Registration.

shari  
#2 Posted : Friday, December 6, 2019 1:18:56 PM(UTC)
shari

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 98

Was thanked: 10 time(s) in 10 post(s)
Quote:
Where is the code for this template so that we can edit this to a more gentle statement?


For this particular place you can change it by opening the file at this path.

\Website\Areas\Admin\Views\Orders\AddOrder.cshtml Line # 351
OR
Search for this line to find the exact code.

Code:
//DELETE BASKET ITEM CODE
$(document).on('click', '.btn-delete', function () {
Joe Payne @ AbleMods LLC  
#3 Posted : Friday, December 6, 2019 1:43:28 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: Developers
Joined: 11/9/2018(UTC)
Posts: 98

Thanks: 12 times
Was thanked: 5 time(s) in 5 post(s)
OMG I didn't even notice that!

Maybe it should read "Black SUVs will approach your driveway!"
SteveFeher  
#4 Posted : Friday, December 6, 2019 1:58:16 PM(UTC)
SteveFeher

Rank: Member

Groups: Developers, HelpDesk
Joined: 11/1/2018(UTC)
Posts: 25

@Joe ---

You'll probably have a heart attack if you remove an item from the basket. You'd better purchase it!
SteveFeher  
#5 Posted : Friday, December 6, 2019 2:04:12 PM(UTC)
SteveFeher

Rank: Member

Groups: Developers, HelpDesk
Joined: 11/1/2018(UTC)
Posts: 25

@shari --
Thanks for the effort -- but that only controls the popup on the admin side, yes?
I really don't care TOO much about that. I'd MUCH rather edit the code that appears on the PUBLIC facing side. It's my customers that I want to help!

Do you know where that code is set on the public-facing pages? I'm searching now.... haven't found it yet.


Thanks,
Steve
shari  
#6 Posted : Friday, December 6, 2019 2:15:51 PM(UTC)
shari

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 98

Was thanked: 10 time(s) in 10 post(s)
@Steve

I thought you were asking about the admin side.

Quote:
The store is using SweetAlert to display a popup window when you attempt to delete a product from the cart.


Can you please refer to the place on retail side where this popup appears.

I remember for latest release, we have removed the confirmation box on deleting product from the cart.

Or if you share the release on which you are testing.

Thanks
SteveFeher  
#7 Posted : Friday, December 6, 2019 2:27:28 PM(UTC)
SteveFeher

Rank: Member

Groups: Developers, HelpDesk
Joined: 11/1/2018(UTC)
Posts: 25

Hi Shari --

AbleCommerce AC9 (Version: 9.0.1.5867)
When I review the "Upgrades" section of the admin panel, I'm told that there are no available updates. Not sure how I'm using the wrong version.

In my store, this is happening when I remove an item from the minicart on the sidebar.

I have looked through so many pages, but cannot find this code base to edit!
shari  
#8 Posted : Friday, December 6, 2019 2:59:25 PM(UTC)
shari

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 98

Was thanked: 10 time(s) in 10 post(s)
Hi Steve,

Sure you are working on the latest release. I haven't thought of mini basket. I was referring to main basket page.
We have a generic script file for these confirmation boxes at retail side.

To change this text you can open the file at
\Website\Scripts\alert-script.js

and search for the lines:

Code:
text: "You will not be able to recover!",

Edited by user Friday, December 6, 2019 3:00:37 PM(UTC)  | Reason: Not specified

SteveFeher  
#9 Posted : Friday, December 6, 2019 3:32:00 PM(UTC)
SteveFeher

Rank: Member

Groups: Developers, HelpDesk
Joined: 11/1/2018(UTC)
Posts: 25

Shari --

Thanks!

I also found that I could simply edit the CSS at [/website/content/sweetalert/sweetalert.css]. I just made the text not visible and that was sufficient.

The good news is that others may need this same edit, so now both the source JS and the CSS are here in the forum. Hopefully we save other folks some time.

Much appreciated!

Steve
Joe Payne @ AbleMods LLC  
#10 Posted : Friday, December 6, 2019 3:33:14 PM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: Developers
Joined: 11/9/2018(UTC)
Posts: 98

Thanks: 12 times
Was thanked: 5 time(s) in 5 post(s)
Too bad the new CMS features do not allow for editing these aspects of the website content.
katie_able_support  
#11 Posted : Monday, December 9, 2019 6:13:10 AM(UTC)
katie_able_support

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, System
Joined: 10/29/2018(UTC)
Posts: 98

Thanks: 2 times
Was thanked: 7 time(s) in 6 post(s)
Remember, that you can edit the language resource strings to change these messages.

Thanks
Katie
Thanks for your support!
Katie
Joe Payne @ AbleMods LLC  
#12 Posted : Monday, December 9, 2019 6:20:37 AM(UTC)
Joe Payne @ AbleMods LLC

Rank: Advanced Member

Groups: Developers
Joined: 11/9/2018(UTC)
Posts: 98

Thanks: 12 times
Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: katie_able_support Go to Quoted Post
Remember, that you can edit the language resource strings to change these messages.


That also works for hard-coded text in javascript code? I thought that only worked for Razor view content....

katie_able_support  
#13 Posted : Monday, December 9, 2019 8:31:42 AM(UTC)
katie_able_support

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, System
Joined: 10/29/2018(UTC)
Posts: 98

Thanks: 2 times
Was thanked: 7 time(s) in 6 post(s)
You are correct Joe. My mistake. I was checking the language strings file and found several places where the confirmation messages can be changed, but for the JavaScript, it isn't part of the interface.

Sorry if I caused any confusion,
Katie
Thanks for your support!
Katie
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.