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.
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
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:
<?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
Specials:
<?php $this->include_namespace($app,'prodspec',array()); ?>
New:
<?php $this->include_namespace($app,'prodnew',array()); ?>
Best Sellers:
<?php $this->include_namespace($app,'prodbest',array()); ?>
Offline
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...![]()
Offline
Typos! Fixing post as I type this ![]()
Offline
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
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()); ?>
Offline
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
)
Offline
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
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?
Offline
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
"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?
Offline
Where do you see a setting to limit how many featured items are shown? I must be missing something (which is quite possible).
Offline
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
Offline
Hey
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
So I guess if you set it to display 8, then you really need to just flag 8.
Offline
That would be correct (or know that it's only going to take the first 8 every time).
Offline
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:
// +--
// | 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:
// +--
// | 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
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!
Offline
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
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
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':
<?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
This looks great, but ... where do I put it again?
Offline
Or rather, how do I make this change in CCP7?
Offline