<?php
  public function createDummyProduct($sku = '', $title = '', $amount = -1, $currency_code = 'USD', $uid = 1, $type_given = 'product') {
    $new_product->commerce_price[LANGUAGE_NONE][0]['amount'] = ($amount < 0) ? rand(2, 500) : $amount;
    $new_product->commerce_price[LANGUAGE_NONE][0]['currency_code'] = 'USD';
  }
?>

As shown in the cut down version of createDummyProduct(), the currency is hard coded to USD rather than using the $current_code parameter.

CommentFileSizeAuthor
commerce-base.patch616 bytesbenjy

Comments

rszrama’s picture

Category: Bug report » Task

Man, those test suites...

Tagging for http://contribkanban.com/#/board/commerce/7.x-1.x.

johnennew’s picture

Status: Needs review » Reviewed & tested by the community

This patch is truly awesome! All tests should use other currencies.

rszrama’s picture

No clue why I didn't just commit this before. : P

  • rszrama committed 3605bd8 on 7.x-1.x authored by benjy
    Issue #2424937 by benjy: createDummyProduct should use the $...
rszrama’s picture

Status: Reviewed & tested by the community » Fixed

Aaaand, committed. Thanks for the patch / review. : )

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.