Product code in Products->Latest (Menu Link)

24.05.2011 10:33
#1
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Product code in Products->Latest (Menu Link)

Hello,

Where and what do I have to modify in order to have the Product Code (product_ean) display inline after the Product Title in components\com_jshopping\templates\default\products\listproducts.php? I mean like in Product detail view (com_jshopping\templates\default\product\product_default.php)?
Using getEAN() throws an error, also $this->product->product_ean or $curr->product_ean brings nothing. A little hint?

Thank you!


Joomla: 1.5.23
JoomShopping: 2.8.4
PHP: 5.3.3
 
24.05.2011 13:03
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Product code in Products->Latest (Menu Link)

$product->product_ean

 
24.05.2011 13:16
#3
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Aw: Product code in Products->Latest (Menu Link)

In \components\com_jshopping\templates\default\products\listproducts.php, on line 39, I have:
<a href="<?php print $product->product_link?>"><?php print $product->name?></a><?php if ($this->config->show_product_code) { ?> <span class="jshop_code_prod">(<?php print _JSHOP_EAN?>: <span id="product_code"><?php print $product->product_ean?></span>)</span><?php } ?>
but the actual code (product_ean) is not displayed
Aw: Product code in Products->Latest (Menu Link)

 
24.05.2011 14:09
#4
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Product code in Products->Latest (Menu Link)

Works for me.

 
24.05.2011 14:20
#5
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Aw: Product code in Products->Latest (Menu Link)

Sorry, it was my fault.
It does work with Menu->Products->Last products
It doesn't work with Menu->Products->Label->LabelID (the pic provided is for Products->Label menu)

Thank you!

 
24.05.2011 14:58
#6
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Product code in Products->Latest (Menu Link)

change DB Query

\components\com_jshopping\tables\product.php

function getProductLabel(){
...

add in query "prod.product_ean"

 
24.05.2011 15:19
#7
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Aw: Product code in Products->Latest (Menu Link)

Wonderful!
Thank you!

 
24.05.2011 23:13
#8
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Aw: Product code in Products->Latest (Menu Link)

I got this even further :)
One may want to see Product Code in Menu->Products->Label but not on Menu->Product->Last product (example). Here's the solution:
1. Edit \components\com_jshopping\metadata.xml and insert this code:

<params>
<param name="show_prod_code" type="radio" default="1" label="Show Product Code" description="Display product code next to product name">
<option value="0">No</option>
<option value="1">Yes</option>
</param>
</params>

between <products>... </products>, just unde the </url> tag.
2. Edit \components\com_jshopping\templates\default\products\listproducts.php
At line 39 insert this code between <div class="name">... </div> (overwrite existing line39):

<?php
$app = JFactory::getApplication();
$params = $app->getParams();
?>
<a href="<?php print $product->product_link?>"><?php print $product->name?></a><?php if ($params->get('show_prod_code')=='1') { ?> <span class="jshop_code_prod">(<?php print _JSHOP_EAN?>: <span id="product_code"><?php print $product->product_ean?></span>)</span><?php } ?>

Now if you get to Menu manager and try to edit a Joomshopping->Products menuitem, you'll see a new parameter (radio button) - Show Product Code - No / Yes.
Enjoy!

PS: Webdesigner, maybe you may consider to integrate this as standard in a future version


Joomla: 1.5.23
JoomShopping: 2.8.4
PHP: 5.3.3
 
25.05.2011 08:02
#9
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16514
Quote
Aw: Product code in Products->Latest (Menu Link)

Ok

 
25.05.2011 11:11
#10
Onofrei
Joomshopping forum user no avatar
Name: Mihai-Codrut
06.03.2011
Posts: 55
Quote
Aw: Product code in Products->Latest (Menu Link)

webdesigner - 25.05.2011 08:02
Ok

Will you consider also the time-based solution for product labels, as I described it here: http://www.webdesigner-profi.de/joomla-webdesign/joomla-shop/forum/posts/2/1123.html ? I think it would be useful.

Thank you again!

 
11.07.2011 01:44
#11
Leal
Joomshopping forum user no avatar
Name: Vasco
10.07.2011
Posts: 2
Quote
Aw: Product code in Products->Latest (Menu Link)

Hi,
I'm using latest product module as an article, but it only displays in one column and i really need to see it, all free table wide. Can you help me please?

Thanks in advance!


Joomla: 1.5.22
JoomShopping: latest
 
Copyrights MAXXmarketing GmbH. All Rights Reserved