Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cookiz’s picture

Title: Shipping service is not taking the current currency » Shipping services are not created the default site currency
vasike’s picture

Version: 7.x-2.0-alpha1 » 7.x-2.x-dev
Status: Active » Needs review
FileSize
1.54 KB

indeed. i found that in the "commerce_kickstart_product" features module, the Flat Rate Services are built with "USD" currency.
I created a patch that change settings to use the "commerce_default_currency"

vasike’s picture

also commited with Gerrit : https://code.drupalcommerce.org/#/c/103/

GuGuss’s picture

Assigned: Unassigned » vasike
davereplicant’s picture

Version: 7.x-2.x-dev » 7.x-2.4
Priority: Normal » Major

Hi
I hope I've been able to add this to the right part of the original post.

I'm experiencing the Shipping bug and I can't seem to fix it - I've found the relevant file in a different location to the one mentioned.

I have GBP set as my currency and the Shipping insists on being DOLLARS.
If you choose Express shipping the page freezes.

I wish I was able to be more help here, am I doing something wrong by replacing the line

'currency_code' => variable_get('commerce_default_currency', 'USD'),

When I do this it still doen't work.

Thanks in advance.

Dave

pcambra’s picture

Option one: implement an alter hook to the services and provide the correct currency.
This has the risk of altering a currency that the user has set on purpose so it will override an user setting which is bad. Needs testing if this alter can notice if the service has been altered and not override the user setting.

Moving the service creation to install is the second option.

jsacksick’s picture

We can't implement the second option as the shipping services can only be defined via the hooks, the attached patch check if the currency code of the defined service is enabled, if not then we're setting the currency to the default currency of the site.

bojanz’s picture

#7 sounds like it would also modify shipping services that don't belong to the demo store.
Could we use a features preprocess hook instead? (if any?)

vasike’s picture

within #7 patch, alter only its own defined shipping services.

i don't think features provides a way to alter this, as a features preprocess hook

vasike’s picture

Version: 7.x-2.4 » 7.x-2.x-dev

here is gerrit commit for limiting changes to its own defined shipping services:
https://code.drupalcommerce.org/#/c/683/

my previous patch was a mess.

lsolesen’s picture

Issue summary: View changes

@vasike han you create it as a regular patch against latest version

vasike’s picture

@lsolesen: almost missed, lucky i faced this issue working on other module within kickstart.
here it is.

mglaman’s picture

Issue tags: +sprint
rszrama’s picture

Status: Needs review » Closed (outdated)

Commerce Kickstart 2.x is in minimal maintenance mode. Closing out all outdated tickets now to maintain focus on Commerce Kickstart 3.x.