View more context

 

greg_808

I have a problem with i18n for the silvershop emails. To be precise with the product titles. My default local is de_AT this is what i get in the email:

greg_808

I allways get item instead of the product title. And yes product titles are translated

greg_808

I changed this

  1. public function getTableTitle()
  2. {
  3. $product = $this->Product();
  4. $tabletitle = ($product) ? $product->Title : $this->i18n_singular_name();
  5. $this->extend('updateTableTitle', $tabletitle);
  6.  
  7. return $tabletitle;
  8. }

to

  1. public function getTableTitle()
  2. {
  3. $product = $this->Product() ?? $this->getComponent('Product');
  4. $tabletitle = ($product) ? $product->Title : $this->i18n_singular_name();
  5. $this->extend('updateTableTitle', $tabletitle);
  6.  
  7. return $tabletitle;
  8. }

it works as expected.

👍 (2)
wmk

I'd hook in updateTableTitle instead of subclassing and use the injector

r3v3rb

I need to round half down on a percentage discount modifier in SilverShop for SS3 - anyone know the best place to do this - its a VAT issue

greg_808

Does anyone know how long a shopping cart will last if it is not ordered?