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

使用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

图片转代码服务由CSDN问答提供 功能建议

我想通过提交很少的先前信息来提出问题而道歉,但即时通讯 关于如何开始的失败。

我需要根据预设的SKU分组创建一个SKU列表,这些SKU已经存在,就像组合表或迭代表一样。

然而,手动执行此操作是一项荒谬的任务,我找不到允许我根据需要执行此操作的Javascript站点。

使用PHP类我认为它 将是一种更有效的方法来实现目标。

AIM:目标项目将包含5个左右的项目类型。 对于每个TYPE,它可以包含大约15-20个精确代码。

例如,TYPE 1可以是Apple,Pear,Orange,Pineapple。 等等 TYPE 2可以是红色,绿色,蓝色,黑色。 等等

我需要能够为每个TYPE输入变量列表,并让它在可能存在的项目的每个可能迭代中连接变量。 \ n

我知道这将产生数以万计(在这种情况下)SKU。

我遇到的问题是在创建迭代时类型总是重复。 此外,此规则也有例外,例如Variant Apple永远不会使用Variant Black。 所以这些类型永远不会在相同的连接代码中找到。

我确信对于他们来说这是非常简单的基本分组和类配置。 所以我非常感谢任何人可能对此有任何帮助。

非常感谢 - 刘易斯

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题