Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 03-05-2008 15:00:42

wyattea
Member
Registered: 01-07-2006
Posts: 1650

featured products on splash page - multi-line, multi-heading?

I turned on featured products on the splash page and made it 3 across, but I want to have multiple categories show up - for example, first row of 3 is one category, next row of 3 is another category...with each row having it's own heading (Featured Baby Gifts for example). 

I assume this ain't an easy thing to do but I figure I'll ask anyway in case there's built-in functionality I haven't seen.

Off the top of my head, I'm thinking if I pick 3 standard categories (not rotating ones, but the same 3 all the time), an if/elsif statement could be used maybe?

Regards,

James...

Offline

 

#2 03-05-2008 15:40:27

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: featured products on splash page - multi-line, multi-heading?

Ok, I have an idea - I can use featured products, specials and new items for this purpose.  I just pick the items I want to be in those categories, and I reference them in the splash page with my own unique header and the visitor doesn't need to know it's a 'new product' or a 'special'.  I don't use either of those anyway.  How can I reference displaying the specials and new items in the same way you can display featured products on the splash page:

Code:

<?php 
$this->include_namespace($app,'prodfeature',array());
?>

What namespace would new and specials be under?

Regards,

James...

Last edited by wyattea (03-05-2008 15:41:08)

Offline

 

#3 03-05-2008 15:54:03

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

Specials:

Code:

<?php $this->include_namespace($app,'prodspec',array()); ?>

New:

Code:

<?php $this->include_namespace($app,'prodnew',array()); ?>

Best Sellers:

Code:

<?php $this->include_namespace($app,'prodbest',array()); ?>

Offline

 

#4 03-05-2008 16:56:47

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: featured products on splash page - multi-line, multi-heading?

just out of curiosity, is there a reason for the space after the referenced name?  there isn't one for prodfeature?

also, how could I have found that out myself...is there somewhere you referenced or did you just know what .php file it was already mentioned in?

Thanks Dave! <--- my new signature...smile

Offline

 

#5 03-05-2008 17:05:42

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

Typos!  Fixing post as I type this smile

Offline

 

#6 03-05-2008 17:11:49

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

wyattea wrote:

also, how could I have found that out myself...is there somewhere you referenced or did you just know what .php file it was already mentioned in?

You find things like that out by going to the page either on your own site or the demo site and looking at the resulting URL.  With SEO off it's quite apparent what is being called and how.

In this particular case though I just glanced at a mod I did not long ago which used all of the names like that (the one in post 8 of ).

Offline

 

#7 03-26-2008 11:06:40

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

If I have 10 items flagged as "New" will this array randomly pick from those 10 to display 3? or will it pick the same 3 every time?

If not random, how can these be randomized?

Dave wrote:

Specials:

Code:

<?php $this->include_namespace($app,'prodspec',array()); ?>

New:

Code:

<?php $this->include_namespace($app,'prodnew',array()); ?>

Best Sellers:

Code:

<?php $this->include_namespace($app,'prodbest',array()); ?>

CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#8 03-26-2008 11:12:22

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: featured products on splash page - multi-line, multi-heading?

Yesterday I set my New Products to 4 per row and it still only showed 3 of them even with 5 or 6 products set to true...is there another place to 'turn it on' that I missed?

(theblade24: sorry to not be helpful but you happen to be bringing up issues I'm having to - i'm not stalking your posts smile)

Offline

 

#9 03-26-2008 11:14:56

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

theblade24 wrote:

If I have 10 items flagged as "New" will this array randomly pick from those 10 to display 3? or will it pick the same 3 every time?

The namespace will retrieve all products with the new (or special or best seller) flag turned on.

theblade24 wrote:

If not random, how can these be randomized?

You should be able to do some pseudo randomizing in the "Product List Display" XHTML include.

Offline

 

#10 03-26-2008 11:40:40

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

Dave I don't want to randomize the featured to include new specials etc.

I want it to randomly pick from the items flagged as featured.

So if there are 10 items flagged as featured, and it is set to display 3 featured items on splash page...

Will it simply go down the products list and pick the first three it comes to each time, meaning the same 3 every time the splash is refreshed?

or will it go to the 10 flagged items and randomly pick 3 to display each time?

What is the default behavior?

If it picks the same first 3 every time, how would I make it randomly pick 3 of the 10 instead?


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#11 03-26-2008 11:55:07

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

theblade24 wrote:

Dave I don't want to randomize the featured to include new specials etc.

I was merely pointing out that each of the namespace call examples you originally posted all behave the same way when it comes to retrieving product information.

theblade24 wrote:

So if there are 10 items flagged as featured, and it is set to display 3 featured items on splash page...

The only setting is how many featured products to display per row.  If you have 10 products with the featured flag turned on then 10 products will be shown as featured.

theblade24 wrote:

Will it simply go down the products list and pick the first three it comes to each time, meaning the same 3 every time the splash is refreshed?

ALL of the products flagged as featured will be displayed every time.

Offline

 

#12 03-26-2008 12:14:28

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

"ALL of the products flagged as featured will be displayed every time."

So if I have 10 flagged as featured, but ccp is set to only display 6 on the splash page, it will display 10 anyway?


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#13 03-26-2008 12:15:51

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

Where do you see a setting to limit how many featured items are shown?  I must be missing something (which is quite possible).

Offline

 

#14 03-26-2008 12:35:48

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

Home > ClickCartPro > Settings: Application Settings Menu > Catalog Global Displays

Splash Page: Number of Featured Products to Display*

Select the number of featured products to display in the featured products listing.

Eight


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#15 03-26-2008 12:54:43

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

Hey smile  Told you I was missing something.  To summarize, the namespace call is always going to return the first x number it finds where x is the value you select there.  Not sure how you'd get a random group since the routine that is used is common to several other things.

Offline

 

#16 03-26-2008 13:06:22

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

So I guess if you set it to display 8, then you really need to just flag 8.


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#17 03-26-2008 13:14:16

Dave
Member
Registered: 07-05-2003
Posts: 11233

Re: featured products on splash page - multi-line, multi-heading?

That would be correct (or know that it's only going to take the first 8 every time).

Offline

 

#18 03-26-2008 18:06:04

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: featured products on splash page - multi-line, multi-heading?

If you set more items to be displayed on the splash page than you have set to display in Home > ClickCartPro > Settings: Application Settings Menu > Catalog Global Displays > Splash Page: Number of Featured Products to Display* and make an edit to the code in your private_dir/khxc/app/ccp0/CCP/CCP.php in Function: prodfeature looking for:

Code:

// +--
// | Piece together our SQL statement and execute it.
// +--

$count = $this->globals('khxc_settings.' . $this->app . '.prodfeaturenum');

if (empty($count)) {$count = 1;}

$sql .= $where;

$result = $this->KHXC_DB->sql_do(array('sql'    => $sql,
                                       'table'  => $table,
                                       'order'  => array('sortorder' => 'ASC'),
                                       'count'  => $count,
                                       'offset' => 0));

and change it to this:

Code:

// +--
// | Piece together our SQL statement and execute it.
// +--

$count = $this->globals('khxc_settings.' . $this->app . '.prodfeaturenum');

if (empty($count)) {$count = 1;}

$sql .= $where;

// +---
// | Changed order from 'order' => array('sortorder' => 'ASC')
// +---

$result = $this->KHXC_DB->sql_do(array('sql'    => $sql,
                                       'table'  => $table,
                                       'order'  => array('RAND()' => 'ASC'),
                                       'count'  => $count,
                                       'offset' => 0));

the site will randomly select the number of items to be displayed form those that are flaged to be displayed, giving you different splash page items every time the page is called.

This mod was originally posted on the UK side.

John

Offline

 

#19 03-26-2008 18:22:12

theblade24
Member
From: Tampa, Florida
Registered: 11-19-2003
Posts: 384
Website

Re: featured products on splash page - multi-line, multi-heading?

OMG, you made by day!

This, single handedly, by creating dynamic ever changing content for the robots on the home page could be the most important mod for high or higher search engine rankings.

Done right, they will see a different page every time they come by!


CCP 5.1
CCP 5.1
CCP 5.1

Offline

 

#20 03-26-2008 18:38:17

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: featured products on splash page - multi-line, multi-heading?

John, I notice Featured Products allows you to specify how many are displayed.  Is that possible with Best Sellers and Specials? It doesn't give the option, only the ability to put # per row.

Regards,

James...

Offline

 

#21 03-26-2008 19:44:08

dh783
Member
From: Avondale, Arizona
Registered: 04-06-2005
Posts: 6233
Website

Re: featured products on splash page - multi-line, multi-heading?

Best Sellers and Specials return all the item set to be displayed and those that don't make it on the first get pushed to another  page or pages. Your could put the order code in the call for the products but the possibility of getting an item that has been displayed on a previous page is one of the problems, you could not guaranty that all of the product would be seen and would make them hard to find.

John

Offline

 

#22 03-26-2008 19:50:28

wyattea
Member
Registered: 01-07-2006
Posts: 1650

Re: featured products on splash page - multi-line, multi-heading?

ah, no, I just wanted it to work the same as featured.

I don't actually use any of them as actual pages, I just call the three of them on my splash page 'manually':

Code:

<?php $this->include_namespace($app,'prodfeature',array());?>
<?php $this->include_namespace($app,'prodspec',array());?>
<?php $this->include_namespace($app,'prodbest',array());?>

I have text/headings in between them, I just pasted the calls to show what I was doing with those three namespaces.  I won't have an actual link anywhere on my site to 'Best Sellers' or 'Specials' or 'Featured Products'.

James...

Offline

 

#23 08-03-2010 20:25:01

jensme
Member
Registered: 04-29-2010
Posts: 392

Re: featured products on splash page - multi-line, multi-heading?

This looks great, but ... where do I put it again?

Offline

 

#24 08-04-2010 10:04:58

jensme
Member
Registered: 04-29-2010
Posts: 392

Re: featured products on splash page - multi-line, multi-heading?

Or rather, how do I make this change in CCP7?

Offline

 

Board footer