X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   wishlist help (https://forum.x-cart.com/showthread.php?t=60984)

4ideas 09-23-2011 01:39 AM

wishlist help
 
I want to add the wishlist info in the OnePageCheckout page, but i don't know how to add it with the product list and other components.

I believe that i need to modify something in cart.php but don't know what.

Can anybody help me ?

totaltec 09-27-2011 08:21 PM

Re: wishlist help
 
Can you clarify what you are looking to do?

You can use webmaster mode to determine what variables are assigned to your session at the moment, visit the cart page with it enabled to see what is assigned. To install this mod you will need to track down every instance of the wishlist and figure out what makes it tick.

Describe your issue further and I will help you. Provide links and descriptions of what you want and where it should appear.

4ideas 09-27-2011 10:41 PM

Re: wishlist help
 
My task is simple to put the wishlist in the checkout page. But i dont know how to modify the cart.php to initialize the wishlist in the checkout page.

The reason i want to do that is that i modified the wishlist to act as a "ask for offer" module. The customor adds to it and it sends a mail to the shop for a price offer.

totaltec 09-28-2011 05:57 AM

Re: wishlist help
 
Okay I have done some research. Looking at webmaster mode, on the wishlist page, I see the array that holds the wishlist is assigned to this variable: {$wl_products} try searching through cart.php for variations of mode=wishlist and $wl_products. That should put you on the right track at least.

When mode=checkout, I don't think I saw this variable initialized in webmaster mode, but you should double check for yourself. Our task is to get this variable initialized and populated with the data when mode=checkout. Now at least we have a goal, and it has a name. :)

Let me know how far this gets you, and we will work further on it if necessary. BTW sounds like a cool mod you are doing, and a very creative way to use existing functionality! kudos.

4ideas 09-28-2011 06:06 AM

Re: wishlist help
 
i found the $wl_products array from the wishlist view. I tried initializing this variable in checkout but i was unable to find the code that does it. Im getting stuck in the cart.php logistics ... :(

totaltec 09-28-2011 06:30 AM

Re: wishlist help
 
Hopefully I can shed some light. I have had projects where I have completely rewired cart.php, but it has changed since then.

see this?
Code:

include $xcart_dir . '/modules/Wishlist/wishlist.php';
Skimming through cart.php, it looks like things are "settling down" around line 591. This might be a good area to look at poking your code in.
Start experimenting! what happens if you simply include the wishlist.php down there?

If that fails crack open wishlist.php and see how it generates the variable array. Try simply copy pasting this code in and assigning the variable. PHP is not rocket science, but it is hard to get started with it if you are new. The best way to learn I have found, is to experiment.

Another file to look in: include/func/func.cart.php

I got lots of hits for "wishlist" from that file. I won't code this for you for free, but I will certainly help you to do it! The more you analyze what is happening in the logic, the better overall understanding you will have. Don't discount sections of the code because they don't apply to what you are doing, try to read and understand them as best you can. Sooner or later you will start connecting the dots and having "aha" moments. :)

4ideas 09-30-2011 02:05 AM

Re: wishlist help
 
After 3 days of hard work i've got it !!!! :)

totaltec 09-30-2011 02:08 AM

Re: wishlist help
 
Congrats! That's always a great feeling.

4ideas 09-30-2011 06:36 AM

Re: wishlist help
 
1 question can i concatenate the 2 buttons ? the sent button from the wishlist and the checkout button ?


All times are GMT -8. The time now is 05:34 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.