Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#541 2010-12-10 19:53:14

evan
Member
Registered: 2010-01-31
Posts: 16

Re: yab_shop (simple textpattern shop with paypal support)

if anyone is interested in having their special shipping for multiple items multiply accordingly, add this line to yab_shop_core in the yab_shop_shipping_costs() function:

function yab_shop_shipping_costs()
{
	$cart =& $_SESSION['wfcart'];
	$sub_total = $cart->total;
	$shipping_costs = yab_shop_replace_commas(yab_shop_config('shipping_costs'));
	$free_shipping = yab_shop_replace_commas(yab_shop_config('free_shipping'));
	if (yab_shop_config('custom_field_shipping_name') != '')
	{
		$special_cost = 0.00;
		foreach ($cart->get_contents() as $item)
		{
			$special_cost += yab_shop_replace_commas($item['spec_shipping']);
			//****** ADD THIS BELOW LINE HERE: ******
			$special_cost = $item['qty'] * $special_cost;
		}
		$shipping_costs += $special_cost;
	}
	if ($sub_total >= $free_shipping)
	{
		$shipping_costs = 0.00;
	}
	return $shipping_costs;
}

Last edited by evan (2010-12-10 19:57:29)

Offline

#542 2011-02-05 23:48:32

chume
Member
Registered: 2009-12-03
Posts: 27

Re: yab_shop (simple textpattern shop with paypal support)

I was wondering if anyone knows the status of this plug-in and whether it is still actively worked on because the last post occurred in 2010?
Thank you.

Offline

#543 2011-02-08 12:33:02

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: yab_shop (simple textpattern shop with paypal support)

Hi,
I seem to be having an error with my Private cert. It brings an error up:

Fatal error: Call to undefined function openssl_x509_check_private_key() in /public_html/admin/lib/txplib_misc.php(594) : eval()’d code on line 338

Any reasons why its doing this.
I tested using a .txt file in place on the private.pem file and it passes over to Paypal so something is wrong somehow.

Hope someone can help me here.

Cheers
Mike

Offline

#544 2011-02-08 13:21:06

chume
Member
Registered: 2009-12-03
Posts: 27

Re: yab_shop (simple textpattern shop with paypal support)

mfos,
You might want to see if you can open the file(s) in question with a text editor.

Offline

#545 2011-02-08 15:23:50

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: yab_shop (simple textpattern shop with paypal support)

Hi, Yes I can open them in an editor and everything appears okay with them. Still having the same issues though.
Cheers

Last edited by mfos (2011-02-08 15:24:37)

Offline

#546 2011-02-08 16:10:33

chume
Member
Registered: 2009-12-03
Posts: 27

Re: yab_shop (simple textpattern shop with paypal support)

Hi mfos,
You may want to be sure that the path to the file, the ownership and permissions are correct.

Offline

#547 2011-02-09 13:09:16

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: yab_shop (simple textpattern shop with paypal support)

Hi,
All the paths, filenames etc are all correct. I have it working on another site but not on this one.
Cheers

Offline

#548 2011-02-10 09:54:17

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

Hi,
I seem to be having an error with my Private cert. It brings an error up:

Fatal error: Call to undefined function openssl_x509_check_private_key() in /public_html/admin/lib/txplib_misc.php(594) : eval()’d code on line 338

Hi mfos,

seems that your PHP is not compiled with the OpenSSL extension or some function of these are disabled.

Create a file – say info.php – on your hosting with the following content:

<?php
        phpinfo();
?>

Open this in your browser an have a look at the output. At the »Configure Command« section there have to be a command that looks like this:

--with-openssl=<some dir here>

And if your scroll down there have to be a section »openssl« where OpenSSL support have to be enabled.

If not, you must ask your provider to enable/install the PHP OpenSSL extension.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#549 2011-02-10 18:56:29

chume
Member
Registered: 2009-12-03
Posts: 27

Re: yab_shop (simple textpattern shop with paypal support)

Hello Trenc,

How would the yab_special_promo be applied to individual items based on <txp:ign_user_info type=“name” />?
I will appreciate a hint on how to do this.
Thank you.

Last edited by chume (2011-02-10 19:12:18)

Offline

#550 2011-02-11 08:42:35

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

The promotional discount can’t be placed on individual items, it only works on a global context. All items are included in the discount.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#551 2011-02-11 12:46:52

chume
Member
Registered: 2009-12-03
Posts: 27

Re: yab_shop (simple textpattern shop with paypal support)

Trenc,

Thank you for taking your time to respond.

Offline

#552 2011-02-24 11:14:11

AndrijaM
Member
From: Belgrade, Serbia
Registered: 2007-12-22
Posts: 190
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hello Trenc,

could you please add suport for another currency: serbian “dinar”, it is “dinara” in plural, like 552,00 dinara

Best Regards,

Andrija

Offline

Board footer

Powered by FluxBB