Notice
  • The administrator has disabled public write access.
  • Only logged-in/registered users are allowed to contribute to the forum.

Open Source Services

Development Services and Products for Open Source e-Commerce Sites

 
Notice
  • The administrator has disabled public write access.
  • Only logged-in/registered users are allowed to contribute to the forum.
Welcome, Guest
Please Login or Register.    Lost Password?
Support forum for Shareware version of Product Attribute Pictures for Zen Cart.
Go to bottomPage: 1
TOPIC: mysql error
#514
mysql error 3 Years, 9 Months ago  
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/*******/public_html/admin/includes/functions/extra_functions/paps_data_access.php on line 11


I am interested in this mod but I get the error above. I select a product, but it shows a different product when I press submit. And select by model yields no entries. I appreciate any help. I am on php5 (I think).

Many thanks,

Russ
heathenmagic
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#515
Re:mysql error 3 Years, 9 Months ago  
Hi

Thanks for your query. There are a couple of things which may be causing this.

First of all, open admin/includes/functions/extra_functions/paps_data_access.php, and on line 11 add
an '@' sign immediately before the 'm' of 'mysql_num_rows'. This ought to suppress the error which is appearing, but won't necessarily fix the erroneous product selection behaviour.

You need to make sure that you have set up all your products with model numbers, because it's the model numbers which PAPs uses to reference products.

If you have definitely set up all your products with model numbers and you are still having the same problem then try the following:

Look into each of the PAPs files you installed and replace every instance of $HTTP_POST_VARS to $_POST and every instance of $HTTP_GET_VARS to $_GET. Most of the instances of $HTTP_POST_VARS and $HTTP_GET_VARS appear in admin/paps.php, but the best way is to use the 'Find In Files' functionality of your text editor or similar program, or use 'Replace in Files' to make all the changes with one click.

If making these changes still doesn't help the problem, then I'd need to take a look at it myself at some point. you can send me your FTP/ website login details to the email address in the User Manual if you'd like me to do this.

Let me know how you get on.

Cheers

Nick
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#516
Re:mysql error 3 Years, 9 Months ago  
Hello Nick,

The @ fixed the mysql problem, and there were a couple of items that had no model. The category select issue is due to me having repeated model numbers for different items - a result of having Cross Sell By Model installed. I made a unique model name for an item, and it is working ok.

I am on the Product Attribute Upload, but the dropdown for the item with attributes yields no values. I am pretty sure it is because I have Stock for Attributes module installed. That alters a few core files. Does this sound like a conflict?

Thanks for you assistance,

Russ
heathenmagic
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#517
Re:mysql error 3 Years, 9 Months ago  
Hi

In PAPs v2.0, the attribute select box in the upload section refers ONLY to attributes for which PAPs have been uploaded already. In other words, you will only use this dropdown box in cases where you want to add further images to an attribute which already has attribute pictures associated with it. (Version 3.0 PLUS is much more user friendly in this regard and behaves in the way you were expecting).

The behaviour you describe in v2.0 is therefore normal. What you need to do is to enter the attribute name (e.g. color, size etc.) in the text box EXACTLY as it was spelled when you were setting up the attribute itself in the default Zen Cart Attribute Controller.
then you can continue with the upload process.

Do remember that during the next stage of the upload process you must also type in the attribute values (e.g. red, green, large etc) EXACTLY as the appear in the Attribute Controller section.

I hope this helps.

Cheers

Nick
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#518
Re:mysql error 3 Years, 9 Months ago  
Hello Nick,

Thanks for the help. I referred to Attributes Controller, and copied exactly what was there. I made sure there was no trailing spaces.

For Attribute: , I have Glass Vial Pendants. Images: 3 then submit.

For respective Value: they are
x 2
x 5
x 12

browse for the respective images, one is 2 glss vial pendants.jpg

Are the presence of spaces in photo a problem? They are sied at 480 by 700 or less. It goes through the upload, then returns to the item part where you put attribute name and number of images again. No images logged or error messages appear.

Is this maybe an error restricted to the shareware version? And would any attribute modification be causing the non-upload i.e Kurois' Stock by Attribute?

Regards,

Russ
heathenmagic
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#519
Re:mysql error 3 Years, 9 Months ago  
Hi

You should check your images/paps folder on the server to see if the images files were uploaded. It sounds like they weren't. If this is the case check the following:

1) Make sure the filenames for each image don't contain any spaces

2) Make sure you have given full write permissions for the images/paps folder. If you are using a Microsoft server you'll need to do this using the server's admin component.

Let me know what happens.

Cheers

Nick
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#520
Re:mysql error 3 Years, 9 Months ago  
Hello Nick,

I checked the folder, I have three images there. I checked myphpadmin to see if the paps tables were being filled, and they still have 0 for their data size.

I tried renaming attribute to one word, and having no spaces in attribute values, but the same happens. It still says, there are no attribute images for this product.

I'm not having much luck. lol. I have been looking for this mod, with the features mentioned, for ages. I am sure we can get it working, then I will update to the full version no doubt to make adding images a bit quicker. And I noticed an add on for it too.

I am trying it with an item that has dropdowns, has that got any bearing on it at all? And I have defined a quantity for each attribute value, using the Stock by Attributes mod I mentioned.

Thanks for your assistance as always.

Russ
heathenmagic
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#521
Re:mysql error 3 Years, 9 Months ago  
Hi Russ

Sorry to hear of your continued problems. I'm not familiar with the Stock by Attributes contrib so I can't say if this is having an effect on PAPs.

The best way for me to get to the bottom of this is to take a look at your site. Is it online? If so could you point me in the direction of the product page you want to add attribute pictures to? Also, I'd need FTP access to check the installation is correct and access to your Zen Cart admin to test it out.

You can send me the details by email (the address is in the user guide if memory serves) if you want me to do this for you. I'm a bit busy doing upgrades for paying customers at the moment so it might be 2-3 days before I get around to it - hope you understand

The fact that the item you are setting up for PAPs has dropdowns is perfectly natural and shouldn't get in the way of PAPs functioning. PAPs is aware of dropdowns and hides them when users select 'Allow Attribute Selection' via the PAPs radio buttons. If files are actually being uploaded properly but the info about them isn't being persisted in the DB, it suggests a problem concerning SQL but as I say, I'd need to get into the code in order to really fix the problem.

Regards

Nick
hanuman
Moderator
Posts: 371
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1