Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

JUST RELEASED! Printable Catalog


Guest

Recommended Posts

Hi David,

 

Sorry I didn't get back to you sooner...had family obligations yesterday.

 

I'm afraid I don't have an answer why you are getting that error. Which version are you using? Have you uninstalled the mod and tried re-installing it?

Link to comment
Share on other sites

Hi all,

First of all, let me say this contribution is great.

However, the printable catalog prints out the duplicate products serveral times depend on how many attribute options I have added to that product. I think this is the problem with most of stores in which each product has several options added to itself.

 

For example :

Product A has some attribute options like:

Color = red (+ USD 2.00 )

yellow (+ USD 2.00 )

blue (+ USD 2.00 )

 

Somehow the product table in database understands there are three different products ( actually only one Product A )

 

So, if I have only 40 actual products ( with pictures and descriptions ) and I have 4 attribute options for each product, the Printable Catalog will print out 160 products. There are 4 duplicate for each product.

 

Any ideas and suggestions how to get rid of duplicate ones.

Link to comment
Share on other sites

Hi Wayne,

 

Hhhhmmm.....I just double checked my printable catalog and the products I have that have attributes are not duplicated but, I don't have an upcharge either. I haven't worked on adding the attributes to the catalog yet either.

 

I'm going to have to think about this one a bit....

 

Question...Do all of your products have an upcharge associated with the attribute like your example?

Product A has some attribute options like:

Color = red (+ USD 2.00 )

yellow (+ USD 2.00 )

blue (+ USD 2.00 )

Link to comment
Share on other sites

In looking over the SQL query, I don't think this is possible today.

 

You will have a product printed for each time it's in a new catetory, but there is nothing in the catalog query that even cares about attributes.

 

If you are getting duplicates based on attributes, you are running something other than BirdBrain's contribution.

 

-t

Link to comment
Share on other sites

Sorry for making any confusion :wink: . I have checked again and found out that I had double prints of each product in the Printable Catalog. So, what I say about duplicate prints based on attributes in incorrect. I should have been more careful about what I said.

 

Any ideas about double prints. :-) I am sure about what I said this time.

Link to comment
Share on other sites

Those products that are in multiple categories are going to be shown more than once because of the way the query is written. Do you have any other contributions installed? Have you modified the tables in the dB?

 

How 'bout a URL where I can see exactly what it's doing?

Link to comment
Share on other sites

Hi Kim,

 

Besides doing some customizations, I have not installed any major contributions.

I did sort products by price in each category by following some suggestions in forum.

 

In header.php, add the following lines

<? php

if(!isset ($HTP_GET_VARS['sort'])) {

$HTTP_GET_VARS['sort']='4a';

}

?>

 

In the product DB, I only changed the dates of products added.

 

That's all I did.

This is the link:

 

http://www.e-saigonflowers.com/catalog/pri...int_catalog.php

Link to comment
Share on other sites

Wayne,

 

The catalog looks great...except for the duplication....:-)

 

I'm stumped....

 

Well, I'm only half-stumped now....I believe that some of the duplication stems from using multiple languages in the store....I don't know how to fix it though.

 

Any bright ideas?

Link to comment
Share on other sites

I have the same problem, and it looks to be due to multiple languages... I have 7 of every item, and 7 languages. Unfortunately, I don't know enough PHP to fix it :(

 

Awesome job though, Kim!

 

Violet

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

Just wondering if anyone had solved the duplication problem or had any ideas?

 

The only idea I can think of is I moved some entries from the "root" into a category, could this cause a double entry as if there is a 'ghost' impression in the db?

 

Even though i removed all the sample categories from the default installation and added only four items into the catalog, the printable catalog page says:- "Displaying 1 to 3 (of 18 products)"

 

But after all that, a lovely contrib, wish I could help!

 

Penge

Link to comment
Share on other sites

  • 2 months later...
  • 9 months later...

I'm adding this in to a new store and am getting the following error:

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select p.products_id, pd.products_name, pd.products_descrip

 

select count(select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, cd.categories_name, m.manufacturers_name from products p left join products_to_categories p2c on p.products_id=p2c.products_id left join categories c on p2c.categories_id=c.categories_id left join categories_description cd on c.parent_id=\'0\' and c.categories_id=cd.categories_id left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id where products_status = \'1\' order by cd.categories_name, c.parent_id, c.sort_order, c.categories_id, pd.products_name) as total

 

[TEP STOP]

 

which you can see here: http://oddsandinsonline.com/catalog/print_catalog.php

 

Any suggestions where to start looking?

Link to comment
Share on other sites

Still haven't figured it out but am wondering about this piece of code at the end of includes/modules/print_catalog:

 

  <!-- model number -->

  <td >

    <?php echo TEXT_MODEL . $print_catalog_array[$i]['model']; ?>

  </td>

  <!-- added to inventory -->

  <td >

    <?php echo TEXT_DATE_ADDED . $print_catalog_array[$i]['date_added']; ?>

  </td>

  </tr>

<?php

      if (($i+1) != sizeof($print_catalog_array)) {

?>

</table>

 

</td>

</tr>

<?php

      }

    }

  }

?>

 

</table>

 

Should that closing table be there? Or before ?>?

Link to comment
Share on other sites

  • 3 months later...

I just installed the mod and I am having the same problem as Quin is. My info is:

 

1064 - You have an error in your SQL syntax near 'select p.products_id, pd.products_name, pd.products_description, p.products_m' at line 1

 

select count(select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_image, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, p.products_date_added, cd.categories_name, m.manufacturers_name from products p left join products_to_categories p2c on p.products_id=p2c.products_id left join categories c on p2c.categories_id=c.categories_id left join categories_description cd on c.parent_id=\'0\' and c.categories_id=cd.categories_id left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join products_description pd on p.products_id = pd.products_id and pd.language_id = \'1\' left join specials s on p.products_id = s.products_id where products_status = \'1\' order by cd.categories_name, c.parent_id, c.sort_order, c.categories_id, pd.products_name) as total

 

[TEP STOP]

 

I'm not a php guru, but I am certain I installed everything very very carefully. Any ideas?

--Sanguinarius

 

If you're reading this, I'm probably pulling my hair out. ;>

 

*waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.)

Link to comment
Share on other sites

Please disregard my above post. I can't edit or delete it. I'm trying a different mod (and having problems with IT now, instead, lol!).

--Sanguinarius

 

If you're reading this, I'm probably pulling my hair out. ;>

 

*waiting for osCommerce 3.0 alpha 6* (I'm after the coupons.)

Link to comment
Share on other sites

  • 1 month later...

Has anybody found a solution to the above SQL error? If so how do I fix it. I have just started to update my website and would like to use this contrib, but if I can't find a solution to this problem I may just find another solution for a printable catalog.

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...