How to change default currency in Crinsane/LaravelShoppingcart?
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.
php laravel shopping-cart
add a comment |
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.
php laravel shopping-cart
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09
add a comment |
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.
php laravel shopping-cart
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.
php laravel shopping-cart
php laravel shopping-cart
asked Nov 17 '18 at 10:04
PSNPSN
1,22021132
1,22021132
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09
add a comment |
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09
add a comment |
1 Answer
1
active
oldest
votes
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.)
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53350174%2fhow-to-change-default-currency-in-crinsane-laravelshoppingcart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.)
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
add a comment |
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.)
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
add a comment |
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.)
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.)
answered Nov 17 '18 at 14:08
Oleg NurutdinovOleg Nurutdinov
352213
352213
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
add a comment |
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
Thank you. :) I didn't think of that .
– PSN
Nov 17 '18 at 14:20
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53350174%2fhow-to-change-default-currency-in-crinsane-laravelshoppingcart%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi, do you sure this package has a default currency? I think it has only a value of price.
– Oleg Nurutdinov
Nov 17 '18 at 10:38
In my case, when I use this package, I only strore the user cart without currency and shows information about cart for user with utf-8 currency symbol.
– Oleg Nurutdinov
Nov 17 '18 at 10:40
@OlegNurutdinov Can you provide a detailed answer?
– PSN
Nov 17 '18 at 12:32
check my answer, hope it helps.)
– Oleg Nurutdinov
Nov 17 '18 at 14:09