|
From: <os...@us...> - 2016-04-26 12:00:44
|
Revision: 5316
http://sourceforge.net/p/oscss/svn/5316
Author: oscim
Date: 2016-04-26 12:00:41 +0000 (Tue, 26 Apr 2016)
Log Message:
-----------
Fix error in box recently viewed content
Fix link js in product module gab
Modified Paths:
--------------
trunk/catalog/install/data/templates/appareil_photo/techno/includes/gabarit/product/module.gab
trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php
Modified: trunk/catalog/install/data/templates/appareil_photo/techno/includes/gabarit/product/module.gab
===================================================================
--- trunk/catalog/install/data/templates/appareil_photo/techno/includes/gabarit/product/module.gab 2016-04-26 09:05:35 UTC (rev 5315)
+++ trunk/catalog/install/data/templates/appareil_photo/techno/includes/gabarit/product/module.gab 2016-04-26 12:00:41 UTC (rev 5316)
@@ -10,7 +10,9 @@
*/
global $page, $ele, $load, $themodule;
-
+// print_r($ele);
+// var_dump((_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->GetId())) == 0) );
+// exit;
?>
<div class="product_block equal-height_listing_block" style="min-height: 556px;">
<div class="img-thumbnail product">
@@ -24,7 +26,7 @@
<?php endif; ?>
<?php if(isset($ele->linkto['featured']) && !empty($ele->linkto['featured'][0]) ): ?>
- <div class="label featured_label en"><strong>featured</strong></div>
+ <div class="label featured_label en"><strong><?php echo __('featured')?></strong></div>
<?php endif; ?>
<!-- <div class="label top_label en"><strong>best sellers</strong></div> -->
@@ -50,21 +52,35 @@
<div><?php echo substr(strip_tags($ele->GetDescription()),0,170).'..'; ?>
</div>
</div>
- <?php if($load->module !='child' || ( $load->module =='child' && tep_not_null($themodule->module_db->title) ) ) : ?>
+ <?php if($load->module !='child' || ( $load->module =='child' && !tep_not_null($themodule->module_db->title) ) ) : ?>
<div class="table">
- <table><tbody><tr class="first">
- <td class="td_left"><?= __('model') ?>:</td>
- <td class="td_right"><?php echo $ele->GetModel(); ?></td>
- </tr><tr>
- <td class="td_left"><?= __('manufacturer') ?>:</td>
- <td class="td_right"><a href="http://www.responsive-shops.org/osc/tstore/31/index.php/brand-name-m-1">Brand Name 1</a></strong></td>
- </tr> <tr>
- <td class="td_left"><?= __('quantity') ?>:</td>
- <td class="td_right"><?php echo $ele->GetQuantity() ?></td>
- </tr><tr class="last">
- <td class="td_left"><?= __('weight') ?>:</td>
- <td class="td_right"><?php echo $ele->GetWeight() ?></td>
- </tr></tbody></table>
+ <table>
+ <tbody>
+ <tr class="first">
+ <td class="td_left"><?= __('model') ?>:</td>
+ <td class="td_right"><?php echo $ele->GetModel(); ?></td>
+ </tr>
+
+ <?php if(isset($ele->linkto['manufacturer']) && !empty($ele->linkto['manufacturer'][0]) ):
+ $ObjManufacturer = manufacturer::get_item($ele->linkto['manufacturer'][0]);
+ ?>
+ <tr>
+ <td class="td_left"><?= __('manufacturer') ?>:</td>
+ <td class="td_right"><a href="<?= $ObjManufacturer->GetHref() ?>"><?= $ObjManufacturer->GetName() ?></a></strong></td>
+ </tr>
+ <?php endif; ?>
+ <tr>
+ <td class="td_left"><?= __('quantity') ?>:</td>
+ <td class="td_right"><?php echo $ele->GetQuantity() ?></td>
+ </tr>
+ <?php if( !in_array( $ele->GetType(), explode(',',TYPE_VIRTUAL_PRODUCTS) ) ) : ?>
+ <tr class="last">
+ <td class="td_left"><?= __('weight') ?>:</td>
+ <td class="td_right"><?php echo $ele->GetWeight() ?></td>
+ </tr>
+ <?php endif; ?>
+ </tbody>
+ </table>
</div>
<?php endif; ?>
<div class="row_02">
@@ -81,20 +97,29 @@
<?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->GetId())) == 0): ?>
<?php echo tep_draw_form($themodule->id.'cart_quantity'.$ele->GetId(), tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=add_product'), 'post', ' class="addcart"'); ?>
- <?php echo tep_draw_hidden_field('products_id', $ele->GetId()). tep_draw_hidden_field('products_quantity', '1'); ?>
- <?php endif; ?>
+ <?php echo tep_draw_hidden_field('products_id', $ele->GetId()). tep_draw_hidden_field('products_quantity', '1'); ?>
<strong class="button_content button_content1">
<strong class="button bg_button button1">
- <a class="btn btn-default button1" role="button" href="<?php echo $ele->GetHref() ?>" onclick="this.form.submit()" >
+ <a class="btn btn-default button1" role="button" onclick="document.forms['<?php echo $themodule->id.'cart_quantity'.$ele->GetId() ?>'].submit(); " >
<span class="ui-button-text">
<?php echo __('add to cart') ?>
</span>
</a>
</strong>
</strong>
- <?php if (_test_bool($ele->action['buy'] ) && count(product_attribut_info($ele->GetId())) == 0): ?>
</form>
- <?php endif; ?>
+ <?php else: ?>
+ <strong class="button_content button_content1">
+ <strong class="button bg_button button1">
+ <a class="btn btn-default button1" role="button" href="<?php echo $ele->GetHref() ?>" >
+ <span class="ui-button-text">
+ <?php echo __('add to cart') ?>
+ </span>
+ </a>
+ </strong>
+ </strong>
+ <?php endif; ?>
+
<strong class="button_content button_content2">
<strong class="button bg_button button2">
Modified: trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php
===================================================================
--- trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php 2016-04-26 09:05:35 UTC (rev 5315)
+++ trunk/catalog/templates/defaut/includes/boxes/recently_viewed_content.php 2016-04-26 12:00:41 UTC (rev 5316)
@@ -48,24 +48,15 @@
foreach ($rec_products as $recent) {
if (strlen($recent) >0 && $count<=$page->_conf_value('MAX_DISPLAY_RECENTLY_VIEWED') && ( !isset($_GET['content']) || (isset($_GET['content']) && (int)$_GET['content'] !=$recent)) ) {
- $count++;
+ $count++;
- $obj = content::get_item((int)$recent, true);
-
- $tmp = new stdClass;
- $tmp->type = $type;
- $tmp->name = $obj->title;
- $tmp->title = $obj->title;
- $tmp->href = $obj->href;
- $tmp->image = $obj->orginial;
- $tmp->price = false ;
-
- $list[] = $tmp;
+ $obj = content::get_item((int)$recent, true);
+ $list[] = $obj;
}
}
- if($count<=0)
- return false;
+ if($count<=0)
+ return false;
/**
@remarks Transmit var array for master construtor boxes
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|