Skip to content

Commit

Permalink
[PepperBridgeAbstract] Fix Deal Origin and Shipping cost (#3790)
Browse files Browse the repository at this point in the history
- Deal Origin was changed by the website : fixed the CSS class to get it
- Shipping cost had an extra SVG image in the content : removed the
  whole HTML tags from the content
  • Loading branch information
sysadminstory authored Nov 7, 2023
1 parent 8d0ddb5 commit 84b5ffc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bridges/PepperBridgeAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,11 @@ private function getShippingCost($deal)
if ($deal->find('span[class*=space--ml-2 size--all-s overflow--wrap-off]', 0) != null) {
if ($deal->find('span[class*=space--ml-2 size--all-s overflow--wrap-off]', 0)->children(1) != null) {
return '<div>' . $this->i8n('shipping') . ' : '
. $deal->find('span[class*=space--ml-2 size--all-s overflow--wrap-off]', 0)->children(1)->innertext
. strip_tags($deal->find('span[class*=space--ml-2 size--all-s overflow--wrap-off]', 0)->children(1)->innertext)
. '</div>';
} else {
return '<div>' . $this->i8n('shipping') . ' : '
. $deal->find('span[class*=text--color-greyShade flex--inline]', 0)->innertext
. strip_tags($deal->find('span[class*=text--color-greyShade flex--inline]', 0)->innertext)
. '</div>';
}
} else {
Expand All @@ -376,7 +376,7 @@ private function getSource($deal)
{
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);
$text = $origin->find('span[class*=link]', 0);
return '<div>' . $this->i8n('origin') . ' : <a href="' . static::URI . $path . '">' . $text . '</a></div>';
} else {
return '';
Expand Down

0 comments on commit 84b5ffc

Please sign in to comment.