X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Changing breadcrumbs ...how can i change link-url of company (https://forum.x-cart.com/showthread.php?t=18497)

krpatel 12-07-2005 05:49 AM

Changing breadcrumbs ...how can i change link-url of company
 
Hello Everyone,

i have top level in the breadcrumbs like this:

Company :: category :: product with urls https://shop.vaatchit.com/home.php :: https://shop.vaatchit.com/home.php?cat=245 :: "product link"

means....

for,
Company -->https://shop.vaatchit.com/home.php
category --->https://shop.vaatchit.com/home.php?cat=245.

Now, i would like to have,

The link-url should be http://www.vaatchit.com instead of https://shop.vaatchit.com/home.php

can we do this ??

I tried with location.tpl but i didnt get proper success for it. if anyone able to do this please inform me.
Regards,
N V Master.

balinor 12-07-2005 06:08 AM

That should be automatic if you have things set up correctly in your config.php.

Fascinations 01-24-2011 08:58 AM

Re: Changing breadcrumbs ...how can i change link-url of company
 
balinor, could you expand on that explanation?

I am trying to do the same thing on 4.4 pro.

I would like to try and remove as many references and/or pointers to home.php as possible. I am using a completely separate front end outside of x-cart and would like to use the breadcrumbs, but I need them to point to the base url instead of home.php.

Any input would be appreciated on this.

Thanks.

qualiteam 01-28-2011 02:04 AM

Re: Changing breadcrumbs ...how can i change link-url of company
 
Insert this code into <xcart_dir>/smarty.php script:

PHP Code:

if (AREA_TYPE == "C") { 
        function 
replace_home_php_links($tpl_source, &$smarty
        { 
            global 
$xcart_web_dir

            return 
str_replace("\"home.php\"""\"$xcart_web_dir\""$tpl_source); 
        } 
        
$smarty->register_outputfilter("replace_home_php_links"); 



right before this code fragment:
PHP Code:

$smarty->config_dir $xcart_dir $smarty_skin_dir


michellevy 02-04-2011 10:07 AM

Re: Changing breadcrumbs ...how can i change link-url of company
 
Quote:

Originally Posted by qualiteam
Insert this code into <xcart_dir>/smarty.php script:

PHP Code:

function replace_home_php_links($tpl_source, &$smarty)
{
    global 
$xcart_web_dir;

    return 
str_replace("\"home.php\"""\"$xcart_web_dir\""$tpl_source);
}
$smarty->register_outputfilter("replace_home_php_links"); 


right before this code fragment:
PHP Code:

$smarty->config_dir $xcart_dir $smarty_skin_dir



Thank yu for teh code, however this is not working in the admin backend.

if you install this code, then in the admin backend the home link will be the same as the following link.

so for example:

Home :: General Setting

in this case, if you mouse over the Home link, then you will see in the bottom of browesr that the link will say:

admin/configuration.php

Same link if you were to mouse over the "general setting" breadcrumb setting.

Anyway, it would be nice if you could provide a way to correct that issue.

Thank you.

qualiteam 02-08-2011 05:01 AM

Re: Changing breadcrumbs ...how can i change link-url of company
 
OK. Sorry. I've update the code.

It should work for customer front end only now.
Please check.

michellevy 02-08-2011 08:52 PM

Re: Changing breadcrumbs ...how can i change link-url of company
 
Quote:

Originally Posted by qualiteam
OK. Sorry. I've update the code.

It should work for customer front end only now.
Please check.


Alex,
Thank you very much for this update.
It is now working very well.

alinush 07-29-2013 03:45 AM

Re: Changing breadcrumbs ...how can i change link-url of company
 
This helps a lot to replace all the links in the store.

Can you also advise about updating the homepage canonical link from store.url/home.php to store.url ?

Thanks


All times are GMT -8. The time now is 06:11 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.