Textpattern CMS support forum

You are not logged in. Register | Login | Help

#891 2018-12-12 15:17:26

trenc
Plugin Author
From: Cologne
Registered: 2008-02-27
Posts: 562
Website

Re: yab_shop (simple textpattern shop with paypal support)

Oh thanks Kris for pointing out. I really should check my plugins against new TXP versions.

But here’s the bugfx for TXP 4.7.1: yab_shop v0.8.4

Offline

#892 2019-02-15 18:47:51

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,245
Website

Re: yab_shop (simple textpattern shop with paypal support)

This following changes seems to avoid Specified key was too long; max key length is 1000 bytes error message on installation (within TXP 4.7.2):

CREATE TABLE `yab_shop_prefs` (
				`prefs_id` int(11) NOT NULL,
				`name` varchar(170) NOT NULL,
				`val` varchar(20) NOT NULL default '',
				`type` smallint(5) unsigned NOT NULL default '1',
				`event` varchar(18) NOT NULL default 'shop_prefs',
				`html` varchar(64) NOT NULL default 'text_input',
				`position` smallint(5) unsigned NOT NULL default '0',
				UNIQUE KEY `prefs_idx` (`prefs_id`,`name`),
				KEY `name` (`name`))

And into the yab_shop_admin file the “Save” button:

$out .= n.'</tbody>'.n.endTable().
		graf(fInput('submit', 'Submit', gTxt('save_button'), 'publish').$submit).
		n.n.'</form></div>';

Can be changed by:

$out .= n.'</tbody>'.n.endTable().
		graf(fInput('submit', 'Submit', gTxt('save'), 'publish').$submit).
		n.n.'</form></div>';

Offline

#893 2019-02-27 03:50:52

arellanon
New Member
From: San Jose, CA
Registered: 2019-02-26
Posts: 7
Website

Re: yab_shop (simple textpattern shop with paypal support)

If this works it will be great. So far the databases won’t load. I installed yab_shop v0.8.4 followed the instructions hit save and only the preferences are saved. Do I need to change the code as described above or is all the updates in the current release? I searched the code and could not find “CREATE TABLE `yab_shop_prefs` ( “ so which code do I replace it with.


Regards, Nick

Offline

#894 2019-02-27 10:47:25

jakob
Moderator
From: Germany
Registered: 2005-01-20
Posts: 3,347
Website

Re: yab_shop (simple textpattern shop with paypal support)

You’ll find that bit in the code here.

The bits that Pat changed are I think just the numbers after varchar. If your database is set to utf8mb4, you can run into the Specified key was too long… error and one way of resolving that is not making the variable character fields so long if they don’t need to be 255 characters.

The other code was here and just makes the button text display properly.

If it didn’t install for another reason, see if you can provide the plugin author with more information on what you’ve done (e.g. installed plugin and activated it) along with any error message you got.

Trenc is still around but only visits the forum irregularly so you might want to mail him if you need direct assistance.


TXP Builders – finely-crafted code, design and txp

Offline

#895 2019-02-27 17:11:49

trenc
Plugin Author
From: Cologne
Registered: 2008-02-27
Posts: 562
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi guys,

thanks Patrick for the code and the hint.

So here is a bugfix release: yab_shop_0.8.5.tar.gz

Changed:
  • bugfix: 4.7-ready save button
  • bugfix: MySQL yab_shop_prefs name and val varchar size changed to 191 to prevent hitting the limit. It’s now safe for InnoDB and utf8mb4 (767 bytes)

Offline

#896 2019-02-28 01:43:59

arellanon
New Member
From: San Jose, CA
Registered: 2019-02-26
Posts: 7
Website

Re: yab_shop (simple textpattern shop with paypal support)

Thank you for updating your plugin. It works on 7.2 PHP and TP 4.7.3. I see how it is developed to be it’s own website as explained in your instructions. Before I go that route, I really want to make the store as part of my existing site. I have been experimenting, but I haven’t come up with the perfect solution yet. What advice would you have to make this happen?


Regards, Nick

Offline

Board footer

Powered by FluxBB