Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Forcing Attributes


Guest

Recommended Posts

I am selling clothing on my oscommerce website and have setup attributes (sizes) in all products.

 

The first one says "size" and the others are ranges from S - XXXL.

 

For the customers that dont see the attribute down the buttom, how do i make it so that it pops up an error saying that they didnt pick a size?

 

Im getting fedup emailing customers back asking wat size they require..

 

Thanks

Link to comment
Share on other sites

This is what I have done just to put a bandaid on it until I can figure out how to run an if statement against the attributes dropdowns.

 

In your products_info.php on or around line 37 in your <head> tag section

place this code:

 

//message to alert customer to attributes
<script language="javascript">
<!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=no,copyhistory=no,width=100,height=100,screenX=150,screenY=200,top=150,lef
t=150')
}

function MM_popupMsg(msg) { //v1.0
 alert(msg);
}
//-->
</script>

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

My product_info.php file:

<?php

/*

  $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  require('includes/application_top.php');

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.pro

ducts_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

  $product_check = tep_db_fetch_array($product_check_query);

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function popupWindow(url) {

  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,scre

enY=150,top=150,left=150')

}

//--></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

//message to alert customer to attributes

<script language="javascript">

<!--

function popupWindow(url) {

 

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=no,copyhistory=no,width=100,height=100,screenX=150,screenY

=200,top=150,left=150')

}

 

function MM_popupMsg(msg) { //v1.0

alert(msg);

}

//-->

</script>

 

 

<!-- body //-->

<table border="0" width="100%" cellspacing="3" cellpadding="3">

  <tr>

    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

 

Your code didnt seem to make any difference. Or did I place it in the wrong location?

Link to comment
Share on other sites

You have this:

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

<script language="javascript"><!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=yes,copyhistory=no,width=100,height=100,screenX=150,scre

enY=150,top=150,left=150')

}

//--></script>

and below again you have this:

//message to alert customer to attributes

<script language="javascript">

<!--

function popupWindow(url) {

 

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=no,copyhistory=no,width=100,height=100,screenX=150,screenY

=200,top=150,left=150')

}

 

function MM_popupMsg(msg) { //v1.0

alert(msg);

}

//-->

</script>

 

 

It appears you have pasted it twice.

 

See below for instructions.

 

 

****Find the below block of code:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::

 

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

//right after the above section in your catalog/product_info.php page place this script:

 

//Pop window to alert customers to attributes selections

<script language="javascript">

<!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=no,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=250,lef

t=150')

}

 

function MM_popupMsg(msg) { //v1.0

alert(msg);

}

//-->

</script>

 

//So it should look like this:

 

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:::::::::::::::::::::::::::::::::

 

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="stylesheet.css">

 

//Message alert to warn customer of necessary attribute selections

<script language="javascript">

<!--

function popupWindow(url) {

window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res

izable=no,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=250,lef

t=150')

}

 

function MM_popupMsg(msg) { //v1.0

alert(msg);

}

//-->

</script>

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...