PC版Fecro选择其他语言不能跳转

技术问题 · evansun · 于 3年前 发布 · 1096 次阅读

我安装了最新的Fecro,设置了www.xxx.com 英语, fr.xxx.com法语,es.xxx.com西班牙语 但是通过顶部的语言选择,不能跳转到其他店铺

共收到 3 条回复
Fecmall#13年前 0 个赞

您只安装了fecro吧? 标题应该写的更确切一点,这个应该是pc入口

代码位置:./addons/fecmall/fecro/app/appfront/theme/fecro/widgets/header.php

338行左右

function getCaption(url,parameter) {
            var index = url.lastIndexOf(parameter);
            if (index >0 ) {
                url = url.substring(0, index);
            }
            
            return url;
        }

        $(".lang_currency").click(function(){
            changeStore = $(".modal-language-select-outer-js .currentLang").attr("rel");
            currentCurrency = $(".modal-language-select-outer-js .currentCurrency").attr("rel");
            
            ctUrl = "<?= Yii::$service->url->getUrl('cms/home/changecurrency') ?>";
            htmlobj=$.ajax({url: ctUrl+"?currency="+currentCurrency, async:false});
            
            location.reload() ;
            currentUrl = window.location.href;
            currentStore = $(".current_lang").val();
            redirectUrl = currentUrl.replace("://"+currentStore,"://"+changeStore);
            redirectUrl = getCaption(redirectUrl, "#");
            window.location.href=redirectUrl;
            //alert(redirectUrl);
        });

您debug一下看看原因。

q791695728#22年前 0 个赞

选择不同语是可以跳到主页,但是在选定后的相对应的语言里要点产品就找不到页面

Fecmall#32年前 0 个赞

nginx配置有问题

https://www.fecmall.com/topic/2101

各个语言子项需要加入

location /fr/ {
        index index.php;
        if (!-e $request_filename){
            rewrite . /fr/index.php last;
        }
    }
添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics