News:

Support the VirtueMart project and become a member

Main Menu

Bugs in shop.browse

Started by doorknob, August 18, 2008, 03:11:20 AM

Previous topic - Next topic

doorknob

Now that the browse page has been changed to allow a single record to be displayed (rather than switching automatically to the flypage, the following change needs to be made so that the header information can be shown:
Line 171 should be changed from:
if ( $num_rows > 1 && @$_REQUEST['output'] != "pdf") {

to:
if ( $num_rows > 0 && @$_REQUEST['output'] != "pdf") {

and line 470 from:
if ( $num_rows > 1 ) {

to:
if ( $num_rows > 0 ) {


and a couple of w3c compliance issues
Line 192 should be changed from:
$search_string .="&".$key."[]=".urlencode($var);

to:
$search_string .="&".$key."[]=".urlencode($var);

and line 195 from:
$search_string .="&".$key."=".urlencode($val);

to:
$search_string .="&".$key."=".urlencode($val);


If a parameter search finds no resiults then the browse page is left blank unless line 75 is changed from:
if ($num_rows == 0 && (!empty($keyword)||!empty($keyword1))) {

to:
if ($num_rows == 0 && (!empty($keyword)||!empty($keyword1)||!empty($product_type_id))) {


Regards
Phil

sindb

Phil  ;),

Joomla 1.5.6
VM 1.1.2 stable

I've changed the shop.browse.php in /administrator/components/com_virtuemart/html/ as you described but without any result.
Problem 1: have a category with 8 products  http://www.herbslife.be/producten?page=shop.browse&category_id=30 but shows an empty white page ?  ???
Problem 2: this also happens with the VM search module, if he doesn't find the page even when this pages do exist ??  ???  (see attached jpg's please)
Please can you help me with this issue ?

I have a topic open here about this problem http://forum.virtuemart.net/index.php?topic=44292.msg141138#msg141138 August 09, 2008, 00:37:58 am

TIA
sindb

[attachment cleanup by admin]

doorknob

Hi sindb,

I find it very difficult to comment on the detail of your issue. What I would do myself to investigate the issue is
1 find and install the 'J!Dump' extension. I never leave home without it! (http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,1509/Itemid,35/)
2 use it to investigate the issues you are having by putting extra lines into the programs concerned to show you how the parameters are processed and monitor the values of variables (although the query string that drives the browse page is too long for dump() and so you should uncomment the 'echo $list;' line near the end of html/shop_browse_queries.php so that the query is displayed at the top of the browse page).

I'm sorry I can't offer any specific help except to point to how I would approach the issue.
Regards
Phil

sindb

doorknob,

many thanks for this suggestion but I never heard of this J!Dump, so you can figure out how many I know of Joomla.

Please, is it possible to say where I must put this dump( $variable, 'Variable Name' ); to figure out what the problem is ?


TIA
sindb

doorknob

If you are getting completely blank pages, you must have made a change to your system to cause this because VM works right 'out of the box'. There are a few issues but nothing that would cause your browse page to be blank. I suggest that you back-track on your changes until you get it working again and then apply changes one at a time with a test to ensure that it works before moving on.
Phil

sindb

Hi doorknob,

I'm not getting complete white pages please see jpg's in previous message.
It's more when the VM searchmodule doesn't find a page then he gave this almost complete white page with only the filter on. And the strange part is when you search e.g. "voedingsshake" he found nothing but there are pages with this word on ?

So now I want to use this D!Jump to found out what the variable exactly is where he looks with.
But I don't know how I must do this, could you help me with this please ?

TIA
sindb

doorknob

It seems to me that you are messing with something that you don't understand enough about. I don't see how I can help at this distance. You should find someone who knows php & sql and preferable also Joomla & VirtueMart although probably not essential who can look at what you have done and resolve the problems.

Good luck
Phil

sindb

doorknob,

the only thing I've done is installed everything, that's it.
As you already mention I don't understand enough about PHP to go messing around in these files. That's why I didn't change anything.
Is this an option please:
Delete VM complete and re-install it ?

Anyway thanks for your help :)

regards,
sindb

doorknob

sindb,
I'm sorry, I got the impression that you were making changes to the shop.browse program.
If you have installed VM from scratch and cannot get any products to display in the browse page then I think you must have made an installation error at some point. If you start a fresh installation and follow the instructions carefully then it should work ok. For those new to VM, it is a good idea to install the demo data and play with the demo system for a while to help to become familiar with the software. You can also add your own categories and products to the demo system to see how they will be displayed. This will also give you a point of comparison for when you build your own shop so that if you can't get a particular feature to work, you can look to see how it was done in the demo system.
I would also like to make another point which is that VM is often described as a start point for building a shop rather than the finished article. Many of the features of VM will be suitable without modification but many (most?) VM users find that they want to make some changes to the software so that they can meet their exact requirements. VM has been specifically designed to facilitate extension of the software. If you have no access to programming resources (specifically php & sql) then giving VM the 'polish' you require might be a struggle. If you really have no previous experience with any of the scripting languages then a trip to Amazon for basic primer in php would be a good idea whether or not you intend to do your own development work.

Good luck,
Phil

sindb

Thanks Phil,

I would like to re-install VM but I do not know what the consequent is because I've put all my products (almost 100) already in VM and I would like to keep this. Has been a lot of work.
Or is there no dangerous because re-installing VM doesn't go into the database ?

TIA
sindb

doorknob

sindb,
I would proceed as follows:
1 - install a new vm in a new database (the old one will not be lost) with the demo data.
2 - When you feel that you want to add your own products, unload them from your current database using the 'csv improved' extension (http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,4973/Itemid,35/) and then add them to your demo system. You'll need to switch on the legacy plugin but you can turn it off afterwards. (BTW I have not used the csv extension myself but it is endorsed by the vm project).
3 - Finally, when you are happy that the configuration meets your needs, start all over but without the demo data and create a third database. Again, you can transfer the product data with the csv extension.

Good luck
Phil

sindb

Hey Phil,

I have a new vm installed in a new database with the demo data as you told me.
Then I want to check out how the payments possibilities are here.
FYI: I would like that customers can pay "by Cash On Delivery" or "Bank Debit".
Now in the sample data I can't find an example of "Bank Debit" ?
So once again I'm blocked again  ???

TIA
sindb

sindb

#12
Phil,  ;)
In this environment there is no search problem. (see sampledata_search_ok.JPG)  :)
But now I can't even get in a category ?? (see sampledata_whitepage.JPG)
If I click on Books than a complete white page opens with only above "Display Items: " ?
Any idea please how I can fix this all ?  ???
TIA
sindb

[attachment cleanup by admin]

doorknob

sindb,
I can't help you. I know nothing about the shopping cart. My site is 'catalogue only'.
I think that the issues that you are having are installation problems rather than bugs and so the best place to get answers will be that forum.
Regards
Phil

sindb

Thanks Phil.
Sorry I didn't know that this was only for a catalogue store.
Anyway this is at the moment the only place where somebody answer my questions, thanks to you.
So I'll try on another forum.
regards,
sindb