Results 1 to 10 of 15

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Download links not showing all the time...

    Quote Originally Posted by thysm00 View Post
    But sometimes, it just misses the Download URL and Download 2 URL lines and it looks like this, i fount that when the email looks like this, the links are not present in the user account as if the product had no attributes:

    Products
    ------------------------------------------------------
    1 x Kontr V3 = €5
    ------------------------------------------------------
    Sub-Total: €5
    Download only ( ): €0
    Total: €5
    That's symptomatic of the customer not selecting the attributes before clicking Add-to-cart.
    Merely hiding attribute choices via css doesn't absolutely prevent the customer from unchecking options that can be unchecked.

    So, if you've set up your options using checkboxes and/or haven't set each to be auto-selected as default, it's not surprising that you're having the problems you describe.

    Additionally, if you've copied add-to-cart links for your products and pasted them someplace else on your site to attempt to allow add-to-cart operations from other places on your site, it's possible that those links are causing you problems since they won't include any download attribute details in the links.

    Quote Originally Posted by thysm00 View Post
    This is when the client does not get his download links
    Naturally.
    .

    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. #2
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Download links not showing all the time...

    Ok thanks, i think i understand, but where can i set this default value?
    About the links, i did not change anything i'm just setting the add to cart button in an absolute positionned div in order to have it on top of the description, but in the all products page, yep, i copied a link... so that might be it... how do you create a proper link with attributes?

    Thanks again for helping me out!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Download links not showing all the time...

    Quote Originally Posted by thysm00 View Post
    yep, i copied a link... so that might be it... how do you create a proper link with attributes?
    With attributes, it's always best to link to the product page, and NOT to an add-to-cart or buy-now button.
    .

    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.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Download links not showing all the time...

    Quote Originally Posted by thysm00 View Post
    i think i understand, but where can i set this default value?
    As explained in the FAQ article on setting up attributes and downloads, in the Attributes Controller there are several colored buttons to let you select various options for each attribute.
    .

    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.

  5. #5
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Download links not showing all the time...

    Ok thanks a lot for all of your explanations!

    In fact you were right! I just tested it and buying something from a copied link doesn't add attributes at all... But as i sometimes get orders with no links, that means people use the feature... i'll try to find something that adds the attributes in the link or maybe i'll use a form.

    Thanks again!

  6. #6
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Download links not showing all the time...

    Ok, i got it to work in the all_products page.

    If that interests somebody, here is my (not perfect, but working ) code that has to go in line 107 of the tpl_modules_products_all_listing.php file located in your template :
    PHP Code:
          if (PRODUCT_ALL_LIST_DESCRIPTION '0') {
              
              
    $link2 '<form name="cart_quantity" action="index.php?main_page=product_info&amp;products_id=' $products_all->fields['products_id'] . '&amp;action=add_product" method="post" enctype="multipart/form-data">';
              
    $link2 .= '<input type="hidden" name="cart_quantity" value="1" />';
            
    $link2 .= '<input type="hidden" name="products_id" value="' $products_all->fields['products_id'] . '" />';
            
            
    $sqllink2 "SELECT  options_id ,  options_values_id FROM  products_attributes WHERE products_id =  " $products_all->fields['products_id'];
            
    $resultlink2 mysql_query($sqllink2) or die ('Erreur '.$sqllink2.' '.mysql_error());
            while (
    $ligne mysql_fetch_assoc($resultlink2)) {
                
    $link2 .= '<input type="hidden" name="id[' $ligne[options_values_id] . ']" value="'.$ligne[options_values_id].'" checked="checked" id="attrib-'.$ligne[options_values_id].'-'.$ligne[options_values_id].'" />';
            }

            
    $link2 .= '<input type="image" src="includes/templates/classic/buttons/english/button_buy_now.png" alt="Add to Cart" title=" Add to Cart " />';       
            
    $link2 .= '</form>';
          
            
    $disp_text zen_get_products_description($products_all->fields['products_id']);
            
    $disp_text zen_clean_html($disp_text);

            
    $display_products_description stripslashes(zen_trunc_string($disp_textPRODUCT_ALL_LIST_DESCRIPTION'<a href="' zen_href_link(zen_get_info_page($products_all->fields['products_id']), 'cPath=' zen_get_generated_category_path_rev($products_all->fields['master_categories_id']) . '&products_id=' $products_all->fields['products_id']) . '"> ' MORE_INFO_TEXT '</a><br><br>' $link2));
          } 
    It should add a buy now button and retreive and force auto-selecting of ALL the attributes for each product.
    Hope that will help somebody.

    Arno
    Last edited by thysm00; 9 Feb 2010 at 05:59 PM.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Download links not showing all the time...

    A very important caveat / limitation to note: What you've shown above will FORCE the buy-now button to add ALL attributes to the cart when the product is added. Thus, the customer is NOT offered the option of deselecting any options.
    While in *your* particular case that is what you wanted, it may NOT be the case for most other folks.
    Also, it wouldn't surprise me that the "cart_quantity" form-name will throw HTML validation errors since you're duplicating the same form multiple times on the page. That might even cause functional problems beyond just validation matters.

    So ... use at own risk.
    .

    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.

  8. #8
    Join Date
    May 2009
    Posts
    30
    Plugin Contributions
    0

    Default Re: Download links not showing all the time...

    Yep that's true...
    I'll name the forms differently. And also with a litle tweaking (letting input type="radio" instead of "hidden" and adding the name of the attribute next to it) anyone should be able to use the feature.

    Bt yeah, use at your own risk I'm not really a php guru, i just do what i need, and obviously make a lot of mistakes

 

 

Similar Threads

  1. Download attributes not present all the time...
    By thysm00 in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2010, 08:17 PM
  2. Images not showing all the time
    By rternier in forum General Questions
    Replies: 4
    Last Post: 22 Aug 2008, 03:20 PM
  3. HTTPS Not Showing All the Time in Admin
    By Griff1324 in forum General Questions
    Replies: 3
    Last Post: 3 Aug 2008, 10:40 AM
  4. Bestsellers sidebox not showing all bestsellers all the time
    By Heather88 in forum Basic Configuration
    Replies: 4
    Last Post: 7 Jul 2008, 12:50 AM
  5. showing all categories(top & sub) in sidebox all the time
    By meocanada in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2008, 12:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg