Snaf

Views: 40,728

Results 261 to 280 of 298
21 Feb 2016, 9:06 PM
#261
hubert avatar

hubert

Zen Follower

Join Date:
Mar 2005
Posts:
229
Plugin Contributions:
0

Snaf

I reply to myself in case it can help somebody else.

I had just to change the Maximum Display Columns Products to Multiple Categories Manager, in Configuration->Maximum values.

12 Mar 2016, 7:29 PM
#262
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: Snaf

I could usse a hand with setting the default sort order in a categories listing. All my SNAF items are set to 6 - which is Date Added - New to Old. When I click a category I want the same sort order, but can't seem to set it as a default. Setting "Display Product Listing Default Sort Order" to 6, blank, or anything else seems to have no effect. Changing $listing_sql .= " order by p.products_date_added DESC, pd.products_name"; in default_filter.php gets the sort right, but the sort by drop down comes in as product name, and if you really want to sort by product name you have to select something else, then re-select product name. I finally added &disp_order=6 to the end of line 88 in categories_ul_generator.php to force the menu to select 6, but that's a stupid hack and I don't like it. Anyone know how to do this correctly with SNAF?

2 + 2 = 5 for extremely large values of 2

Pez Collectors Store •••••••• My Plugins List

14 Mar 2016, 1:12 AM
#263
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: Snaf

Well I found a better solution, through its still not quote right. To the top to tpl_snaf_display_order.php I added:
$disp_order_default = PRODUCT_ALL_LIST_SORT_DEFAULT;
require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_LISTING_DISPLAY_ORDER));

Its better than making the URLs ugly, and it does do what I wanted, but it still feels like an ugly hack.

2 + 2 = 5 for extremely large values of 2

Pez Collectors Store •••••••• My Plugins List

19 Sep 2016, 8:12 PM
#264
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Snaf

Pulled the Responsive version of SNAF from GitHub. Installed and all settings show but no grid layout on storefront. Did I miss something here? Using a clone of Responsive Classic Template. No other modules yet.

Live and learn... the Zen way.

19 Sep 2016, 8:39 PM
#265
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

Re: Snaf

mydanilo:

Pulled the Responsive version of SNAF from GitHub. Installed and all settings show but no grid layout on storefront. Did I miss something here? Using a clone of Responsive Classic Template. No other modules yet.
Solved, not all files uploaded, ftp issues. But working now.

Live and learn... the Zen way.

4 Jan 2017, 4:42 PM
#266
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

I have had SNAF 1.2 installed for some time and it works fine.
Since I installed v155d Responsive classic I do not like how it looks on the mobile view.

I installed responsive SNAF from github and it works but in the desktop view in my xammp test site the three columns do not fill out the full table width, see image.
If I increase the column width to say 40% from 33 then it defaults to two columns, logical I suppose.
I looked at the css but not much help, see image!
I tried adding width commands to css .listingrow but this was ignored!

4 Jan 2017, 6:15 PM
#267
carlwhat avatar

carlwhat

zennedOut

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

Re: Snaf

i find it very difficult to troubleshoot layout/css problems from images.....

that said, the use of tables does not make for good responsive design.

and your 3 columns do not look to take up the full width that you want because it seems that your small text above it, is taking up 1 column....

pure guesses based off your images.

good luck.

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

4 Jan 2017, 6:54 PM
#268
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

carlwhat:

i find it very difficult to troubleshoot layout/css problems from images.....

that said, the use of tables does not make for good responsive design.

and your 3 columns do not look to take up the full width that you want because it seems that your small text above it, is taking up 1 column....

pure guesses based off your images.

good luck.

Good guess! Sorry about the images but this runs on my PC test site. :smile:

The line in my style sheet.css for the text you mention is
.prod-list-wrap{text-align:center;padding:20px 10px 10px 20px;clear:both;height:40px;}

When I remove "height:40px;" then the three columns fill out the space correctly.

I do not know enough about css to know why :blush:

Many thanks, I will do more testing before moving it to my live site :unsure:

26 Apr 2017, 10:45 AM
#269
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

gothstone:

I could usse a hand with setting the default sort order in a categories listing. All my SNAF items are set to 6 - which is Date Added - New to Old. When I click a category I want the same sort order, but can't seem to set it as a default. Setting "Display Product Listing Default Sort Order" to 6, blank, or anything else seems to have no effect. Changing $listing_sql .= " order by p.products_date_added DESC, pd.products_name"; in default_filter.php gets the sort right, but the sort by drop down comes in as product name, and if you really want to sort by product name you have to select something else, then re-select product name. I finally added &disp_order=6 to the end of line 88 in categories_ul_generator.php to force the menu to select 6, but that's a stupid hack and I don't like it. Anyone know how to do this correctly with SNAF?

I believe I have the same problem.
my SNAF items are set to 6 - which is Date Added - New to Old.

If I set the filter "Use Product Listing Filter for Column Display" to "true" then the products are shown sorted in product name order and I do not find a way to set a different default sort order.

I would like to find an alternative to your fixes :)

I assume the filter default should be set in tpl_snaf_display_order.php in the following code but I have no clue how :(

<select name="disp_order" onchange="this.form.submit();" id="disp-order-sorter">
<?php if ($disp_order != $disp_order_default) { ?>
    <option value="<?php echo $disp_order_default; ?>" <?php echo ($disp_order == $disp_order_default ? 'selected="selected"' : ''); ?>><?php echo PULL_DOWN_ALL_RESET; ?></option>
[B]<?php } // reset to store default ?>[/B]
<option value="1" <?php echo ($disp_order == '1' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME; ?></option>
<option value="2" <?php echo ($disp_order == '2' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME_DESC; ?></option>
<option value="3" <?php echo ($disp_order == '3' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE; ?></option>
<option value="4" <?php echo ($disp_order == '4' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE_DESC; ?></option>
<option value="5" <?php echo ($disp_order == '5' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_MODEL; ?></option>
<option value="6" <?php echo ($disp_order == '6' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE_DESC; ?></option>
<option value="7" <?php echo ($disp_order == '7' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE; ?></option>
</select>
26 Apr 2017, 11:03 AM
#270
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Snaf

What is your setting in:

admin>>product listing>>Display Product Listing Default Sort Order

Nick
iszent.com

26 Apr 2017, 11:11 AM
#271
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

niccol:

What is your setting in:

admin>>product listing>>Display Product Listing Default Sort Order

That is blank

26 Apr 2017, 11:15 AM
#272
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

I could "fix" it by changing the order of the options in the code; not elegant :)

<?php } // reset to store default ?>
<option value="6" <?php echo ($disp_order == '6' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE_DESC; ?></option>
<option value="1" <?php echo ($disp_order == '1' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME; ?></option>
<option value="2" <?php echo ($disp_order == '2' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_NAME_DESC; ?></option>
<option value="3" <?php echo ($disp_order == '3' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE; ?></option>
<option value="4" <?php echo ($disp_order == '4' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_PRICE_DESC; ?></option>
<option value="5" <?php echo ($disp_order == '5' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_MODEL; ?></option>
<option value="7" <?php echo ($disp_order == '7' ? 'selected="selected"' : ''); ?>><?php echo TEXT_INFO_SORT_BY_PRODUCTS_DATE; ?></option>
</select>

But now I cannot elect other options :(

26 Apr 2017, 12:20 PM
#273
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

Wish I had never touched it, now I have problems with this code around line 21

<? foreach($_GET as $key=>$value)

I had to change it to

<? foreach($_GET as $key=>$value)
26 Apr 2017, 1:00 PM
#274
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Snaf

marton_1:

Wish I had never touched it, now I have problems with this code around line 21

<? foreach($_GET as $key=>$value) ``` > > I had to change it to > ``` <? foreach($_GET as $key=>$value) ``` That is nood right. Your php configuration probably does not support short code. Better try this``` <?php foreach($_GET as $key=>$value) ```
26 Apr 2017, 1:35 PM
#275
marton_1 avatar

marton_1

Totally Zenned

Join Date:
Apr 2013
Location:
eglisau switzerland
Posts:
568
Plugin Contributions:
0

Re: Snaf

Design75:

That is nood right.
Your php configuration probably does not support short code. Better try this```

<?php foreach($_GET as $key=>$value) ``` Great, that worked fine; thanks
1 Jan 2018, 3:40 PM
#276
keneso avatar

keneso

Totally Zenned

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

Re: Snaf

Hi
I tried installing v1.3 and when logging in admin I get error: "WARNING: An Error occurred, please refresh the page and try again"

I believe it has to do with language (see https://www.zen-cart.com/showthread.php?191943-Snaf/page10#93) since I installed it on local machine which is an English install, while the one failing is an Italian and English install.

Thank you.

1 Jan 2018, 3:56 PM
#277
drbyte avatar

drbyte

Sensei

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

Re: Snaf

What's in the /log/myDebug-adm-xxxxxx.log file generated when that message appeared?

Ref: http://www.zen-cart.com/content.php?311-warning-an-error-occurred-please-refresh-the-page-and-try-again

.
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, 4:09 PM
#278
carlwhat avatar

carlwhat

zennedOut

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

Re: Snaf

keneso:

Hi
I tried installing v1.3 and when logging in admin I get error: "WARNING: An Error occurred, please refresh the page and try again"

I believe it has to do with language (see https://www.zen-cart.com/showthread.php?191943-Snaf/page10#93) since I installed it on local machine which is an English install, while the one failing is an Italian and English install.

Thank you.

we can confirm your belief by posting the information contained in your debug logs, as indicated by this page:

https://www.zen-cart.com/content.php?311

we can then address the specific problem you are having.

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, 4:33 PM
#279
keneso avatar

keneso

Totally Zenned

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

Re: Snaf

Thank you.
BTW I forgot to mention it is 1.55e

This is the error log

[01-Jan-2018 14:54:31 Europe/London] Request URI: /shop/admin/login.php, IP address: 2.234.145.206
#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 14:54:31 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/>
This will make some of the settings on this page inactive as the product listing settings will be used.', , 900, now(), now(), NULL, 'zen_cfg_select_option(array(''True'',''False''),') ==> (as called by) /public_html/shop/admin/includes/init_includes/init_snaf.php on line 111 <== in /public_html/shop/includes/classes/db/mysql/query_factory.php on line 167

BTW
When trying to uninstall I followed the instructions of readme, and after I got a totally blank page when going to admin area login, I found that the file config.snaf.php was stille there, and after I removed it I could access the admin area, perhaps it should be added to the uninstall instruction.

1 Jan 2018, 5:04 PM
#280
carlwhat avatar

carlwhat

zennedOut

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

Re: Snaf

there looks to be a problem with your database.

if you go to the admin -> tools -> developers tool kit -> Search in Configuration Settings/Keys

and then search for

PRODUCT_ALL_LIST_GROUP_ID

what is the result?

specifically, under group, does it say:

All Listing

and if it does, its entirely possible that the admin sanitizer or something else is coming into play.

the config id for all products is not getting found. why they use the group title as opposed to the key_name, well you got me. but that looks to be the problem from your log file. the 2 commas, before the 900 -> you should have the group id number there.

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.