Plugins

  • Posts: 93
  • Thank you received: 3
11 years 2 months ago #161721

-- url of the page with the problem -- : mywebsite.com/mypage
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 3.3
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Hi,
is there a place where all the current extra plugins are listed for download, in particular I need the custom_quantity plugin but cannot find it in the forum anywhere.

Thanks

Tony

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #161736

Hi Tony,
Here is the last version of the Hikashop custom_quantity plugin :

File Attachment:

File Name: hcb105eb.zip
File Size:1 KB


I thought this plugin was automatically installed through the the Hikashop install package.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 93
  • Thank you received: 3
11 years 2 months ago #161754

Hi,
I couldn't see it in the install any way I have altered what is there to suit what I want but I cannot figure out how to get one calculation to work,
I altered the code to use ordered_length instead of quantity which works great but I also added a new field ordered_cutouts which is a dropdown with umbers 1 to 10.. This is supposed to add £15*the dropdown quantity to the price so if a customer enters 1.5 in length and pick 2 from the dropdown the total would be X x 1.5 + (15*dropdown)

I added this line to the secondond function in the code but its ignoring it
$product->order_product_total_price_no_vat = $product->order_product_price*$quantity+($product->ordered_cutouts*15);
$product->order_product_total_price = ($product->order_product_price+$product->order_product_tax)*$quantity+(($product->ordered_cutouts*15)*1.2);;
}

Have I done something wrong here or is there a better way? you can see what I am trying to achieve here:
demo.battleva.co.uk/nextday/next-day-cub...-vanity-and-frontage

Thanks

Tony

Please Log in or Create an account to join the conversation.

  • Posts: 93
  • Thank you received: 3
11 years 2 months ago #161764

I have made a change ad left the length in as a variable and added the cutouts as an option.

The problem is that it calculates the length after adding the options to the price so they are not really option. How can I alter the plugin so that the length*price is calculated before the options are added on.

Thanks

Tony

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #161801

Hello,
I didn't totally understood your issue, so can you tell me how do you exactly want to edit your product quantity and price regarding the value of your 2 custom fields ?

Please Log in or Create an account to join the conversation.

  • Posts: 93
  • Thank you received: 3
11 years 2 months ago #161887

Hi,
The issue is that a customer can order any length he wants so with a length custom plugin at the point you add to cart it multiplies the price x length which is perfect but we also have an option which is number of cutouts these are £15 each . The problem is that the options field alters the price the moment you select so the price when you add to cart is (originsl price + options)* length. Whereas it should be (original price * length ) + options.

I dont mind changing the option to a custom field if necessary but i need to get the cutouts added to the price after the length calculation

Does this make sense?

Tony

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #161918

Hi,

So for your needs, you will have to edit the plugin in order to make the desired calculation.
It require good PHP knowledges, if you don't have this knwoledge you can ask to a third developer or post a request on the commercial jobs section of this forum.

Please Log in or Create an account to join the conversation.

  • Posts: 93
  • Thank you received: 3
11 years 2 months ago #162006

Hi
I have no problem editing the plugin, however, what i ned guidance on is what trigger or $order fields i would need recalculate on. ie how do i manipulate the original price

Tony

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #162080

Hi,

In the trigger "hikashop_product_price_for_quantity_in_cart" you will have to change the value of "$product->prices", you should find all the required informations in the $product object.

And for the trigger "hikashop_product_price_for_quantity_in_order" you have to change the value of "$product->order_product_total_price_no_vat" and "$product->order_product_total_price".

As you can see in the plugin these things are the only ones which are edited.

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum