close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Lockout Checkout button

Thread began 10/17/2020 8:31 am by Timothy | Last modified 10/19/2020 1:50 pm by Ray Borduin | 19 views | 8 replies |

Timothy

Lockout Checkout button

Is there a way to lockout the Checkout button/function until a specified item is placed in the shopping cart?

Thanks - Tim

Sign in to reply to this post

Ray BorduinWebAssist

You can manually add an IF statement around the checkout button that checks to see if a particular item is in the cart. I couldn't give specific code without knowing the name of the cart and the item ID you want to check for.

Sign in to reply to this post
Did this help? Tips are appreciated...

Timothy

Lockout Checkout button

Thank you Ray! eCart1 and only show the cart if any of the following button names selected:
eCart1_3_ATC
eCart1_8_ATC
eCart1_9_ATC
I don't see IDs in the code for these..Can I just manually add ID's. If where would I add them?

Sign in to reply to this post

Ray BorduinWebAssist

The add to cart buttons have the ID with the name and price when the item is added.

The IF statement would be something like:

php:
<?php

if ($eCart1->InCart(1) || $eCart1->InCart(2) || $eCart1->InCart(3)) {
?>
button code here
<?php
}
?>
Sign in to reply to this post
Did this help? Tips are appreciated...

Timothy

Lockout Checkout button

OK so if the ids ate DeliverMyOwn, SendBottles and pickupCost the code would look like:

<?php
if ($eCart1->InCart(DeliverMyOwn) || $eCart1->InCart(SendBottles) || $eCart1->InCart(pickupCost)) {
?>
button code here
<?php
}
?>

Is that correct?
Thanks again for the help Ray!!!

Sign in to reply to this post

Ray BorduinWebAssist

No you have to get the ID number from the add to cart... it should be a number not text.

Sign in to reply to this post
Did this help? Tips are appreciated...

Timothy

Lockout Checkout button

Ok I just defined them with text to keep them straight but I can change them back to numbers. Can I use text or do they have to be numbers?

Sign in to reply to this post

Ray BorduinWebAssist

It has to be numbers by default. It would take a few changes to the cart and code to use text, so it is easiest if you just change it to a number.

Sign in to reply to this post
Did this help? Tips are appreciated...

Timothy

Lockout Checkout button

Works like a charm! Thank you Ray!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...