DwZone Forum DwZone Forum
Welcome to the DwZone-it Forum
 
  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups  
    RegisterRegister -->   LoginLogin  
Shopping Cart  
DwZone Forum Index -> Shopping Cart
.
Moderators: AdministratorsModerators 
Hint: For improved responsiveness, use Internet Explorer 4 (or above) with Javascript enabled, choose 'Dynamic' from the View dropdown and hit 'Set Options' to save your changes.
New Topic Search for
 View     Per page     Messages Since 
Messages 11 to 20 of 50 (Total: 50) First |  Prev |  Next |  Last  
 Subject Author Date  
   Re: Shopping Store Demo question  
View this persons public profile  Gianluigi   11:24 27 Apr 2018  
   MySqli Demo Store Connections/Shop.php suggestion  
View this persons public profile  JarrellHill   9:50 21 Apr 2018  
   Re: MySqli Demo Store Connections/Shop.php suggestion  
View this persons public profile  Gianluigi   2:35 22 Apr 2018  
    Errors in new Mysqli Demo Store  
View this persons public profile  JarrellHill   9:39 20 Apr 2018  
 
The update to the demo store files for MySqli is much appreciated! It saves me time. However
there are still many errors inside the demo store files inside of "Admin" folder. Some I was able to
correct to make code functional such as switching mysql to mysqli where needed
to get pages to show correctly. The connections file for includes had a few errors For Your Information.

I was using admin store to add products in products details but received errors.
Examples of demo store current errors where I'm a little stuck and could use help include:

ProductDetailsAdd.php not able to add products due to error " Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\wamp\www\Shopping\Admin\Product\ProductDetailsAdd.php on line 412" and "Warning: mysqli_error() expects exactly 1 parameter, 0 given in C:\wamp\www\Shopping\Admin\Product\ProductDetailsAdd.php on line 412


I noticed that when you're using mysqli the syntax for it looks as though you're using mysql syntax format vs newer mysqli_query ( $connection, $string ) . I'm seeing
the placement of parameters in arguments such as " Mysqli_query ($string, $connection) " I believe that $connection as first parament, then 2nd $string).
I don't know if this is allowed by MySqli or not for sure and no value (parameter) for MySqli_Error commands which it appears that MySqli requires a value generating
an error.

I'm not an advanced coder and have very little understanding of "PHP" as a whole. Here's the code below that's causing issues with adding products in productdetails when clicking
add new button.

<?php
$list = preg_split("/,/", $row_rsProduct['OptionList']);
$hasOptions = false;
for($i=0; $i<count($list); $i++){
if($totalRows_rsOptionProduct != 0){

$query_rsOptionProductDetail = "SELECT OptionProductDetail.IdOptionProductDetail, OptionProductDetail.IdOptionProduct, OptionProductDetail.Description, OptionProductDetail.Visible, OptionProductDetail.SortOrder, OptionProduct.OptionDescription FROM OptionProduct INNER JOIN OptionProductDetail ON OptionProduct.IdOptionProduct = OptionProductDetail.IdOptionProduct where OptionProductDetail.IdOptionProduct = " .$list[$i];
"This line is causing errors"********----> $rsOptionProductDetail = mysqli_query($query_rsOptionProductDetail,$shop) or die(mysqli_error()); <-----******This line causing errors Error Type "
$row_rsOptionProductDetail = mysqli_fetch_assoc($rsOptionProductDetail);
$count = mysqli_num_rows($rsOptionProductDetail);

$query_rsOptionProduct = "SELECT * FROM optionproduct where IdOptionProduct = " .$list[$i] ." ORDER BY SortOrder ASC";
$rsOptionProduct = mysqli_query($query_rsOptionProduct, $shop) or die(mysqli_error());
$row_rsOptionProduct = mysqli_fetch_assoc($rsOptionProduct);

//OptionProduct.filter = "[IdOptionProduct] = " & list(J)
//OptionProductDetail.filter = "[IdOptionProduct] = " & list(J)

if($count > 0){
$hasOptions = true;
?>

Jay Hill
 
Reply to this current thread  View this persons public profile  Send Private Message
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  Gianluigi   7:38 21 Apr 2018  
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  JarrellHill   8:45 21 Apr 2018  
   Re: Errors in new Mysqli Demo Store  
View this persons public profile  Gianluigi   2:36 22 Apr 2018  
   Shopping Cart Question Shopping -> Admin -> Upload -> Saveimage / uploadimage  
View this persons public profile  JarrellHill   9:17 8 Mar 2018  
   Re: Shopping Cart Question Shopping -> Admin -> Upload -> Saveimage / uploadimage  
View this persons public profile  Gianluigi   10:09 9 Mar 2018  
   MySQLi compatible version of Demo Site?  
View this persons public profile  JarrellHill   7:07 7 Mar 2018  
Last Visit: Friday 27 Dec, 2024 3:26 am First |  Prev |  Next |  Last  
 Login
Username:  Password:    
Read Message Read Message   Unread message Unread message
Read message [popular] Read message [popular]   Unread message [popular] Unread message [popular]
Read message [locked] Read message [locked]   Unread message [locked] Unread message [locked]
All times are GMT-1

Jump to: