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.
How do I change the layout to move the Related Products?
I'm adding the Tab feature (https://forum.kryptronic.com/viewtopic.php?id=19079) and want to move the related products in a tab, below the Add to Cart button.
Offline
You will probably have to make edits to the include "Product List Display" to get what you want. I am still quite uncertain as to how you would build the display as it may take some coding to get the job done but you might be able to get what you want in the foreach loop.
John
Offline
I'm sorry, but that doesn't make sense to me.
This should be a simple task to change the layout and move the position of the Related Products.
Can you kindly provide instructions how to move Related Products?
Offline
Yes, inside the tab display.
Offline
place it in a tab display in it's present position, below the add to cart buttons
The tab will be placed below the add to cart buttons.
Offline
That's what I originally thought, then my first post is still valid (given that I am looking a ccp7 name but it should not have changed from ccp6). The Product List Display include is what is building that display but it also builds the display for Featured Items, so you will have to include code to only get what you want on the pages that you want a tab display built. There is a foreach loop in that include that builds the display for each item in an array that is built by another script. To get a tab display your going too have to place code logic in that foreach statement to build the tab divisions needed to create the display and only for the page you want it on.
John
Offline
Okay - what's the file name? "Product List Display" tells me nothing.
Offline
Blitzen wrote:
Okay - what's the file name? "Product List Display" tells me nothing.
Yes, it does. It's the name displayed in admin under Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes
Offline
I assume you mean apps/ccp0/CCP/includes/prodlist.php
Well, how do I the related products position. I have the tab feature in the product detail display template.
Thus, I need to move the related products to that template/namespace/file/.
The related products are written to the browser after proddetdisp, but I need it in proddetdisp.
p.s. I don't use the Admin interface. It takes too long to find things. Given just "Product List Display" didn't tell me it was in admin under Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes. I would have thought it might have been a "core" function.
Last edited by Blitzen (08-18-2009 17:30:29)
Offline
Okay, let me rephrase this.
I need to move Related Products from one namespace to another.
Where, exactly, is the code where the Related Products are written to the browser?
Offline
In the private_dir/apps/ccp0/CCP_Prod/CCP_Prod.php in function prodshow just under
// +-- // | Handle related items now if we have them and we're allowed // | to show them. // +--
is where the related item array is set and the prodlist.php script is called. Just how you change that and get the array built and able to be pulled for the long description is more than I want to think about at the moment. Keep in mind that ccp does not allow or execute php for the long description by default so you would have to enable that to get this working first.
John
Offline
Thank you. I'll look there to determine how to move it to the other file.
Offline
I simply want to move the related products to one of the proddetdisp namespaces.
Copying the code there just doesn't work.
I guess that I won't get any help on this issue.
Offline
I copied the code to proddetdisp and it stops at this (I hardcoded the 'app').
$this->exec_namespace(array('app' => 'ccp0',
'namespace' => 'prodlist',
'type' => '*',
'params' => null));
What do I need to include to get this to work?
Offline
Fist have you made the edits necessary to get php to be executed in the long description? If not look .
Second you will need to add this line to your descriptions
<?php $this->include_namespace('ccp0','prodlist',array()); ?>
Third, you will need entries in the "Related Products" field for the item.
Forth, you will need to comment out this code in the prodshow function of CCP_Prod.php (near the end of the function), or you will have two occurrence of the related products display (this will affect all product that display related products)
$this->exec_namespace(array('app' => 'ccp0', 'namespace' => 'prodlist', 'type' => '*', 'params' => null));
John
Offline
Hi John,
Close but no cigars.
I did "second", "third" and "fourth".
BUT, "second" was put into Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View.
I'm not putting this in ccp0_prod table "product description" field in the database.
The table, ccp0_proddetdisp needs to contain the code to display the Related Products.
(Or, Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View.)
At the bottom, we're using a tab structure.
In this tab structure, we want the Related Products.
When I put what you suggested there, the program stops after listing 2 of the 6 related products.
Bluntly stops loading anything after that.
Any idea what's missing?
Offline
Never mind. I got it
Thank you John!
Last edited by Blitzen (08-22-2009 15:07:02)
Offline
Hi all
I am finding this a little tricky to follow....
Might you be able to write this solution down as a step-by-step?
Best
Oli
Offline
I got this working in CCP7 except for step 4
$this->exec_namespace(array('app' => 'ccp0', 'namespace' => 'prodlist', 'type' => '*', 'params' => null));
Where do you make this change in CC7? I looked at the Product List Display but couldn't figure what to change to turn off the related products display.
Thanks!
Michael
Offline