I have been implementing a shopping cart in Laravel and I came across this awesome library Crinsane/LaravelShoppingcart
but I want to change the default currency from $
to ₹
. How can I do this? I have searched the whole documentation but couldn't find a way to do this.
If you'll check class Cart in this package (string 89, for example). Where's no attributes on add()
method that say us something about currency usage.
Also, you can see, what this package doesn't have a currency settings on simple example in readme file:
// Add some items in your Controller.
Cart::add('192ao12', 'Product 1', 1, 9.99);
Cart::add('1239ad0', 'Product 2', 2, 5.95, ['size' => 'large']);
.....
<tbody>
<?php foreach(Cart::content() as $row) :?>
<tr>
<td>
<p><strong><?php echo $row->name; ?></strong></p>
<p><?php echo ($row->options->has('size') ? $row->options->size : ''); ?></p>
</td>
<td><input type="text" value="<?php echo $row->qty; ?>"></td>
<td>$<?php echo $row->price; ?></td>
<td>$<?php echo $row->total; ?></td>
</tr>
<?php endforeach;?>
</tbody>
As you can see in two last <td>
used the dollar symbol ($) to show for users this prices are in dollars.
In my case, I used russian roubles utf-8 symbol and shows it in all views which has a price (product, product list, cart, order, etc).
Hope it helps you.)