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 01-15-2007 17:43:17

slydog
Member
Registered: 05-21-2006
Posts: 694

Modification change

This is just for those who were/are interested in the change I did to prevent the "Online Store" header/label from appearing on the "Store Home" page. See original post in this thread - https://forum.kryptronic.com/viewtopic.php?id=15142

I have updated/changed that modification. I decided I did not want the category header/label appearing above the breadcrumbs either because it's redundant. The breadcrumb nav sufficiently describes where the customer is, and they know anyway because they had to click that category to get there.

So now when I go to the "Store Home" the "Online Store" header/label is gone in favor of just the "Categories" label -- known as Store Catalog on my site. You can view that here if you wish:
http://www.spadedlady.com/khxc/ccp0-splash/KHXCseo.html

Further, as I said, I removed the category name header/label from the category pages in favor of just the breadcrumb nav and category description. You can, of course change the color of the breadcrumb background and text as you wish. You can see mine here if you are so inclined:
http://www.spadedlady.com/khxc/ccp0-cat … wraps.html

The change to the original mod involved changing the if statement to use $ns (name space) rather than $metatitle. That wasn't necessary in the case of the "Online Store" label, but since I had no other variable I could use to designate a category page for the 'elseif' statement, I changed them both. In order to utilize the $ns variable though, I had to first set the variable up by inserting this statement:
$ns        = $this->globals('khxc.namespace');

Note: I've found that the value right after ccp0- in your browser address is = to the name space for that page (not certain that is valid for every page though).

With that in place I was able to give the instruction that if the page the viewer is on is the "Store Home" page (name space is splash for that page) so ($ns == 'splash')) then print nothing '<p/>'

then the elseif becomes ($ns == 'catshow') to specify a category page where it will again print nothing '<p/>' if it finds itself on a category page

then the else tells it to go ahead and print the labels for any pages it's called on if it is not a page that meets the criteria in the if or elseif

which is this telling it to print the label:
           /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title);

So long story short... On my cloned ClickCartPro Ecommerce page, I changed this original code:

Code:

<td id="skin_ct_mcol">

     <?php /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title); ?>

<div id="skin_content">

     <?php /* PHP FUNCTION */
           /* REQUIRED: Print the content for the page.  Do not   */
           /* remove this function call.  Doing so will result in */
           /* blank pages being generated. */
           $skinfunc->content(); ?>

</div>

</td>

To this:

Code:

<td id="skin_ct_mcol">

<?php

$ns        = $this->globals('khxc.namespace');

if ($ns == 'splash') {

print '<p/>';

} elseif ($ns == 'catshow') {

print '<p/>';

} else {

           /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title);

} // End of if statement

?>


<div id="skin_content">

     <?php /* PHP FUNCTION */
           /* REQUIRED: Print the content for the page.  Do not   */
           /* remove this function call.  Doing so will result in */
           /* blank pages being generated. */
           $skinfunc->content(); ?>

</div>

</td>

I did a view source on my pages and pasted that in the validator at http://validator.w3.org/  They validate -- This Page Is Valid XHTML 1.0 Strict!

Haven't found any ills from this mod, but normal disclaimers apply... backup..BACKUP!

If anyone finds anything wrong with this mod where it may conflict with anything I haven't tested yet, please let me know.

P.S. To the best of my knowledge, your cloned Ecommerce skin does not change from running updates with the installer.

Offline

 

#2 01-15-2007 19:52:11

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

I just viewed your product page and figured out a great solution to moving your options into your product detail area.  We were thinking about the issue programatically when we should have been thinking about the displays.  Try this:

In the management interface, under the ClickCartPro application:

ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage Catalog Product Displays: Detail View

Clone the product display you're currently using.  For this example, we'll assume you're using the 'Default Format' display.  At the end of that include, you'll see:

Code:

</td></tr></table>

Replace that with:

Code:

</td><td>

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

Now go to ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes.  Edit the display include named 'Email a Friend Link'. 

Look for (at the top):

Code:

$link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $ref));

Right after that, add:

Code:

if ($this->globals('ecom.closetable_emailafriend')) {print '</td></tr></table>';}

This has the effect of closing the table later on after the options are printed by passing a value to the next include encounted (the Email A Friend include in this case - due to the fact you're using that function) and having that include close it.  You could event print a <div> pair between the two and have full CSS control over the options (instead of showing them in the default format). 

Once you've finished this stuff, assign your new product display type to your products you would like displayed like this.


Nick Hendler

Offline

 

#3 01-15-2007 20:09:46

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Nick,

Thanks... I might give that a go once these Advil start working wink

I was wondering why there was an extra set of table, row, and column closings at the bottom of that.

Offline

 

#4 01-15-2007 22:04:09

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Nick,

Well...... got it working the way I want, but it WILL NOT VALIDATE. The table closing routines I suppose. I've spent hours and hours trying to get it working right and then many hours trying to get it to validate.

What was happening that cost me much time to fix was when you click the email a friend link it popped into that same column. Of course, it's too wide for that column for 1024 x 768 (have to side scroll). So I tricked it a little. Go to that page and click the email a friend link and you'll see what it does. If I can ever get it to validate I can move on to finding all those other things below to square that options/add to cart display away.

I have to be able to reassign new CSS to that pre-built options table to control alignment and size; and edit whatever is entering the verbiage. I need to edit the "All require fields are marked..."; edit the "Add to your Shopping Cart..." label and assign new CSS; edit the Quantity*  and options cells and assign new CSS and try to get Quantity text left inline to form field; assign new CSS to the add buttons to control width and try to get inline (in resolution 1280 x 1024 the buttons are inline, but stacked vertical at 1024 x 768).

I haven't found yet where the table and print commands for those "elements" are located. I don't recall seeing ang table format commands in CCP_Prod.php, so more searching is needed to find what is holding the other end of the leash.

You can see where we are so far here - http://www.spadedlady.com/khxc/ccp0-pro … 002-M.html

Last edited by slydog (01-16-2007 07:20:12)

Offline

 

#5 01-16-2007 08:36:42

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

Can you put it back to the way it should be (after my mod, before your display hack) so I can see what's out of place?  It looks like the extra td's and tr's you put in are screwing up the validation.


Nick Hendler

Offline

 

#6 01-16-2007 11:05:15

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Sure, I can put it back.

FWIW, this is the code from the bottom of the page you looked at yesterday:

</td></tr></table>
</td>
<td class="khxc_ghost_r">
Need to figure out how to put<br/>the options and stuff here.
</td></tr>

</table>

</td></tr></table>

I had a copy of that an put it back -- it validated.

Then I changed the bottom code to this:

</td></tr></table>
</td>
<td class="khxc_ghost_r">
Need to figure out how to put<br/>the options and stuff here.
</td></tr>

</table>

</td>

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

That does not validate or move the option display.

When I get it to this:

</td></tr></table>
</td>
<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

It starts working but does not validate and the email form you have to scroll sideways for on 1024X 768

Like this is same result as above and no validate:

</td></tr></table>

<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

This doesn't work:

</td></tr></table>

<td class="khxc_ghost_r">
</td>
<?php $this->globals('ecom.closetable_emailafriend',1); ?>

Neither does this:

</td></tr></table>

<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>
</td>

So I took it backward for you to the first method that started to work without my manipulating the columns. Like this:

</td></tr></table>
</td>
<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

The email link file has remained like this throughout:

<?php

$app         = $this->globals('khxc_display.app');
$ref         = $this->globals('ecom.prod_id');

$link_emailf = $this->link_namespace($app,'emailfriend',array('ref' => $ref));


if ($this->globals('ecom.closetable_emailafriend')) {print '</td></tr></table>';}

?>

<div class="khxc_storelink_emlfr">

<a href="<?php print $link_emailf; ?>" title="Email a Friend">Click to email this product info. to a friend.</a>

</div>

Had it working pretty slick with only needing to find all the places to change the display of that options table and text. I've run straight through the night with no sleep trying to work it out and get it to validate. No joy. There must be some really quirky reason.

Offline

 

#7 01-16-2007 14:41:49

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

I think I finally found the right combination of code. It works and validates now, bu still has the problem of the email form loading into that narrow right table causing side scroll to use it. But the combination below works and validates.

End of product detail currently:

</td></tr></table></div>
</td>
<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

The Email A Friend File currently is and needs to be:

if ($this->globals('ecom.closetable_emailafriend')) {print '</td></tr></table></td></tr></table>';}

Now I'm going to see if I can do the coulumn manipulation and get validation too.

Last edited by slydog (01-16-2007 14:43:01)

Offline

 

#8 01-16-2007 15:46:40

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Ok, I cloned that one product and called it test3, the one we have been viewing retained it's regular name. So this one without my column manipulation to accomodate the email form at 1024 x 768 validates BUT clicking the email friend link renders a non-validating page:
http://www.spadedlady.com/khxc/ccp0-pro … 002-M.html

This one has my column manipulation. It also works and validates, BUT clicking the email friend link renders a non-validating page:
http://www.spadedlady.com/khxc/ccp0-prodshow/Test3.html

The first has 6 errors on the email friend page and the second 8 errors. Except for the Test3 email form page having one <div> error, both have all td tr table errors. So I figure the there may need to be some IF statements somewhere (email friend link maybe) to change the format when it's on that page.

Offline

 

#9 01-16-2007 21:37:54

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

I screwed up the XHMTL in my post.  I've changed it and will list the change here:

Code:

</td>

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

This should have been:

Code:

</td><td>

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

All other changes were fine and should render correctly as you intended.  Back out your changes since my last post and try this simple change.


Nick Hendler

Offline

 

#10 01-16-2007 23:03:41

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Yep, already have that on that static column page except that it looks like this:

</td>
<td class="khxc_ghost_r">

<?php $this->globals('ecom.closetable_emailafriend',1); ?>

But I made another page and ran it all through the validator anyway http://www.spadedlady.com/khxc/ccp0-prodshow/test5.html

The other td tr and table closing you see above that in my previous post are only the endings to that red dashed table that is embedded in column 2. That code works, but will only validate with this double td tr and table string in the email a friend file:
if ($this->globals('ecom.closetable_emailafriend')) {print '</td></tr></table></td></tr></table>';}

But the email form "emailfriend" page won't validate. I assume that the table construction to that changes the formatting and will require isolating the offending td tr table & div bits and contolling them with IF statements for rendering proper when that "element" loads.

Last edited by slydog (01-16-2007 23:05:46)

Offline

 

#11 01-16-2007 23:10:26

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Can you point me to where I can find what is controlling the text and line breaks in that options table? At least I can get that out of the way while my validator is being punished for failing to agree with my aesthetics.

I also need to make the prodoption display name field NOT REQUIRED. I don't want to use it, I prefer that the first entry in the drop list be self-explanatory like *Select Color -- then I intend to do the mod to make it error out on (*) as first character. I can't find a way to make the option display name field in Admin not required like I have it in ccp5.1.

Last edited by slydog (01-17-2007 00:22:00)

Offline

 

#12 01-21-2007 03:25:08

kiwimum
Member
Registered: 03-30-2004
Posts: 305
Website

Re: Modification change

Re: the original post.  I do get a warning when I try to validate due to the empty paragraph tag the php is printing.  It's trying to trim the empty tag.  I replaced </p> with <br /> and I have that lovely little green checkmark in the corner of my browser (TIDY plugin for Firefox you can validate your pages without navigating to the w3 page). 

Thanks for this though!


Edit:  scratch that, the <br /> leaves too large a space.  You can just leave it empty!  So mine looks like this:

Code:

<td id="skin_ct_mcol">

     <?php

$ns        = $this->globals('khxc.namespace');

if ($ns == 'splash') {

print '';

} elseif ($ns == 'catshow') {

print '';

} else {

           /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title);

} // End of if statement

?>

No more xhtml warnings big_smile

Last edited by kiwimum (01-21-2007 03:27:12)


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#13 01-21-2007 04:19:23

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

kiwimum wrote:

Re: the original post.  I do get a warning when I try to validate due to the empty paragraph tag the php is printing.  It's trying to trim the empty tag.  I replaced </p> with <br /> and I have that lovely little green checkmark in the corner of my browser (TIDY plugin for Firefox you can validate your pages without navigating to the w3 page). 

Thanks for this though!


Edit:  scratch that, the <br /> leaves too large a space.  You can just leave it empty!  So mine looks like this:

Code:

<td id="skin_ct_mcol">

     <?php

$ns        = $this->globals('khxc.namespace');

if ($ns == 'splash') {

print '';

} elseif ($ns == 'catshow') {

print '';

} else {

           /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title);

} // End of if statement

?>

No more xhtml warnings big_smile

Yeah, I changed it a few days ago to '' (blank) but I've been too busy to get back to editing that post. I just ran the home page and a few others and they validate (I keep a browser open to w3 all the time). The only one that doesn't so far is my odd little 'email a friend' pop in -- I bypassed it for now. If I never get that email page to validate, I won't sweat it.

Just finished work on the checkout button for the shopping cart. You can see it here http://www.spadedlady.com/khxc/ccp0-prodshow/Test3.html put that prod in the cart then go back and put one in the wish list. The reason for both is so you see that there is no checkout button under the wish list. I think it makes way more sense than the default setup.

Disclaimer: I ain't finished with the a lot of other stuff yet -- photo alignment and cell background, options configuration, etc.

Edit: This is my current code -- I added one...

Code:

<?php

$ns        = $this->globals('khxc.namespace');

if ($ns == 'splash') {

print '';

} elseif ($ns == 'catshow') {

print '';

} elseif ($ns == 'prodshow') {

print '';

} else {

           /* PHP FUNCTION */
           /* Prints the page title.   */
           $skinfunc->titletag($disp_title);

} // End of if statement

?>

Last edited by slydog (01-21-2007 04:24:28)

Offline

 

#14 01-21-2007 12:04:13

kiwimum
Member
Registered: 03-30-2004
Posts: 305
Website

Re: Modification change

Hey Slydog, I actually miss the "continue shopping" buttons - the use the back button and refresh seems kind of clunky to me.  But I like how you removed the checkout after the wishlist.


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#15 01-21-2007 13:17:02

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Yeah, but the continue button just dumps them on the "store home" and they have to find their way back to the product section they were in before the cart. Mine will have over 11,000 items. They would have to go to the category again and perhaps wade through 47 pages to get back where they were.

So many disliked that function in ccp5.1 because of that, I thought for sure something would have been worked out for ccp6 to take them back in history rather than back to the beginning.

I've only used IE, how did the button matching look in firefox?

Last edited by slydog (01-21-2007 13:23:41)

Offline

 

#16 01-21-2007 18:57:08

kiwimum
Member
Registered: 03-30-2004
Posts: 305
Website

Re: Modification change

Ack, really?  My current cart (not ccp) takes them back to where they were - maybe we should put that in the feature request forum.  Dumping them back on the store home page isn't very helpful. 

Looks fine in FF, I'm seeing the regular gray browser buttons, not the CSS buttons the new cart has for submit and search and stuff.  I wish I could attach a screenshot - is that what you were aiming for? 

Edit:  Oh, I went and read this:  https://forum.kryptronic.com/viewtopic.php?id=15286  "checkout" next to "Update Shopping Cart" is just a text link.  You can e-mail me at verymom at gmail dot com and I'll send you a screen shot if you like.  I'm on Firefox 2.0.1 on a mac.  I haven't looked at it on my PC.

I didn't know FF freaked out over buttons like that.  I'll be doing the same thing (or trying to, shortly) if I figure anything out I'll share, but you'll probably get to it before me.

Last edited by kiwimum (01-21-2007 18:59:54)


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#17 01-21-2007 19:05:16

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

kiwimum wrote:

Ack, really?  My current cart (not ccp) takes them back to where they were - maybe we should put that in the feature request forum.  Dumping them back on the store home page isn't very helpful. 

Looks fine in FF, I'm seeing the regular gray browser buttons, not the CSS buttons the new cart has for submit and search and stuff.  I wish I could attach a screenshot - is that what you were aiming for?

Take a look in IE6 if you have it. Hard to describe if you haven't looked ccp6 with IE6. The default buttons have a bluish color and a 1px darker border. I made the checkout button same except for 2px greenish border and the hover color goes to light green. I wanted it to stand out a bit more.

Re: Continue Shopping - Yeah, taking my customers back to the catalog page after they got to page 27 in a category would not be nice. Continue should mean continue, not start again. By saying "Continue" we are being umm... too clever? Mouse over your Continue Shopping link.

Offline

 

#18 01-21-2007 19:39:51

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

kiwimum,

Just saw your EDIT. Screen shot could go to webmaster at (you know the base url). Thanks.

Last edited by slydog (01-21-2007 19:40:26)

Offline

 

#19 01-22-2007 08:20:47

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

I'll look into changing the behavior of the continue shopping button.  I may be able to get them back to the last category viewed in their breadcrumbs fairly easilly.  I'll get this on the list for the first major update to CCP6.


Nick Hendler

Offline

 

#20 01-22-2007 14:37:44

kiwimum
Member
Registered: 03-30-2004
Posts: 305
Website

Re: Modification change

Here's what I was seeing, figured I'd just upload it:  http://verybaby.com/screenshot.png 

It looks like you've fixed it though, here's what I see today: http://verybaby.com/screenshot2.png

Looks fine on Safari too.

I noticed your product page looks a lot better in Safari - I can see the background images:  http://verybaby.com/ProductsscrnS.png  But on FF it's mostly black:  http://verybaby.com/ProductscrnFF.png

You might be in there working on it at the moment, but I figured I'd share since I was uploading screenshots anyway.

Last edited by kiwimum (01-22-2007 14:38:50)


Jessica
:: CCP5 > CCP6 > Magento > CCP7

Offline

 

#21 01-23-2007 16:26:26

slydog
Member
Registered: 05-21-2006
Posts: 694

Re: Modification change

Thanks for the screen shots.

I'm not going to worry much about the other browsers though, one look at my stats for visits by browser types tells me just to put a disclaimer that it may not display as intended in browsers other than IE6, move forward and worry about that and validating the email a friend page later.

Offline

 

#22 06-28-2007 07:14:48

ndoherty
Member
Registered: 06-13-2006
Posts: 95

Re: Modification change

Hi Slydog,

Is there any way to apply a different label - other than the standard "Categories" - but have it change depending on what category you are in.

So for example is I have the following breadcrumb:

store -> house -> window
store -> office  -> door

When I am in the "house" or "office" categoires, I would like to change the standard "Categories" label to be "Properties".
Simialr for the "window and door" expect the lable might be "Parts".

So what do you think? Any ideas on php code to change the lable based on the breadcrumb?

Thanks

Offline

 

#23 06-29-2007 12:50:50

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

Are you talking about the label for the sub-categories listed?


Nick Hendler

Offline

 

#24 07-02-2007 09:33:34

ndoherty
Member
Registered: 06-13-2006
Posts: 95

Re: Modification change

Hi Nick,

Yes I am talking about the standard "label" for categories and subcategories?

Can this be done - if so can you provide example code?

Thanks.

Offline

 

#25 07-02-2007 09:43:30

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19990
Website

Re: Modification change

Sure.  In the management interface, under:

Home > ClickCartPro > Displays: Skins, Menus, XHTML Includes and Messages > Manage XHTML Includes

Edit the 'Category List Display' include.  In there, find:

Code:

print '<div class="khxc_storehead">Categories</div>' . $eol . $eol;

And replace with:


Code:

$catname = 'Categories';
$ns      = $this->globals('khxc.namespace');
$catshow = $this->globals('ecom.cat_catshow');

if (($ns == 'catshow') && (is_array($catshow)) && (!(empty($catshow['name'])))) {

     $catname = $catshow['name'];

} // End of if statement.


print '<div class="khxc_storehead">' . $this->xhtml_encode($catname) . '</div>' . $eol . $eol;

Nick Hendler

Offline

 

Board footer