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)

mrerotic 07-24-2009 02:20 AM

Re: Newest Products
 
Can anyone please make this work for 4.2 please...

Victor D 07-27-2009 12:35 PM

Re: Newest Products
 
Try this http://x-cart-customization.com/x-cart-modules/Whats-New.html
It is free ;)

Plucky Pear 08-13-2009 09:03 AM

Re: Newest Products
 
I have that mod, but it doesn't show that products on my main store page.

Plucky Pear 08-18-2009 10:54 AM

Re: Newest Products
 
Does anyone know of one that will show the products on the front page that also works with whats new?

Victor D 08-25-2009 06:40 AM

Re: Newest Products
 
Quote:

Does anyone know of one that will show the products on the front page that also works with whats new?
Please put your question into Whats New support thread, this task is quite simple

aimeea 11-15-2009 07:50 PM

Re: Newest Products
 
Is there a way to limit how many new products per manufacturer show up in this mod?

jmcfall 02-12-2010 01:27 AM

Re: Newest Products
 
Does the Firetank Mod work with X-Cart 4.3.1? (the website only lists X-cart 3.4.X to 4.2.)

jmcfall 02-12-2010 08:34 PM

Re: Newest Products
 
I bought the Firetank Mod & it does work with 4.3.1

Learner 02-15-2010 10:45 PM

Re: Newest Products
 
Anyone for 4.3 version?

ShishaPipeUK 03-13-2010 03:20 AM

Re: Newest Products
 
1 Attachment(s)
The newproducts works fine with 4.3.1

Attached are the 2 files i use on 4.3.1 which are

My X-Cart home directory - newproducts.php
My X-Cart home/skin1/customer/main/newproducts.tpl

I have also included my X-Cart home/skin1/customer/home_main.tpl file as this is a new shop and not been changed yet.


And you can view this at http://www.nightscene.co.uk/shop/newproducts.php

tom437 03-13-2010 08:35 AM

Re: Newest Products
 
After, adding those code, whats next? how do we set it up? where does it appear on the admin part? how do I let it appear on the store front/
Please

ShishaPipeUK 03-14-2010 06:51 AM

Re: Newest Products
 
It does not appear in the admin section, it appears on your shopping cart home page and you can either enter this in your Speed bar in admin section. Just put in Link Title = New Products and url = newproducts.php.

You can also edit your skin1/customer home.tpl

Pyro 03-30-2010 04:21 PM

Re: Newest Products
 
Quote:

Originally Posted by ShishaPipeUK
The newproducts works fine with 4.3.1

Attached are the 2 files i use on 4.3.1 which are

My X-Cart home directory - newproducts.php
My X-Cart home/skin1/customer/main/newproducts.tpl

I have also included my X-Cart home/skin1/customer/home_main.tpl file as this is a new shop and not been changed yet.


And you can view this at http://www.nightscene.co.uk/shop/newproducts.php



I just want to clarify, if I only want to make a new page like yours, I just have to include those two files? I do not need it to show up on the home page at all, so do I not need the newproducts.tpl? I am using 4.3.1, but I get

"Page not found! The requested page does not exist or you are not allowed to access it!".

I have put the "newproducts.tpl" into the /skin1/customer/main and I have put the "newproducts.php" into the root directory. When i visit the php file, I get the error listed above.

Thanks

sparker2 04-02-2010 08:52 PM

Re: Newest Products
 
Has this error been resolved because I am getting this also? The page not found. Thanks in advance for your help.

Pyro 04-02-2010 08:59 PM

Re: Newest Products
 
I have not found the answer yet. I have tried a few things, but nothing seems to work. Let me know if you make any head way and I will do the same.

sparker2 04-02-2010 09:05 PM

Re: Newest Products
 
I got the page to load by adding the two lines of code to the home_main.tpl page but when the page loads it does not display anything. just : in a big menu box with a folder icon in left hand corner.

sparker2 04-04-2010 08:21 AM

Re: Newest Products
 
Just to give you guys an update for version 4.3.1, maybe this can help someone else. I got the label to show for the What's new category by changing the language code from US to en because 4.3.1 does not use code US like the previous versions. I am still not able to get the description to show so I just included it in the title code for now. I have not added any new products in a while but I set the (How many days for the products (0 to disable) setting to 1000 and I can get products to show up which is good. Now is there a way to add a (if) statement some place so that if there are no new products for that time frame, it will display a message like (No new products have been added at this time). I notice that if there are no new products it will display the featured products list from my home page which is not good for me.

amy2203 04-11-2010 10:02 AM

Re: Newest Products
 
I've had this running for ages and it's been fine, but I've added a field to the database, and the products.tpl template displays different images based on this field.

The search function this uses doesn't search for this field though so it's displaying the wrong images. I've tried looking in func.product.php but I can't seem to find the right place to add my field to the select query.

Can anyone help?

tia,

jadefrolics 04-13-2010 02:13 PM

Re: Newest Products
 
Hi all, I just tried to add this mod to my 4.3 shop, and it looks perfect. However, all the product thumbnails take me to the home page when I click them, not the product page. It doesn't even attempt to go to the product page. I don't know smarty or php, and I kinda put it all together based on a variety of posts in this thread, so I must have done part of it wrong.

Can anyone tell me where I can find code that tells the product thumbnail to link to the product detail page rather than the home page? Thanks!

presson83 05-11-2010 11:48 AM

Re: Newest Products
 
For anyone having trouble getting the normal price to show in 4.2.3 (not the list price) I had to update the query in newproducts.php (from the original post) like so:

Code:

SELECT xcart_products.*, xcart_pricing.*, xcart_quick_flags.* from xcart_products LEFT JOIN xcart_quick_flags ON xcart_quick_flags.productid = xcart_products.productid LEFT JOIN xcart_pricing ON xcart_pricing.productid = xcart_products.productid WHERE forsale = 'Y' ORDER BY add_date DESC LIMIT 12

So that problem is taken care of. My final problem is getting the buy now button to work. Has anyone gotten the buy_now button functioning with this mod?

TheWrongGrape 05-14-2010 04:47 PM

Re: Newest Products
 
Quote:

Originally Posted by jadefrolics
Hi all, I just tried to add this mod to my 4.3 shop, and it looks perfect. However, all the product thumbnails take me to the home page when I click them, not the product page. It doesn't even attempt to go to the product page. I don't know smarty or php, and I kinda put it all together based on a variety of posts in this thread, so I must have done part of it wrong.

Can anyone tell me where I can find code that tells the product thumbnail to link to the product detail page rather than the home page? Thanks!


I tried this also and got the same error so it's not just you.

Learner 05-14-2010 09:07 PM

Re: Newest Products
 
Hi I think that it is not compatible with 4.1.x version !!! Please give me some stable version for 4.1.x??

sinobest 08-26-2010 01:55 PM

Re: Newest Products
 
how to show newest products at homepage of x-cart v4.4.0?

Ajay 08-27-2010 09:32 AM

Re: Newest Products
 
I think this feature should be really part of base feature set of x-cart. If you agree please vote for this feature request, under the feature request area
http://ideas.x-cart.com/forums/32109-feature-requests/suggestions/440323-a-customer-link-to-see-newly-adde...-the?ref=title

Cankus 01-20-2011 02:14 AM

Re: Newest Products
 
1 Attachment(s)
NewProducts for 4.4.2

it is working on http://www.elitmarket.com/newproducts.php (x-cart 4.4.2)

only problem is products url links wrong so need help

svang 01-21-2011 09:57 PM

Re: Newest Products
 
Is there an add-on available that will allow you to show the "Newest Products" or "Latest Products Added" without doing all this code modification? I would definitely buy it if it was available. I couldn't find this anywhere though. Please advise if you know if one exists! Thanks!

chamberinternet 01-22-2011 07:20 AM

Re: Newest Products
 
Quote:

Originally Posted by svang
Is there an add-on available that will allow you to show the "Newest Products" or "Latest Products Added" without doing all this code modification? I would definitely buy it if it was available. I couldn't find this anywhere though. Please advise if you know if one exists! Thanks!


Have a look at these?

http://www.websitecm.com/x-cart-mods/newest-added-products-for-xcart.html

http://forum.x-cart.com/showthread.php?t=47502

Sparks 01-22-2011 11:07 AM

Re: Newest Products
 
One more mod to consider that will do the job and has a few customisable templates that you can edit to fit your site.

Newest Added products list for x-cart

Quote:

Automatically lists the most recently added products on any page you wish. You can control the number shown and the date range shown, for example "show the 7 newest products added in the last 3 weeks"
You can randomly display new products, or show the newest products in order from oldest to newest or newest to oldest automatically.
Comes with three versions:
  • with product thumbnails.
  • simple text links
  • 3 column layout
You can also edit the TPL files easily just like any x-cart tpl.


Compatible with all version of xcart.. even V3 :D

ScrapOrchard 01-25-2011 10:17 AM

Re: Newest Products
 
Is there a mod to be able to display random products from a particular category on a non-xCart page?

nickff 07-07-2011 03:52 AM

Re: Newest Products
 
Quote:

Originally Posted by Cankus
NewProducts for 4.4.2

it is working on http://www.elitmarket.com/newproducts.php (x-cart 4.4.2)

only problem is products url links wrong so need help


Thanks for this Cankus. Did you ever get the links working? Let me know, thanks!

Cankus 07-07-2011 06:14 AM

Re: Newest Products
 
1 Attachment(s)
Yes, it is working but only change

new products_tn.tpl file, please replace attach file on skin/common_files/customer/main

nickff 07-07-2011 06:21 AM

Re: Newest Products
 
Worked perfectly.

Thanks Cankus!!!!

nickff 07-07-2011 06:28 AM

Re: Newest Products
 
Also, you can add the manufacturer into the newproducts.php page by putting this into newproducts.php:

PHP Code:

if (is_array($newproducts)){
foreach(
$newproducts as $k => $v) {
$newproducts[$k]["manufacturer"] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid IN (SELECT manufacturerid FROM $sql_tbl[products] WHERE productid ='$v[productid]')"); }} 


right above:
PHP Code:

# flag set that is used in home_main.tpl
$smarty->assign("main","newproducts"); 


cheers!

adriant 08-09-2011 10:27 PM

Re: Newest Products
 
Quote:

Originally Posted by Cankus
Yes, it is working but only change

new products_tn.tpl file, please replace attach file on skin/common_files/customer/main


Hi Cankus......

Is there a chance that you could make available the whole mod for 4.4 - the code edits, SQL mods and up-to-date files?

I've read through the thread and my head is spinning!?!

I visited your site and the mod looks really good!

many thanks
Adrian

MSfan 03-12-2012 08:34 AM

Re: Newest Products
 
Quote:

Originally Posted by jriggins911
Sidebar from the latest discussion.....

So I have this mod installed and is working fine with one exception.

If I have a product with market price (not the price we are actually selling it for) the market price and the discount (our price vs market price) is not displayed.

For example if on the home page I have a featured product we are selling for $10 dollars with a market price of $20 dollars the selling price of $10, the market price of $20 and a discount of 50% is displayed. However, if the same product is displayed using this mod on the new products page only the $10 price is displayed.

The newest product mod calls all the same templates the featured products and all other category pages call (products.tpl or products_t.tpl) but the output is not the same.

After having parsed through all of the nested template calls I have narrowed it down to a conditional evaluation in products_t.tpl.



The problem here is the returns the appropriate value while returns nothing (as in not even zero). It seems as if the value isn't being passed or made available globally in this "function call".

Since the has no value the entire conditional IF evaluates to false and the market price and discount are not caluculated or displayed.

Since this mod initates the page display from the same template path, customer/home.tpl, and some of the variables are available from the product object ... why does the particular ".list_price" variable (list / market price) not return its' value?

Any ideas? Anyone else have this problem?


Though the post above is over three years old, I encountered this same issue and didn't notice a solution (granted I didn't check all the posts in this thread). Anyway, if anyone still wants to show the market price in addition to the sale price I think I figured out a way.

1. In the file include/func/func.product.php

Look for the following
Code:


    $fields[] = $sql_tbl['products'] . ".productcode";
    $fields[] = $sql_tbl['products'] . ".avail";


and add the following after it:
Code:

   
$fields[] = "$sql_tbl[products].list_price";


2. You will want to open your template file (I'm using the name products_tn.tpl) and write an if statement that compares the list_price to the taxed_price.

Your template code may differ depending on whose recommendation you are trying but look for something like this:
Code:

<tr{interline name=products_matrix} align="center">

        {*Display price/market_price/taxes*}
        {foreach from=$row item=product name=products}
          {if $product}

            <td{interline name=products additional_class="product-cell product-cell-price"} align="center">

                    <div class="price-row" align="center">
<center>                      <span class="price">{$lng.lbl_our_price}:</span> <span class="price-value">{currency value=$product.taxed_price}</span>
<center>                      <span class="market-price">{alter_currency value=$product.taxed_price}</span>
                    </div>


And add something like this right after it:
Code:

{if $product.list_price gt $product.taxed_price}
    <div class="market-price">
    <span class="market-price-value">Price: {currency value=$product.list_price}</span>
   
{/if}


While I am a programmer, I don't know php at all, so I've stumbled through this. It seems to be working though I haven't throughly tested it. I've modified my X-Cart code a bunch so I don't know how helpful this will be (e.g. your class names/format may be different), but I hope it helps someone. :)

xtech 04-17-2012 10:43 PM

Re: Newest Products
 
Quote:

Originally Posted by Sparks
One more mod to consider that will do the job and has a few customisable templates that you can edit to fit your site.

Newest Added products list for x-cart



Compatible with all version of xcart.. even V3 :D


I have sent you a mail and submit a support ticket about the compatibility of the mod for my x-cart Pro 4.4.2 but got no answer.Pl reply FAST.

Otis 09-24-2012 01:38 PM

Re: Newest Products
 
Can you please tell us how to make this work for xcart gold 4.5.2???


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

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