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)

MythNReality 09-23-2005 09:54 PM

Thanks James. Great work.

Followed the instruction but couldn't get the day to show up...here's my web: http://www.petadorn.com/store/newproducts.php

Had any one tried this yet? Was something that I did wrong or?


Thanks for the great work,

lapidarist 09-23-2005 11:27 PM

Quote:

Followed the instruction but couldn't get the day to show up...here's my web: http://www.petadorn.com/store/newproducts.php

Had any one tried this yet? Was something that I did wrong or?

It looks like the labels from the languages.sql file aren't getting loaded. I am not sure about all the different language settings.

Try adding your "Labels" and "Text" manually to the languages in the admin panel.

It looks like from your site that the label for "New Products" got added but the rest did not. Try adding a couple of labels and test it. You should see if you are getting any results.

- james -


LABEL
=================================
Name: lbl_newproducts
Value: [i] New Products

Name: lbl_newproducts_since
Value: Products added since

Name: lbl_newproducts_24hrs
Value: 24 Hours

Name: lbl_newproducts_3days
Value: 3 Days

Name: lbl_newproducts_7days
Value: 7 Days

Name: lbl_newproducts_30days
Value: 30 Days

Name: lbl_newproducts_adddate
Value: Add Date

Name: lbl_newproducts_sku
Value: SKU

Name: lbl_newproducts_product
Value: Title

Name: lbl_newproducts_price
Value: Price


TEXT
======================================
Name: txt_no_newproducts
Value: No new products have been listed within timeframe you specified

MythNReality 09-24-2005 11:40 AM

Quote:

Originally Posted by lapidarist

Try adding your "Labels" and "Text" manually to the languages in the admin panel.

Try adding a couple of labels and test it. You should see if you are getting any results.

Name: lbl_newproducts_since
Value: Products added since


Magic!!! Thank you sooo much James, I think you've got a magic wand in your hand!
Right now the only thing is the [i]lbl_newproducts_since
I've got an error message says: The label for language selected is invalid. Please select another label.

I'm almost there! :lol:

lapidarist 09-24-2005 11:50 AM

Quote:

Right now the only thing is the [i]lbl_newproducts_since
I've got an error message says: The label for language selected is invalid. Please select another label.


Take the "[i]" off the label name. It was used as emphasis for this listing it to this forum. I guess I went a little crazy with them.

The label name should be:

lbl_newproducts_since


The value is the same as before.

- james -

MythNReality 09-24-2005 11:59 AM

Quote:

Originally Posted by lapidarist
Take the "[i]" off the label name. It was used as emphasis for this listing it to this forum. I guess I went a little crazy with them.

The label name should be:

lbl_newproducts_since

The value is the same as before.

- james -


:P =D> Hugs to you...I did that, and forgot to refresh my browser. Shame on me!
Now I am ready to do the hooter dance!!! :-({|= \:D/

fuzzy 09-24-2005 04:58 PM

GREAT Job James!! :D
This is about the first mod that installed without having to tweak this or that.
Come to think about it, it was rather boring. Just copy, paste, save, upload, patch...enjoy! :wink:

fuzzy 09-24-2005 06:03 PM

Well... I did have to make 1 tweak.
I noticed the "Manufacturers" menu wasn't showing, so...
In "newproducts.php" just below:
Code:

require "./auth.php";

require $xcart_dir."/include/categories.php";

I added:
Code:

if ($active_modules["Manufacturers"])
    include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";


Now this may not be the correct way to do it, but it seems to work okay in 4.12 & 4.15.

yages 09-24-2005 06:31 PM

Great mod works great

Have a problem
I have put the link in the cartegories tpl

{section name=cat_num loop=$categories}
{if $categories[cat_num].order_by eq 20 ||
$categories[cat_num].order_by eq 100}

<div class="VertMenuItems1">New Products</div>
<hr>

I have the categories separated with a <hr>
the link shows in both areas of the category

Any suggestions how to only show the link in the top part of the categories

lapidarist 09-24-2005 06:46 PM

Quote:

Originally Posted by fuzzy
Well... I did have to make 1 tweak.
I noticed the "Manufacturers" menu wasn't showing, so...
In "newproducts.php" just below:
Code:

require "./auth.php";

require $xcart_dir."/include/categories.php";

I added:
Code:

if ($active_modules["Manufacturers"])
    include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php";


Now this may not be the correct way to do it, but it seems to work okay in 4.12 & 4.15.


I saw the same thing earlier and had already updated mine. Since it was my first xcart mod I stripped the code down to the minimum and rebuilt it to learn. I forgot to add the manufacturers reference that back in the code I posted. Oops.

I have gotten a lot of help from reading the forum. So, I thought it was time to give something back :-)

- james -

fuzzy 09-24-2005 07:37 PM

Quote:

Originally Posted by yages
Great mod works great

Have a problem
I have put the link in the cartegories tpl

{section name=cat_num loop=$categories}
{if $categories[cat_num].order_by eq 20 ||
$categories[cat_num].order_by eq 100}

<div class="VertMenuItems1">New Products</div>
<hr>

I have the categories separated with a <hr>
the link shows in both areas of the category

Any suggestions how to only show the link in the top part of the categories


Not sure if this helps, but I put mine like so:
Code:

{capture name=menu}
{if $active_modules.Fancy_Categories ne ""}
{include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"}
{else}
{if $main eq "newproducts"}New Additions<HR size="1" noshade class="CateMenuHr">
{else}
New Additions<HR size="1" noshade class="CateMenuHr">
{/if}
{if $config.General.root_categories eq "Y"}
{section name=cat_num loop=$categories}



All times are GMT -8. The time now is 12:32 PM.

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