简体   繁体   English

shopp插件中的导出选项

[英]Export option in shopp plugin

I am using shopp plugin for paypal in my wordpress site. 我在wordpress网站上将shopp插件用于paypal。 In that there is an 'export options' in shopp->orders page. shopp->orders页面中有一个“ export options”。 The function for exporting the orders in the purchased page is 在已购买页面中导出订单的功能是

function exportcolumns () {
        $prefix = "p.";
        return array(
            $prefix.'id' => __('Line Item ID','Shopp'),
            $prefix.'optionlabel' => __('Product Variation Name','Shopp'),
            $prefix.'description' => __('Product Description','Shopp'),
            $prefix.'sku' => __('Product SKU','Shopp'),
            $prefix.'quantity' => __('Product Quantity Purchased','Shopp'),
            $prefix.'unitprice' => __('Product Unit Price','Shopp'),
            $prefix.'total' => __('Product Total Price','Shopp'),
            $prefix.'data' => __('Product Data','Shopp'),
            $prefix.'downloads' => __('Product Downloads','Shopp')
            );
    }

In this $prefix.'optionlabel' => __('Product Variation Name','Shopp') , contains the value 3482 Gouchh, Two Sems, With Insurance in a single field. 在此$prefix.'optionlabel' => __('Product Variation Name','Shopp') ,单个字段中包含值3482 Gouchh, Two Sems, With Insurance I have to separate it into 3 fields while exporting as xls. 在导出为xls时,我必须将其分为3个字段。

How can I do that? 我怎样才能做到这一点?

In my experience, the best reason to export anything from Shopp is to move it to a different shopping cart platform. 以我的经验,从Shopp导出任何内容的最好原因是将其移至另一个购物车平台。

I used Shopp for over a year on several sites, and it was never anything but a nightmare. 我在多个站点上使用Shopp已有一年多了,这只是一场噩梦。 It remained buggy, presented security problems. 它仍然存在问题,存在安全问题。 If you engage the logging you'll see that the code is SO SLOPPY that it constantly throws PHP errors. 如果您使用日志记录,您会发现该代码太糟糕了,不断抛出PHP错误。

EVERY update they did broke my sites and left me hemorrhaging money - while they jerked me around in their "support" area, delaying to extort money - and offering to repair the sites their junkware broke - for $500 EACH. 他们所做的每一次更新都破坏了我的网站,并让我大出血了-他们在“支持”区域向我猛拉,延迟了勒索金钱-并提出要修复其垃圾器损坏的网站-每次收费500美元。

Strongly recommend getting away from Shopp. 强烈建议您离开Shopp。

I'm not sure if I have misunderstood your question, but if you have a string value that you want to extrapolate, explode is the function you need. 我不确定是否误解了您的问题,但是如果您要推断一个字符串值,则需要使用explode函数。

Assuming your product is stored in the $product variable 假设您的产品存储在$ product变量中

$export=explode(', ',$product['p.optionlabel']);

Will provide 会提供

array(3)
(
  [0] => string(11) "3482 Gouchh"
  [1] => string(8) "Two Sems"
  [2] => string(14) "With Insurance"
)

You can then use this to do your export. 然后,您可以使用它进行导出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM