close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

ecart, not showing backorder message

Thread began 6/23/2010 1:23 pm by watercolor346374 | Last modified 7/01/2010 6:44 pm by Eric Mittman | 2227 views | 5 replies |

watercolor346374

ecart, not showing backorder message

Hello,
I have been attempting to show a message on the detail page in the cart area that tells a client when a product is on backorder...nothing seems to work. When I have done it in plain old code it works. I have included the detail page to show you what I have done so far, then I want to have the backorder statement shown in the cart under the size the customer has chosen.
thank you,

Attached Files
detail.php.zip
Sign in to reply to this post

Eric Mittman

It looks like the criteria that you are using to display the message is:

php:
<?php if ($row_rsSize['quantity']!= "0") { // Show if recordset empty ?>

<?php 
echo $row_rsSize['backordermsg']; ?>
<?php 
// Show if recordset empty ?>



This rsSize recordset looks like one that you are using for the values of the item. It looks like you have another recordset called inventory that should check on the inventory of the current item. Is this what you would like to use to determine if the item is on backorder? If so you should check the rsInventory recordset and check on the column in the table that lets you know the stock. When you check this stock you just need to see if is < 1, if so you should display the out of stock message.

Sign in to reply to this post

watercolor346374

backorder message in cart

Hi Eric,
You are correct at what I am attempting to do. As you suggested I used the rsInventory. I played with the statement: <?php if ($row_rsInventory['quantity'] = 0) { // Show if recordset empty ?>
Made it <1 made it 0 made it ==0 and could not get it to work. Seems that this should work. Am I missing something?
Thank you

Attached Files
detail.php.zip
Sign in to reply to this post

Eric Mittman

The if statement that you have now is setup like this:

php:
<?php if ($row_rsInventory['quantity'] = 0) { // Show if recordset empty ?>

<?php 
echo $row_rsInventory['backordermsg']; ?>
<?php 
// Show if recordset empty ?>



To make it so this message will only show if there is not at least one item available it should look like this:

php:
<?php if ($row_rsInventory['quantity'] < 1) { // Show if recordset empty ?>

<?php 
echo $row_rsInventory['backordermsg']; ?>
<?php 
// Show if recordset empty ?>



This is saying that if the current row in the rsInventory recordset for the quantity column is less than 1, then display the value backordermsg from the rsInventory recordset for the current row. If you do not see the message then it would indicate that the value from this column is 1 or greater. If you have any further problems with this you should check your db for the specific record involved to see what the exact values are for these columns.

Sign in to reply to this post

watercolor346374

backorder message to show in cart

Hi Eric,
Your help worked. Now I want to have the backorder msg show in the cart underneath the size. I inserted what you showed me into the cart:
<td><?php echo $winkee->DisplayInfo("Tab"); ?>
<?php if ($row_rsSize['quantity'] < 1) { // Show if recordset empty ?>
<?php echo $row_rsSize['backordermsg']; ?>
<?php } // Show if recordset empty ?> </td>
I change the rsInventory to rsSize and created the rs rsSize with the prodid=prodid...did not work. I played around with the filter and nothing worked. When I set up my cart I did include a column that is BO and that did not work. Some of the items do not have sizes, so I have an inventory table. If a product has sizes the prodid is posted on the inventory table, and given an inventory id. How do I get the cart to pick up the inventoryid for the size and post the message in the cart under the size?
Thank you,
K

Attached Files
cart.php.zip
Sign in to reply to this post

Eric Mittman

In order to show a message like this in your cart you would need a way to compare the value for the current item to the available quantity amount. Doing this with a recordset like this is not going to work because the first record in the recordset might not match up for the current item.

Getting this message to show in the cart is going to be a custom endeavor that require hand editing of the code to get it worked out and is not supported. One way that I can think of to do something like this would be to have the recordset and the code that checks against it inside of the eCart loop. You could then have a new recordset that is filtered for the current item on each loop of the cart. You can then have your check in place to show the message based on the recordset value compared to the value of the current item in the cart.

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...