- Posts: 1421
- Thank you received: 234
Item aditional info in Datafeed for Joomla 3.x
8 years 11 months ago #3367
by bram
Replied by bram on topic Item aditional info in Datafeed for Joomla 3.x
I just tested the first code sniplet from
affiliatefeeds.nl/datafeeds-configuratio...ml?limitstart=0#3327
I replaced the code
with the code in the first box.
resulting in j3.gryla.eu/normaal
I replaced the code
Code:
echo $item['description'];
if ( $product_price > 0 ) {
print '<p class="prijs"><span>'.$currency.' '.money_format('%!.2n', $product_price).'</span></p>';
}
Code:
<?php // no direct acce
defined('_JEXEC') or die('Restricted access');
echo '<div id="com_datafeeds">';
#
# Copyright brambring.nl
# https://www.affiliatefeeds.nl
# joomla@brambring.nl
#
if ($this->pagination ) {
$links= $this->pagination->getPagesLinks();
echo '<div class="pagination" id="datafeeds_top">'.$links.'</div>';
}
echo '<div class="datafeeds_clear">';
$zebra=0;
@$field1=$this->where['fields'][1];
@$field2=$this->where['fields'][2];
@$field3=$this->where['fields'][3];
$currency=$this->where['currency_sign'];
$baselink=$this->where['baselink'];
foreach ( $this->dataitems as $item ) {
$zebra++;
$alt=df_alt($item['title']);
$product_price=$item['Prijs'];
?>
<div class="datafeeds dfzebra<?php echo $zebra%2?>">
<h2><a target="_blank" class="dflink" href="<?php echo $item['url'];?>" rel="nofollow"><?php echo $item['title'];?></a></h2>
<div class='datafeeds_description'>
<?php
echo '<div class="prijs">€'.$product_price.'</div>';
@$x=$item['Select6']; # contains old price
if ($x > $item['Prijs']) {
print '<h2>Aanbieding</h2><div class="prijs sale">oude prijs: ' . money_format('%!.2n', $x).'</div>';
}
$list=array();
if ( @$item['Select4'] ) { $list[]='Merk : ' . $item['Select4']; } # replace according your mapping
if ( @$item['Select5'] ) { $list[]='Kleur : ' . $item['Select5']; }
if ( @$item['Select8'] ) { $list[]='Model : ' . $item['Select8']; }
if ( @$item['Select7'] ) { $list[]='Materiaal : ' . $item['Select7']; }
if ( count($list) ) {
echo '<ul class="product"><li>'.join('</li><li>',$list).'</li></ul>';
}
?>
<p class="datafeeds_more">
<a class="dflink" href="<?php echo $item['url'];?>" target="_blank" rel="nofollow" title="<?php echo $alt;?>"><?php echo $this->more_text?></a>
</p>
<span class="datafeeds_bread">
<?php
if ( @$s1=$item[$field1]) {
print ' <a href="'.JRoute::_( $baselink."&". make_urlencoded(array("q1"=>$s1))).'">'.$s1.'</a>';
}
if ( @$s2=$item[$field2] ) {
print ' <a href="'.JRoute::_( $baselink."&". make_urlencoded(array("q1"=>$s1,"q2"=>$s2))).'">'.$s2.'</a>';
}
if ( @$s3=$item[$field3] ) {
print ' <a href="'.JRoute::_( $baselink."&". make_urlencoded(array("q1"=>$s1,"q2"=>$s2,"q3"=>$s3))).'">'.$s3.'</a>';
}
?>
</span>
</div>
<a class="dflink" href="<?php echo $item['url'];?>" rel="nofollow" target="_blank">
<img class="datafeeds_img" src="<?php echo $item['image']; ?>" alt="<?php echo $alt;?>" />
</a>
<div class="datafeeds_clear datafeeds_fix"> </div>
</div>
<?php } #foreach ?>
</div>
<?php
if ($this->pagination ) { echo '<div class="pagination" id="datafeeds_bottom">'.$links.'</div>'; }
?>
</div>
resulting in j3.gryla.eu/normaal
Please Log in or Create an account to join the conversation.
8 years 11 months ago #3368
by k.m.1
Replied by k.m.1 on topic Item aditional info in Datafeed for Joomla 3.x
Hallo Bram
Danke für die schnelle Antwort.
Frage: Ich habe die Longdecription in full.php eingefügt diese wird jedoch nicht ganz angezeigt sondern nur max 50 Zeichen.
Wie kann ich ändern das die ganze Longdescription angezeigt wird
Danke für die schnelle Antwort.
Frage: Ich habe die Longdecription in full.php eingefügt diese wird jedoch nicht ganz angezeigt sondern nur max 50 Zeichen.
Wie kann ich ändern das die ganze Longdescription angezeigt wird
Please Log in or Create an account to join the conversation.
8 years 11 months ago #3370
by bram
Replied by bram on topic Item aditional info in Datafeed for Joomla 3.x
not sure,
the current default_full.php doesn't truncate the description.
the current default_full.php doesn't truncate the description.
Please Log in or Create an account to join the conversation.
8 years 11 months ago - 8 years 11 months ago #3371
by k.m.1
Replied by k.m.1 on topic Item aditional info in Datafeed for Joomla 3.x
Hallo Bram
Die automatische Description erscheit bei mir nicht daher habe ich die Longdescription ( bei mir Select 6 ) in der full.php eingefügt.
Hier werden nur ca. 50 Zeichen aufgeführt.
Hier ein Link zur Seite example.de/t-Langarmshirt
Die automatische Description erscheit bei mir nicht daher habe ich die Longdescription ( bei mir Select 6 ) in der full.php eingefügt.
Hier werden nur ca. 50 Zeichen aufgeführt.
Hier ein Link zur Seite example.de/t-Langarmshirt
Code:
$list=array();
if ( @$item['Select6'] ) { $list[]=' ' . $item['Select6']; } # replace according your mapping
if ( @$item['Select5'] ) { $list[]='Brand : ' . $item['Select5']; }
if ( @$item['Select7'] ) { $list[]='Color : ' . $item['Select7']; }
if ( @$item['Select11'] ) { $list[]='Größe : ' . $item['Select11']; }
if ( @$item['Select12'] ) { $list[]='Material : ' . $item['Select12']; }
if ( @$item['Select10'] ) { $list[]='Lieferzeit : ' . $item['Select10']; }
if ( @$item['Select9'] ) { $list[]='Versandkosten : ' . $item['Select9']; }
if ( count($list) ) {
echo '<ul class="product"><li>'.join('</li><li>',$list).'</li></ul>';
}
Last edit: 8 years 11 months ago by k.m.1.
Please Log in or Create an account to join the conversation.
8 years 11 months ago - 8 years 11 months ago #3372
by bram
Replied by bram on topic Item aditional info in Datafeed for Joomla 3.x
ok,
the database field is limited to 50 characters.
you can solve the issue by either assigning the longdescription to the descriprion using a callback filter (better I think)
or changing the database
not sure whether or not varchar is the best option here, maybe text....
the database field is limited to 50 characters.
you can solve the issue by either assigning the longdescription to the descriprion using a callback filter (better I think)
Code:
#add to administror/components/com_datafeeds/cron/feeds.php
function add_long_cb(&$item){
$item['description'].="<br/>".$item['longdescription'];
#or $item['description']=$item['longdescription'];
generic_cb($item);
}
or changing the database
Code:
ALTER TABLE `REPLACE_dataitems` CHANGE `Select6` `Select6` VARCHAR( 2048 )
not sure whether or not varchar is the best option here, maybe text....
Last edit: 8 years 11 months ago by bram.
Please Log in or Create an account to join the conversation.
8 years 11 months ago #3373
by k.m.1
Replied by k.m.1 on topic Item aditional info in Datafeed for Joomla 3.x
Hallo Bram
Wenn ich
in meine feed.php eingebe bekomme ich immer eine weisse Seite
Ich habe auch verschiedene cb z.Beispiel
Shop A function a_cb(&$item){
Shop B function b_cb(&$item){
Shop C function c_cb(&$item){ ...
Die Database habe ich erhöht auf 2048 - Ergebnis: Keine Änderung
Geändert auf TEXT - Ergebnis: Keine Änderung
Verschiedenes Verucht: Keine Änderung
Wenn ich
Code:
#add to administror/components/com_datafeeds/cron/feeds.php
function add_long_cb(&$item){
$item['description'].="<br/>".$item['longdescription'];
#or $item['description'].$item['longdescription'];
generic_cb($item);
}
Ich habe auch verschiedene cb z.Beispiel
Shop A function a_cb(&$item){
Shop B function b_cb(&$item){
Shop C function c_cb(&$item){ ...
Die Database habe ich erhöht auf 2048 - Ergebnis: Keine Änderung
Geändert auf TEXT - Ergebnis: Keine Änderung
Verschiedenes Verucht: Keine Änderung
Please Log in or Create an account to join the conversation.
Time to create page: 0.628 seconds