Jump to content

need help in checkout with custom price


shueb

Recommended Posts

actually m calculating the percentage of the product price based on user input & i need to checkout with the calculated amount ,tried ,tried .....but was confused how it is transferring the price to the cart when we click on add to cart ........Thanks in advance...

Link to comment
Share on other sites

actually m working on rent module ...........i.e giving books for rent online....in product page i was able calculate rent based on product price ... & now i want to check out with calculated price ......................it's just like chegg.com ...can have look at

http://site.chegg.com/textbooks/harry-potter-and-the-sorcerer-s-stone-1st-edition-9780590353427-059035342x

 

whatever price user selects ....need to check out with that amount ....Thanks for reply

Link to comment
Share on other sites

there is a way to display two pricing for the same product. you may try using this.

 

go to catalog>attributes and group and create new attributes group e.g. status ( use your own word).

then add an attribute within this attribute group e.g. new.

then add another attribute within this same attribute group name it e.g. used

then you can go to the product page and go to the combinations tab.

 

do the pricing for this particular product both for the new and the used ones.

say, you have the new one at usd45.00

 

for the used one perhaps you have some reductions -reduce the price by, say, minus usd35.00 - in the display it will show the final pricing as usd10.00. ( here there is no percentage discount etc. by default. but you may want to change the coding)

on the front page you will be able to see a drop down menu with option new/used and if chosen the price shown will be in relation to the Status.

  • Like 1
Link to comment
Share on other sites

@halennoor

Hi halenoor , thanks for replying ... created groups & attributes ..can you please eloborate how do i assign values to new & used attributes ...if i want to assign product price to new den how do i do it........could you please write that particular piece of code.......Thanks..

Link to comment
Share on other sites

Catalog>attributes and group> + add attributes group

Name:Status

Public name:Status

Color Group: X

Save

 

Catalog>attributes and group> +add attributes

Name: New

Group: Status ( from drop down menu)

Save

 

Catalog>attributes and group> +add attributes

Name: Used

Group: Status ( from drop down menu)

Save

 

 

Go to Catalog> choose the product e.g. Harry Potter

go to Combinations tab

 

Group: Status (choose from drop down menu)

Attributes:New ( choose from drop down menu)

click Add

Impact on price : None (choose from drop down menu)

(Enter all the fields according to your own e.g. initial stocks etc)

Check the box next to "Make this the default combination for this product"

Add this combination

 

Group: Status (choose from drop down menu)

Attributes:Used ( choose from drop down menu)

click Add

Impact on price : Reduction of $ (tax excl.) or $ (tax incl.) final product price will be set to $ ??? (< put your price or reduction amount)

(Enter all the other fields according to your own e.g. initial stocks etc)

Add this combination

 

You will get two pricing on the front office where customer can choose either the used or the new book for their purchase and the relevant price will be added to the cart.

 

Hope it helps.

post-366824-0-17265800-1339261310_thumb.jpg

Edited by halennoor (see edit history)
Link to comment
Share on other sites

the module is not compatible with prestashop 1.4 as mentioned by the developer in the thread. there was a link for download which was available but couldn't find it. It seems it needs a lot of adjusting for it to work the way you wanted it. If you need the radio/check button badly you may have to consider the paid module which you can check the Add-ons section ( such as this one) you may ask Mike Kranzler for help on the recommended add-ons for your purpose.

Edited by halennoor (see edit history)
Link to comment
Share on other sites

@halennoor

Hi halennoor ..thanks for helping me .... is there any way to set discount based on product range ...there is an option for setting discount based on quantity but could not find for price range......

 

I haven't done much, but am glad if i hv been of help. But, I think this one may require creating a new topic on Discount based on Total Price. Check the forum as there may be some discussions already on this.

Link to comment
Share on other sites

On your requirement to have radio button instead of drop down menu there is a discussion here which seems working and I pasted the code here to make it easier.

 

Replace with the 1st code mentioned in the relevant part in your /themes/yourtheme/product.tpl .

 

<div id="attributes">
  {foreach from=$groups key=id_attribute_group item=group}
  {if $group.attributes|@count}
  <p>
	<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>
	{assign var="groupName" value="group_$id_attribute_group"}

{foreach from=$group.attributes key=id_attribute item=group_attribute}
	<label>
	  <input type="radio" name="{$groupName}" value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute}  checked="checked"{/if} id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};" title="{$group_attribute|escape:'htmlall':'UTF-8'}" />
	  {$group_attribute|escape:'htmlall':'UTF-8'}
	</label>
{/foreach}

  </p>
 {/if}
  {/foreach}
  </div>

 

and

 

Look into /themes/yourtheme/js/product.js and replace

$('div#attributes select').each(function(){
 choice.push($(this).val());
});

 

 

with

 

$('div#attributes input[type=radio]:checked').each(function(){
	choice.push($(this).val());
});

 

 

I tried it in prestashop v 1.4.7 using the default theme.

Edited by halennoor (see edit history)
Link to comment
Share on other sites

On your requirement to have radio button instead of drop down menu there is a discussion here which seems working and I pasted the code here to make it easier.

 

Replace with the 1st code mentioned in the relevant part in your /themes/yourtheme/product.tpl .

 

<div id="attributes">
  {foreach from=$groups key=id_attribute_group item=group}
  {if $group.attributes|@count}
  <p>
	<label for="group_{$id_attribute_group|intval}">{$group.name|escape:'htmlall':'UTF-8'} :</label>
	{assign var="groupName" value="group_$id_attribute_group"}

{foreach from=$group.attributes key=id_attribute item=group_attribute}
	<label>
	  <input type="radio" name="{$groupName}" value="{$id_attribute|intval}"{if (isset($smarty.get.$groupName) && $smarty.get.$groupName|intval == $id_attribute) || $group.default == $id_attribute}  checked="checked"{/if} id="group_{$id_attribute_group|intval}" onchange="javascript:findCombination();{if $colors|@count > 0}$('#wrapResetImages').show('slow');{/if};" title="{$group_attribute|escape:'htmlall':'UTF-8'}" />
	  {$group_attribute|escape:'htmlall':'UTF-8'}
	</label>
{/foreach}

  </p>
 {/if}
  {/foreach}
  </div>

 

and

 

Look into /themes/yourtheme/js/product.js and replace

$('div#attributes select').each(function(){
 choice.push($(this).val());
});

 

 

with

 

$('div#attributes input[type=radio]:checked').each(function(){
	choice.push($(this).val());
});

 

 

I tried it in prestashop v 1.4.7 using the default theme.

 

I use to code and use it in PS .1.4.8.2, using prestashop new theme (black&white). It works.

 

Peluang Bisnis&Franchise | Jual Sepatu-Sandal Kulit, Murah&Bagus

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...