Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247031 Posts in 67504 Topics- by 258313 Members - Latest Member: Matej.iStraxx
Pages: 1 [2]   Go Down
Print
Author Topic: mambo-phpshop mysql 5 problem  (Read 130965 times)
dj_mystic82
Newbie
*
Posts: 45


« Reply #15 on: September 04, 2008, 19:42:27 pm »

Many thanks. It will be drunk tonight Smiley
Logged
parapet
Newbie
*
Posts: 5


« Reply #16 on: October 01, 2008, 21:26:22 pm »

My client has an older version of the cart used as a catalog only. The version is as follows: mambo-phpShop 1.2 stable - TEST RELEASE 0  [Polar King] 25/04/2004

The site was developed by someone else. We also have the same problem with a change over to MySQL 5, but our code is a bit different from that posted here previously, and I don't know enough about writing queries to be able to handle it easily.

Here's the code I believe is the one we need to change:
Code:

/*** DEFAULT, LIST ALL PUBLISHED PRODUCTS ***/
else {
//PALMEA Allow link to full image and all other product details
// $list  = "SELECT DISTINCT product_name,#__pshop_product.product_id, product_thumb_image,product_s_desc ";
  $list  = "SELECT DISTINCT #__pshop_product.* ";
 $list .= "FROM #__pshop_product, #__pshop_shopper_group ";
 $count  = "SELECT DISTINCT #__pshop_product.product_id as num_rows FROM #__pshop_product, #__pshop_shopper_group ";
 $q  = "LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id ";
 $q .= "WHERE #__pshop_product.product_parent_id='0' ";
 $q .= "AND #__pshop_product.product_publish='Y' ";
 $q .= "AND ((";


Any help that can be offered would be most appreciated!
Thanks!

Logged
dj_mystic82
Newbie
*
Posts: 45


« Reply #17 on: October 01, 2008, 22:39:46 pm »

This code seems quite different to anything in shop.browse.php when doing a search. Is it definatley in shop.browse.php you are looking? What line number is it roughly at?

It seems odd that it is nearly the same version of Phpshop and the code is written so different.

The version I have is 1.2 stable 3  [Good Young Progress]
Logged
parapet
Newbie
*
Posts: 5


« Reply #18 on: October 02, 2008, 14:49:54 pm »

This code seems quite different to anything in shop.browse.php when doing a search. Is it definatley in shop.browse.php you are looking? What line number is it roughly at?
It seems odd that it is nearly the same version of Phpshop and the code is written so different.
The version I have is 1.2 stable 3  [Good Young Progress]

Since the install date appears to be 2004, this would seem to be a much older version, even though the numbering of the old version *appears* to be close to the current version.

The code definitely comes from the correct file, there are also a few lines above it where similar code is placed, but listing according to manufacturer. It starts at Line 227.

I don't know enough about rewriting MySQL queries to rewrite the code, but I may have to find out if no one has any answers to this problem.
Logged
parapet
Newbie
*
Posts: 5


« Reply #19 on: October 02, 2008, 15:04:45 pm »

A further note. Here's the identification content from the top of the file:

/**
* @version $Id: shop.browse.php,v 1.29 2005/04/23 15:44:29 soeren_nb Exp $
* @package mambo-phpShop
* @subpackage HTML
* Contains code from PHPShop(tm):
*    @copyright (C) 2000 - 2004 Edikon Corporation (www.edikon.com)
*   Community: www.phpshop.org, forums.phpshop.org
* Conversion to Mambo and the rest:
*    @copyright (C) 2004-2005 Soeren Eberhardt
Logged
dj_mystic82
Newbie
*
Posts: 45


« Reply #20 on: October 02, 2008, 15:19:14 pm »

This is the version of the file I am using:
@version $Id: shop.browse.php,v 1.45 2005/06/23 18:59:16 soeren_nb Exp $
Logged
ididgeit
Newbie
*
Posts: 2


« Reply #21 on: November 03, 2008, 09:54:08 am »

Hi guys,

I had the same problems initially with the category showing empty whereas there are products in the backend. I have done as suggested by dj_mystic82:

Quote

I've just been going over my notes for this again. Try around line 218 that has " /*** GET ALL PUBLISHED PRODUCTS ***/"

The code is very similar. I have pasted below exactly what was changed :

 $list  = "SELECT DISTINCT $fieldnames FROM #__pshop_product LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";
 $count  = "SELECT $count_name FROM #__pshop_product LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";
// Original Code
 #$list  = "SELECT DISTINCT $fieldnames FROM #__pshop_product, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";
 #$count  = "SELECT $count_name FROM #__pshop_product, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";
 #$q  = "LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id ";


But now it shows as a blank page altogether only with the error lines:

Quote
Fatal error: Call to undefined function mm_writeWithJS() in /home/gohbros/public_html/administrator/components/com_phpshop/html/shop.browse.php on line 438

See this link for example:

Quote

I am btw using PHP Ver 5.2.6 and MySQL 5.0.51a-community.

Any help is greatly...greatly appreciated. Smiley

A million thanks in advance.

--Jahn
Logged
dj_mystic82
Newbie
*
Posts: 45


« Reply #22 on: November 03, 2008, 10:35:26 am »

Sounds like it could be a separate issue. I suggest mm_writeWithJS is the function for the ascending / descending sorting.

Also check that there isn't a character such as semi colon or quote missing or pasted in with the fix.
Logged
ididgeit
Newbie
*
Posts: 2


« Reply #23 on: November 03, 2008, 11:52:51 am »

This is the code as pasted into shop.browse.php

/*** GET ALL PUBLISHED PRODUCTS ***/
 $list  = "SELECT DISTINCT $fieldnames FROM #__pshop_product LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";
 $count  = "SELECT $count_name FROM #__pshop_product LEFT JOIN #__pshop_product_price ON #__pshop_product.product_id = #__pshop_product_price.product_id, #__pshop_category, #__pshop_product_category_xref,#__pshop_shopper_group ";

The error started showing only after a few weeks as I had just upgraded my servers. It was working fine for more than a couple of years...weird.

Thanks

Logged
Pages: 1 [2]   Go Up
Print
Jump to: