Skip to content

Commit

Permalink
[PepperBridgeAbstract] Fix deal origin (#3605)
Browse files Browse the repository at this point in the history
Origin display has chenged : this commit follow the websites changes.

Fixes #3521
  • Loading branch information
sysadminstory authored Aug 9, 2023
1 parent f3896ed commit 1fcf67f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bridges/PepperBridgeAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,10 @@ private function getShippingCost($deal)
*/
private function getSource($deal)
{
if ($deal->find('a[class*=text--color-greyShade]', 0) != null) {
return '<div>' . $this->i8n('origin') . ' : '
. $deal->find('a[class*=text--color-greyShade]', 0)->outertext
. '</div>';
if (($origin = $deal->find('button[class*=text--color-greyShade]', 0)) != null) {
$path = str_replace(' ', '/', trim(Json::decode($origin->{'data-cloak-link'})['path']));
$text = $origin->find('span[class*=cept-merchant-name]', 0);
return '<div>' . $this->i8n('origin') . ' : <a href="' . static::URI . $path . '">' . $text . '</a></div>';
} else {
return '';
}
Expand Down

0 comments on commit 1fcf67f

Please sign in to comment.