[Skip to main content](#vessel-content)

#   product display page (listing tabel view)

##

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago [\#163703](#163703) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#163703 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")* was created by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")*

* @package HikaShop for Joomla!
* @version 2.3.1

Hi,

Working with a product listing table i encountered a problem.
Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view.
On the forum i found a (almost) solution for my problem, but it is still not working as it should.

Enclosed is a pict. from the generated view including php code and VAR_dump. As you probably will see, i need some help.
The solution i found was from Xavier :

$prodClass = hikashop_get('class.product');
$prodClass-&gt;getProducts($this-&gt;row-&gt;product_id);
echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products[1]-&gt;prices[0]-&gt;price_value,4);
echo '&lt;/td&gt;&lt;td&gt;';
echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products[1]-&gt;prices[1]-&gt;price_value,4);

But the result is still (value of 0) for secondary prices (bulk prices).
If i change (see pict) prices[1] to prices[250] it will give the correct number, otherwise the value is 0.
The thing is, that not every product has the same bulk prices!

Product (a), size (10x10x10) list price (10), per 50(7), per 100(5)
product (b), size (10x15x10) list price (15), per 25(10), per 50(![8)](/media/kunena/emoticons/2.png "8)"), per 100(5)

in my example (pict) the price per 15 and 25 are not in the list.
Any advise is welcome.

Richard

- [ ![h84eec9d.jpg](/forum/attachment/18382) ](/forum/attachment/18382 "h84eec9d.jpg") [ ](/forum/attachment/18382?download=1 "h84eec9d.jpg")
- [ ![h3998510.jpg](/forum/attachment/18383) ](/forum/attachment/18383 "h3998510.jpg") [ ](/forum/attachment/18383?download=1 "h3998510.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago [\#163705](#163705) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#163705 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

So what need to be done is something like:

Code:

if(isset($this-&gt;row-&gt;prices[15]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo '&lt;td&gt;&lt;/td&gt;'; }else{ echo '&lt;td&gt;&lt;/td&gt;'; } if(isset($this-&gt;row-&gt;prices[25]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo '&lt;td&gt;&lt;/td&gt;'; }else{ echo '&lt;td&gt;&lt;/td&gt;'; } if(isset($this-&gt;row-&gt;prices[50]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo '&lt;td&gt;&lt;/td&gt;'; }else{ echo '&lt;td&gt;&lt;/td&gt;'; } if(isset($this-&gt;row-&gt;prices[100]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format($this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo '&lt;td&gt;&lt;/td&gt;'; }else{ echo '&lt;td&gt;&lt;/td&gt;'; }

etc.

This way if the price exist, it is displayed, else not.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago [\#163816](#163816) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#163816 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi Xavier,

I tried your solution and it (partly) worked. (See enclosed pict 001) The problem is that a number of products have different bulk amounts.

example:
product a : 1, 250, 500, 1000, 3200
product a1: 1, 100, 250, 500,1000, 2400
product b: 1, 6, 12, 18, 24
product c: 1, 36, 72, 180, 288

In other words, I can only place a max of 9 (th) header/bulk amounts in the view and therefore i can't show all bulk prices! See enclosed pict 002.

I therefore have the following question:

a) Is it possible to make different headers in the table list view, based upon for instance a product-range? Like Code 100.005 to 100.130 (bulk-range) header001, 100.140 to 100.235 (bulk-range) header002 etc. In this case, working with 1 table list view will give a lot of possibilities.

[ ![hebe59f1.jpg](/forum/attachment/18403) ](/forum/attachment/18403 "hebe59f1.jpg")

[ ![h30aba2f.jpg](/forum/attachment/18404) ](/forum/attachment/18404 "h30aba2f.jpg")

Thanks in advanced

Richard

- [ ![hebe59f1.jpg](/forum/attachment/18403) ](/forum/attachment/18403 "hebe59f1.jpg") [ ](/forum/attachment/18403?download=1 "hebe59f1.jpg")
- [ ![h30aba2f.jpg](/forum/attachment/18404) ](/forum/attachment/18404 "h30aba2f.jpg") [ ](/forum/attachment/18404?download=1 "h30aba2f.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#163818](#163818) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#163818 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

So you should not use hard coded values but you have to list the keys in "row-&gt;prices" to get all values of all products in the current listing.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 3 months ago [\#164097](#164097) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164097 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi Jerome,

Thanks for the reply.

I'm currently using the following code for the view: Code:

if(isset($this-&gt;row-&gt;prices[50]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[50]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[100]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[100]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[150]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[150]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; }

Can you give me an example of what your solution would look like?
Thanks,

Last edit: 12 years 3 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: [code] is nice !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 3 months ago [\#164151](#164151) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164151 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

You can use a more dynamic algorithm. It requires some development/PHP skills. Code:

$this-&gt;all_price_quantities = array(50,100,150,200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; }

It idea is to fill the array "$values" with all possible values.
You have to fill the array in the view you can access to all rows.
So you can extra all array keys from the $rows[...]-&gt;prices

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 3 months ago [\#164270](#164270) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164270 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

The dynamic algorithm is a better approach for this problem, but i'm still stuck with the table header (theader) where
The table header equals the price_min_quantity. For now I use a fixed header f.i. 1, 50, 100, 150, 250, 500, 1000, 2400, 3200 like
Code:

&lt;th class="hikashop_product_staffel_title" align="center"&gt; &lt;?php echo JText::_('50st');?&gt; &lt;/th&gt; &lt;th class="hikashop_product_staffel_title" align="center"&gt; &lt;?php echo JText::_('100st'); ?&gt; &lt;/th&gt; &lt;th class="hikashop_product_staffel_title" align="center"&gt; &lt;?php echo JText::_('150st'); ?&gt;

Example: A

price_product_id price_min_quantity Price_value
25 1 0,43
25 250 0,31
25 500 0,25
.. ........... ............etc.

Brings me to my problem. In case of example B, the table header is still 1, 50, 100, 150, 250, 500, 1000, 2400, 3200 but the values of price_min_quantity are:

Example: B

price_product_id price_min_quantity Price_value
64 1 1,43
64 6 1,31
64 12 1,25
.. ........... ............etc.

You can see my problem here. Perhaps there is a possibility to make the &lt;th text variable or in relation to price_product_id?

Example:

Hope you can help me. Done excellent so far.

Regards,

Last edit: 12 years 3 months ago by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile"). Reason: removed table

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago [\#164274](#164274) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164274 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

For the header part, you can use: Code:

$this-&gt;all_price_quantities = array(6,12,50,100,150,200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $qty; } echo '&lt;/th&gt;&lt;th&gt;'; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago [\#164367](#164367) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164367 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

With your solution i'm getting on the right track, but I still encountered a problem in the view.

Source: Code:

&lt;?php /****************************************************************/ /******************** table view header *******************/ /****************************************************************/ $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $qty; } echo '&lt;/th&gt;&lt;th&gt;'; } /****************************************************************/ ?&gt;

With result: LIST VIEW-A.jpg
In this case there are no headers! Only corresponding values.

Just to check, i used the following code: Code:

&lt;?php /****************************************************************/ /******************** table view header *******************/ /****************************************************************/ $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $qty; } echo '&lt;/th&gt;&lt;th&gt;'; echo $qty; } /****************************************************************/ ?&gt;

That gave the following results: LIST VIEW-B.jpg
In this case i can see all headers from the array, even when there is no value.

I'm confused and on the other hand convinced to leave it to the pro's
So if you could give me the final push, i would be very obliged.

Regards,

- [ ![ha6b5713.jpg](/forum/attachment/18503) ](/forum/attachment/18503 "ha6b5713.jpg") [ ](/forum/attachment/18503?download=1 "ha6b5713.jpg")
- [ ![hdf9cfdb.jpg](/forum/attachment/18504) ](/forum/attachment/18504 "hdf9cfdb.jpg") [ ](/forum/attachment/18504?download=1 "hdf9cfdb.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago -  12 years 3 months ago [\#164372](#164372) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164372 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

Sorry my code was not correct, the values were not loaded.
Thanks to add: Code:

$this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); $toShowQties = array(); foreach($this-&gt;rows as $row){ foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ $toShowQties[$qty] = $qty; } } }

At the top of the file, just after **if(!empty($this-&gt;rows)){**

And use: Code:

foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $qty; } echo '&lt;/th&gt;&lt;th&gt;'; }

For the header part.
And: Code:

foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; }

For the "td" part.

Last edit: 12 years 3 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago [\#164384](#164384) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164384 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

I just tried the solution you gave, with the following results: See pict

Perhaps the complete code will give you an idea what i did?
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.3.1 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(!empty($this-&gt;rows)){ /*****************************************************/ $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); $toShowQties = array(); foreach($this-&gt;rows as $row){ foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ $toShowQties[$qty] = $qty; } } } /****************************************************/ $pagination = $this-&gt;config-&gt;get('pagination','bottom'); if(in_array($pagination,array('top','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_top'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_top"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_top"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;div class="hikashop_products"&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { ?&gt; &lt;form action="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart'); ?&gt;" method="post" name="hikashop_product_form_&lt;?php echo $this-&gt;params-&gt;get('main_div_name'); ?&gt;" enctype="multipart/form-data"&gt; &lt;?php } $columns = 1; ?&gt; &lt;table class="hikashop_products_table adminlist table table-striped table-hover" cellpadding="1"&gt; &lt;thead&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ $columns++; ?&gt; &lt;th class="hikashop_product_image title" align="center"&gt; &lt;?php echo JText::_( 'HIKA_IMAGE' );?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')) { $columns++;?&gt; &lt;th class="hikashop_product_code_title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT_CODE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;th class="hikashop_product_name title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT' );?&gt; &lt;/th&gt; &lt;th class="hikashop_product_quality title" align="center"&gt; &lt;?php echo JText::_( 'Kwaliteit' );?&gt; &lt;/th&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;th class="hikashop_product_vote title" align="center"&gt; &lt;?php echo JText::_('VOTE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php /****************************************************************/ /******************** table view header ************************/ /****************************************************************/ foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $qty; } echo '&lt;/th&gt;&lt;th&gt;'; } /****************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo ($qty); } echo '&lt;/th&gt;&lt;th&gt;'; } echo '&lt;/th&gt;&lt;th&gt;' /****************************************************************/ ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ $columns++; ?&gt; &lt;th class="hikashop_product_price title" align="center"&gt; &lt;?php echo JText::_('P/stuk'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart') &#124;&#124; $this-&gt;params-&gt;get('add_to_wishlist')){ $columns++; ?&gt; &lt;th class="hikashop_product_add_to_cart title" align="center"&gt; &lt;?php echo JText::_( 'Aantal'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { $columns++; ?&gt; &lt;th class="hikashop_product_compare title" align="center"&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tfoot&gt; &lt;tr&gt; &lt;td colspan="&lt;?php echo $columns; ?&gt;"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tfoot&gt; &lt;tbody&gt; &lt;?php foreach($this-&gt;rows as $row){ $this-&gt;row =&amp; $row; $height = $this-&gt;params-&gt;get('image_height'); $width = $this-&gt;params-&gt;get('image_width'); if(empty($height)) $height=$this-&gt;config-&gt;get('thumbnail_y'); if(empty($width)) $width=$this-&gt;config-&gt;get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this-&gt;image-&gt;checkSize($divWidth,$divHeight,$row); $link = hikashop_contentLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product_id.'&amp;name='.$this-&gt;row-&gt;alias.$this-&gt;itemid.$this-&gt;category_pathway,$this-&gt;row); ?&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ ?&gt; &lt;td class="hikashop_product_image_row"&gt; &lt;div style="height:&lt;?php echo $divHeight;?&gt;px;text-align:center;clear:both;" class="hikashop_product_image"&gt; &lt;div style="position:relative;text-align:center;clear:both;width:&lt;?php echo $divWidth;?&gt;px;margin: auto;" class="hikashop_product_image_subdiv"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;"&gt; &lt;?php } $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); $img = $this-&gt;image-&gt;getThumbnail(@$this-&gt;row-&gt;file_path, array('width' =&gt; $this-&gt;image-&gt;main_thumbnail_x, 'height' =&gt; $this-&gt;image-&gt;main_thumbnail_y), $image_options); if($img-&gt;success) { echo '&lt;img class="hikashop_product_listing_image" title="'.$this-&gt;escape(@$this-&gt;row-&gt;file_description).'" alt="'.$this-&gt;escape(@$this-&gt;row-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; } $main_thumb_x = $this-&gt;image-&gt;main_thumbnail_x; $main_thumb_y = $this-&gt;image-&gt;main_thumbnail_y; if($this-&gt;params-&gt;get('display_badges',1)){ $this-&gt;classbadge-&gt;placeBadges($this-&gt;image, $this-&gt;row-&gt;badges, -10, 0); } $this-&gt;image-&gt;main_thumbnail_x = $main_thumb_x; $this-&gt;image-&gt;main_thumbnail_y = $main_thumb_y; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')){ ?&gt; &lt;td class="hikashop_product_code_row"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_code; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_name; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_quality; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } /****************************************************************/ /*********************** table view option [prices]**************/ foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; } /**************************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { ; /**************************************************************** if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; } /****************************************************************/ /* if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[50]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[150]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[150]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[250]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[250]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[500]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[500]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1000]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1000]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1600]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1600]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[2400]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[2400]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[3200]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[3200]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } /*******************************************************************/ if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;td class="hikashop_product_vote_row"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;setLayout('listing_vote'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ ?&gt; &lt;td class="hikashop_product_price_row"&gt; &lt;?php $prodClass = hikashop_get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product_id); echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo (''); echo $this-&gt;row-&gt;price_product_id; ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart')){ ?&gt; &lt;td class="hikashop_product_add_to_cart_row"&gt; &lt;?php $this-&gt;setLayout('add_to_cart_listing'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { if( $this-&gt;params-&gt;get('show_compare') == 1 ) { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;?php $js = 'setToCompareList('.$this-&gt;row-&gt;product_id.',\''.$this-&gt;escape($this-&gt;row-&gt;product_name).'\',this); return false;'; echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_COMPARE_LIST'),'compare',$this-&gt;params,$link,$js,'',0,1,'hikashop_compare_button'); ?&gt; &lt;/td&gt; &lt;?php } else { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;input type="checkbox" class="hikashop_compare_checkbox" id="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" onchange="setToCompareList(&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;,'&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;',this);"&gt;&lt;label for="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;"&gt;&lt;?php echo JText::_('ADD_TO_COMPARE_LIST'); ?&gt;&lt;/label&gt; &lt;/td&gt; &lt;?php } } ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\'); } return false;'; $this-&gt;row = null; $this-&gt;row-&gt;product_quantity = -1; $this-&gt;row-&gt;product_min_per_order = 0; $this-&gt;row-&gt;product_max_per_order = -1; $this-&gt;row-&gt;product_sale_start = 0; $this-&gt;row-&gt;product_sale_end = 0; $this-&gt;row-&gt;prices = array('filler'); $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); if(!empty($this-&gt;ajax) &amp;&amp; $this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } ?&gt; &lt;input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/&gt; &lt;input type="hidden" name="add" value="1"/&gt; &lt;input type="hidden" name="ctrl" value="product"/&gt; &lt;input type="hidden" name="task" value="updatecart"/&gt; &lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt; &lt;/form&gt; &lt;?php } if(in_array($pagination,array('bottom','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_bottom'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_bottom"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_bottom"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;?php } ?&gt;

Regards,

- [ ![h45719af.jpg](/forum/attachment/18506) ](/forum/attachment/18506 "h45719af.jpg") [ ](/forum/attachment/18506?download=1 "h45719af.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago [\#164389](#164389) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164389 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

Thanks to try that code: Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.3.1 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(!empty($this-&gt;rows)){ /*****************************************************/ $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); $toShowQties = array(); foreach($this-&gt;rows as $row){ foreach($this-&gt;all_price_quantities as $qty) { if(isset($row-&gt;prices[$qty]-&gt;price_value)){ $toShowQties[$qty] = $qty; } } } /****************************************************/ $pagination = $this-&gt;config-&gt;get('pagination','bottom'); if(in_array($pagination,array('top','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_top'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_top"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_top"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;div class="hikashop_products"&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { ?&gt; &lt;form action="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart'); ?&gt;" method="post" name="hikashop_product_form_&lt;?php echo $this-&gt;params-&gt;get('main_div_name'); ?&gt;" enctype="multipart/form-data"&gt; &lt;?php } $columns = 1; ?&gt; &lt;table class="hikashop_products_table adminlist table table-striped table-hover" cellpadding="1"&gt; &lt;thead&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ $columns++; ?&gt; &lt;th class="hikashop_product_image title" align="center"&gt; &lt;?php echo JText::_( 'HIKA_IMAGE' );?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')) { $columns++;?&gt; &lt;th class="hikashop_product_code_title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT_CODE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;th class="hikashop_product_name title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT' );?&gt; &lt;/th&gt; &lt;th class="hikashop_product_quality title" align="center"&gt; &lt;?php echo JText::_( 'Kwaliteit' );?&gt; &lt;/th&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;th class="hikashop_product_vote title" align="center"&gt; &lt;?php echo JText::_('VOTE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php /****************************************************************/ /******************** table view header ************************/ /****************************************************************/ foreach($toShowQties as $qty) { echo $qty; echo '&lt;/th&gt;&lt;th&gt;'; } /****************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo ($qty); } echo '&lt;/th&gt;&lt;th&gt;'; } echo '&lt;/th&gt;&lt;th&gt;' /****************************************************************/ ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ $columns++; ?&gt; &lt;th class="hikashop_product_price title" align="center"&gt; &lt;?php echo JText::_('P/stuk'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart') &#124;&#124; $this-&gt;params-&gt;get('add_to_wishlist')){ $columns++; ?&gt; &lt;th class="hikashop_product_add_to_cart title" align="center"&gt; &lt;?php echo JText::_( 'Aantal'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { $columns++; ?&gt; &lt;th class="hikashop_product_compare title" align="center"&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tfoot&gt; &lt;tr&gt; &lt;td colspan="&lt;?php echo $columns; ?&gt;"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tfoot&gt; &lt;tbody&gt; &lt;?php foreach($this-&gt;rows as $row){ $this-&gt;row =&amp; $row; $height = $this-&gt;params-&gt;get('image_height'); $width = $this-&gt;params-&gt;get('image_width'); if(empty($height)) $height=$this-&gt;config-&gt;get('thumbnail_y'); if(empty($width)) $width=$this-&gt;config-&gt;get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this-&gt;image-&gt;checkSize($divWidth,$divHeight,$row); $link = hikashop_contentLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product_id.'&amp;name='.$this-&gt;row-&gt;alias.$this-&gt;itemid.$this-&gt;category_pathway,$this-&gt;row); ?&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ ?&gt; &lt;td class="hikashop_product_image_row"&gt; &lt;div style="height:&lt;?php echo $divHeight;?&gt;px;text-align:center;clear:both;" class="hikashop_product_image"&gt; &lt;div style="position:relative;text-align:center;clear:both;width:&lt;?php echo $divWidth;?&gt;px;margin: auto;" class="hikashop_product_image_subdiv"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;"&gt; &lt;?php } $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); $img = $this-&gt;image-&gt;getThumbnail(@$this-&gt;row-&gt;file_path, array('width' =&gt; $this-&gt;image-&gt;main_thumbnail_x, 'height' =&gt; $this-&gt;image-&gt;main_thumbnail_y), $image_options); if($img-&gt;success) { echo '&lt;img class="hikashop_product_listing_image" title="'.$this-&gt;escape(@$this-&gt;row-&gt;file_description).'" alt="'.$this-&gt;escape(@$this-&gt;row-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; } $main_thumb_x = $this-&gt;image-&gt;main_thumbnail_x; $main_thumb_y = $this-&gt;image-&gt;main_thumbnail_y; if($this-&gt;params-&gt;get('display_badges',1)){ $this-&gt;classbadge-&gt;placeBadges($this-&gt;image, $this-&gt;row-&gt;badges, -10, 0); } $this-&gt;image-&gt;main_thumbnail_x = $main_thumb_x; $this-&gt;image-&gt;main_thumbnail_y = $main_thumb_y; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')){ ?&gt; &lt;td class="hikashop_product_code_row"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_code; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_name; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_quality; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } /****************************************************************/ /*********************** table view option [prices]**************/ foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value) echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } /**************************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { ; /**************************************************************** if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; } /****************************************************************/ /* if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[50]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[150]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[150]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[250]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[250]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[500]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[500]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1000]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1000]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1600]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1600]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[2400]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[2400]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[3200]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[3200]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } /*******************************************************************/ if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;td class="hikashop_product_vote_row"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;setLayout('listing_vote'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ ?&gt; &lt;td class="hikashop_product_price_row"&gt; &lt;?php $prodClass = hikashop_get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product_id); echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo (''); echo $this-&gt;row-&gt;price_product_id; ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart')){ ?&gt; &lt;td class="hikashop_product_add_to_cart_row"&gt; &lt;?php $this-&gt;setLayout('add_to_cart_listing'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { if( $this-&gt;params-&gt;get('show_compare') == 1 ) { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;?php $js = 'setToCompareList('.$this-&gt;row-&gt;product_id.',\''.$this-&gt;escape($this-&gt;row-&gt;product_name).'\',this); return false;'; echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_COMPARE_LIST'),'compare',$this-&gt;params,$link,$js,'',0,1,'hikashop_compare_button'); ?&gt; &lt;/td&gt; &lt;?php } else { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;input type="checkbox" class="hikashop_compare_checkbox" id="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" onchange="setToCompareList(&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;,'&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;',this);"&gt;&lt;label for="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;"&gt;&lt;?php echo JText::_('ADD_TO_COMPARE_LIST'); ?&gt;&lt;/label&gt; &lt;/td&gt; &lt;?php } } ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\'); } return false;'; $this-&gt;row = null; $this-&gt;row-&gt;product_quantity = -1; $this-&gt;row-&gt;product_min_per_order = 0; $this-&gt;row-&gt;product_max_per_order = -1; $this-&gt;row-&gt;product_sale_start = 0; $this-&gt;row-&gt;product_sale_end = 0; $this-&gt;row-&gt;prices = array('filler'); $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); if(!empty($this-&gt;ajax) &amp;&amp; $this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } ?&gt; &lt;input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/&gt; &lt;input type="hidden" name="add" value="1"/&gt; &lt;input type="hidden" name="ctrl" value="product"/&gt; &lt;input type="hidden" name="task" value="updatecart"/&gt; &lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt; &lt;/form&gt; &lt;?php } if(in_array($pagination,array('bottom','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_bottom'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_bottom"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_bottom"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;?php } ?&gt;

If still not working thanks to give me backend access via pm in order to take more time about this.
thanks to give the url to that topic in the private message.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago -  12 years 3 months ago [\#164488](#164488) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164488 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

Thanks for the update. It 'almost' works perfectly.

I've enclosed a pict of the latest results.

As you can see, for some reason the header is 'mixed up'. The first header-value (e.g. 250) is not placed on the same row as the rest of the header. The corresponding value (0,31) is now underneath the header 500 instead of 250.

Too make sure i didn't make any typo's i enclosed the code. Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.3.1 * @author hikashop.com * @copyright (C) 2010-2014 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;?php if(!empty($this-&gt;rows)){ /*****************************************************/ $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); $toShowQties = array(); foreach($this-&gt;rows as $row){ foreach($this-&gt;all_price_quantities as $qty) { if(isset($row-&gt;prices[$qty]-&gt;price_value)){ $toShowQties[$qty] = $qty; } } } /****************************************************/ $pagination = $this-&gt;config-&gt;get('pagination','bottom'); if(in_array($pagination,array('top','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_top'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_top"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_top"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;div class="hikashop_products"&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { ?&gt; &lt;form action="&lt;?php echo hikashop_completeLink('product&amp;task=updatecart'); ?&gt;" method="post" name="hikashop_product_form_&lt;?php echo $this-&gt;params-&gt;get('main_div_name'); ?&gt;" enctype="multipart/form-data"&gt; &lt;?php } $columns = 1; ?&gt; &lt;table class="hikashop_products_table adminlist table table-striped table-hover" cellpadding="1"&gt; &lt;thead&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ $columns++; ?&gt; &lt;th class="hikashop_product_image title" align="center"&gt; &lt;?php echo JText::_( 'HIKA_IMAGE' );?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')) { $columns++;?&gt; &lt;th class="hikashop_product_code_title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT_CODE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;th class="hikashop_product_name title" align="center"&gt; &lt;?php echo JText::_( 'PRODUCT' );?&gt; &lt;/th&gt; &lt;th class="hikashop_product_quality title" align="center"&gt; &lt;?php echo JText::_( 'Kwaliteit' );?&gt; &lt;/th&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;th class="hikashop_product_vote title" align="center"&gt; &lt;?php echo JText::_('VOTE'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php /****************************************************************/ /******************** table view header ************************/ /****************************************************************/ foreach($toShowQties as $qty) { echo $qty; echo '&lt;/th&gt;&lt;th&gt;'; } /****************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo ($qty); } echo '&lt;/th&gt;&lt;th&gt;'; } echo '&lt;/th&gt;&lt;th&gt;' /****************************************************************/ ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ $columns++; ?&gt; &lt;th class="hikashop_product_price title" align="center"&gt; &lt;?php echo '&lt;/th&gt;&lt;th&gt;'; ?&gt; &lt;?php echo JText::_('P/stuk'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart') &#124;&#124; $this-&gt;params-&gt;get('add_to_wishlist')){ $columns++; ?&gt; &lt;th class="hikashop_product_add_to_cart title" align="center"&gt; &lt;?php echo JText::_( 'Aantal'); ?&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { $columns++; ?&gt; &lt;th class="hikashop_product_compare title" align="center"&gt; &lt;/th&gt; &lt;?php } ?&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tfoot&gt; &lt;tr&gt; &lt;td colspan="&lt;?php echo $columns; ?&gt;"&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tfoot&gt; &lt;tbody&gt; &lt;?php foreach($this-&gt;rows as $row){ $this-&gt;row =&amp; $row; $height = $this-&gt;params-&gt;get('image_height'); $width = $this-&gt;params-&gt;get('image_width'); if(empty($height)) $height=$this-&gt;config-&gt;get('thumbnail_y'); if(empty($width)) $width=$this-&gt;config-&gt;get('thumbnail_x'); $divWidth=$width; $divHeight=$height; $this-&gt;image-&gt;checkSize($divWidth,$divHeight,$row); $link = hikashop_contentLink('product&amp;task=show&amp;cid='.$this-&gt;row-&gt;product_id.'&amp;name='.$this-&gt;row-&gt;alias.$this-&gt;itemid.$this-&gt;category_pathway,$this-&gt;row); ?&gt; &lt;tr&gt; &lt;?php if($this-&gt;config-&gt;get('thumbnail')){ ?&gt; &lt;td class="hikashop_product_image_row"&gt; &lt;div style="height:&lt;?php echo $divHeight;?&gt;px;text-align:center;clear:both;" class="hikashop_product_image"&gt; &lt;div style="position:relative;text-align:center;clear:both;width:&lt;?php echo $divWidth;?&gt;px;margin: auto;" class="hikashop_product_image_subdiv"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;" title="&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;"&gt; &lt;?php } $image_options = array('default' =&gt; true,'forcesize'=&gt;$this-&gt;config-&gt;get('image_force_size',true),'scale'=&gt;$this-&gt;config-&gt;get('image_scale_mode','inside')); $img = $this-&gt;image-&gt;getThumbnail(@$this-&gt;row-&gt;file_path, array('width' =&gt; $this-&gt;image-&gt;main_thumbnail_x, 'height' =&gt; $this-&gt;image-&gt;main_thumbnail_y), $image_options); if($img-&gt;success) { echo '&lt;img class="hikashop_product_listing_image" title="'.$this-&gt;escape(@$this-&gt;row-&gt;file_description).'" alt="'.$this-&gt;escape(@$this-&gt;row-&gt;file_name).'" src="'.$img-&gt;url.'"/&gt;'; } $main_thumb_x = $this-&gt;image-&gt;main_thumbnail_x; $main_thumb_y = $this-&gt;image-&gt;main_thumbnail_y; if($this-&gt;params-&gt;get('display_badges',1)){ $this-&gt;classbadge-&gt;placeBadges($this-&gt;image, $this-&gt;row-&gt;badges, -10, 0); } $this-&gt;image-&gt;main_thumbnail_x = $main_thumb_x; $this-&gt;image-&gt;main_thumbnail_y = $main_thumb_y; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/td&gt; &lt;?php if ($this-&gt;config-&gt;get('show_code')){ ?&gt; &lt;td class="hikashop_product_code_row"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_code; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php } ?&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_name; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } echo $this-&gt;row-&gt;product_quality; if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;td class="hikashop_product_name_row"&gt; &lt;span class="hikashop_product_name"&gt; &lt;?php if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;a href="&lt;?php echo $link;?&gt;"&gt; &lt;?php } /****************************************************************/ /*********************** table view option [prices]**************/ foreach($toShowQties as $qty) { if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)) echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } /**************************************************************** $this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); foreach($this-&gt;all_price_quantities as $qty) { ; if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[$qty]-&gt;price_value,1); } echo '&lt;/td&gt;&lt;td&gt;'; } /****************************************************************/ /* if(isset($this-&gt;row-&gt;prices[$qty]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[50]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[150]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[150]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[250]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[250]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[500]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[500]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1000]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1000]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[1600]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[1600]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[2400]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[2400]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } if(isset($this-&gt;row-&gt;prices[3200]-&gt;price_value)){ echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[3200]-&gt;price_value,1); echo '&lt;/td&gt;&lt;td&gt;'; } else{ echo '&lt;/td&gt;&lt;td&gt;'; } /*******************************************************************/ if($this-&gt;params-&gt;get('link_to_product_page',1)){ ?&gt; &lt;/a&gt; &lt;?php } ?&gt; &lt;/span&gt; &lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;afterProductName)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;afterProductName); } ?&gt; &lt;/td&gt; &lt;?php if($this-&gt;params-&gt;get('show_vote_product')){ ?&gt; &lt;td class="hikashop_product_vote_row"&gt; &lt;?php $this-&gt;row =&amp; $row; $this-&gt;setLayout('listing_vote'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ ?&gt; &lt;td class="hikashop_product_price_row"&gt; &lt;?php $prodClass = hikashop_get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product_id); echo $this-&gt;currencyHelper-&gt;format(@$this-&gt;row-&gt;prices[0]-&gt;price_value,1); echo (''); echo $this-&gt;row-&gt;price_product_id; ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if($this-&gt;params-&gt;get('add_to_cart')){ ?&gt; &lt;td class="hikashop_product_add_to_cart_row"&gt; &lt;?php $this-&gt;setLayout('add_to_cart_listing'); echo $this-&gt;loadTemplate(); ?&gt; &lt;/td&gt; &lt;?php } ?&gt; &lt;?php if(JRequest::getVar('hikashop_front_end_main',0) &amp;&amp; JRequest::getVar('task')=='listing' &amp;&amp; $this-&gt;params-&gt;get('show_compare')) { if( $this-&gt;params-&gt;get('show_compare') == 1 ) { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;?php $js = 'setToCompareList('.$this-&gt;row-&gt;product_id.',\''.$this-&gt;escape($this-&gt;row-&gt;product_name).'\',this); return false;'; echo $this-&gt;cart-&gt;displayButton(JText::_('ADD_TO_COMPARE_LIST'),'compare',$this-&gt;params,$link,$js,'',0,1,'hikashop_compare_button'); ?&gt; &lt;/td&gt; &lt;?php } else { ?&gt; &lt;td class="hikashop_product_compare_row"&gt; &lt;input type="checkbox" class="hikashop_compare_checkbox" id="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;" onchange="setToCompareList(&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;,'&lt;?php echo $this-&gt;escape($this-&gt;row-&gt;product_name); ?&gt;',this);"&gt;&lt;label for="hikashop_listing_chk_&lt;?php echo $this-&gt;row-&gt;product_id;?&gt;"&gt;&lt;?php echo JText::_('ADD_TO_COMPARE_LIST'); ?&gt;&lt;/label&gt; &lt;/td&gt; &lt;?php } } ?&gt; &lt;/tr&gt; &lt;?php } ?&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;?php if ($this-&gt;config-&gt;get('show_quantity_field')&gt;=2) { $this-&gt;ajax = 'if(hikashopCheckChangeForm(\'item\',\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\')){ return hikashopModifyQuantity(\'\',field,1,\'hikashop_product_form_'.$this-&gt;params-&gt;get('main_div_name').'\'); } return false;'; $this-&gt;row = null; $this-&gt;row-&gt;product_quantity = -1; $this-&gt;row-&gt;product_min_per_order = 0; $this-&gt;row-&gt;product_max_per_order = -1; $this-&gt;row-&gt;product_sale_start = 0; $this-&gt;row-&gt;product_sale_end = 0; $this-&gt;row-&gt;prices = array('filler'); $this-&gt;setLayout('quantity'); echo $this-&gt;loadTemplate(); if(!empty($this-&gt;ajax) &amp;&amp; $this-&gt;config-&gt;get('redirect_url_after_add_cart','stay_if_cart')=='ask_user'){ ?&gt; &lt;input type="hidden" name="popup" value="1"/&gt; &lt;?php } ?&gt; &lt;input type="hidden" name="hikashop_cart_type_0" id="hikashop_cart_type_0" value="cart"/&gt; &lt;input type="hidden" name="add" value="1"/&gt; &lt;input type="hidden" name="ctrl" value="product"/&gt; &lt;input type="hidden" name="task" value="updatecart"/&gt; &lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt; &lt;/form&gt; &lt;?php } if(in_array($pagination,array('bottom','both')) &amp;&amp; $this-&gt;params-&gt;get('show_limit') &amp;&amp; $this-&gt;pageInfo-&gt;elements-&gt;total){ $this-&gt;pagination-&gt;form = '_bottom'; ?&gt; &lt;form action="&lt;?php echo hikashop_currentURL(); ?&gt;" method="post" name="adminForm_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;_bottom"&gt; &lt;div class="hikashop_products_pagination hikashop_products_pagination_bottom"&gt; &lt;?php echo $this-&gt;pagination-&gt;getListFooter($this-&gt;params-&gt;get('limit')); ?&gt; &lt;span class="hikashop_results_counter"&gt;&lt;?php echo $this-&gt;pagination-&gt;getResultsCounter(); ?&gt;&lt;/span&gt; &lt;/div&gt; &lt;input type="hidden" name="filter_order_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;value; ?&gt;" /&gt; &lt;input type="hidden" name="filter_order_Dir_&lt;?php echo $this-&gt;params-&gt;get('main_div_name').$this-&gt;category_selected;?&gt;" value="&lt;?php echo $this-&gt;pageInfo-&gt;filter-&gt;order-&gt;dir; ?&gt;" /&gt; &lt;?php echo JHTML::_( 'form.token' ); ?&gt; &lt;/form&gt; &lt;?php } ?&gt; &lt;/div&gt; &lt;?php } ?&gt;

I'm sorry to say that there is no back-end at this moment. Where still on a local development situation, so this is the only way to make any changes at the moment.

Last minute change: I've changed the source regarding to the header and that seems to work. Rest sorting the header/data.Code:

/******************** table view header ************************/ /****************************************************************/ foreach($toShowQties as $qty) { echo $qty; echo '&lt;/th&gt;&lt;th&gt;'; } /****************************************************** changed in: foreach($toShowQties as $qty) { echo '&lt;/th&gt;&lt;th&gt;'; echo $qty; }

As for the view, is it possible to sort the header / data on **low header-value to high header-value**. In that case the view would look better.

As always i'm very grateful for the good professional support.

Regards,

- [ ![h13920c0.jpg](/forum/attachment/18526) ](/forum/attachment/18526 "h13920c0.jpg") [ ](/forum/attachment/18526?download=1 "h13920c0.jpg")

Last edit: 12 years 3 months ago by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile"). Reason: added change

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 3 months ago [\#164610](#164610) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164610 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

Indeed the "&lt;th&gt;" tags were not at the correct place.
Thanks to add: Code:

ksort($toShowQties);

After: Code:

$this-&gt;all_price_quantities = array(5,6,10,12,18,24,36,50,60,72,100,108,140,150,180,250,288,500,600,1000,1200,1600,2400,3200); $toShowQties = array(); foreach($this-&gt;rows as $row){ foreach($this-&gt;all_price_quantities as $qty) { if(isset($row-&gt;prices[$qty]-&gt;price_value)){ $toShowQties[$qty] = $qty; } } }

In order to sort the values as you want.

The following user(s) said Thank You: [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")**
- [![RWouters's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar33356.png)](/forum/user/33356-rwouters "View RWouters's Profile") Topic Author
- [ Offline](/forum/user/33356-rwouters)

Less More

- Posts: 11
- Thank you received: 0
-
-

12 years 3 months ago [\#164624](#164624) by [RWouters](/forum/user/33356-rwouters "View RWouters's Profile")  Replied by *[RWouters](/forum/user/33356-rwouters "View RWouters's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#164624 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi Xavier,

All is working fine. Thanks for the support

Regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")**
- [![b&#95;sz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12026-b-sz "View b&#95;sz's Profile")
- [ Offline](/forum/user/12026-b-sz)

Less More

- Posts: 30
- Thank you received: 0
-
-

12 years 4 weeks ago [\#173517](#173517) by [b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")  Replied by *[b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#173517 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

I would like to ask you.
Table header:
photo of NO; product Name; Price / piece; price&gt; 10 items; price&gt; 50 items; price&gt; 100

There where price 0, then "Call of price"
How can solve
Thank you!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 4 weeks ago [\#173541](#173541) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#173541 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

Sort but I don't really understand your issue, could you please give us more details ?
Through screenshots, or something else ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")**
- [![b&#95;sz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12026-b-sz "View b&#95;sz's Profile")
- [ Offline](/forum/user/12026-b-sz)

Less More

- Posts: 30
- Thank you received: 0
-
-

12 years 4 weeks ago [\#173559](#173559) by [b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")  Replied by *[b\_sz](/forum/user/12026-b-sz "View b&#95;sz's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#173559 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Now it is.

I would like to:
column headings: Column 1: Product name; Column 2: Price 1; Column 3: Price 2; Column 4: Price 3; Column 5: Price 4; Column 6: Cart button
no photo

- [ ![Kategrik&#95;listja&#95;-&#95;Google&#95;Chrome.jpg](/forum/attachment/19865) ](/forum/attachment/19865 "...gle&#95;Chrome.jpg") [ ](/forum/attachment/19865?download=1 "...gle&#95;Chrome.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

12 years 4 weeks ago [\#173569](#173569) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[product display page (listing tabel view)](/forum/26-product-category-display/869638-product-display-page-listing-tabel-view#173569 "&#42; @package HikaShop for Joomla! &#42; @version 2.3.1  Hi,  Working with a product listing table i encountered a problem. Because we are working with products with prices in relation to bulk prices per piece, i want to show the bulk prices in a tabel view. On the forum i found a (almost) solution for my problem, but it is still not working as it should.  Enclosed is a pict. from the generated view including php code and VAR&#95;dump. As you probably will see, i need some help. The solution i found was from Xavier :  $prodClass = hikashop&#95;get('class.product'); $prodClass-&gt;getProducts($this-&gt;row-&gt;product&#95;id); echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;0&#93;-&gt;price&#95;value,4); echo ''; echo $this-&gt;currencyHelper-&gt;format(@$prodClass-&gt;products&#91;1&#93;-&gt;prices&#91;1&#93;-&gt;price&#95;value,4);  But the result is still (value of 0) for secondary prices (bulk prices). If i change (see pict) prices&#91;1&#93; to prices&#91;250&#93; it will give the correct number, otherwise the value is 0. The thing is, that not every product has the same bulk prices!  Product (a), size (10x10x10) list price (10), per 50(7), per 100(5) product (b), size (10x15x10) list price (15), per 25(10), per 50(8), per 100(5)  in my example (pict) the price per 15 and 25 are not in the list. Any advise is welcome.  Richard")*

Hi,

So you have to edit the view "product / listing_table" and do the same editions than RWouters.
With these modifications columns had been added with the desired values.

then you just have to reorder the fields as you want, it's some HTML.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84Njk2MzgtcHJvZHVjdC1kaXNwbGF5LXBhZ2UtbGlzdGluZy10YWJlbC12aWV3P3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.797 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
