Skip to content

Commit

Permalink
Further removal of Mage_Sendfriend module
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Oct 14, 2024
1 parent 392aef0 commit 43669e4
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 105 deletions.
1 change: 0 additions & 1 deletion app/code/core/Mage/Adminhtml/Helper/Help/Mapping.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ abstract class Mage_Adminhtml_Helper_Help_Mapping extends Mage_Core_Helper_Abstr
'system_config/edit/section/cataloginventory' => 'configuration/catalog/inventory.html',
'system_config/edit/section/sitemap' => 'configuration/catalog/google-sitemap.html',
'system_config/edit/section/rss' => 'configuration/catalog/rss-feeds.html',
'system_config/edit/section/sendfriend' => 'configuration/catalog/email-to-a-friend.html',
'system_config/edit/section/newsletter' => 'configuration/customers/newsletter.html',
'system_config/edit/section/customer' => 'configuration/customers/customer-configuration.html',
'system_config/edit/section/wishlist' => 'configuration/customers/wishlist.html',
Expand Down
4 changes: 0 additions & 4 deletions app/code/core/Mage/Adminhtml/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,6 @@
<title>Currency Setup</title>
<sort_order>120</sort_order>
</currency>
<sendfriend translate="title">
<title>Email to a Friend</title>
<sort_order>140</sort_order>
</sendfriend>
<admin translate="title">
<title>Admin</title>
<sort_order>100</sort_order>
Expand Down
11 changes: 0 additions & 11 deletions app/code/core/Mage/Catalog/Block/Product/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,6 @@ public function getProduct()
return Mage::registry('product');
}

/**
* Check if product can be emailed to friend
*
* @return bool
*/
public function canEmailToFriend()
{
$sendToFriendModel = Mage::registry('send_to_friend_model');
return $sendToFriendModel && $sendToFriendModel->canEmailToFriend();
}

/**
* Retrieve url for direct adding product to cart
*
Expand Down
16 changes: 0 additions & 16 deletions app/code/core/Mage/Catalog/Helper/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,22 +149,6 @@ public function getThumbnailUrl($product)
return $url;
}

/**
* @param Mage_Catalog_Model_Product $product
* @return string
*/
public function getEmailToFriendUrl($product)
{
$categoryId = null;
if ($category = Mage::registry('current_category')) {
$categoryId = $category->getId();
}
return $this->_getUrl('sendfriend/product/send', [
'id' => $product->getId(),
'cat_id' => $categoryId
]);
}

/**
* @return array
*/
Expand Down
2 changes: 0 additions & 2 deletions app/code/core/Mage/Catalog/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* @method int getLastVisitedCategoryId()
* @method string getLimitPage()
* @method bool getParamsMemorizeDisabled()
* @method array getSendfriendFormData()
* @method $this setSendfriendFormData(array $value)
* @method string getSortDirection()
* @method string getSortOrder()
* @method $this unsDisplayMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'sales_email/creditmemo_comment/template' => 'sales_email_creditmemo_comment_template',
'sales_email/shipment/template' => 'sales_email_shipment_template',
'sales_email/shipment_comment/template' => 'sales_email_shipment_comment_template',
'sendfriend/email/template' => 'sendfriend_email_template',
'sitemap/generate/error_email_template' => 'sitemap_generate_error_email_template',
'wishlist/email/email_template' => 'wishlist_email_email_template',
];
Expand Down
17 changes: 0 additions & 17 deletions app/code/core/Mage/Reports/Model/Event/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,6 @@ public function catalogProductView(Varien_Event_Observer $observer)
return $this->_event(Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW, $productId);
}

/**
* Send Product link to friends action
*
* @return $this
*/
public function sendfriendProduct(Varien_Event_Observer $observer)
{
if (!$this->_enabledReports) {
return $this;
}

return $this->_event(
Mage_Reports_Model_Event::EVENT_PRODUCT_SEND,
$observer->getEvent()->getProduct()->getId()
);
}

/**
* Remove Product from Compare Products action
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
'event_type_id' => Mage_Reports_Model_Event::EVENT_PRODUCT_VIEW,
'event_name' => 'catalog_product_view'
],
[
'event_type_id' => Mage_Reports_Model_Event::EVENT_PRODUCT_SEND,
'event_name' => 'sendfriend_product'
],
[
'event_type_id' => Mage_Reports_Model_Event::EVENT_PRODUCT_COMPARE,
'event_name' => 'catalog_product_compare_add_product'
Expand Down
8 changes: 0 additions & 8 deletions app/code/core/Mage/Reports/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@
</reports>
</observers>
</catalog_controller_product_view>
<sendfriend_product>
<observers>
<reports>
<class>reports/event_observer</class>
<method>sendfriendProduct</method>
</reports>
</observers>
</sendfriend_product>
<catalog_product_compare_add_product>
<observers>
<reports>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
INSERT INTO {$this->getTable('report_event_types')} VALUES
(1, 'catalog_product_view'),
(2, 'sendfriend_product'),
(3, 'catalog_product_compare_add_product'),
(4, 'checkout_cart_add_product'),
(5, 'wishlist_add_product'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
INSERT INTO {$this->getTable('report_event_types')} VALUES
(1, 'catalog_product_view'),
(2, 'sendfriend_product'),
(3, 'catalog_product_compare_add_product'),
(4, 'checkout_cart_add_product'),
(5, 'wishlist_add_product'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
<h1><?= $_helper->productAttribute($_product, $_product->getName(), 'name') ?></h1>
</div>

<?php if ($this->canEmailToFriend()): ?>
<p class="email-friend"><a href="<?= $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>"><?= $this->__('Email to a Friend') ?></a></p>
<?php endif ?>

<?= $this->getReviewsSummaryHtml($_product, false, true) ?>
<?= $this->getChildHtml('alert_urls') ?>
<?= $this->getChildHtml('product_type_data') ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<?php $_wishlistSubmitUrl = $this->helper('wishlist')->getAddUrlWithCustomParams($_product, [], false); ?>

<ul class="sharing-links">
<?php if ($this->canEmailToFriend()): ?>
<li><a href="<?= $this->helper('catalog/product')->getEmailToFriendUrl($_product) ?>" class="link-email-friend" title="<?= Mage::helper('core')->quoteEscape($this->__('Email to a Friend')) ?>"><?= $this->__('Email to a Friend') ?></a></li>
<?php endif ?>

<?php $_helper = $this->helper('catalog/output'); ?>
<?php $_productName = urlencode(trim($_helper->productAttribute($_product, $_product->getName(), 'name')))?>
<?php $_productImageUrl = urlencode(trim((string)$this->helper('catalog/image')->init($_product, 'image')))?>
Expand Down
30 changes: 0 additions & 30 deletions app/locale/en_US/template/email/product_share.html

This file was deleted.

1 change: 0 additions & 1 deletion lib/MahoCLI/Commands/LegacyRenameMysql4Classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'<rule_mysql4>' => '<rule_resource>',
'<sales_mysql4>' => '<sales_resource>',
'<salesrule_mysql4>' => '<salesrule_resource>',
'<sendfriend_mysql4>' => '<sendfriend_resource>',
'<shipping_mysql4>' => '<shipping_resource>',
'<sitemap_mysql4>' => '<sitemap_resource>',
'<tag_mysql4>' => '<tag_resource>',
Expand Down

0 comments on commit 43669e4

Please sign in to comment.