close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Add to Cart Not Working

Thread began 11/18/2012 5:37 am by sfranzken73972 | Last modified 11/20/2012 6:20 pm by sfranzken73972 | 883 views | 8 replies |

sfranzken73972

Add to Cart Not Working

Can you please tell me why my add to cart, quantity and button are not working?

menu.php

Attached Files
cartIssue.zip
Sign in to reply to this post

Jason ByrnesWebAssist

This issue is caused by the way the nested repeat region plugin you are using works.

the recordset used by the add cart button, and also by the nested repeat creates an intial empty data set on page load.


to correct this, edit line 46:

php:
$query_detail2menu = "SELECT * FROM menu WHERE cid=123456789 ORDER BY itemname";




to:

php:
$query_detail2menu = "SELECT * FROM menu ORDER BY itemname";




then change line 126:

php:
$nested_query_detail2menu = str_replace("123456789", $row_master1menucategories['id'], $query_detail2menu);




to:

php:
$query_detail2menu = "SELECT * FROM menu WHERE cid=123456789 ORDER BY itemname";

$nested_query_detail2menu = str_replace("123456789", $row_master1menucategories['id'], $query_detail2menu);
Sign in to reply to this post

sfranzken73972

Only Showing From 1 Category Now

Hi Jason and thank you for your help.

I updated the code as per your suggestion, however now it only shows 1 category and its items.

menu.php

Sign in to reply to this post

Jason ByrnesWebAssist

add the following code at line 1:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>




and send a copy of the updated page.

Sign in to reply to this post

sfranzken73972

Ok I did Jason

menu.php

Sign in to reply to this post

Jason ByrnesWebAssist

  and send a copy of the updated page.  




i still need a copy of the updated page.


NOTE: you are getting a Headers already sent error message at line 5, this is most likely caused by a blank space or line after the closing ?> tag in the error reporting code:

"?> "

make sure there is no blank space or line after the closing php tag.

Sign in to reply to this post

sfranzken73972

Sure thanks and here you are

Here you go Jason checking that issue now and thank you!

Attached Files
menu.zip
Sign in to reply to this post

Jason ByrnesWebAssist

in addition to making the changes i had suggested, there was also code removed from the original page that i did not suggest.

in the original page the was a do staement to start the lop for the main recordset at line 120. line 120 - 123 was:
<?php do { ?>
<tr>
<td colspan="3" class="bold"><h1><b><?php echo $row_master1menucategories['category']; ?></b></h1></td>
</tr>


and lines 157 - 158 where to while statement:
<?php } while ($row_master1menucategories = mysql_fetch_assoc($master1menucategories)); ?>
</table>


those 2 have been removed which removes the loop for the main recordset.

i suggest downloading the original attachment you sent me, then only making the changes that i suggested in my initial replay, leaving the main recordset loop in tact.

Sign in to reply to this post

sfranzken73972

Thank you Jason it worked!

Thank you Jason it worked!

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