Snaf

Views: 40,729

Results 141 to 160 of 298
1 Feb 2013, 4:01 PM
#141
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Snaf

Hi Nick
Thank you for the mod! I just installed in on the advice of Anne (Picaflor Azul) when I asked her about getting a column layout for my Newport Eco template that she created. I had several mods already installed on my website, a few bundled with her template, and a couple I added myself. When I installed SNAF I had to be careful of my Gallery Category mod install, which had a lot of modification to includes/modules/newport_eco/product_listing.php, so what I did was use the SNAF file and add the gallery category mods into it, because it was easier for me to understand that way.

My problem is the SNAF module really isn't working on my site.

My website is https://www.mgsdesigns.net/store and you can see it now set in "column" mode, it still shows rows, though the dashed borders show up as if there are columns. When I put the product listing into "row" mode, the only difference is where the dashed borders appear.

I read earlier in this thread that there are known issues with the compatibility of Picaflor Azul templates and the SNAF mod, so I was wondering if you had come across this before and had an ideas.

Thank you in advance for any thoughts you may have on this!

Melissa

1 Feb 2013, 4:30 PM
#142
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

grakowsky:

Hi Nick
Thank you for the mod! I just installed in on the advice of Anne (Picaflor Azul) when I asked her about getting a column layout for my Newport Eco template that she created. I had several mods already installed on my website, a few bundled with her template, and a couple I added myself. When I installed SNAF I had to be careful of my Gallery Category mod install, which had a lot of modification to includes/modules/newport_eco/product_listing.php, so what I did was use the SNAF file and add the gallery category mods into it, because it was easier for me to understand that way.

My problem is the SNAF module really isn't working on my site.

My website is www.mgsdesigns.net/store and you can see it now set in "column" mode, it still shows rows, though the dashed borders show up as if there are columns. When I put the product listing into "row" mode, the only difference is where the dashed borders appear.

I read earlier in this thread that there are known issues with the compatibility of Picaflor Azul templates and the SNAF mod, so I was wondering if you had come across this before and had an ideas.

Thank you in advance for any thoughts you may have on this!

Melissa
I have used SNAF with Anne's templates before and had no issues..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

1 Feb 2013, 8:39 PM
#143
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Snaf

DivaVocals:

I have used SNAF with Anne's templates before and had no issues..

+1 to that.

2 Feb 2013, 3:28 AM
#144
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Re: Snaf

picandnix:

+1 to that.

That really makes me wonder what I'm doing wrong then... the options that are supposed to appear in the Admin have appeared, it's just that they don't have the desired effect. The option to have the user choose the layout also doesn't do anything. Maybe an uninstall and fresh install is the first step...

2 Feb 2013, 10:08 AM
#145
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

I am away from my computer for a few days . weird but true. happy to have a look when i get back . usually however that will be a problem product_listing.php .so if you have altered that then check the alterations.

Nick
iszent.com

5 Feb 2013, 9:25 AM
#146
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

First thing to check is that you have the files in the right places. The main one of importance is product_listing.php. You should have this file:

includes/modules/newpost_eco/product_listing.php

If that is not there then you have installed incorrectly. You have maybe not changed 'YOUR_TEMPLATE' to 'newport_eco' in the installation files? If you do have that file in place check that it is the SNAF version of that file.

It should say at the top :

/*
 * SNAF version 1.2
 * product listing version
*/

Nick
iszent.com

7 Feb 2013, 2:47 AM
#147
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Re: Snaf

niccol:

First thing to check is that you have the files in the right places. The main one of importance is product_listing.php. You should have this file:

includes/modules/newpost_eco/product_listing.php

If that is not there then you have installed incorrectly. You have maybe not changed 'YOUR_TEMPLATE' to 'newport_eco' in the installation files? If you do have that file in place check that it is the SNAF version of that file.

It should say at the top :

/*

  • SNAF version 1.2
  • product listing version
    */

Thanks, Nick. I checked and I do have the product_listing.php in the right place, with the template name correctly changed in the installation files.  It is also version 1.2, I verified that on the product_listing.php file that came with the package I downloaded. When I went to install SNAF I wanted to also have a gallery featured, so I took the product_listing.php from the gallery mod I downloaded, and attempted to merge it with your SNAF product_listing.php so that I could have both mods. I guess what I should do is try putting the file from the SNAF package alone in the directory and see if it works that way, before I add the code for the gallery mod. Here's my attempt at merging the two files. I don't know much about PHP but it seemed legit to me in terms of what objects needed to be wrapped with Glen's gallery code:
<?php /** * product_listing module * * @package modules * @copyright Copyright 2003-2006 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: product_listing.php 4655 2006-10-02 01:02:38Z ajeh $ * modified for Gallery Category by Glenn Herbert (gjh42) 2007-06-01 */ if (!defined('IS_ADMIN_FLAG')) { die('Illegal Access'); } $show_submit = zen_run_normal(); $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page'); $how_many = 0; $list_box_contents[0] = array('params' => 'class="productListing-rowheading"'); $zc_col_count_description = 0; $lc_align = ''; //gallery category test $gallery_skips = 0; //flag for reducing # of columns $not_gallery = 1; if (ereg("(^82$|^82_)",$cPath)) { //this is a gallery category (replace 23 with your cat id) $not_gallery = 0; } // /gallery category test for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $gallery_skip_now = 0; //reset flag for skipping column write switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; $zc_col_count_description++; break; case 'PRODUCT_LIST_PRICE': if($not_gallery) { //delete this line for price to be displayed in gallery $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right' . (PRODUCTS_LIST_PRICE_WIDTH > 0 ? '" width="' . PRODUCTS_LIST_PRICE_WIDTH : ''); $zc_col_count_description++; } else { //delete these 4 lines for price to be displayed in gallery $gallery_skip_now = 1; //gallery $gallery_skips++; //gallery } // /not_gallery break; case 'PRODUCT_LIST_QUANTITY': if($not_gallery) { //display if not gallery $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; $zc_col_count_description++; } else { //gallery $gallery_skip_now = 1; $gallery_skips++; } // /not_gallery break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; $zc_col_count_description++; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; $zc_col_count_description++; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = zen_create_sort_heading($_GET['sort'], $col+1, $lc_text); } // skip column in output array for gallery if ($gallery_skip_now == 1) { //don't add a column this time } else { $list_box_contents[0][$col - $gallery_skips] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => $lc_text ); } } if ($listing_split->number_of_rows > 0) { $rows = 0; $listing = $db->Execute($listing_split->sql_query); $extra_row = 0; while (!$listing->EOF) { $rows++; if ((($rows-$extra_row)/2) == floor(($rows-$extra_row)/2)) { $list_box_contents[$rows] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[$rows] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; $gallery_skips = 0; //reset flag for reducing # of columns for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; $gallery_skip_now = 0; //reset flag for skipping column write switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = ''; $lc_text = $listing->fields['products_model']; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; if (isset($_GET['manufacturers_id'])) { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ; } else { $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>'; } break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = ''; $lc_text = '<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing->fields['manufacturers_id']) . '">' . $listing->fields['manufacturers_name'] . '</a>'; break; case 'PRODUCT_LIST_PRICE': if($not_gallery) { //delete this line for price to be displayed in gallery $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />'; $lc_align = 'right'; $lc_text = $lc_price; // if($not_gallery) { //uncomment this line for price to be displayed in gallery // more info in place of buy now $lc_button = ''; if (zen_has_product_attributes($listing->fields['products_id']) or PRODUCT_LIST_PRICE_BUY_NOW == '0') { $lc_button = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; } else { if (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0) { if ( // not a hide qty box product $listing->fields['products_qty_box_status'] != 0 && // product type can be added to cart zen_get_products_allow_add_to_cart($listing->fields['products_id']) != 'N' && // product is not call for price $listing->fields['product_is_call'] == 0 && // product is in stock or customers may add it to cart anyway ($listing->fields['products_quantity'] > 0 || SHOW_PRODUCTS_SOLD_OUT_IMAGE == 0) ) { $how_many++; } // hide quantity box if ($listing->fields['products_qty_box_status'] == 0) { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } else { $lc_button = TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "<input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />"; } } else { // qty box with add to cart button if (PRODUCT_LIST_PRICE_BUY_NOW == '2' && $listing->fields['products_qty_box_status'] != 0) { $lc_button= zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($listing->fields['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product&products_id=' . $listing->fields['products_id']), 'post', 'enctype="multipart/form-data"') . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($listing->fields['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_draw_hidden_field('products_id', $listing->fields['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT) . '</form>'; } else { $lc_button = '<a href="' . zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing->fields['products_id']) . '">' . zen_image_button(BUTTON_IMAGE_BUY_NOW, BUTTON_BUY_NOW_ALT, 'class="listingBuyNowButton"') . '</a>'; } } } $the_button = $lc_button; $products_link = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . MORE_INFO_TEXT . '</a>'; $lc_text .= '<br />' . zen_get_buy_now_button($listing->fields['products_id'], $the_button, $products_link) . '<br />' . zen_get_products_quantity_min_units_display($listing->fields['products_id']); $lc_text .= '<br />' . (zen_get_show_product_switch($listing->fields['products_id'], 'ALWAYS_FREE_SHIPPING_IMAGE_SWITCH') ? (zen_get_product_is_always_free_shipping($listing->fields['products_id']) ? TEXT_PRODUCT_FREE_SHIPPING_ICON . '<br />' : '') : ''); } else { //gallery $gallery_skip_now = 1; $gallery_skips++; } // /not_gallery break; case 'PRODUCT_LIST_QUANTITY': if($not_gallery) { //display if not gallery $lc_align = 'right'; $lc_text = $listing->fields['products_quantity']; } else { //gallery $gallery_skip_now = 1; $gallery_skips++; } // /not_gallery break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = $listing->fields['products_weight']; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; if ($listing->fields['products_image'] == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == 0) { $lc_text = ''; } else { if (isset($_GET['manufacturers_id'])) { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } else { $lc_text = '<a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . zen_image(DIR_WS_IMAGES . $listing->fields['products_image'], $listing->fields['products_name'], IMAGE_PRODUCT_LISTING_WIDTH, IMAGE_PRODUCT_LISTING_HEIGHT, 'class="listingProductImage"') . '</a>'; } } break; } // skip column in output array for gallery if ($gallery_skip_now == 1) { //don't add a column this time } else { $list_box_contents[$rows][$col - $gallery_skips] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } // add description and match alternating colors //if (PRODUCT_LIST_DESCRIPTION > 0) { // $rows++; // if ($extra_row == 1) { // $list_box_description = "productListing-data-description-even"; // $extra_row=0; // } else { // $list_box_description = "productListing-data-description-odd"; // $extra_row=1; // } // $list_box_contents[$rows][] = array('params' => 'class="' . $list_box_description . '" colspan="' . $zc_col_count_description . '"', // 'text' => zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)); //} $listing->MoveNext(); } $error_categories = false; } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); $error_categories = true; } //no button for gallery if ($not_gallery == 1 and ($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 1 or PRODUCT_LISTING_MULTIPLE_ADD_TO_CART == 3) ) { $show_top_submit_button = true; } else { $show_top_submit_button = false; } //no button for gallery if ($not_gallery == 1 and ($how_many > 0 and $show_submit == true and $listing_split->number_of_rows > 0) and (PRODUCT_LISTING_MULTIPLE_ADD_TO_CART >= 2) ) { $show_bottom_submit_button = true; } else { $show_bottom_submit_button = false; } //no button for gallery if ($not_gallery == 1 and $how_many > 0 && PRODUCT_LISTING_MULTIPLE_ADD_TO_CART != 0 and $show_submit == true and $listing_split->number_of_rows > 0) { // bof: multiple products echo zen_draw_form('multiple_products_cart_quantity', zen_href_link(FILENAME_DEFAULT, zen_get_all_get_params(array('action')) . 'action=multiple_products_add_product'), 'post', 'enctype="multipart/form-data"'); } ?>
Unfortunately my website is not working at the moment because inmotionhosting was attempting to move my domain to another server and messed something up, so I'll have to try at another time.

Thank you for taking the time to try to help me with this!

Melissa
7 Feb 2013, 8:51 AM
#148
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

Melissa,

Well, I think that the problem is probably the two mods needing to be merged. I have no knowledge at all about this gallery code. Never seen it before. You learn something new every day! Which mod is that exactly?

So, yes, as soon as you get your site back ;-( then the first thing to try is just to use SNAF by itself. Check that everything works. Then at least we know it is the gallery that is conflicting with SNAF. And we can have a look at merging the files.

Nick

Nick
iszent.com

7 Feb 2013, 7:04 PM
#149
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Re: Snaf

niccol:

Melissa,

Well, I think that the problem is probably the two mods needing to be merged. I have no knowledge at all about this gallery code. Never seen it before. You learn something new every day! Which mod is that exactly?

So, yes, as soon as you get your site back ;-( then the first thing to try is just to use SNAF by itself. Check that everything works. Then at least we know it is the gallery that is conflicting with SNAF. And we can have a look at merging the files.

Nick

Success!! I re-installed the mod with complete success. Now I have to see about merging the product_listing file with the Gallery category product_listing file. It is the gallery mod described in the readme as such: "Gallery Category v1.0

Modification by Glenn Herbert (gjh42) 2007-06-01"

Melissa

7 Feb 2013, 7:19 PM
#150
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

Great:-) Well done, Melissa.

This is where I am meant to say ' Oh, I can't look at other mods - not my problem' . But I have never been so good at that. I'll try and have a look at that mod when I get a moment. But yes it sounds like you just have to merge the product_listing.php file.

Hmmm, just had a look. I am guessing that you might have fun with that! This is no criticism of Glenn who writes nice code but it is not necessarily easy to merge unless you know that file intimately. And that particular file is probably one of the more complex in Zen.

Give it a go but I think that I might need to do it :-)

In his version

Nick
iszent.com

7 Feb 2013, 7:23 PM
#151
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

niccol:

Great:-) Well done, Melissa.

This is where I am meant to say ' Oh, I can't look at other mods - not my problem' . But I have never been so good at that. I'll try and have a look at that mod when I get a moment. But yes it sounds like you just have to merge the product_listing.php file.

Hmmm, just had a look. I am guessing that you might have fun with that! This is no criticism of Glenn who writes nice code but it is not necessarily easy to merge unless you know that file intimately. And that particular file is probably one of the more complex in Zen.

Give it a go but I think that I might need to do it :-)

In his version
I would suggest that the 1st step for Melissa might be to compare the product_listing.php with the default version that comes with Zen Cart to clearly identify all the places that the gallery mod modifies the product_listing.php file.. Plus given that the gallery module was last updated in 2007, it wouldn't hurt to make sure that any changes from the latest version of the product_listing.php file with the gallery changes is being used.. Once she has an updated product_listing.php file, then she can merge that file with the one that comes with SNAF (using Winmerge or Beyond Compare)..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Feb 2013, 8:30 PM
#152
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Re: Snaf

DivaVocals:

I would suggest that the 1st step for Melissa might be to compare the product_listing.php with the default version that comes with Zen Cart to clearly identify all the places that the gallery mod modifies the product_listing.php file.. Plus given that the gallery module was last updated in 2007, it wouldn't hurt to make sure that any changes from the latest version of the product_listing.php file with the gallery changes is being used.. Once she has an updated product_listing.php file, then she can merge that file with the one that comes with SNAF (using Winmerge or Beyond Compare)..

Thanks, Nick! You're right, it's definitely not your problem! I appreciate you taking the time to read my posts and answer anyway :-) I am bound and determined to get this right.

I just tried going over the two files in Dreamweaver and merging them there by putting Glen's code into the SNAF file, because he marked up all the places he modified the code (I think) and it seems like it should be an easy merge, but I tried it and it isn't quite working-it messed up the SNAF code a bit.

Diva: Thanks for the suggestion on the file comparison programs, I didn't know about those! I'm checking out Winmerge right now.

Melissa

7 Feb 2013, 9:13 PM
#153
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

grakowsky:

Thanks, Nick! You're right, it's definitely not your problem! I appreciate you taking the time to read my posts and answer anyway :-) I am bound and determined to get this right.

I just tried going over the two files in Dreamweaver and merging them there by putting Glen's code into the SNAF file, because he marked up all the places he modified the code (I think) and it seems like it should be an easy merge, but I tried it and it isn't quite working-it messed up the SNAF code a bit.

Diva: Thanks for the suggestion on the file comparison programs, I didn't know about those! I'm checking out Winmerge right now.

Melissa
DROP Dreamweaver as an FTP or file merging tool.. I use Dreamweaver occasionally for HTML markup ONLY.. Their file merging tools are WOEFULLY lacking.. Personally i prefer the commercial Beyond Compare over the free Winmerge tool. It's a pretty inexpensive program and well worth the cost.. I may even upgrade to the Pro version so I can get three way merging capabilities..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Feb 2013, 10:21 PM
#154
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

@Melissa
Yes, that is the correct way of doing it. Glenn's changes are relatively minor and SNAF makes some more major changes so you want to merge his changes into SNAF. What you can do in this situation, although not always, is do one little block of modifications at a time. And check each time that the file is still running all right.

So, for instance, copy this lot into the file and check it works.

//gallery category test
$gallery_skips = 0; //flag for reducing # of columns
$not_gallery = 1;
if (ereg("(^23$|^23_)",$cPath)) { //this is a gallery category (replace 23 with your cat id)
  $not_gallery = 0;
} // /gallery category test

So, you can kind of go step-by-step.

@Diva
You poor benighted windows users! You don't have Meld, do you? http://meldmerge.org/ Free, like all linux stuff, and very very powerful :-) Three way comparisons. Directory comparisons. Version control. Mmmmmmm :-)

Nick
iszent.com

7 Feb 2013, 11:33 PM
#155
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

niccol:

@Diva
You poor benighted windows users! You don't have Meld, do you? http://meldmerge.org/ Free, like all linux stuff, and very very powerful :-) Three way comparisons. Directory comparisons. Version control. Mmmmmmm :-)LOL the late great Conor Kerr recommended Beyond Compare and I haven't looked back since.. I found most free tools (esp Winmerge) useless.. but you being you means I will have to checkout Meld.. :smile:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

7 Feb 2013, 11:36 PM
#156
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

I think Meld can run on windows but it is probably more grief than it is worth :-) Beyond Compare is good too!

Nick
iszent.com

8 Feb 2013, 9:30 PM
#157
grakowsky avatar

grakowsky

New Zenner

Join Date:
Jun 2012
Posts:
26
Plugin Contributions:
0

Re: Snaf

niccol:

@Melissa
Yes, that is the correct way of doing it. Glenn's changes are relatively minor and SNAF makes some more major changes so you want to merge his changes into SNAF. What you can do in this situation, although not always, is do one little block of modifications at a time. And check each time that the file is still running all right.

So, for instance, copy this lot into the file and check it works.

//gallery category test
$gallery_skips = 0; //flag for reducing # of columns
$not_gallery = 1;
if (ereg("(^23$|^23_)",$cPath)) { //this is a gallery category (replace 23 with your cat id)
$not_gallery = 0;
} // /gallery category test

> 
> So,  you can kind of go step-by-step.
> 
> @Diva
> You poor benighted windows users!  You don't have Meld, do you?  <http://meldmerge.org/>  Free, like all linux stuff, and very very powerful :-)  Three way comparisons.  Directory comparisons.  Version control.  Mmmmmmm :-)

Thanks, Nick. That's a great idea to do it step-by-step. I tried winmerge and blindly merged all the changes to the SNAF file to see if it would work (with my fingers crossed) and it did not, so next I'll try going through it systematically.

Diva-I don't use Dreamweaver to merge the files or to do FTP, just to look at the files because it shows the different call-outs in different colors, so it's a lot easier for me to see the syntax than just reading black text in notepad. I have heard how bad Dreamweaver is for this stuff!

Nick I use Windows just because I've been using it since windows 3.1!!! I tried Ubuntu Linux for a while but felt the learning curve as far as installing and managing files was too steep for me to spend all that time learning it!

Melissa
8 Feb 2013, 9:34 PM
#158
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

grakowsky:

I tried winmerge and blindly merged all the changes to the SNAF file to see if it would work (with my fingers crossed) and it did not, so next I'll try going through it systematically.and this is probably why you had issues.. you really need to do this one step at a time one block at a time.. Take your time and you will get it all merged together..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

9 Feb 2013, 11:54 AM
#159
niccol avatar

niccol

Totally Zenned

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

Re: Snaf

Well, give it a go a step at a time. And if you still have issues then let me know.

Off Topic:

Not a fan of dreamweaver for coding work. It tends to add all kinds of extra stuff into the code.

Yes, syntax highlighting is very useful. Just recently for small stuff that has no security issues I have been experimenting with various online editors/IDEs. ShiftEdit is one that seems quite practical and might be suitable for you, Melissa. It has syntax highlighting but it also has syntax checking which might be even more use to you :-) It is to me!

Or you can have a look at this: http://net.tutsplus.com/articles/web-roundups/22-neat-code-editors-for-windows/.

Nick
iszent.com

10 Feb 2013, 4:36 PM
#160
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Snaf

niccol:

Not a fan of dreamweaver for coding work. It tends to add all kinds of extra stuff into the code.Actually the latest and greatest versions don't do this anymore. When I occasionally need WYSIWYG capabilities (for readme files and EZ/Define pages), Dreamweaver is my go to tool.. Otherwise I like Developers Notepad or Notepad++

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.