Snaf

Views: 40,727

Results 281 to 298 of 298
1 Jan 2018, 5:07 PM
#281
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Snaf

I wonder if that's a bug in the SNAF init_snaf.php installer, where it's trying to rename/renumber old configuration groups, and now when you're running the installer again it can't find the things it was originally renaming/renumbering.

It looks for "All listing" (not "All Listing", notice the caps).

BTW, the "upgrade" from v1.2 to v1.3 didn't require re-running the init_snaf installer, so bypassing the config.snaf.php file as you suggested, would be fine.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

1 Jan 2018, 5:30 PM
#282
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Snaf

DrByte:

It looks for "All listing" (not "All Listing", notice the caps).

definitely looks like a bug....

i was unaware of this extension, despite having ranted at 1 point about having to maintain 4 different pages for what is essentially a different sql selection.

great idea for an extension and hopefully the ideas contained are part of base v1.6 (i have not looked at it of late...)

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 Jan 2018, 5:33 PM
#283
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Snaf

Thank you carlwhat and DrByte

Being ignorant I would say it is a language problem during installation, as mentioned in my post https://www.zen-cart.com/showthread....naf/page28#276

Following is the result for the search as suggested.

Configuration Listino Generale Tutti i Prodotti - ID Gruppo di Default Attenzione: Modifica questo valore solamente se l'ID Gruppo Tutti i Prodotti è stato modificato dal valore default di 23
Qual è il configuration_group_id per la visualizzazione di Tutti i Prodotti ? PRODUCT_ALL_LIST_GROUP_ID 23

I Guess you know what it says (or supposed to say), anyhow following is the translation

Configuration General Lis/Index All Products - ID of Default Group Attention: Change this value only if the Group ID All Products has been changed from default value of 23
Which is the configuration_group_id for viewing All Products? PRODUCT_ALL_LIST_GROUP_ID 23

1 Jan 2018, 5:46 PM
#284
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Snaf

ok... small mistake on my part in:

https://www.zen-cart.com/showthread.php?191943-Snaf&p=1339757#post1339757

apologies...

change admin/includes/init_includes/init_snaf.php

line 95

//from
$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='All listing' LIMIT 1";
//to
$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='All Listing' LIMIT 1";

should work...

let us know.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 Jan 2018, 6:48 PM
#285
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Snaf

Thank you.

No joy, getting same error when trying to login.

This is the error log:

[01-Jan-2018 18:35:45 Europe/London] Request URI: /shop/admin/login.php?camefrom=index.php
#1 trigger_error() called at [/public_html/shop/includes/classes/db/mysql/query_factory.php:167]
#2 queryFactory->show_error() called at [/public_html/shop/includes/classes/db/mysql/query_factory.php:139]
#3 queryFactory->set_error() called at [/public_html/shop/includes/classes/db/mysql/query_factory.php:266]
#4 queryFactory->Execute() called at [/public_html/shop/admin/includes/init_includes/init_snaf.php:111]
#5 require(/public_html/shop/admin/includes/init_includes/init_snaf.php) called at [/public_html/shop/includes/autoload_func.php:48]
#6 require(/public_html/shop/includes/autoload_func.php) called at [/public_html/shop/admin/includes/application_top.php:171]
#7 require(/public_html/shop/admin/includes/application_top.php) called at [/public_html/shop/admin/login.php:9]

[01-Jan-2018 18:35:45 Europe/London] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' 900, now(), now(), NULL, 'zen_cfg_select_option(array(''True'',''False''),')' at line 2 :: INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function) VALUES
(NULL, 'Use Product Listing Format for All Products', 'USE_PRODUCT_LISTING_FOR_ALL_PRODUCTS', 'False', 'Use Product Listing Format instead of the Default All Product Format <br/><br/>

1 Jan 2018, 6:51 PM
#286
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Snaf

my mistake... it does look like it is there...

give me a second...

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 Jan 2018, 7:06 PM
#287
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Snaf

ok... as you previously stated, this looks to be a language problem and specifically with the configuration_group table. i have no idea what ZC does with various language packs.

if you have phpMyadmin or some other access, we can look at the following sql commands and post the results:

SELECT * FROM `configuration_group` WHERE `configuration_group_title` = 'All listing';

SELECT * FROM `configuration_group` WHERE `configuration_group_id` = 23;

my sql command did NOT fail on the caps problem previously mentioned.

(if you make use of a db_prefix you would need to add that in from of the table name...)

alternatively, if you want to get past this problem, you can change:

admin/includes/init_includes/init_snaf.php

line 97:

//from
	$all_configuration_id = $result->fields['configuration_group_id'];
//to
	$all_configuration_id = 23;

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 Jan 2018, 8:08 PM
#289
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,969
Plugin Contributions:
8

Re: Snaf

the 0 results in the first query is the problem....

it's curious how it worked for the specials config... unless the italian is the same as the english.

the question is whether it will now work for new, featured and product_listing.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

1 Jan 2018, 8:52 PM
#290
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Snaf

The Configuration and Configuration_Groups tables DO NOT SUPPORT MULTIPLE LANGUAGES directly*.

So, if you've renamed the titles then any script that's looking for the original english titles will fail. In the case of this SNAF plugin, it was built to lookup based on titles, and therefore only works on sites whose configuration titles and configuration_group titles haven't been altered.

    • there is a way to add custom language defines which will be used to replace the english titles for-display-purposes-only, but will NOT assist if the titles in the database have been altered.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jan 2018, 12:00 AM
#291
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Snaf

Thank you.

I found a modified config.snaf.php of an older version (1.2), and by comparing the files the following 4 lines had been changed, I tried using that, but got same error.

line 95

$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".BOX_CONFIGURATION_ALL_LISTING."' LIMIT 1";

line 130

$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".BOX_CONFIGURATION_NEW_LISTING."' LIMIT 1";

line 165

$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".BOX_CONFIGURATION_FEATURED_LISTING."' LIMIT 1";

line 200

$sql = "SELECT configuration_group_id FROM ".TABLE_CONFIGURATION_GROUP." WHERE configuration_group_title='".BOX_CONFIGURATION_PRODUCT_LISTING."' LIMIT 1";
    • there is a way to add custom language defines which will be used to replace the english titles for-display-purposes-only, but will NOT assist if the titles in the database have been altered
      Could you please tell me how, and in case would it help if I go in, and change the titles back to English, or maybe overwrite the whole table?
2 Jan 2018, 4:48 AM
#292
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Snaf

Did this site ALREADY have SNAF v1.2 on it?

If so, then you didn't need to run the admin configuration scripts at all.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Jan 2018, 9:20 AM
#293
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Snaf

DrByte:

Did this site ALREADY have SNAF v1.2 on it?

No, it was another site, if I remember correctly it was 1.51 or 1.54.
This one is a new with 1.55e, and this is the first time attempting to install SNAF.

2 Jan 2018, 10:24 AM
#294
keneso avatar

keneso

Totally Zenned

Join Date:
May 2009
Posts:
1,273
Plugin Contributions:
3

Re: Snaf

Soled it :smile:

I compared the English database configuration_group titles with the Italian one I have, and put the titles in lines 95, 130, 165, 200.

Uploaded, and no error.

22 Apr 2022, 10:51 AM
#296
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Snaf

@DrByte

Is all of the functionality of this module now in the core for 1.5.7x?
I can see that product listing page can do columns or rows by default, but not sure if SNAF adds anything that the current version of ZC is missing.

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions

22 Apr 2022, 11:30 AM
#297
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: Snaf

strelitzia:

@DrByte

Is all of the functionality of this module now in the core for 1.5.7x?
I can see that product listing page can do columns or rows by default, but not sure if SNAF adds anything that the current version of ZC is missing.
The beauty of SNAF is that the layout for the Specials, New, Alll and Featured Products' pages use the same layout as the index-page's product listing.

From my quick review of the responsive_classic template, that functionality isn't included in the base.

22 Apr 2022, 11:39 AM
#298
strelitzia avatar

strelitzia

Totally Zenned

Join Date:
Nov 2005
Location:
France
Posts:
588
Plugin Contributions:
1

Re: Snaf

Thanks for the very speedy reply @lat9 !

I would assume that some/all of the includes/modules/YOUR_TEMPLATE/product_listing.php edits won't be necessary as the page already has column/row functionality.

Zen Cart developer since 2009 — Zen Cart Solutions
Ecommerce development, integrations & automation — Junction Solutions