Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help! adding to wishlist adds to cart


mattmcau

Recommended Posts

Hi

 

Thanks for this wishlist contribution - looks great.

 

I have had a prob with the install in MS2

 

Had the common'ish Phase prob others reported - fixed it.

 

But when I click on "add to wishlist" it adds the item to the shopping cart and not to the wishlist.

 

The Database table to create OK.

 

Any Ideas?????

Link to comment
Share on other sites

The support thread for this mod pointed me in the right direction- I had to make sure to put this snippet after the /form section for the add to cart but for some reason I couldn't get it to work on the same line so it ended up like this:

 

?></td>

                <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>

                <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

              </tr>

            </table></td>

          </tr>

        </table></td>

      </tr>

      <tr>

        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

      </tr>

</tr>

        <td>

<?php

//added for cross -sell

  if ( (USE_CACHE == 'true') && !SID) {

    echo tep_cache_also_purchased(3600);

    include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

  } else {

    include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

    }

  }

?>

        </td>

     

    </form></td></tr>

<tr>

 

<td align="center" class="main"><?php echo tep_draw_form('wishlist_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_wishlist')); ?>

          <?php if (tep_session_is_registered('customer_id')) echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_wishlist.gif', IMAGE_BUTTON_ADD_WISHLIST); ?></form>

                </td>

      </tr></table>

 

<!-- body_text_eof //-->

 

Just remember that I also added the cross sell mod into mine (so you'll have to make allowances for that coding if you don't have it) and there's somewhere else- can't recall where but it's a different php- that needs a closing /form in it too.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...