| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Show qualified special offers (outside of the cart) | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Hi,
I'm wondering if there's a way to use the Special Offers module to show only offers that the visitor is currently qualified for. This is possible on the cart, but I am hoping to achieve this outside of the cart and unfortunately the data seems inaccessible. Any ideas?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() You probably have to grab the same code the cart uses to determine if it qualifies and use that.
|
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Yes, unfortunately it doesn't seem to be available outside of the cart though - do you know what I mean?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() The data is in the database. You need a php page that establishes a connection to the database and the code snippet that gets the data you are looking for. I would use the X-Cart auth and functions to help you connect and get the data. You could use something like home.php as an example.
|
|||||||||
#5
|
|||||||||
|
|||||||||
![]() You will have to find the code that calls special offers in cart.php and have same call on the page you want it to show so the offers array can be populated and pass to smarty
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() Thanks Steve. There's a link shown on offers.php that says 'Show offers for cart'
The content on that link (offers.php?mode=cart&offers_return_url=) is what I want to embed into the main page but I can't locate where that code is being generated in offers.php or customers_offers.php. Any chance I can get some advice on where that page is being put together? I think with that info I can figure out how to pull the code I need.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() Look in offers.php - it calls '/modules/Special_Offers/customer_offers.php' to build the list and show the template
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#8
|
|||||||||
|
|||||||||
![]() I think I'm getting somewhere. The code below is from cart_offers.tpl - including this file on content.tpl doesn't display anything on the home page, but it's still active when the cart is loaded and it outputs the current active special:
{if $products and $cart.have_offers and $cart.applied_offers} {capture name=dialog} {foreach name=offers from=$cart.applied_offers item=offer} {if $offer.promo_checkout ne ""} <div> {if $offer.html_checkout} {$offer.promo_checkout} {else} <tt>{$offer.promo_checkout|escape}</tt> {/if} </div> {if not $smarty.foreach.offers.last} <div><img src="{$ImagesDir}/spacer.gif" width="1" height="30" alt="" /></div> {/if} {/if} {/foreach} {/capture} {include file="customer/dialog.tpl" title=$lng.lbl_sp_offers_applied_to_cart content=$smarty.capture.dialog} {/if} The part I don't know how to do is to get the system to recognize $cart on the non-cart pages of the site. Any ideas???
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#9
|
|||||||||
|
|||||||||
![]() See my previous post. The template receives from php and passes to html - just including the template doesn't mean it will show the info - that info has to be build first and come from somewhere and that is the php script
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() I've found that in modules/Special_Offers/init.php the cart variable seems to be 'registered':
x_session_register('offer_products_priority'); x_session_register('cart'); and so I included tried loading the init.php on home.php and then called cart_offers.tpl to load on content.tpl (even tried removing the if statement) but still no luck. I'm afraid this one seems above my head. Has anyone out there been able to achieve this?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|