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 06-21-2010 21:15:15

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

How do I link to the results of a given namespace?

I'm using my own images for the best sellers and I want to link to the page with those items (same for new products).  How do I do that?  Thanks!

Offline

 

#2 06-21-2010 21:51:56

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

Re: How do I link to the results of a given namespace?

The ccp php line of

Code:

$this->include_namespace('app','namespace',array());

where app is the namespace's app and namespace is the  namespace you want to call, so (example ecom.catshow)

Code:

$this->include_namespace('ecom','catshow',array());

will pull the categories for display. But this will execut the namespace and if  used on or for the best sellers will not insert any other image than listed in the porducts information or that is stored within  your ccp directory because that's all the original script is set to do.

an example to pull a product is

Code:

$this->include_namespace('ecom','prodshow',array('ref' => 'product_id'));

John

Offline

 

#3 06-21-2010 22:50:27

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

Re: How do I link to the results of a given namespace?

Hm.  Well, I don't want to pull up the  namespace, but just the link to the page it generates.

Offline

 

#4 06-21-2010 23:12:55

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

Re: How do I link to the results of a given namespace?

So you have created a static html page and just want to link to the products?

John

Offline

 

#5 06-22-2010 08:18:27

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

Re: How do I link to the results of a given namespace?

Well, yes.  A static image, to be specific.  But I want to link to best sellers and new stuff.

Offline

 

#6 06-22-2010 12:36:53

susan2go
Member
Registered: 04-19-2010
Posts: 81

Re: How do I link to the results of a given namespace?

It seems you just want to create a xhtml link.

Offline

 

#7 06-22-2010 13:08:08

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

Re: How do I link to the results of a given namespace?

I want a link that looks something like this:

<a href="[link to best sellers]"><img src="[my image]"></a>

Offline

 

#8 06-22-2010 13:20:33

susan2go
Member
Registered: 04-19-2010
Posts: 81

Re: How do I link to the results of a given namespace?

Code:

<a href="index.php?app=ecom&ns=prodbest" title="Best Sellers"><img src="some-image.jpg" alt="whatever"></a>

Offline

 

#9 06-22-2010 13:27:10

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

Re: How do I link to the results of a given namespace?

Is the page within ccp (created when the site is accessed) or is it out side of ccp? You can hardcode the link

Code:

<a href="http://www.sitename.com/index.php?&amp;app=ecom&amp;ns=prodbest" title="your_title"><img src="your_image"></a>

within ccp (php script)

Code:

$link =$this->link_namespace('ecom','prodbest',array());

print '<a href="' . $link . '" title="best seller"><img src="your_image"></a>';

inside html page (within ccp)

Code:

<?php $link =$this->link_namespace('ecom','prodbest',array()); ?>

<a href="<?php print $link; ?>" title="your_title"><img src="your_image"></a>

John

John

Last edited by dh783 (06-22-2010 13:30:01)

Offline

 

#10 06-22-2010 14:05:48

susan2go
Member
Registered: 04-19-2010
Posts: 81

Re: How do I link to the results of a given namespace?

dh783 wrote:

Code:

<?php $link =$this->link_namespace('ecom','prodbest',array()); ?>

<a href="<?php print $link; ?>" title="your_title"><img src="your_image"></a>

John, how would you code a product link?  I have set up hard-coded links to free samples in the long product descriptions in the format of: index.php?app=ecom&ns=prodshow&ref=free_sample and of course, I realize now that they will not rewrite when SEO is on.

Offline

 

#11 06-22-2010 14:22:48

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

Re: How do I link to the results of a given namespace?

The problem here is that the long description isn't set up to execute php code within its field but a product link would be

Code:

<?php
$link = $this->link_namespace('ecom','prodshow',array('ref' => 'product_id'));
?>

<a href="<?php print $link; ?>" title="your_title"><img src="your_image"></a>

also if you used & in your hard link you need to change it & amp; (no space) to get it to validate.

John

Last edited by dh783 (06-22-2010 14:24:10)

Offline

 

#12 06-22-2010 15:20:43

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: How do I link to the results of a given namespace?

susan2go wrote:

Code:

<a href="index.php?app=ecom&ns=prodbest" title="Best Sellers"><img src="some-image.jpg" alt="whatever"></a>

This is not the way to do it properly, because SEO links will not work once you enable SEO.  The link will work, but there's some unforeseen downsides.  Hope this helps!



-James Garrett

Offline

 

#13 06-22-2010 16:42:44

susan2go
Member
Registered: 04-19-2010
Posts: 81

Re: How do I link to the results of a given namespace?

jj1987 wrote:

This is not the way to do it properly, because SEO links will not work once you enable SEO.  The link will work, but there's some unforeseen downsides.  Hope this helps!

Nice doubles, dude. smile

She said she needed a link from a static .html page?   I have no idea why she wants to do it that way.

Offline

 

#14 06-22-2010 17:05:08

susan2go
Member
Registered: 04-19-2010
Posts: 81

Re: How do I link to the results of a given namespace?

dh783 wrote:

The problem here is that the long description isn't set up to execute php code within its field but a product link would be

Code:

<?php
$link = $this->link_namespace('ecom','prodshow',array('ref' => 'product_id'));
?>

<a href="<?php print $link; ?>" title="your_title"><img src="your_image"></a>

John

It won't execute in that space.  When I view the source, the link is printed verbatim:

Code:

<a href="<?php print $link; ?>" title="Free Sample">Get a Free Sample!</a>

and everything except "<?php" and "?>" in the following

Code:

$link = $this->link_namespace('ecom','prodshow',array('ref' => 'product_id'));

is also printed verbatim.

I can use the already rewritten url hard links I suppose.

Offline

 

#15 06-22-2010 17:07:26

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

Re: How do I link to the results of a given namespace?

Much obliged!

Offline

 

#16 06-22-2010 18:03:39

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

Re: How do I link to the results of a given namespace?

If you want to run php in the long description then replace this line in your product detail displays

Code:

<?php print $proddesc; ?>

with this

Code:

<?php $this->include_phptext($proddesc); ?>

Have tested this and haven't seen any problems yet with items with no html or php in them.

John

Offline

 

#17 06-22-2010 19:17:06

jj1987
Member
From: Orlando, FL
Registered: 07-14-2008
Posts: 502
Website

Re: How do I link to the results of a given namespace?

susan2go wrote:

jj1987 wrote:

This is not the way to do it properly, because SEO links will not work once you enable SEO.  The link will work, but there's some unforeseen downsides.  Hope this helps!

Nice doubles, dude. smile

She said she needed a link from a static .html page?   I have no idea why she wants to do it that way.

Well, you can still link from a static page that way. smile



-James Garrett

Offline

 

Board footer