Author |
Message |
Topic: Check in a foreach if 2 or more items have the same value |
artik
Replies: 5
Views: 19783
|
Forum: General Posted: Tue Mar 08, 2022 2:03 pm Subject: Check in a foreach if 2 or more items have the same value |
https://i.imgur.com/bbTwp3k.png
As you can see, I was able in the third select to sort products that as the same "category_id" from the second one (thanks to your fix)
But in the secon ... |
Topic: Check in a foreach if 2 or more items have the same value |
artik
Replies: 5
Views: 19783
|
Forum: General Posted: Mon Mar 07, 2022 11:51 pm Subject: Check in a foreach if 2 or more items have the same value |
It works, but is there a way to "merge" the products with the same category in te first select ? |
Topic: Check in a foreach if 2 or more items have the same value |
artik
Replies: 5
Views: 19783
|
Forum: General Posted: Fri Mar 04, 2022 7:46 pm Subject: Check in a foreach if 2 or more items have the same value |
HI,
I'm facing a wall when I'm trying to success with the feature I want.
Let's say I have an array:
$products:
Array (4)
0 => Array
prod_id => "1"
categor ... |
Topic: [Solved] Display in same div products with same value |
artik
Replies: 2
Views: 3440
|
Forum: General Posted: Tue May 07, 2019 1:50 pm Subject: [Solved] Display in same div products with same value |
It works perfectly, I had to remove the unexpected "s" from your second line ($OIDs), and it does the job :
{foreach $orders as $n}
{$OID[{$n.order_id}] ... |
Topic: [Solved] Display in same div products with same value |
artik
Replies: 2
Views: 3440
|
Forum: General Posted: Mon May 06, 2019 8:30 pm Subject: [Solved] Display in same div products with same value |
I have a question regarding an array and how to display my infos.
I have 4 products, and 2 of them with the same "order_id".
My $orders:
Array (8)
0 => Array (11) ... |
Topic: [Solved] Getting sum of values in multi dimensional array |
artik
Replies: 4
Views: 9747
|
Forum: General Posted: Mon May 06, 2019 1:05 pm Subject: [Solved] Getting sum of values in multi dimensional array |
Works perfectly, thanks bsmither! |
Topic: [Solved] Getting sum of values in multi dimensional array |
artik
Replies: 4
Views: 9747
|
Forum: General Posted: Sun May 05, 2019 11:46 pm Subject: [Solved] Getting sum of values in multi dimensional array |
thank bsmither, I tried, and here is the error:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/html/theme/header.tpl" on line 19 "{$cart_item_c ... |
Topic: [Solved] Getting sum of values in multi dimensional array |
artik
Replies: 4
Views: 9747
|
Forum: General Posted: Sun May 05, 2019 5:41 pm Subject: [Solved] Getting sum of values in multi dimensional array |
Hi, I'm quite stuck since this afternnon. I tried many ways to get a result (using {count} and many other things I saw on documenttaion and internet) but none of them worked. Here is my infos :
$se ... |
|