Permalink
Browse files

Template Standardized popup info pages for Search Help

and add Shipping Help popup
Prepearation for my Shipping and Conditions Terms popups contribution

Signed-off-by: Gergely <t-gely@freemail.hu>
  • Loading branch information...
1 parent 08fd533 commit 443798932e40e7036a2bbf4536c11274cb73bf33 @tgely committed Sep 5, 2010
@@ -0,0 +1,35 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ namespace osCommerce\OM\Core\Site\Shop\Application\Products\Action;
+
+ use osCommerce\OM\Core\ApplicationAbstract;
+ use osCommerce\OM\Core\Registry;
+ use osCommerce\OM\Core\OSCOM;
+
+ class ShippingHelp {
+ public static function execute(ApplicationAbstract $application) {
+ $OSCOM_Template = Registry::get('Template');
+ $OSCOM_NavigationHistory = Registry::get('NavigationHistory');
+
+// HPDL
+ $OSCOM_Template->setHasHeader(false);
+ $OSCOM_Template->setHasFooter(false);
+ $OSCOM_Template->setHasBoxModules(false);
+ $OSCOM_Template->setHasContentModules(false);
+ $OSCOM_Template->setShowDebugMessages(false);
+
+ $OSCOM_NavigationHistory->removeCurrentPage();
+
+ $application->setPageTitle(OSCOM::getDef('info_shipping_heading'));
+ $application->setPageContent('shipping_help.php');
+ }
+ }
+?>
@@ -25,7 +25,8 @@ protected function process() {
$OSCOM_Breadcrumb = Registry::get('Breadcrumb');
$OSCOM_Language->load('products');
-
+ $OSCOM_Language->load('info');
+
$requested_product = null;
$product_check = false;
@@ -58,6 +59,7 @@ protected function process() {
}
$OSCOM_Template->addJavascriptFilename('templates/' . $OSCOM_Template->getCode() . '/javascript/Products/info.js');
+ $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('templates/' . $OSCOM_Template->getCode() . '/javascript/general_page_popup.js'));
// HPDL osC_Services_category_path::process($osC_Product->getCategoryID());
@@ -40,7 +40,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="productInfoKey"><?php echo $OSCOM_Language->get('listing_price_heading') ?>:</td>
- <td class="productInfoValue"><span id="productInfoPrice"><?php echo $OSCOM_Product->getPriceFormated(true); ?></span> ( <?php echo $OSCOM_Language->get('plus_shipping_template_info') . ' ' . osc_link_object(OSCOM::getLink(null, 'Info', 'Shipping'), $OSCOM_Language->get('shipping_template_info')); ?>)</td>
+ <td class="productInfoValue"><span id="productInfoPrice"><?php echo $OSCOM_Product->getPriceFormated(true); ?></span> ( <?php echo $OSCOM_Language->get('plus_shipping_template_info') . ' ' . osc_link_object('javascript:popupWindow(\'' . OSCOM::getLink(null, null, 'ShippingHelp') . '\');', $OSCOM_Language->get('shipping_template_info')); ?>)</td>
</tr>
<?php
@@ -0,0 +1,35 @@
+<?php
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+ use osCommerce\OM\Core\OSCOM;
+?>
+
+<style type="text/css">
+#pageContent {
+ width: 100%;
+ margin: 0;
+ padding: 0;
+}
+
+div#pageBlockLeft {
+ width: 100%;
+ margin: 0;
+}
+</style>
+
+<div class="moduleBox">
+ <h6><?php echo OSCOM::getDef('info_shipping_heading'); ?></h6>
+
+ <div class="content">
+ <p><?php echo OSCOM::getDef('shipping'); ?></p>
+
+ <p align="right"><?php echo osc_link_object('javascript:window.close();', OSCOM::getDef('close_window')); ?></p>
+ </div>
+</div>
@@ -27,7 +27,7 @@ protected function process() {
$this->_page_title = OSCOM::getDef('search_heading');
- $OSCOM_Template->addJavascriptPhpFilename('templates/' . $OSCOM_Template->getCode() . '/javascript/search/search.php');
+ $OSCOM_Template->addJavascriptFilename(OSCOM::getPublicSiteLink('templates/' . $OSCOM_Template->getCode() . '/javascript/general_page_popup.js'));
if ( $OSCOM_Service->isStarted('Breadcrumb') ) {
$OSCOM_Breadcrumb->add(OSCOM::getDef('breadcrumb_search'), OSCOM::getLink());
@@ -0,0 +1,16 @@
+/*
+ osCommerce Online Merchant $osCommerce-SIG$
+ Copyright (c) 2010 osCommerce (http://www.oscommerce.com)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License v2 (1991)
+ as published by the Free Software Foundation.
+*/
+
+/**
+ * General Javascript Page PopUp
+ */
+
+function popupWindow(url) {
+ window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + (window.screen.availWidth)*0.5 + ',height=' + (window.screen.availHeight)*0.5 + ',screenX=150,screenY=150,top=150,left=150')
+}

0 comments on commit 4437989

Please sign in to comment.