Jump to content

Product details missing in cart summary


wp4all

Recommended Posts

Hi,

I need some help or more an idea how to solve this staff smarter.

In Germany we need to show the customer exactly for what they have to pay, therefore we must show him all information until he press the Button buy.

If this is the product 

image.png.d61866622509eb373e94b8d1ddb024b2.png

then on the next page before check out we need to show him again all information:

image.png.d32996ccc57090cb4ba529f494198c6c.png

As you can see on the "Starter SSD Hosting" product we have all information the "Basic SSD Hosting" miss all this information which is standard by WHMCS.

The first information was added by inline code 

 {if $product.productinfo.name=='Starter SSD Hosting'}
 {$LANG.mein_Tarif1}
 {/if}

and the $_Lang 

$_LANG['tarif1'] = "<strong>20 GB SSD</strong> Webspeicher<br /><strong>10 GB</strong> E-Mail Speicher<br /><strong>1 Domain inkl.</strong> (.de,.eu,.com,.net,.org,.info)<br /><strong>50</strong> E-Mail Konten<br /><strong>5 MySQL</strong> Datenbanken<br /><br /><strong><em>Fair-Use-Traffic-Flatrate</em></strong>";

So for every single product an override was needed.
This hack was from 2014 I guess there is an smarter way to get this information filled in dynamical or ?

Greetings Christian

Edited by wp4all
Link to comment
Share on other sites

Hi Christian,

50 minutes ago, wp4all said:

I need some help or more an idea how to solve this staff smarter.
In Germany we need to show the customer exactly for what they have to pay, therefore we must show him all information until he press the Button buy.
So for every single product an override was needed.
This hack was from 2014 I guess there is an smarter way to get this information filled in dynamical or ?

I hope it wasn't one of my threads! :)

the quick way to do it in 2018 (and probably back in 2014 too!) would be to use a Data Feed - that way, WHMCS is doing the work and pulling the current product description from the database... meaning that if you ever update the product description in WHMCS, it will be reflected automatically in the cart and you won't need to update a language string for every one of your products. :idea:

looking at your screenshots, it should just require changing...

{if $product.domain}
	<span class="item-domain">
		{$product.domain}														
	</span>
{/if}

to...

{if $product.domain}
	<span class="item-domain">
		{$product.domain}<br>
		<script language="javascript" src="/feeds/productsinfo.php?pid={$product.productinfo.pid}&get=description"></script>				
	</span>
{/if}

uA3Avn9.png41Q1Qce.png

the example above is using Feature Highlights in the product description, but you aren't using that option, so your output should be the same in both the opening cart page and viewcart. :idea:

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.

Guest
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...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated