Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Catalog Products with Images problem


dlyxzen

Recommended Posts

Hi Guys,

 

Have looked all over the forum for a answer to this question but cant seem to find anything, im hoping some people out there might be using this mod and have it working slightly better then me.

 

I am using the catalog products with images mod to print my catalog, its works almost like a charm except for two issues. Instead of displaying the main category name, it displays the sub category name. And i cant seem to get this working with SPPC (getting it to display wholesale price instead of a retail price). Im not great with mysql but it uses the following.

 

$products_query_raw = "select distinct p.products_id, p.products_image, p.products_model, p.products_quantity, p.products_weight, pd.products_name, p.manufacturers_id, p.products_price, p.products_date_added, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, m.manufacturers_name, pd.products_description, cd.categories_name, p.products_tax_class_id, p2c.categories_id from (" . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c) left join " . TABLE_CATEGORIES_DESCRIPTION . " cd on p2c.categories_id = cd.categories_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = ' ". $languages_id . "' and cd.language_id = '" . $languages_id . "' order by $order";

 

it is getting the category name from the categoriy_id in categories_description table, problem is the category_id is from products_to_categories table , and this is always set to the second level of categories i have. Would there be anyway to re-write this query to use "parent_id" from the categories table and compare this to the category_id.

 

Secondly its pulling product_price from the products table, however i need it to pull out customer_group_price from products_groups table where customer_group_id='2' (2 being wholesale)

 

Is anybody else using this mod successfully ?

 

Any help greatly appreciated, eg: of script can be found here http://catalog.sportsmode.com.au/catalog_p...with_images.php

 

cheers

 

dlyxzen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...