X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Free "What's New?" X-Cart module released! (https://forum.x-cart.com/showthread.php?t=47502)

mrerotic 08-13-2009 08:34 AM

Re: Free "What's New?" X-Cart module released!
 
Victor can you please look at my post above and let me know if you can help me.Thanks.

canuck 08-13-2009 06:47 PM

Re: Free "What's New?" X-Cart module released!
 
1 Attachment(s)
Quote:

Originally Posted by Victor D
please attach your modules/Whats_New/config.php here, there is something wrong there as quotes should not be escaped in this query. Moreover, it should have no quotes. This is probably related with magic quotes configuration.


see attached

Quote:

I'm happy with magic quotes feature removal in PHP6. :)

I don't even want to think about moving to a new php version.. gives me the shakes.

Victor D 08-14-2009 06:02 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

1) Is there a way to not show "Bestsellers" on the whats new page if you have it enabled?
2) Also yes I can make the 'Whats New' category look different, but what if I want 2 more other categories to be up there with the 'Whats New' that look the same as it?
3) Can you make the 'Whas New' category specific for products?
4) Can you make it show products in a 3 column matrix if your main settings are set to just list products?
5) Is there anyway to give this category a description?

Too many questions :) I begin with the end))

edit modules/Whats_New/module.php

find there
Code:

    $current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");

and replace with

Code:

    $current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");

# this is  5)
    $current_category["description"] = "description here";
 
#this is 4)
$config["Appearance"]["products_per_row"] = 3;
$config["Appearance"]["featured_only_multicolumn"] = 'N';
$smarty->assign("config", $config); 


1) Do you mean Bestsellers menu or dialog?
2) You need add the same class with 'Whats new' category to all root categories with orderid lite then certain value in skin1/customer/categories.tpl
3) Can you make the 'Whas New' category specific for products - for example?

mrerotic 08-14-2009 07:25 AM

Re: Free "What's New?" X-Cart module released!
 
Thanks Victor

1) On Dialog?
2) whats orderid lite?
3) Say for 'dvds' only catid '433'?

mrerotic 08-16-2009 12:20 PM

Re: Free "What's New?" X-Cart module released!
 
Found an issue. When I have just added over 70,000 products at once to the store, I get an error in IE and FF where the popup showing new items since last visited. When I try to click "x" or new products to view them on that small popup window, it just keeps showing the same and never shows the main layout of the site or anything. Also does this mod add alot to the index.php as far as load? Please let me know. Thanks

gotpump 08-17-2009 07:18 PM

Re: Free "What's New?" X-Cart module released!
 
Sorry to add to the question craze. But if I'm updating strictly instock and out of stock lvls using a .csv import it adds all the products to What's New. Is there anyway to disable this from happening?

Thanks again,


NM found a way around it.

ibdmanhb 08-21-2009 12:41 PM

Re: Free "What's New?" X-Cart module released!
 
Hey Victor,

Thanks for the great mod ! Quick question, how can I change the size of the bubble and the font size/type of the text inside? I assume it's in Whats_New.tpl but I don't want to break anything.

Thanks again

mrerotic 08-24-2009 02:52 PM

Re: Free "What's New?" X-Cart module released!
 
Hey victor any updates on my post?

Also is there anyway to show only products that have an image? And again maybe only products from a certain category example (114 - dvds)?

Thanks,
Kyle

Victor D 08-25-2009 05:46 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by canuck
see attached
I don't even want to think about moving to a new php version.. gives me the shakes.


PHP6 is in development so I didn't attend you to switch to it. I'm just happy with it.

Seems something wrong with your cookies. There are no changes required in your config.php

Just clean all the cookies for your store and try place the bubble code one more time

Victor D 08-25-2009 06:01 AM

Re: Free "What's New?" X-Cart module released!
 
mrerotic
I'm not ready to explain about bestsellers dialog placement right now.
Quote:

2) whats orderid lite?
Categories are sorted by their orderids
So you can add specific class for the categories with the orderid less then 40 for example

Quote:

3) Can you make the 'Whas New' category specific for products?
Say for 'dvds' only catid '433'?
modules/Whats_New/products.php
Code:

$search_data["products"]["categoryid"] = 0; #place 433 (your catid) here instead of zero

Victor D 08-25-2009 06:26 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by gotpump
Sorry to add to the question craze. But if I'm updating strictly instock and out of stock lvls using a .csv import it adds all the products to What's New. Is there anyway to disable this from happening?
Thanks again,
NM found a way around it.


You need to prevent import script from changing add_date field in xcart_products table


Quote:

Thanks for the great mod ! Quick question, how can I change the size of the bubble and the font size/type of the text inside? I assume it's in Whats_New.tpl but I don't want to break anything.

lines 33,34 of whats_new.tpl:
Code:

popup_top = round(viewportheight/2) - 23; //23 - half of the height
popup_left = round(viewportwidth/2) - 178;  //178 - half of the width


and lines 85,86
Code:

newdiv.style.height = '36px';
newdiv.style.width = '356px';


You need to change height and width of the background image as well

Add into your css file to change font size/color:
Code:

#bubble{font-size:12px}
#bubble a:link, #bubble a:visited, #bubble a:hover, #bubble a:active{color:#cccccc;}


mrerotic 08-25-2009 06:43 AM

Re: Free "What's New?" X-Cart module released!
 
Victor thank you, what about my posting on the popup bubble issue in IE the whole page just keep resfreshing in IE8.

Thanks man :)

Victor D 08-25-2009 07:00 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by mrerotic
Found an issue. When I have just added over 70,000 products at once to the store, I get an error in IE and FF where the popup showing new items since last visited. When I try to click "x" or new products to view them on that small popup window, it just keeps showing the same and never shows the main layout of the site or anything. Also does this mod add alot to the index.php as far as load? Please let me know. Thanks


Did you change it to show products without pagination?
It looks like your PHP is running out of memory trying to display them at once

mrerotic 08-25-2009 07:47 AM

Re: Free "What's New?" X-Cart module released!
 
Victor this happens on the homepage. I'm not displaying any 'whats new' products on the homepage. They are in a category. If you dont mind as well I have the same question as the other who posted in the wrong forum. How can you display a certain number of 'whats new' on the homepage and again maybe from a certain category?

Victor D 08-25-2009 10:55 PM

Re: Free "What's New?" X-Cart module released!
 
to display the first page of new products on the homepage
/modules/Whats_New/module.php
replace
Code:

if ($WhatsNew == "Y"){
    if ($config["Whats_New"]["cheat"]) $products=array();
    include $xcart_dir."/products.php";
    $config["Whats_New"]["products"] = $total_items;
   
    $smarty->clear_assign("f_products");
    $smarty->assign("navigation_script", "home.php?WhatsNew=Y");

    $smarty->clear_assign("sort_fields");
    $smarty->clear_assign("products_sort_url");
    $current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
}

with
Code:

if ($WhatsNew == "Y"){
    if ($config["Whats_New"]["cheat"]) $products=array();
    include $xcart_dir."/products.php";
    $config["Whats_New"]["products"] = $total_items;
   
    $smarty->clear_assign("f_products");
    $smarty->assign("navigation_script", "home.php?WhatsNew=Y");

    $smarty->clear_assign("sort_fields");
    $smarty->clear_assign("products_sort_url");
    $current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
} elseif ($cat==0){
    if ($config["Whats_New"]["cheat"]) $products=array();
    include $xcart_dir."/products.php";
    $config["Whats_New"]["products"] = $total_items;

    $current_category["category_location"][] = array(func_get_langvar_by_name("lbl_wnmod_title"), "home.php?WhatsNew=Y");
}


and add into your skin1/customer/main/welcome.tpl
Code:

{capture name=dialog}
{include file="customer/main/products.tpl"}
{/capture}
{include file="customer/dialog.tpl" title=$lng.lbl_products content=`$smarty.capture.dialog` products_sort_url="home.php?cat=`$cat`&"}


For a certain category check this post
http://forum.x-cart.com/showpost.php?p=266341&postcount=50

Victor D 08-25-2009 11:00 PM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by mrerotic
Victor this happens on the homepage. I'm not displaying any 'whats new' products on the homepage. They are in a category.


That's right, but when you clicking the bubble it tries to search for all the products since last visit (70000)

Plucky Pear 08-27-2009 02:49 PM

Re: Free "What's New?" X-Cart module released!
 
The code on #55 can I use that to have it on my home page but also still have the category?

Victor D 08-28-2009 05:36 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Plucky Pear
The code on #55 can I use that to have it on my home page but also still have the category?

Yes, it doesn't affect the category. Moreover, if you need to remove category you should take some more actions (described in this thread a few pages ago)

Plucky Pear 08-28-2009 08:21 PM

Re: Free "What's New?" X-Cart module released!
 
Thank you for the great mod! It installed easy and I had no troubles getting it to work. Not really happy that when I add it to the front page it looks like a category page so I think I will take that back off, but other than that it does exactly what it should do. Thank you for making it such a simple and quick install :)

Jayk 08-29-2009 11:23 AM

Re: Free "What's New?" X-Cart module released!
 
I love this module. It's been running great, but I got a couple of SQL errors in the last day or so. Maybe someone could shed a little light on them for me...

Code:

SQL query  : select count(*) from xcart_products where add_date > 1251517824, $Version=0 and add_date < 1251517825
    Error code  : 1064
    Description : 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 ' $Version=0 and add_date < 1251517825' at line 1 Request URI: /product.php
Backtrace:
/xxx/include/func/func.db.php:186
/xxx/include/func/func.db.php:112
/xxx/include/func/func.db.php:357
/xxx/modules/Whats_New/config.php:10
/xxx/init.php:635
/xxx/auth.php:44
/xxx/product.php:38


Thanks,
Jason

mrerotic 08-29-2009 12:21 PM

Re: Free "What's New?" X-Cart module released!
 
Shouldnt this query be:
-----------------------
select count(*) from xcart_products where add_date > 1251517824 AND add_date < 1251517825

This should fix that. I don't know where $Version came into play.

Victor D 08-29-2009 03:21 PM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Jayk
I love this module. It's been running great, but I got a couple of SQL errors in the last day or so. Maybe someone could shed a little light on them for me...


Try to clean your browser cookie for your store domain

mrerotic 09-15-2009 02:13 PM

Re: Free "What's New?" X-Cart module released!
 
Is it possible to use this mod twice on the website? I'm not interested in using the popup notification of how many new products have been added, but rather having one area for new dvds and another for new toys. Is this doable?

Thanks

Christofer 09-15-2009 02:42 PM

Re: Free "What's New?" X-Cart module released!
 
i am not using the default menu so i can't view the link to "New products" but i want to add it on my menu. I saw on the other sites that use the mode that they use the "?cat=0&WhatsNew=Y" to go to that category.

So i am trying the http://www.gsmcorner.gr/?cat=0&WhatsNew=Y but doesn't work. Any idea?

Victor D 09-16-2009 12:58 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Christofer
i am not using the default menu so i can't view the link to "New products" but i want to add it on my menu. I saw on the other sites that use the mode that they use the "?cat=0&WhatsNew=Y" to go to that category.

So i am trying the http://www.gsmcorner.gr/?cat=0&WhatsNew=Y but doesn't work. Any idea?


http://www.gsmcorner.gr/home.php?cat=0&WhatsNew=Y
should works fine.

Victor D 09-16-2009 01:00 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by mrerotic
Is it possible to use this mod twice on the website? I'm not interested in using the popup notification of how many new products have been added, but rather having one area for new dvds and another for new toys. Is this doable?

Thanks

In the current state the answer is no. I'll think a bit what changes are required.

mrerotic 09-16-2009 05:56 AM

Re: Free "What's New?" X-Cart module released!
 
Thanks Victor that would be great.

Christofer 09-16-2009 06:29 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Victor D


i don't don't if it should works, but i dorsn't :P

Victor D 09-16-2009 06:51 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Christofer
i don't don't if it should works, but i dorsn't :P


It shows 'New products' dialog with no products in it.

Did you update your store inventory within last 10 days?
Try to increase number of days at the module configuration page.

Christofer 09-16-2009 04:11 PM

Re: Free "What's New?" X-Cart module released!
 
i added yesterday a product

Victor D 09-17-2009 03:26 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Christofer
i added yesterday a product

Please PM me your FTP details. I'll take a look.

yages 09-27-2009 10:09 PM

Re: Free "What's New?" X-Cart module released!
 
Found this in my log file
The IP address is unkown to me
Is this Mod causing problems

[17-Sep-2009 21:56:33] (shop: 17-Sep-2009 21:56:33) SQL error:
Site : http://www.xxxxx.com.au
Remote IP : 72.20.99.171
Logged as :
SQL query : select count(*) from xcart_products where add_date > 1253188448, $Version=0 and add_date < 1253188593
Error code : 1064
Description : 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 ' $Version=0 and add_date < 1253188593' at line 1
Request URI: /home.php?cat=525
Backtrace:
/home/xxxx/public_html/include/func/func.db.php:180
/home/xxxx/public_html/include/func/func.db.php:106
/home/xxxx/public_html/include/func/func.db.php:347
/home/xxxx/public_html/modules/Whats_New/config.php:10
/home/xxxx/public_html/init.php:588
/home/xxxx/public_html/auth.php:44
/home/xxxx/public_html/home.php:38

Jayk 09-27-2009 10:19 PM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by yages
Found this in my log file
The IP address is unkown to me
Is this Mod causing problems

[17-Sep-2009 21:56:33] (shop: 17-Sep-2009 21:56:33) SQL error:
Site : http://www.xxxxx.com.au
Remote IP : 72.20.99.171
Logged as :
SQL query : select count(*) from xcart_products where add_date > 1253188448, $Version=0 and add_date < 1253188593
Error code : 1064
Description : 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 ' $Version=0 and add_date < 1253188593' at line 1
Request URI: /home.php?cat=525
Backtrace:
/home/xxxx/public_html/include/func/func.db.php:180
/home/xxxx/public_html/include/func/func.db.php:106
/home/xxxx/public_html/include/func/func.db.php:347
/home/xxxx/public_html/modules/Whats_New/config.php:10
/home/xxxx/public_html/init.php:588
/home/xxxx/public_html/auth.php:44
/home/xxxx/public_html/home.php:38


I see similar ones from time to time. I believe it may be when a visitor who visited your site before you installed the mod returns. It throws off the mod due to the date in the visitor's cookie. It doesn't seem to cause any problems except to log an error.

Jason

Dorothy PCNC 09-28-2009 08:28 AM

Re: Free "What's New?" X-Cart module released!
 
Hi Victor,

I've read through this whole thread and it seems I am having the same problems as some fo the others. When I first installed this mod, the new category showed up and I have some new products on my home page. Great I think....but I have since added new products and they are not registering on neither the New category page nor the home page. I am not using the bubble portion of the mod. I have already tried changing the days of the new products but that did nothing.

Can you help please? Thanks for the mod and the support.

Regard, Dorothy
printcutncreate.com

mrerotic 09-28-2009 09:56 AM

Re: Free "What's New?" X-Cart module released!
 
Victor any news on running 2 of these whats new on the site?

Victor D 09-29-2009 07:17 AM

Re: Free "What's New?" X-Cart module released!
 
Quote:

Originally Posted by Dorothy PCNC
Hi Victor,

I've read through this whole thread and it seems I am having the same problems as some fo the others. When I first installed this mod, the new category showed up and I have some new products on my home page. Great I think....but I have since added new products and they are not registering on neither the New category page nor the home page. I am not using the bubble portion of the mod. I have already tried changing the days of the new products but that did nothing.

Can you help please? Thanks for the mod and the support.

Regard, Dorothy
printcutncreate.com


As I see from your Whats New category all its products added 21.09.2009 but these products are sorted in the reverse order and no pagination is available.
probably the last products are on the next pages

try this
in your products.php after the lines:
//+ + What's new
if ($active_modules["Whats_New"] && $WhatsNew == "Y"){
include "./modules/Whats_New/products.php";
}
//- - What's new
include $xcart_dir."/include/search.php";

add:

if ($active_modules["Whats_New"] && $WhatsNew == "Y"){
$products = array_reverse($products);
}

Dorothy PCNC 09-30-2009 04:48 AM

Re: Free "What's New?" X-Cart module released!
 
Thank you Victor for the reply...unfortunately your suggestion above did not work on my site. Is there anything else I can try?

Regards, Dorothy
printcutncreate.com

mrerotic 10-06-2009 01:30 AM

Re: Free "What's New?" X-Cart module released!
 
Victor - the category description does not show up. Can you please help me with this. I added exactly what you said to add. Also, I got it working for two different whats new sections. But please help on this last part. Thx

Also I want the categories to show up throughout all pages, but they disappear once I click into a subcategory. I followed the detailed instructions as well.

Yalokin 10-14-2009 11:48 AM

Re: Free "What's New?" X-Cart module released!
 
Hello.

we have 4.2.2
several time try to install automatically and manually both time need to run wn-install.php and on form first screen if click processed next page can not be found.

This happened with automatic installation however all permition were set correctly.

If I try to install manual I still need SQL pass and it is not provided in zip file.

With manual installation if you help me with sql do I really need to run installation file?

thank you for your help.



Quote:

Originally Posted by Victor D
Do you update your inventory regularly? Do you know how to inform your visitors about fresh arrivals?

The solution is now available!

Just imagine - you are able:
  • to create a virtual "New products" category shows all products added last week (month, quarter or any other time period);
  • to have a personal pop-up notification to inform a particular customer about new products appear since his last visit.
This solution is FREE!

X-Cart-Customization.com team is glad to announce the "What's New?" module.

http://x-cart-customization.com/images/P/wnbox-200x260.png

Features:
  • Javascript popup with a number of products added since last customer visit.
  • Virtual "What's New" category with products added to your store within the specified time period.
  • Both 4.1 and 4.2 X-Cart branches compatibility.
  • Totally FREE!
  • Completely open source! Feel free to modify.

Module screenshots:


http://x-cart-customization.com/images/marketplace/bubblefull_screenshot.gif

http://x-cart-customization.com/images/marketplace/bubble_screenshot.gif

http://x-cart-customization.com/images/marketplace/category_screenshot.gif


JWait 10-14-2009 01:21 PM

Re: Free "What's New?" X-Cart module released!
 
I am trying to install this on a test version of 4.2.2 and get the following when running wn_install.php

X-Cart installation... Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/sessions.php on line 74
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/sessions.php on line 76
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/sessions.php on line 85
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/sessions.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/sessions.php on line 93
Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/xc42/wn_install.php:66) in /home/myaccount/public_html/xc42/include/func/func.core.php on line 1819

Needless to say, it doesn't work.


All times are GMT -8. The time now is 02:03 AM.

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