If this is your first visit, check our documentation. To post, register or login.

Snaf

Started by niccol on 2 Feb 2012, 12:21 PM · Views: 40,823

Results 241 to 260 of 298
22 Oct 2014, 9:39 AM
#241
niccol avatar

niccol

Totally Zenned

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

Post #241 by niccol

Diva,

In the unchanged version of SNAF's product_listing.php file we are at about line 203. And have this

            // 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 {

Which if you change to this :

            // 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 = '<span>'.TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "</span><input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
            }
          } else {

Will put a span around what you want. Judging from the define name in the code that you posted is different I'd guess that some other modifications have been made?

Not sure what else to suggest.

Nick
iszent.com

22 Oct 2014, 2:56 PM
#242
divavocals avatar

divavocals

Totally Zenned

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

Post #242 by divavocals

niccol:

Diva,

In the unchanged version of SNAF's product_listing.php file we are at about line 203. And have this

        // 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 {
> 
> Which if you change to this :
> 
> ```
            // 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 = '<span>'.TEXT_PRODUCT_LISTING_MULTIPLE_ADD_TO_CART . "</span><input type=\"text\" name=\"products_id[" . $listing->fields['products_id'] . "]\" value=\"0\" size=\"4\" />";
            }
          } else {

Will put a span around what you want. Judging from the define name in the code that you posted is different I'd guess that some other modifications have been made?

Not sure what else to suggest.

Yeah this is the same change I made, and it's not working.. sigh The version of SNAF I'm using has been modified to be responsive. Can't see how swapping tables for divs would impact things.. I'll send you over what I'm working with later so you can see..

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.

22 Oct 2014, 3:09 PM
#243
niccol avatar

niccol

Totally Zenned

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

Post #243 by niccol

DivaVocals:

Yeah this is the same change I made, and it's not working.. sigh The version of SNAF I'm using has been modified to be responsive. Can't see how swapping tables for divs would impact things.. I'll send you over what I'm working with later so you can see..

Put a die() in directly after that line. If the page dies there then you know you are in the right file.

I'd guess you are not in the right file.

Or alternatively some of the configuration setting are different and you are taking a different route through the logic. Either way you need to check that you are in the right file first and then confirm to yourself that that is the route that the logic is taking.

But I know that you know this :-)

Nick
iszent.com

22 Oct 2014, 3:23 PM
#244
divavocals avatar

divavocals

Totally Zenned

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

Post #244 by divavocals

niccol:

Put a die() in directly after that line. If the page dies there then you know you are in the right file.

I'd guess you are not in the right file.

Or alternatively some of the configuration setting are different and you are taking a different route through the logic. Either way you need to check that you are in the right file first and then confirm to yourself that that is the route that the logic is taking.

But I know that you know this :-)

I BARELY know anything... I'm just trying to keep up with you smart people.. :laugh: But this is the file I am working in..

includes/modules/custom_template/product_listing.php

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.

10 Jan 2015, 9:00 PM
#245
lat9 avatar

lat9

Administrator

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

Post #245 by lat9

SNAF v1.2: There's a short-open tag in /includes/templates/YOUR_TEMPLATE/tpl_snaf_display_order.php (line 21). Need to change

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

to

<?php foreach($_GET as $key=>$value)
10 Jan 2015, 10:33 PM
#246
divavocals avatar

divavocals

Totally Zenned

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

Post #246 by divavocals

lat9:

SNAF v1.2: There's a short-open tag in /includes/templates/YOUR_TEMPLATE/tpl_snaf_display_order.php (line 21). Need to change

<?foreach($_GET as $key=>$value) ``` > to > ``` <?php foreach($_GET as $key=>$value) ``` I'll add that to the list.. Planning on submitting the responsive version of SNAF to the downloads.. wanna make sure I fully tweak (and frankly remove) some of the inline styling that gave me fits when trying to configure the rows view..

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.

13 Jan 2015, 1:27 AM
#247
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Post #247 by rbarbour

I hate to say this cause quite frankly I am not sure when I will have time but version 3.0 of the Responsive DIY Template Default for 1.5.x that I will be uploading solves many of the table display issues when it comes to responsive designs.

Tables are responsive to begin with and will resize until the content within doesn't allow them to anymore.

I use a highly altered version of SNAF in my whiteCherries responsive template. Using only CSS to change display of rows as window gets smaller.

you could add this css to see what I mean:

/* index & cPath (product listing pages) */
@media (min-width:0px) and (max-width:480px){
div#productListing table,
div#productListing thead,
div#productListing tbody,
div#productListing th,
div#productListing td,
div#productListing tr 
{ display: block; }
div#productListing tr.productListing-odd,
div#productListing tr.productListing-even
{ width:100%;float:left;height:350px; }
}

@media (min-width:481px) and (max-width:767px){
/* index & cPath (product listing pages) */
div#productListing table,
div#productListing thead,
div#productListing tbody,
div#productListing td,
div#productListing tr 
{ display: block; }
div#productListing tr.productListing-odd,
div#productListing tr.productListing-even
{ width:49.5%;float:left;height:350px; }
}

The above alters one row to show 2 rows on tablets and 1 on phones.

Like I said, the css has been added to 3.0 to handle all tables within Zen Cart without altering any PHP files, just finding the time to package and submit.

Not sure if this helps at all though!

DivaVocals:

I'll add that to the list.. Planning on submitting the responsive version of SNAF to the downloads.. wanna make sure I fully tweak (and frankly remove) some of the inline styling that gave me fits when trying to configure the rows view..

13 Jan 2015, 2:43 PM
#248
divavocals avatar

divavocals

Totally Zenned

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

Post #248 by divavocals

rbarbour:

I hate to say this cause quite frankly I am not sure when I will have time but version 3.0 of the Responsive DIY Template Default for 1.5.x that I will be uploading solves many of the table display issues when it comes to responsive designs.

Tables are responsive to begin with and will resize until the content within doesn't allow them to anymore.

I use a highly altered version of SNAF in my whiteCherries responsive template. Using only CSS to change display of rows as window gets smaller.

And is the v3.0 of the Responsive DIY Template Default going to include this highly altered version of SNAF?? Alternatively could you share your altered version of SNAF.. I would be curious to see and compare to the altered version I am using..

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.

13 Jan 2015, 9:27 PM
#249
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Post #249 by rbarbour

DivaVocals:

And is the v3.0 of the Responsive DIY Template Default going to include this highly altered version of SNAF??

No, the Responsive DIY Template Default will remain free of plugins, it will include the CSS to handle zen-cart tables including CSS to handle all 3 grid plugins.

DivaVocals:

Alternatively could you share your altered version of SNAF.. I would be curious to see and compare to the altered version I am using..

I can send via email for your eyes only, this version of SNAF will only be offered and bundled with my premium responsive templates.

13 Jan 2015, 10:08 PM
#250
divavocals avatar

divavocals

Totally Zenned

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

Post #250 by divavocals

rbarbour:

No, the Responsive DIY Template Default will remain free of plugins, it will include the CSS to handle zen-cart tables including CSS to handle all 3 grid plugins.Fantastic on the "free of plugins" stance!!! Makes it MUCH easier for one to "roll your own" and bundle in what you want..

I take it that when you say "handle all 3 grid plugins", you are including SNAF amongst the three??? Because if that's the case there's no need for me to submit my tableless version of SNAF at all, and I'll keep it exclusive for my clients..

One question.. does your CSS address the rows view in SNAF?? because the SNAF code has a GREAT DEAL of inline hard coded CSS (off the top of my head, I'm not sure if this is from SNAF or from core Zen Cart files) that I personally found to be difficult to work around.. If you've got that all worked out that would be FANTASTIC..

rbarbour:

I can send via email for your eyes only, this version of SNAF will only be offered and bundled with my premium responsive templates.

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.

14 Jan 2015, 12:14 AM
#251
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Post #251 by rbarbour

DivaVocals:

Fantastic on the "free of plugins" stance!!! Makes it MUCH easier for one to "roll your own" and bundle in what you want..

I take it that when you say "handle all 3 grid plugins", you are including SNAF amongst the three??? Because if that's the case there's no need for me to submit my tableless version of SNAF at all, and I'll keep it exclusive for my clients..

I still think the Responsive DIY Template Default is being used to convert existing templates and want to keep it that way, anyone wanting FREE premium Responsive templates with plugins included can download via the zen-cart plugins section and will have a great and improving selection by Anne @ picaflor-azul.

It will include the CSS for the following:
1 - Column Layout Grid for Product Listing
2 - Flexible Product Listing
3 - SNAF

I still think you should submit your table-less version for I do not remove the tables but alter their layout via CSS.

DivaVocals:

One question.. does your CSS address the rows view in SNAF?? because the SNAF code has a GREAT DEAL of inline hard coded CSS (off the top of my head, I'm not sure if this is from SNAF or from core Zen Cart files) that I personally found to be difficult to work around.. If you've got that all worked out that would be FANTASTIC..

From my personal experience with SNAF and I use it allot, there is no inline hard coded styling. in /includes/modules/YOUR_TEMPLATE_NAME/product_listing.php every row column created by setting sort order in ADMIN adds an align class to the table TD so in that file find $lc_align = 'right'; directly under the PHP switch and leave the string empty to remove the inline TD align.

On that note I do believe both the ROW and COLUMN view in SNAF use the tabular output (tables). So YES, the CSS being added address both views without altering the PHP files.

14 Jan 2015, 3:04 AM
#252
divavocals avatar

divavocals

Totally Zenned

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

Post #252 by divavocals

rbarbour:

I still think the Responsive DIY Template Default is being used to convert existing templates and want to keep it that way, anyone wanting FREE premium Responsive templates with plugins included can download via the zen-cart plugins section and will have a great and improving selection by Anne @ picaflor-azul.

It will include the CSS for the following:
1 - Column Layout Grid for Product Listing
2 - Flexible Product Listing
3 - SNAF

I still think you should submit your table-less version for I do not remove the tables but alter their layout via CSS.

From my personal experience with SNAF and I use it allot, there is no inline hard coded styling. in /includes/modules/YOUR_TEMPLATE_NAME/product_listing.php every row column created by setting sort order in ADMIN adds an align class to the table TD so in that file find $lc_align = 'right'; directly under the PHP switch and leave the string empty to remove the inline TD align.

On that note I do believe both the ROW and COLUMN view in SNAF use the tabular output (tables). So YES, the CSS being added address both views without altering the PHP files.SNAF is the ONLY grid layout I use, and consider it a must install on every new store.. that align class stuff is exactly what I am referring to.. it is hardcoded in the file.. That is hard coded styling in my opinion, and I found it most troublesome when switching to the rows view.. once I removed the 'right', it let my styleshet determine the row layout without a bunch of "!important" stuff in my CSS.

Looking forward to your default template release.. I found it useful for "rolling my own", and it just gets better with each new release..

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.

14 Jan 2015, 1:54 PM
#253
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,024
Plugin Contributions:
2

Post #253 by dw08gm

rbarbour:

I use a highly altered version of SNAF in my whiteCherries responsive template.

Nice. Would be even nicer if zcadditions.com/index came out of "Down for Maintenance" and displayed link to whitecherries.

cheers

14 Jan 2015, 3:53 PM
#254
lat9 avatar

lat9

Administrator

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

Post #254 by lat9

dw08gm:

Nice. Would be even nicer if zcadditions.com/index came out of "Down for Maintenance" and displayed link to whitecherries.

cheers
Amen to that!

15 Jan 2015, 1:35 AM
#255
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Post #255 by rbarbour

DivaVocals:

SNAF is the ONLY grid layout I use, and consider it a must install on every new store.. that align class stuff is exactly what I am referring to.. it is hardcoded in the file.. That is hard coded styling in my opinion, and I found it most troublesome when switching to the rows view.. once I removed the 'right', it let my styleshet determine the row layout without a bunch of "!important" stuff in my CSS.

You are correct and right about it being hard-coded in that file but that is transferred from zen core code and was not added to SNAF.

DivaVocals:

Looking forward to your default template release.. I found it useful for "rolling my own", and it just gets better with each new release..

Thank you and that's the idea!

15 Jan 2015, 1:38 AM
#256
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Post #256 by rbarbour

dw08gm:

Nice. Would be even nicer if zcadditions.com/index came out of "Down for Maintenance" and displayed link to whitecherries.

cheers

Very Soon!

lat9:

Amen to that!

Cindy,

The bugs and admin configs are complete, I'll be packaging this weekend!

15 Jan 2015, 2:18 AM
#257
divavocals avatar

divavocals

Totally Zenned

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

Post #257 by divavocals

rbarbour:

You are correct and right about it being hard-coded in that file but that is transferred from zen core code and was not added to SNAF.Yep.. It is stock Zen Cart.. I wasn't sure and at the time of my post, I was typing on a tiny device so I couldn't check. To be honest there's a LOT or hardcoded styling in Zen Cart's code, but I know much of it is leftover from it's osCommerce roots..

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.

15 Jan 2015, 1:27 PM
#258
lat9 avatar

lat9

Administrator

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

Post #258 by lat9

rbarbour:

Very Soon!

Cindy,

The bugs and admin configs are complete, I'll be packaging this weekend!
Woo-hoo! I'm looking forward to the release.

18 Feb 2016, 2:16 AM
#260
hubert avatar

hubert

Zen Follower

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

Post #260 by hubert

Hello,

I'm installed SNAF 1.2 on 1.5.4 and it works as I want but now I would like to have the snaf column grid view on my homepage to have a grid of level 1 categories.

I'm quite sure it's just an include line to insert somewhere but I can't find it. Can someone give me a clue.

Thanks for your help

Hubert