X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Newest Products (https://forum.x-cart.com/showthread.php?t=1084)

JWait 08-15-2008 12:50 PM

Re: Newest Products
 
http://forum.x-cart.com/showthread.php?t=1084&page=9 ...... post #90 through about 110

betty4 08-16-2008 12:20 PM

Re: Newest Products
 
Quote:

Originally Posted by JWait


JWait this is your baby and thanks for your reply. I'm using the zip file from post #185. I have already followed all those instructions to the letter, checked and rechecked code additions, position, spelling, and file location. It's really all pretty straight forward. That's the easy part. I'm almost there.

Here lies the root of my problem. Cleared cache, re-booted PC and continue to get blank page calling newsproducts.php. My post #238 was specific to instructions for Edit $xcart_dir/include/func/func.product.php. Store ver. 4.0.17 is not structured that way. File does not exist to edit. I wrote what I did to remedy for my version in this instance and requested feed back for that action.

I wrote I have already searched for an answer to that concern throughout the thread, but could not find any references to mysql function edit for 4.0.17. It could be a combination of incompatible template coding in newproducts.tpl and mysql query functions for the version. I just don't know at this point.

JWait 08-17-2008 05:18 AM

Re: Newest Products
 
1 Attachment(s)
This is not "my baby" but it is a mod that I find necessary to business, and think it should be a part of x-cart by default.

The zip from post #185 is for version 4.1.x (the "Edit $xcart_dir/include/func/func.product.php" is a dead giveaway as it doesn't exist in versions other than 4.1.x) and from my original notes I don't see where any php files are modified anyway.

I have attached the files I used for version 4.0.x (probably version 4.0.19) for you to compare. As I said before this is a old thread, and it has gone through several version of x-cart that are different from one another, so you will have to find where the discussion pertains to your version.

To make matters worse, there are 2 distinctly different mods that pertain to new products, making it difficult if you do a search of this forum. The posts in the thread at http://forum.x-cart.com/showthread.php?t=1084&page=9 ...... post #90 through about 110 appear to deal with your specific version, and would probably be a good starting point.

betty4 08-18-2008 10:53 AM

Re: Newest Products
 
Thank you for the attachment. I agree the mod shoud definately be inherent in the cart package. Sorry if you were offended by the "baby" reference. It was a show of respect honoring your zip file contribution. I'll give the attached 4.0.x zip a try.

betty4 08-18-2008 02:11 PM

Re: Newest Products
 
1 Attachment(s)
Okay. I overwrite newproducts.php file offered for 4.0.x and called it. newproducts.tpl works now and Ive added products in last 3, 7 & 30 days that don't show. Says no new products and got top of page debug error:

Quote:

INVALID SQL: 0 :
SQL QUERY FAILURE: SELECT COUNT(xcart_products.productid) FROM xcart_products, xcart_categories, xcart_products_categories, xcart_pricing WHERE xcart_products.productid=xcart_products_categories .productid AND xcart_products_categories.categoryid=xcart_categor ies.categoryid AND xcart_products.productid=xcart_pricing.productid AND xcart_pricing.quantity=1 AND (xcart_pricing.membership='' OR xcart_pricing.membership='') AND (xcart_categories.membership='' OR xcart_categories.membership='') AND xcart_products.forsale='Y' AND xcart_pricing.variantid = 0AND xcart_products.avail > 0 AND add_date > 1216504439 AND add_date < 1219096439 GROUP BY xcart_products.productid

Thanks.

JWait 08-24-2008 09:15 PM

Re: Newest Products
 
Did you try clearing the variable templates cache?

betty4 08-25-2008 11:53 AM

Re: Newest Products
 
3 Attachment(s)
Quote:

Originally Posted by JWait
Did you try clearing the variable templates cache?


Thanks again for your reply. Yes. I did that today. Cache now contains 0 files so it's clean. Still have INVALID SQL: 0 : pointing to a SELECT COUNT query failure performing FROM, WHERE, AND... top of page and returning "No new products have been listed within timeframe you specified".

Seems to me the query string needs tweaking in this instance. Probably as plain as the nose on my face, but I can't figure it out even with a clear head.

Backtrace : /include/func.php:121 /include/func.php:80 /newproducts.php:143 /newproducts.php:237

See Screenshot

xcell67 09-27-2008 11:45 AM

Re: Newest Products
 
Hi,

I'm using the version that provided the zip :newproducts4-1-x

Problem:
Whenever I do an inventory update of existing items (price, stock,etc) using the import function of X-cart, the add date changes. With the add date changing, the newproducts mod thinks the old item is a new one causing it to pull up every single item when I just wanted the newest products to show.

Anyone else have this problem?

JWait 10-01-2008 04:35 AM

Re: Newest Products
 
Betty, I'm no sql expert, but this (from your error report) looks strange to me...
"... AND (xcart_pricing.membership='' OR xcart_pricing.membership='')...".

Shouldn't the =" actually be ="", or maybe it is just 2 single ' together.

aimeea 10-02-2008 03:38 PM

Re: Newest Products
 
Is there a way to limit the number of new products per manufacturer or provder that shows up on the newest products first page?

Thank you for any help


All times are GMT -8. The time now is 07:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.