Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#553 2011-02-25 09:42:59
Re: yab_shop (simple textpattern shop with paypal support)
Hi Andrija,
for a quick support for the Serbian dinar, please open the plugin code of yab_shop_core
.
Search for the the function yab_shop_currency_out
. Exactly function yab_shop_currency_out($currency, $what, $toform = '')
There are the currencies in it.
Now insert the following code:
case 'RSD':
$out = array(
'cur' => 'Din.',
'toform' => number_format($toform)
);
break;
after an break
statement.
For example between the USD (US dollar) and the GBP (British pound):
case 'USD':
$out = array(
'cur' => '$',
'toform' => number_format($toform, 2)
);
break;
case 'RSD':
$out = array(
'cur' => 'din.',
'toform' => number_format($toform)
);
break;
case 'GBP':
$out = array(
'cur' => '£',
'toform' => number_format($toform, 2)
);
break;
Instead of din.
you can use/write dinara
as you wish. After saving you can use the dinar with RSD
as currency ISO 4717 code in the Yab_Shop_Preferences.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#554 2011-02-25 13:11:30
Re: yab_shop (simple textpattern shop with paypal support)
Thank you very much!
Offline
#555 2011-02-25 16:38:36
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: yab_shop (simple textpattern shop with paypal support)
I am changing the plug-in code of an installation in version 0.5. Which variable provides the subtotal of the checkout table? How do I get the value for this construct?
if($sub_total >= 500.00) {
$postage_normal = "49.00";
$postage_courier = "110.00";
} else {
$postage_normal = "18.50";
$postage_courier = "55.00";
}
Offline
#556 2011-02-25 22:36:04
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: yab_shop (simple textpattern shop with paypal support)
The solution is (for example with ‘netto’):
$sub_total = yab_shop_calculate_sum('netto');
if($sub_total >= 500.00) {
$postage_normal = "49.00";
$postage_courier = "110.00";
} else {
$postage_normal = "18.50";
$postage_courier = "55.00";
}
Offline
#557 2011-03-09 19:47:26
Re: yab_shop (simple textpattern shop with paypal support)
I can’t get it to work :(
I am able to add items to cart, but I have 2 problems:
1. when I’m on checkout page, I can’t remove previously added articles, neither can change quantity. When I click delete article page just refreshes, and nothing changes.
2. I have <txp:yab_shop_add /> in my articles with products, but after adding a product to cart, little cart shows up without <txp:yab_shop_cart />. So if I add <txp:yab_shop_cart /> then I have 2 little carts. This is a problem because I can’t control the first one, meaning I can’t add a headline Your cart like the on the demo site and have a little cart under it.
any help would be much appreciated.
EDIT solved! it looks like the problem was with puting <txp:yab_shop_cart output=“none” /> after <txp:yab_shop_checkout /> on checkout page! When I placed it before, now it works :)
Great plugin :)
Last edited by AndrijaM (2011-03-10 10:05:34)
Offline
#558 2011-03-10 10:04:03
Re: yab_shop (simple textpattern shop with paypal support)
Hi Andrija,
1. when I’m on checkout page, I can’t remove previously added articles, neither can change quantity. When I click delete article page just refreshes, and nothing changes.
Be sure you have placed the <txp:yab_shop_cart />
in the checkout page. If don’t want an output, place it with the output attribute “none”. Eg.: <txp:yab_shop_cart output="none" />
.
I have <txp:yab_shop_add /> in my articles with products, but after adding a product to cart, little cart shows up without <txp:yab_shop_cart />.
I think <txp:yab_shop_cart />
is placed somewhere in your markup. This tag is the only one, which can output a little cart and the only one which can perform the »Add to cart« procedure. You could not add a product to the cart without this tag.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#559 2011-03-10 10:10:37
Re: yab_shop (simple textpattern shop with paypal support)
Trenc, thank you, looks like we posted at the same time :)
I just check again, when I have
<txp:yab_shop_cart output=“none” /> <txp:yab_shop_checkout />
in my checkout page, all fine. But like this
<txp:yab_shop_checkout />
<txp:yab_shop_cart output=“none” />
it gives me problem, I have to click delete 2 times, and if I want to add more items, also have to click twice.
Also probably what you said I had <txp:yab_shop_cart /> somewhere in my markup, I tried a lot of thing to get this to work, can’t remember now what I’ve done all.
Thanks a lot!
Offline
#560 2011-03-10 10:33:00
Re: yab_shop (simple textpattern shop with paypal support)
But like this
<txp:yab_shop_checkout />
<txp:yab_shop_cart output=“none” />it gives me problem, I have to click delete 2 times, and if I want to add more items, also have to click twice.
Edit: Yes <txp:yab_shop_cart output=“none” />
must be placed before the <txp:yab_shop_checkout />
.
Last edited by trenc (2011-03-10 10:35:41)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#561 2011-03-17 19:28:24
- rewQ
- New Member
- Registered: 2011-03-04
- Posts: 5
Re: yab_shop (simple textpattern shop with paypal support)
Hi to all! I have two ideas !
1. Choose item and choose : custom_field 1 (price) 100$+ custom_field2 (shipping) 20$ + custom field3 (Accessories ) 7$ —-> chekout —-> …. Subtotal :127 $
2. Example : if quantity => 3 items ——-> subtotal -7% (use promo automatically )
What do you think about it ? Is it probably to realize?
Offline
#562 2011-04-19 19:43:23
Re: yab_shop (simple textpattern shop with paypal support)
Hope someone can help!
Couple of problems:
1. Everytime I put something in the shopping basket and then go to the checkout nothing seems to be there unless I refresh. http://www.booenterprise.com/shop
Can anyone see what I mean?
2. Is there anyway to control quantity of an item. For example if I only have 10 of an item and then they are all sold out it removes it from the site or something?
Many thanks in advance?
Offline
#563 2011-04-25 20:06:50
- rewQ
- New Member
- Registered: 2011-03-04
- Posts: 5
Re: yab_shop (simple textpattern shop with paypal support)
Check your ways http://www.booenterprise.com/checkout and www.booenterprise.com/checkout are different values ..
Offline
#564 2011-04-26 08:31:56
Re: yab_shop (simple textpattern shop with paypal support)
Hi miles,
1. Everytime I put something in the shopping basket and then go to the checkout nothing seems to be there unless I refresh. http://www.booenterprise.com/shop
Can anyone see what I mean?
Disable the the »Send Last-Modified-Header« in the TXP preferences and try it again!
2. Is there anyway to control quantity of an item. For example if I only have 10 of an item and then they are all sold out it removes it from the site or something?
No sorry, a store or warehouse management is not implemented.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline