duanfa2014 2015-11-27 06:38
浏览 26

代码错误prestashop模块php到csv

                    if ($product['default_gold_carity'] == 14)
                            $line[$i] = $this->module->l('Set in 14k Gold with Moissanite Solitaires');
                    if ($product['default_gold_carity'] == 18)
                            $line[$i] = $this->module->l('Set in 18k Gold with Moissanite Solitaires');
                            if ($product['default_gold_carity'] == 14 && $product['price_diamond']) > 0)
                                $line[$i] = $this->module->l('Set in 14k Gold with Moissanite Solitaires with Diamonds');
                                elseif ($product['default_gold_carity'] == 18 && $product['price_diamond']) > 0)
                                $line[$i] = $this->module->l('Set in 18k Gold with Moissanite Solitaires with Diamonds');
                                    else
                                $line[$i] = $this->module->l('This is a loose stone');

Hi everyone.

So basically what my modules does is extract product information from mysql database and export into CSV format.

There is this table ps_product where column is default_gold_carity where value is either 14 , 18 and 0. So if value is 14 it will show "Set in 14k Gold with Moissanite Solitaires" and if 18 then it should show "Set in 18k Gold with Moissanite Solitaires"

There is one more column name "price_diamonds" where if value is more than 0 then there is a diamond and result will be "Set in 14k Gold with Moissanite Solitaires with Diamonds" or "Set in 18k Gold with Moissanite Solitaires with Diamonds"

If there is no gold at all but diamond than it should show "There is diamond"

If all the results is false it should show. "this is a loose solitaire"

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
    • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
    • ¥15 Centos / PETSc / PETGEM
    • ¥15 centos7.9 IPv6端口telnet和端口监控问题
    • ¥120 计算机网络的新校区组网设计
    • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
    • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
    • ¥20 海浪数据 南海地区海况数据,波浪数据
    • ¥20 软件测试决策法疑问求解答
    • ¥15 win11 23H2删除推荐的项目,支持注册表等