dongyang4615 2016-09-28 13:28
浏览 1133
已采纳

使用PHP创建SKU代码

I wanted to apologise off the bat for asking a question with very little prior information to go on, but im at a loss as to how to even start.

I need to create a list of SKUs based on a preset grouping of SKUs that already exists its like a combination table, or iteration table.

However doing this manually is a ridiculous task and I could find no Javascript site that would allow me to do it as required.

Using PHP Classes i thought it would be a much more efficient way to achieve the goal.

AIM: The target item will consist of 5 or so TYPES of items. For each TYPE there is approximately 15-20 exact codes it could consist of.

For example TYPE 1 could be Apple, Pear, Orange, Pineapple. Etc. TYPE 2 could be Red,Green,Blue,Black. Etc

I need to be able to input a list of Variants for each TYPE and have it concatenate the Variants in every possible iteration of an item that could exist.

I am aware this would create 10s of thousands of (in this case) SKUs.

The problem i encounter is when creating the iterations the types always duplicate. Furthermore there are exceptions to this rule, for example Variant Apple could never be with Variant Black. So those types would never be found in the same concatenated code.

Im sure that for someone out their this is really very simple basic grouping and class configuration. So I very much appreciate any help that anyone might have for this.

Many Thanks - Lewis

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 edge浏览器最近莫名其妙老是每隔一段时间弹出色情网站,求解决。。
      • ¥15 “glmnet”运行出错
      • ¥30 如何用matlab表达以下公式?
      • ¥15 在arm架构芯片上基于32位linux操作系统做内存检查
      • ¥15 怎么样才能禁止VS自动调整Windows窗体布局
      • ¥15 mysql5.7.40安装到Initializing database报错,如何解决?
      • ¥30 如何降低hdfs中datanode的JVM内存用量
      • ¥15 Android URL如何转成视频/音频,可行吗?
      • ¥20 Hive SQL数据查询,子查询
      • ¥15 c++字符串分割问题