Jump to content

Required info field prior to clicking 'add to basket'


Guest thatblokedan

Recommended Posts

Guest thatblokedan

I am in the process of setting up an online store for school photography novelty gifts. Our photos are recognised on a database by using unique 10 digit code.

Is there a way of forcing the customer to enter this code in a text field prior to adding a product to their basket? and then sending this information on with each individual order.

Iam sorry if this question havs been asked before, I was unable to find the answer by searching

Thanks for your help!!!

Dan

Link to comment
Share on other sites

Guest Brivtech

Hello Dan,

What version of CubeCart are you using (Usually a good start)?

If you're using CubeCart V4.2.x, then there's a textbox as product option, so customers can enter the code into the textbox when ordering a product.

For version 3.x, (or earlier version 4's), this requires a modification, and such a modification (for version 3) can be found at cubecartforums.org, a site that deals specifically with modifications for CubeCart.

Link to comment
Share on other sites

Guest thatblokedan

Hello Dan,

What version of CubeCart are you using (Usually a good start)?

If you're using CubeCart V4.2.x, then there's a textbox as product option, so customers can enter the code into the textbox when ordering a product.

For version 3.x, (or earlier version 4's), this requires a modification, and such a modification (for version 3) can be found at cubecartforums.org, a site that deals specifically with modifications for CubeCart.

Thanks for your help!

Iam using version 4.2.x. Do I have the ability to make this a required option? and can it create an alert if the user has not entered any info?

Link to comment
Share on other sites

Guest paulabakerparkin

Do I have the ability to make this a required option? and can it create an alert if the user has not entered any info?

Not with the standard cart set up. However there is a modification available which will give you that functionality...

Link to comment
Share on other sites

Guest Brivtech

Yes, to have an alert, you'd need to place a Javascript alert if the field is empty when the form (product with text box) is submitted. It's outside of the scope of the cubecart core, but if you know some Javascript, it shouldn't be too hard - You may even be able to Google a suitable script to do this.

Link to comment
Share on other sites

Guest thatblokedan

I have found a code that would do what you are suggesting for the alert. But how would I implement this?

<script LANGAUGE="JavaScript">

function validate(){

if (document.form1.code.value.length<1||!document.form1.code.value.match(/[^\s]/)){

alert("Please Enter Customer Code");

document.form1.code.focus();

return false;

}

return true;

}

//-->

</SCRIPT>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...